/** An address the integrator approved as a withdrawal recipient. */ export interface AllowedRecipient { /** * Address approved on {@link AllowedRecipient.chainId}, in that chain's * format. EVM addresses match in any letter case; Solana and Tron addresses * are case-sensitive and must match exactly. */ address: string; /** Chain the address is approved on, e.g. `'137'`. */ chainId: string; /** Optional nickname shown next to the shortened address. */ label?: string; } export interface AllowedRecipientOption extends AllowedRecipient { /** Unique within its list: {@link toAllowedRecipientKey}. */ key: string; /** Listed but can't receive funds, e.g. a blacklisted address. */ isBlocked: boolean; } /** * - `empty`: nothing to pick, so withdrawals stay blocked. * - `allBlocked`: every address is listed but none can receive funds. * - `selectable`: at least one address can receive funds. */ export type AllowedRecipientListState = 'empty' | 'allBlocked' | 'selectable'; /** Whether `address` is approved on `chainId`. An empty list approves nothing. */ export declare function isAllowedRecipient(recipients: readonly AllowedRecipient[], { address, chainId }: { address: string; chainId: number | string; }): boolean; /** * The chain and address, so a pick keeps its address when the provider * reorders the list. Spellings `isTokenEquivalent` treats as one address share * a key: hex (EVM) addresses in any case, Solana and Tron ones only exactly. */ export declare function toAllowedRecipientKey({ address, chainId, }: Pick): string; /** * Builds the dropdown rows in list order, one per address on its chain. A * repeat is dropped, so the first entry and its label win and keys stay unique. */ export declare function toAllowedRecipientOptions(recipients: readonly AllowedRecipient[], isBlocked: (address: string) => boolean): AllowedRecipientOption[]; export declare function getAllowedRecipientListState(options: readonly AllowedRecipientOption[]): AllowedRecipientListState; /** * The row for `address` on `chainId`, matched as {@link toAllowedRecipientKey} * matches, or undefined when either is missing or the pair isn't listed. */ export declare function findAllowedRecipient(options: readonly AllowedRecipientOption[], { address, chainId, }: { address: string | undefined; chainId: number | string | undefined; }): AllowedRecipientOption | undefined; /** * The selected address while it is listed and can receive funds, else the * first that can. */ export declare function resolveAllowedRecipient(options: readonly AllowedRecipientOption[], selectedKey: string | undefined): AllowedRecipientOption | undefined;