Releases: trustbloc/wallet-sdk
1.0.0-rc4-swift-pm
New walletsdk version 1.0.0-rc4-swift-pm
1.0.0-rc4
1.0.0-rc4
What's New
- SDK
- New VC Status API for revocation check
- Support for Verifiable Credential (VC) JSON-LD format
- Fixes to Well-Known DID Configuration API
- Enable Tracing by default in Issuance and Presentation flow with option to disable
- SDK API refactoring to follow common API patterns
- Reference App
- Support to display VC Revocation Status
- Support to display Issuer /Verifier Domain and DID validation
- Support to select DID method and key type
Breaking Changes
The examples don't show any optional parameters being used. The optional parameters are passed in via the last argument of a function or method.
Note: for Objective-C/Swift functions that return an error, the optional parameters struct will be the second last parameter, since the last parameter is always used for the error return.
In the examples below, it's always null/nil, indicating that default options should be used. See the usage documentation
for more information.
Credential Parsing
Kotlin (Before)
import dev.trustbloc.wallet.sdk.api.*
import dev.trustbloc.wallet.sdk.credential.*
val vc = Vcparse.parse("Serialized VC goes here", null)
Kotlin (After)
import dev.trustbloc.wallet.sdk.verifiable.Verifiable
val vc = Verifiable.parseCredential("Serialized VC goes here", null)
Swift (Before)
import Walletsdk
var error: NSError?
let vc = VcparseParse("VC JSON goes here", nil, &error)
Swift (After)
import Walletsdk
var error: NSError?
let vc = VerifiableParseCredential("Serialized VC goes here", nil, &error)
DID Resolver
Kotlin (Before)
import dev.trustbloc.wallet.sdk.did.*
val didResolver = did.Resolver("")
val didDoc = didResolver.resolve("did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK")
Kotlin (After)
import dev.trustbloc.wallet.sdk.did.*
val didResolver = did.Resolver(null)
val didDoc = didResolver.resolve("did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK")
Swift (Before)
import Walletsdk
var error: NSError?
let didResolver = DidNewResolver("", &error)
let didDoc = didResolver.resolve("did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK")
Swift (After)
import Walletsdk
var error: NSError?
let didResolver = DidNewResolver(&error)
let didDoc = didResolver.resolve("did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK")
OpenID4CI
Kotlin (Before)
import dev.trustbloc.wallet.sdk.localkms.Localkms
import dev.trustbloc.wallet.sdk.localkms.MemKMSStore
import dev.trustbloc.wallet.sdk.did.Resolver
import dev.trustbloc.wallet.sdk.did.Creator
import dev.trustbloc.wallet.sdk.openid4ci.Interaction
import dev.trustbloc.wallet.sdk.openid4ci.ClientConfig
import dev.trustbloc.wallet.sdk.openid4ci.CredentialRequestOpts
import dev.trustbloc.wallet.sdk.openid4ci.mem
// Setup
val memKMSStore = MemKMSStore.MemKMSStore()
val kms = Localkms.newKMS(memKMSStore)
val didResolver = Resolver("")
val didCreator = Creator(kms as KeyWriter)
val didDocResolution = didCreator.create("key", CreateDIDOpts()) // Create a did:key doc
val cfg = ClientConfig("ClientID", kms.crypto, didResolver, null)
// Going through the flow
val interaction = Interaction("YourRequestURIHere", cfg)
interaction.authorize() // Check this to determine whether a PIN is needed or not
val userPIN = "1234"
val requestCredentialOpts = CredentialRequestOpts(userPIN)
val credentials = interaction.requestCredential(requestCredentialOpts, didDocResolution.assertionMethod()) // Should probably store these somewhere
val issuerURI = interaction.issuerURI() // Optional (but useful)
Kotlin (After)
import dev.trustbloc.wallet.sdk.localkms.Localkms
import dev.trustbloc.wallet.sdk.localkms.MemKMSStore
import dev.trustbloc.wallet.sdk.did.Resolver
import dev.trustbloc.wallet.sdk.did.Creator
import dev.trustbloc.wallet.sdk.openid4ci.*
import dev.trustbloc.wallet.sdk.openid4ci.Opts
import dev.trustbloc.wallet.sdk.verifiable.CredentialsArray
// Setup
val memKMSStore = MemKMSStore.MemKMSStore()
val kms = Localkms.newKMS(memKMSStore)
val didResolver = Resolver(null)
val didCreator = Creator(kms as KeyWriter)
val didDocResolution = didCreator.create("key", null) // Create a did:key doc
// Going through the flow
val args = Args("YourRequestURIHere", "ClientID", kms.getCrypto(), didResolver)
val interaction = Interaction(args, null)
val result = interaction.authorize()
val credentials: CredentialsArray
if (result.UserPINRequired) {
credentials = interaction.requestCredentialWithPIN(didVerificationMethod, "1234")
} else {
credentials = interaction.requestCredential(didDocResolution.assertionMethod())
}
val issuerURI = interaction.issuerURI() // Optional (but useful)
Swift (Before)
import Walletsdk
// Setup
let memKMSStore = LocalkmsNewMemKMSStore()
var newKMSError: NSError?
let kms = LocalkmsNewKMS(memKMSStore, &newKMSError)
let didResolver = DidNewResolver("", nil)
var newDIDCreatorError: NSError?
let didCreator = DidNewCreator(kms, &newDIDCreatorError)
let didDocResolution = didCreator.create("key", nil) // Create a did:key doc
let cfg = Openid4ciClientConfig(didDocResolution.id, clientID: "ClientID", didRes: didResolver, activityLogger: nil)
// Going through the flow
var newInteractionError: NSError?
let interaction = Openid4ciNewInteraction("YourRequestURIHere", cfg, &newInteractionError)
interaction.authorize() // Check returned object to see whether a PIN is needed or not
let userPIN = "1234"
let requestCredentialOpts = Openid4ciNewCredentialRequestOpts(userPIN)
let credentials = interaction.requestCredential(requestCredentialOpts, didDocResolution.assertionMethod()) // Should probably store these somewhere
let issuerURI = interaction.issuerURI() // Optional (but useful)
Swift (After)
import Walletsdk
// Setup
let memKMSStore = LocalkmsNewMemKMSStore()
var newKMSError: NSError?
let kms = LocalkmsNewKMS(memKMSStore, &newKMSError)
let didResolver = DidNewResolver(nil)
var newDIDCreatorError: NSError?
let didCreator = DidNewCreator(kms, &newDIDCreatorError)
let didDocResolution = didCreator.create("key", nil) // Create a did:key doc with default options
// Going through the flow
let args = Openid4ciNewArgs("YourRequestURIHere", "ClientID", kms.getCrypto(), didResolver)
var newInteractionError: NSError?
let interaction = Openid4ciNewInteraction(args, nil, &newInteractionError)
let result = interaction.authorize()
var credentials: VerifiableCredentialsArray
if result.UserPINRequired {
credentials = interaction.requestCredential(withPIN: didDocResolution.assertionMethod(), pin:"1234")
} else {
credentials = interaction.requestCredential(didDocResolution.assertionMethod())
}
let issuerURI = interaction.issuerURI() // Optional (but useful)
Credential Display Data
Kotlin (Before)
import dev.trustbloc.wallet.sdk.api.VerifiableCredentialsArray
import dev.trustbloc.wallet.sdk.display.*
val vcArray = VerifiableCredentialsArray()
vcArray.add(yourVCHere)
val resolveOpts = ResolveOpts(vcCredentials, "Issuer_URI_Goes_Here")
val displayData = Display.resolve(resolveOpts)
Kotlin (After)
import dev.trustbloc.wallet.sdk.display.*
import dev.trustbloc.wallet.sdk.verifiable.CredentialsArray
val vcArray = CredentialsArray()
vcArray.add(yourVCHere)
val displayData = Display.resolve(vcArray, "Issuer_URI_Goes_Here", null)
Swift (Before)
import Walletsdk
let vcArray = ApiVerifiableCredentialsArray()
vcArray.add(yourVCHere)
let resolveOpts = DisplayNewResolveOpts(vcArray, "Issuer_URI_Goes_Here")
var error: NSError?
let displayData = DisplayResolve(vcArray, "Issuer_URI_Goes_Here", &error)
Swift (After)
import Walletsdk
let vcArray = VerifiableCredentialsArray()
vcArray.add(yourVCHere)
var error: NSError?
let displayData = DisplayResolve(vcArray, "Issuer_URI_Goes_Here", nil, &error)
OpenID4VP
Kotlin (Before)
import dev.trustbloc.wallet.sdk.localkms.Localkms
import dev.trustbloc.wallet.sdk.localkms.MemKMSStore
import dev.trustbloc.wallet.sdk.did.Resolver
import dev.trustbloc.wallet.sdk.did.Creator
import dev.trustbloc.wallet.sdk.ld.DocLoader
import dev.trustbloc.wallet.sdk.localkms
import dev.trustbloc.wallet.sdk.openid4vp
import dev.trustbloc.wallet.sdk.ld
import dev.trustbloc.wallet.sdk.credential
import dev.trustbloc.wallet.sdk.openid4vp.ClientConfig
import dev.trustbloc.wallet.sdk.openid4vp.Interaction
// Setup
val memKMSStore = MemKMSStore.MemKMSStore()
val kms = Localkms.newKMS(memKMSStore)
val didResolver = Resolver("")
val didCreator = Creator(kms as KeyWriter)
val documentLoader = DocLoader()
val cfg = ClientConfig(kms, kms.getCrypto(), didResolver, documentLoader, null)
// Going through the flow
val interaction = openid4vp.Interaction("YourAuthRequestURIHere", cfg)
val query = interaction.getQuery()
val inquirer = credential.Inquirer(docLoader)
val savedCredentials = api.VerifiableCredentialsArray() // Would need some actual credentials for this to actually work
// Use this code to display the list of VCs to select which of them to send.
val matchedRequirements = inquirer.getSubmissionRequirements(query, savedCredentials)
val matchedRequirement = matchedRequirements.atIndex(0) // Usually we will have one requirement
val requirementDesc = matchedReq...
1.0.0-rc3-swift-pm
New walletsdk version 1.0.0-rc3-swift-pm
1.0.0-rc3
1.0.0-rc3
What's New
- SDK
- New SDK Build Version API to get the SDK version, git revision and build time at runtime (Kotlin Ref and Swift Reference)
- Enhancements to display APIs to send masked/unmasked values for date fields
- Support to inject custom HTTP Headers to add tracing/debugging information
- Reference App
- Support for Dev mode
- Support to show the version
- Support to show masked/unmasked claims
- Fix to show the credential logo
Breaking Changes
No Breaking API changes
What's Changed
- fix(sdk): Switch remote server calls in unit test to local mock server by @DRK3 in #322
- test(app): added health checks for docker containers by @birtony in #320
- docs(sdk): Add error codes and troubleshooting tips by @DRK3 in #324
- feat(sdk): build versioning api by @vkubiv in #323
- fix(app): Refactor flutter logic to the sdk display api by @talwinder50 in #325
- docs(sdk): VC, mobile bindings best practices, update packages list by @DRK3 in #329
- docs(app): Add structure to documentation along with minor edits by @rolsonquadras in #328
- refactor(sdk): integration test to make them more reusable. by @vkubiv in #331
- fix(app): Add masking / unmasking feature by @talwinder50 in #330
- feat(sdk): Update error handling when requesting credential from issuer by @DRK3 in #327
- fix(app): Fix the missing arrow in the credential preview by @talwinder50 in #332
- feat(sdk): Support for latest masking format by @DRK3 in #334
- fix(app): Fix ordering and loading issue by @talwinder50 in #333
- fix(app): Add support for dev mode in the app by @talwinder50 in #336
- fix(app): Update kotlin plugin with latest changes by @talwinder50 in #341
- refactor(sdk): refactor http client usage in openid4ci by @vkubiv in #337
- fix(app): Credential Logo image width and height by @talwinder50 in #345
- refactor(app): Add the error page when no credentials are used in vp flow by @talwinder50 in #338
- feat(sdk): Support for custom HTTP header injection in CI and VP flows by @DRK3 in #335
- fix(app): Fix the setting username missing error by @talwinder50 in #346
- test(sdk): issuer profile with strict checks by @vkubiv in #344
- fix(app): Add the error handling for not matching cred found scenario by @talwinder50 in #347
- feat(sdk): credential status API by @Moopli in #343
Full Changelog: 1.0.0-rc2...1.0.0-rc3
1.0.0-rc2-swift-pm
New walletsdk version 1.0.0-rc2-swift-pm
1.0.0-rc2
1.0.0-rc2
What's New
- SDK
- Support for multiple credentials signed by different DIDs to avoid correlation
- Enhancements to display APIs to send masked/unmasked values along with order and rawID fields
- Reference App
- Support to display credential details based on the display order
- iOS integration tests to validate iOS SDK directly
Breaking Changes
- Presentation/Sharing flow API - Removal of Query API
// Before
val verifiablePres = inquirer.Query(query, credential.CredentialsOpt(selectedVCs))
interaction.presentCredential(verifiablePres)
// Now
interaction.presentCredential(selectedVCs)
What's Changed
- fix(app): Support to present multi credentials based on the input descriptors matched vc ids by @talwinder50 in #299
- fix(app): Remove createDID on login and invoke while requesting credential by @talwinder50 in #302
- ci(sdk): support to upload ios/android binding artifact by @rolsonquadras in #303
- feat(sdk): Ability to get name from VC by @DRK3 in #305
- feat(sdk): Support for resolving claim order by @DRK3 in #304
- test(app): ios integration test by @vkubiv in #307
- feat(sdk): Support for masking, raw ID, and pattern data in display by @DRK3 in #309
- chore(app): update description by @rolsonquadras in #308
- fix(sdk): display value by @rolsonquadras in #313
- fix(app): Use order field to have the data sorted by order by @talwinder50 in #314
- feat(sdk): openid4vp PresentCredential uses multi-presentation format by @Moopli in #306
- chore(app): Add documentation for building app locally by @talwinder50 in #315
- fix(sdk,app): Display value duplication in serialized form by @DRK3 in #316
- fix(sdk): continue using workaround for interop schema by @Moopli in #318
- feat(sdk): Update regex parsing by @DRK3 in #317
- feat(sdk): Support for nested claims by @DRK3 in #319
- docs(sdk): update doc date and commitID by @rolsonquadras in #321
Full Changelog: 1.0.0-rc1...1.0.0-rc2
1.0.0-rc1-swift-pm
New walletsdk version 1.0.0-rc1-swift-pm
1.0.0-rc1
The new version adds the following features to the TrustBloc Wallet SDK and Reference App, along with documentation updates.
- SDK
- The signing DID in the Presentation API is not required as SDK derives the signing DID from the Credential.
- Support for generating performance metrics
- Update to Resolve Display API
- Reference App
- iOS and Android plug-in code refactoring to break Wallet actions like Issuance and Presentation into different functions/files
- Android integration tests to validate Android SDK directly. This can be used as a direct reference to build an Android app.
What's Changed
- fix(app): Support jwk didMethod type in create did flow by @talwinder50 in #276
- docs(app): Add the comments to the plugin functions of ios and kotlin files by @talwinder50 in #277
- docs(sdk): remove duplicate section for DID Creation with Key Reader by @rolsonquadras in #278
- refactor(app): android flutter plugin by @vkubiv in #280
- feat(sdk): Mobile VC types, issuance date, and expiration date methods by @DRK3 in #281
- docs(sdk): Add best practices document by @DRK3 in #282
- refactor(sdk): Remove unused interface, update method comments by @DRK3 in #283
- fix(app): Update Credential screen to display Issuer theme by @talwinder50 in #286
- feat(sdk): VC claim types method by @DRK3 in #284
- docs(sdk): Add docs for wallet errors by @DRK3 in #285
- refactor(app): flutter plugin ios by @vkubiv in #287
- refactor(sdk): disabled JSON-LD checks for VP parsing by @birtony in #288
- fix(app): Theme fix for the presentation credential by @talwinder50 in #290
- fix(app): (Android) Add P-384 key suppport for did:jwk by @rolsonquadras in #291
- fix(app): Removing unused widget credential outline by @talwinder50 in #292
- fix(app): Android demo app compiler error by @DRK3 in #293
- feat(sdk): sign presentation using a VC subject DID by @Moopli in #289
- feat(app): android integration test by @vkubiv in #294
- feat(sdk)!: Metrics logging, ResolveDisplay refactor by @DRK3 in #279
- fix(app): android integration tests by @rolsonquadras in #295
- fix(app): Fix the did in the settings page by @talwinder50 in #296
- docs(sdk): Update resolve display docs, packages by @DRK3 in #297
- docs(sdk): OpenID4VP doc update by @rolsonquadras in #298
Full Changelog: 0.3.1...1.0.0-rc1
0.3.1-swift-pm
New walletsdk version 0.3.1-swift-pm
0.3.1
What's Changed
- fix(sdk): Fix issue in OpenID4CI unit test, remove unused JSON wrappers by @DRK3 in #273
- ci(sdk): Add Android release dependency for iOS by @rolsonquadras in #274
- chore(sdk): update aries-framework-go to v0.1.9 by @rolsonquadras in #275
Full Changelog: 0.3.0...0.3.1