import { AlgorandChainIDs } from "./peraWalletTypes"; import { PeraNetwork } from "../transport/extension/peraProviderTypes"; /** The WalletConnect method use-wallet defines for empty signatures (TxnLab/use-wallet#465). */ export declare const EMPTY_SIGNATURES_METHOD = "algo_getEmptySignatures"; /** Matches use-wallet. Pera apps without the method drop it silently, so this is the only exit. */ export declare const EMPTY_SIGNATURES_TIMEOUT_MS = 30000; /** `algorand:` plus the first 32 characters of the base64url genesis hash, as use-wallet sends them. */ export declare const EMPTY_SIGNATURES_CAIP2_CHAIN_IDS: Record; /** Plain-JS callers bypass the type, so the value is checked at runtime. */ export declare function assertEmptySignaturesNetwork(network: unknown): asserts network is PeraNetwork | undefined; /** * The network to ask about: the argument if given, otherwise the one the * `chainId` option pins. A WalletConnect v1 session's chainId only echoes what * the dApp asked for, so an all-networks session (`4160`, the default) can't * tell which network the wallet is on. */ export declare function resolveEmptySignaturesNetwork(network: PeraNetwork | undefined, chainId: AlgorandChainIDs | undefined): PeraNetwork; /** * Keeps the wallet's answer for the session's own accounts, where the value is * standard base64. Anything else is left out, which use-wallet treats as unknown. */ export declare function filterEmptySignatures(result: unknown, accounts: readonly string[]): Record; /** Rejects with `onTimeout()` after `ms`, and always clears its timer. */ export declare function withTimeout(promise: Promise, ms: number, onTimeout: () => Error): Promise;