export interface L2Creds { key: string; secret: string; passphrase: string; derivedAt: string; } export interface BuilderCreds { key: string; secret: string; passphrase: string; createdAt: string; } export interface PolymarketState { depositWallet?: string; signer?: string; deployed?: boolean; approvalsDone?: boolean; /** * A withdrawal batch whose relayer confirmation timed out. Its EIP-712 * signature stays executable until `deadline` (unix seconds), so a fresh * withdrawal signed before then can DOUBLE-SEND — withdraw refuses to sign * while this is set and unresolved. Cleared on confirm/failure. */ pendingWithdraw?: { transactionID: string; deadline: number; }; } export declare function loadL2Creds(address: string, sigType: number): L2Creds | null; export declare function saveL2Creds(address: string, sigType: number, creds: Omit): void; /** Drop cached creds (called on CLOB 401 / the issue-#65 error fingerprint). */ export declare function invalidateL2Creds(address: string, sigType: number): void; export declare function loadBuilderCreds(owner: string): BuilderCreds | null; export declare function saveBuilderCreds(owner: string, creds: Omit): void; export declare function loadState(): PolymarketState; /** * The persisted deposit wallet, but ONLY if it belongs to `signer`. After a * BlockRun key rotation (~/.blockrun/.session regenerated) the stored wallet is * a CREATE2 vault the new key cannot control, so returning it would point * trading/funding at unrecoverable funds. Returns undefined on signer mismatch. */ export declare function loadDepositWalletForSigner(signer: string): string | undefined; export declare function saveState(patch: Partial): PolymarketState;