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;
}
export declare function loadL2Creds(address: string, sigType: number): L2Creds | null;
export declare function saveL2Creds(address: string, sigType: number, creds: Omit<L2Creds, "derivedAt">): 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<BuilderCreds, "createdAt">): 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>): PolymarketState;
