16.4. Issue a Wallet Attestation
Feature guides / 16. Wallet workflows · Example context
Wallet Provider gives Maya's wallet instance an attestation binding it to a confirmation key. Licensing Authority can later use that attestation in its wallet-acceptance process.
How to use it
WalletProviderRole.createWalletAttestation() signs the JWT format with a protocol signer. Supply the wallet-instance subject, public confirmation key, and expiry. If attaching a chain, configure trusted anchors and the provider's own valid chain. Wallet Attestations; VCI JWT Wallet Attestations; Client attestation format.
The instance method uses a chain configured in the role's options and resolves anchors from the call, the role's dedicated setting, its options, or the host, in that order. Wallet Provider can configure this once for repeated issuance.
import type { CryptoEngine, KeyringEntry } from "@oidfed/crypto";
import { WalletProviderRole } from "@oidfed/wallet";
import type { JWK } from "@oidfed/core";
export async function attestWallet(
engine: CryptoEngine,
signer: KeyringEntry,
walletPublicKey: JWK,
expiresAt: number,
) {
return WalletProviderRole.createWalletAttestation("https://wallet-provider.example", {
subject: "wallet-instance-42", confirmationKey: walletPublicKey, expiresAt,
}, signer, { engine });
}
What your application owns
Wallet Provider decides which wallet instances qualify and how confirmation keys are provisioned. Protect the provider signer and the wallet's private proof key. A wallet attestation is not a driving licence credential and does not contain the holder's driving licence data. Attestation expiry and an embedded chain's usable lifetime are different: offline consumers still need current federation evidence.
Issue for the wallet instance key
Wallet Provider's provider obtains the instance's public proof key through its provisioning process and signs an attestation for that instance. Authenticate that provisioning request before issuance; federation metadata by itself does not prove who controls the proposed instance key.
Deliver the attestation through the provider's channel and retain the instance's private key under the wallet's custody. If multiple federation anchors require different attached chains, issue the appropriate attestations under the provider's configured policy. Renewal must preserve the intended instance identity and current key binding.