The TrustBloc Wallet SDK repo contains APIs to receive and present W3C Verifiable Credentials(VCs) signed using W3C Decentralized Identifiers(DIDs). These APIs are useful for the holder role defined in the W3C VC Specification.
The project contains the following source code components and build scripts for SDKs.
- Go SDK
- Build native Go applications using the core pkg.
- Android and iOS SDK
- A gomobile-compatible Go SDK
- For generating gomobile-compatible bindings (see below).
- To jump straight to usage documentation, see here.
- Scripts to generate Android and iOS-compatible bindings
- Allows the Go SDK to be used in an Android or iOS app.
- A gomobile-compatible Go SDK
The repo also has code to generate a Reference iOS and Android built using the Flutter framework.
The TrustBloc Wallet SDK implements following specifications.
- W3C Verifiable Credential Data Model (VCDM)
- W3C Decentralized Identifier (DID)
- OIDF OpenID for Verifiable Credential Issuance
- Pre Authorization Code flow
- Authorization Code low
- OIDF OpenID for Verifiable Presentation
- DIF Presentation Exchange
- DIF Well Known DID Configuration
The Wallet SDK Android package is available on GitHub Maven Repository. Please refer wallet-sdk maven packages for the latest releases.
<dependency>
<groupId>dev.trustbloc</groupId>
<artifactId>vc-wallet-sdk</artifactId>
<version>1.0.0</version>
</dependency>
Refer here for using the android package in your project.
Add the following GitHub maven repository to dependencyResolutionManagement.repositories
maven {
url = $URL
credentials {
username = $GITHUB_USER
password = $GITHUB_TOKEN
}
}
Use the following URL based on snapshot or release dependency: RELEASE_REPO_URL=https://maven.pkg.github.com/trustbloc/wallet-sdk
The Wallet SDK iOS xcframework packages are distributed through Swift Package Manager (SPM). Please refer
wallet-sdk tags with the suffix -swift-pm
(e.g., 1.0.0-swift-pm
) for the
latest releases.
The Go SDK is defined in pkg. If you want to build a native Go application, then this is what you'd use.
The gomobile
-compatible version of the aforementioned Go SDK is defined in cmd/wallet-sdk-gomobile. It's similar to the Go SDK, except that the various functions, methods, and interfaces only use a subset of Go types that are compatible with the gomobile
tool. The gomobile
-compatible SDK generally acts as a wrapper for the Go SDK. Internally, it converts between the gomobile
-compatible types and the types used by the Go SDK as needed.
Thank you for your interest in contributing. Please see our community contribution guidelines for more information.
Apache License, Version 2.0 (Apache-2.0). See the LICENSE file.