Warning: These packages still is in very early development. Breaking changes without notice will happen at this point!
This is an SSI SDK based on the great work done by Veramo. The SDK is a mono-repository with multiple packages (see lerna below). It contains plugins that extend the Veramo framework:
- DIDs and Key management:
- factom: Factom DID creation (WIP)
- lto: LTO Network DID creation and Verification Methods
- Mnemonic Seed: Mnemonic Seed and Key Derivation
- Verifiable Credentials and Presentations:
- VC API Issuer: Issue VCs using the VC (HTTP) Api v0.1
- VC API Verifier: Verify VCs and VPs using the VC (HTTP) Api v0.1
- Json-LD VC handler: Issues and verifies JSON-LD based VCs and VPs
- OpenID Connect and Presentation Exchange:
- SIOPv2 and OIDC4VP: Self-Issued OpenID Connect and OpenID Connect for Verifiable Presentations
- WACI PEx QR code: Create QR codes for use with WACI PEx for React and React-Native
The core package contains types and methods shared by the other plugins
The core package for microsoft authentication using msal library.
The Factom Protocol DID Provider can create DIDs using the Factom Protocol.
The LTO Network DID Provider can create DIDs, as well as add and manage verification methods using LTO Network.
The Mnemonic Seed and Key Derivation handles generation and secure storage of Mnemonics, as well as the creation of a seed out of the mnemonic and the derivation of keys.
Azure Active Directory (Azure AD) Verifiable Credentials allows you to issue a credential. The Microsoft Verifiable Credential Issuer handles issuing a verifiable credential using issuer authentication info and issuer configuration.
The W3C VC (HTTP) API Issuer issues Verifiable Credentials using a W3C VC API spec based API (currently only supporting a v0.1 spec).
The W3C VC (HTTP) API Verifier is a verifies Verifiable Credentials using a W3C VC API spec based API (currently only supporting a v0.1 spec).
The JSON-LD VC/VP Handler handles issuance and verification of JSON-LD based Verifiable Credentials and Verifiable Presentations
The Self-Issued OpenID Connect and OpenID Connect for Verifiable Presentations plugin allows an OP to authenticate against a Relying Party using Self-Issued OpenID Connect and optionally OpenID Connect for Verifiable Presentations, with the help of our Presentation-Exchange library.
The waci-pex-qr-react is a generates a QR Code for the WACI Presentation Exchange specification in React or React-Native environments.
Note: DID resolution is not part of this SDK. We do provide a Universal DID client you can use in Veramo, simply by using the below code when setting up the Agent:
Using the Universal resolver for all DID methods:
export const agent = createAgent<IDIDManager & CredentialIssuerLD & IKeyManager & IDataStore & IDataStoreORM & IResolver>({
plugins: [
// Other plugins
new DIDResolverPlugin({
resolver: new UniResolver({ resolveURL: 'https://dev.uniresolver.io/1.0/identifiers' })
})
]
})
Using the Universal resolver for specific DID methods and DID-key:
export const agent = createAgent<IDIDManager & CredentialIssuerLD & IKeyManager & IDataStore & IDataStoreORM & IResolver>({
plugins: [
// Other plugins
new DIDResolverPlugin({
resolver: new Resolver({
...getDidKeyResolver(),
...getUniResolver('lto', { resolveUrl: 'https://uniresolver.test.sphereon.io/1.0/identifiers' }),
...getUniResolver('factom', { resolveUrl: 'https://dev.uniresolver.io/1.0/identifiers' }),
}),
}),
]
})
The SSI-SDK makes use of Lerna for managing multiple packages. Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm / yarn.
The below command builds all packages for you using lerna
yarn build
The test command runs:
jest
coverage
You can also run only a single section of these tests, using for example yarn test:watch
.
yarn test
There are other utility scripts that help with development.
yarn prettier
- runsprettier
to fix code style.
There are scripts that can publish the following versions:
latest
next
unstable
yarn publish:[version]