Skip to content
Wallet and Entity Collection draft updates
Documentation menu

16.13. Use supplied evidence in an offline wallet flow

Feature guides / 16. Wallet workflows · Example context

Maya's wallet has no network connection when it receives Car Rental Company's request. The operation can proceed only if its configured policy and supplied evidence are sufficient for the required checks.

How to use it

WalletTrustOptions has offline, trustChain, entityChains, and core's entityConfigurations. Multi-hop paths need intermediate EC evidence as well as the visible chain. Verification operations that resolve protocol keys require effective inline jwks in offline mode. A key-source URL or cached URI response alone does not satisfy that wallet resolver check. Credential callbacks using another verification method must supply their own local evidence. offline blocks library network calls. The same validation requirements still apply. Offline flows.

maxTotalFetches: 0 permits supplied or cached evidence while preventing transport. Missing evidence fails cleanly. With a positive budget, discovery, alternate paths, and related key lookups share that allowance.

import type { CryptoEngine } from "@oidfed/crypto";
import { CredentialVerifierRole } from "@oidfed/wallet";
import type { TrustAnchorSet } from "@oidfed/core";

export async function discoverOfflineVerifier(
  engine: CryptoEngine,
  anchors: TrustAnchorSet, chain: readonly string[],
  configurations: ReadonlyMap<string, string>,
) {
  return CredentialVerifierRole.discover("https://car-rental.example", anchors, {
    engine,
    offline: true, trustChain: chain, entityConfigurations: configurations,
  });
}

What your application owns

Recheck expiry at the time of use. Offline evidence cannot reveal a revocation that happened after it was collected. A policy demanding a current status response must defer or reject when that response is unavailable. Callback implementations can perform their own I/O, so the host must also constrain them if the whole operation must be offline. Select a recipient-compatible signing chain before producing offline artifacts.

Prepare for the loss of connectivity

Before Maya goes offline, The wallet needs the configured anchors and signed evidence required by the intended operation. Consider provider and verifier chains, accreditation, and historical key evidence where applicable. A cached endpoint URL is not a substitute for the evidence itself.

Check the shortest applicable validity window and define what the UI should do after it expires. Offline mode cannot obtain a new status response or refresh a missing statement. Keep the host's callbacks and credential checks within the same no-network policy, and ask for connectivity or decline when required evidence is unavailable.

Back to feature guides

View source on GitHub