Skip to content

AppDelegationSource

Defined in: src/client/app-delegation-source.ts:56

Where SessionIdentity gets an app delegation from.

The identity decides when to mint; this decides how. Splitting them is what lets the timing be tested without a replica, and what keeps the identity free of any agent or canister id.

mint(appPublicKey): Promise<DelegationChain>

Defined in: src/client/app-delegation-source.ts:65

Mint a delegation from the session to appPublicKey.

Three outcomes. SessionGoneError where the session no longer exists, SessionUnsupportedError where it exists but this library cannot act for it, and anything else where the attempt may be worth repeating.

DerEncodedPublicKey

Promise<DelegationChain>