3.2. Validate supplied federation evidence offline
Feature guides / 3. Trust chains · Example context
LIGO Wiki has a previously collected chain and the intermediate ECs needed to check its relationships. It wants to validate those artifacts without making a surprise network request.
How to use it
Call the host's discoverEntityFromChain() with the supplied JWTs, intermediate ECs, and offline: true. It uses the host's anchors and validates the evidence without library network access. For a Wallet operation, pass the same offline evidence through the relevant Wallet role API; that also checks the required Wallet metadata and request context. Missing or expired evidence stops the operation. Chain validation; Wallet offline flows.
import type { Leaf } from "@oidfed/leaf";
import { entityId } from "@oidfed/core";
export function validateOffline(
ligoWiki: Leaf, statements: readonly string[],
configurations: ReadonlyMap<string, string>,
) {
return ligoWiki.discoverEntityFromChain(entityId("https://op.umu.example"), statements, {
entityConfigurations: configurations, offline: true,
});
}
What your application owns
Supply complete evidence and validate it at the current time. An artifact's earlier signature does not make an expired chain current. Offline validation cannot establish whether revocation occurred since collection.
Wallet APIs also accept offline evidence. When their verification workflow resolves protocol keys, offline mode requires effective inline jwks as well as the federation chain; a cached URI response alone is insufficient. Host callbacks and custom signers must honor the same no-network policy.
Prepare the evidence while online
An offline Wallet Provider needs more than a JWT copied from the last request. Provision the anchors and every signed statement required by the intended verification path while a trusted online channel is available. If a workflow needs an issuer's historical keys or accreditation evidence, arrange those inputs as well; offline does not manufacture missing evidence.
Record when that evidence expires and define what the wallet should do when it becomes unusable. Declining the operation or asking for connectivity is a host decision. Do not silently reopen network access after an offline validation error. Host callbacks and credential-format verifiers must respect the same offline boundary.
Create discovery evidence from a supplied chain
Import discoverEntityFromChain(subject, statements, anchors, options) from @oidfed/core when working without an initialized local host. It validates a supplied chain and returns the same DiscoveryResult used by existing protocol APIs. Supply intermediate ECs through entityConfigurations for offline multi-hop validation. This method checks the subject identity and does not bless an arbitrary object as validated evidence.