interface WalletAccountContext { readWriteAddresses: string[]; readOnlyAddresses: string[]; walletAccountIdx: number; getAccountIndex: (pubkey: Uint8Array) => number; } interface AccountContext { readWriteAddresses: string[]; readOnlyAddresses: string[]; accountAddresses: string[]; walletAccountIdx: number; getAccountIndex: (pubkey: Uint8Array) => number; } interface WalletAccountContextParams { walletAddress: string; readWriteAccounts: Uint8Array[]; readOnlyAccounts: Uint8Array[]; programAddress?: string; } /** * Build account indices for an instruction that a wallet will wrap and pay for. * The concrete fee payer is intentionally unknown here; index 0 is reserved for * it and index 1 for the wrapper program. */ declare function buildWalletAccountContext(params: WalletAccountContextParams): WalletAccountContext; /** Ensure the wallet-selected fee payer does not invalidate indices that were * encoded before that payer was known. */ declare function assertWalletFeePayerCompatible(params: WalletAccountContextParams & { feePayerAddress: string; }): void; /** * Build account context for passkey manager transactions. * Handles account deduplication, sorting, and index lookup. */ declare function buildAccountContext(params: { walletAddress: string; readWriteAccounts: Uint8Array[]; readOnlyAccounts: Uint8Array[]; feePayerAddress: string; programAddress?: string; }): AccountContext; /** * Build read-write accounts list for passkey manager transactions (simpler wallet-only version). */ declare function buildPasskeyReadWriteAccounts(userAccounts: Uint8Array[], feePayerPublicKey: Uint8Array, programAddress: Uint8Array): { readWriteAddresses: string[]; findAccountIndex: (target: Uint8Array) => number; }; export { type AccountContext, type WalletAccountContext, assertWalletFeePayerCompatible, buildAccountContext, buildPasskeyReadWriteAccounts, buildWalletAccountContext };