WaltIdCredentialProvider
Drives the whole presentation exchange against a walt.id wallet: initiate, fetch the presentation definition, authenticate, match credentials, present, and carry the resulting session into the download or compute call.
Usage
const = await .(, { })
const = await .(, {
,
: new (.(), {
: 'https://wallet.example.org'
})
})
// Unchanged at the call site — the exchange happens inside.
const { } = await .({ : 'did:ope:1234abcd...' })Options
| Option | Type | Purpose |
|---|---|---|
walletApi | string | Wallet API base URL. Required unless wallet is given. |
wallet | WaltIdWallet | Supply your own client instead. |
signer | Signer | Authenticate as someone other than the instance's signer. |
walletId | string | Pin a wallet rather than taking the first. |
did | string | Pin a DID rather than taking the first. |
onSelectCredentials | (matches, presentationDefinition) => Promise<WaltIdCredential[]> | Drive selection from a UI. |
onSelectDid | (dids) => Promise<string> | Drive DID choice from a UI. |
sessionStore | SessionStore | Override session caching. |
Methods
explainFailure(sessionId)
A human-readable reason a presentation failed — which policy rejected it, rather than a bare error.
clearSessions()
Drop cached verifier sessions, keyed by DID, service and consumer address.