@lelantos-org/sdk / crypto / cryptoContext
Function: cryptoContext() โ
ts
function cryptoContext(): Promise<CryptoContext>;Defined in: @lelantos-org/sdk/dist/crypto/context.d.ts:19
The shared context, built on first use.
Concurrent callers await the same promise, so the WASM module is instantiated once however many code paths race for it. Nothing is built at import time: a bundle that never calls this never pays for it.
A failed build is not cached โ see memoAsync. A caller that races ahead of configureJubjubWasm, or one transient import failure, would otherwise brick the wallet for the lifetime of the process.
Returns โ
Promise<CryptoContext>