Skip to content
LogoLogo

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

OptionTypePurpose
walletApistringWallet API base URL. Required unless wallet is given.
walletWaltIdWalletSupply your own client instead.
signerSignerAuthenticate as someone other than the instance's signer.
walletIdstringPin a wallet rather than taking the first.
didstringPin 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.
sessionStoreSessionStoreOverride 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.

See credential-gated assets.