import { OnChainBtcPubkey } from '../../eth/types'; import { JsonRpcClient } from '../json-rpc-client'; import { VpTokenProvider } from './tokenProvider'; export interface VpTokenRegistryInput { client: JsonRpcClient; peginTxid: string; authAnchorHex: string; pinnedServerPubkey: OnChainBtcPubkey; /** Depositor x-only pubkey (32-byte hex), asserted against each token's CWT `aud`. */ expectedAudienceXOnlyPubkey: string; } export declare class VpTokenRegistry { private readonly entries; /** * Return the cached `VpTokenProvider` for `peginTxid` if one exists * with matching `authAnchorHex` and `pinnedServerPubkey`, otherwise * construct and cache a fresh provider. A mismatch on either throws — * silent overwrite would mask derivation drift or VP pubkey rotation. */ getOrCreate(input: VpTokenRegistryInput): VpTokenProvider; /** Return the cached provider, or `undefined` if none. */ peek(peginTxid: string): VpTokenProvider | undefined; /** * Evict the entry for `peginTxid`. Idempotent. Called on terminal * paths — activation success, user-cancel, or component unmount — * so `authAnchorHex` doesn't outlive the deposit session. */ release(peginTxid: string): void; /** * Wipe every cached entry. Test-only escape hatch — not exposed on * the public {@link VpTokenRegistryPublic} singleton type. * * @internal */ clear(): void; get size(): number; } /** * Public surface of the singleton — excludes the test-only `clear` * method. */ export interface VpTokenRegistryPublic { getOrCreate(input: VpTokenRegistryInput): VpTokenProvider; peek(peginTxid: string): VpTokenProvider | undefined; release(peginTxid: string): void; readonly size: number; } export declare const vpTokenRegistry: VpTokenRegistryPublic; //# sourceMappingURL=tokenRegistry.d.ts.map