Warning: This package still is in very early development. Breaking changes without notice will happen at this point!
For this plugin a DID resolver is also required. A DID resolver can be added to the agent as plugin as seen in the example below.
import { PresentationExchange } from '@sphereon/ssi-sdk.presentation-exchange'
import { Resolver } from 'did-resolver'
import { getDidKeyResolver } from '@veramo/did-provider-key'
import { DIDResolverPlugin } from '@veramo/did-resolver'
import { getUniResolver } from '@sphereon/did-uni-client'
const agent = createAgent<IDidAuthSiopOpAuthenticator & IResolver>({
plugins: [
new PresentationExchange(),
new DIDResolverPlugin({
resolver: new Resolver({
...getDidKeyResolver(),
...getUniResolver('web'),
...getUniResolver('jwk'),
}),
}),
],
})
yarn add @sphereon/ssi-sdk.presentation-exchange
yarn build