import { type AccountMeta, type Address, type Base64EncodedWireTransaction, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit'; import type { AmountLike } from './Session.js'; /** Canonical mainnet multi-delegator program address. */ export declare const MULTI_DELEGATOR_PROGRAM = "EPEUTog1kptYkthDJF6MuB1aM4aDAwHYwoF32Rzv5rqg"; /** PDA seed prefix for `MultiDelegate` accounts. */ export declare const MULTI_DELEGATE_SEED = "MultiDelegate"; /** PDA seed prefix for delegation accounts. */ export declare const DELEGATION_SEED = "delegation"; /** * Concrete instruction shape produced by the multi-delegator builders. */ export type MultiDelegateInstruction = Instruction & InstructionWithAccounts & InstructionWithData; /** * Derives the `MultiDelegate` PDA for `(user, mint)`. */ export declare function findMultiDelegatePda(parameters: findMultiDelegatePda.Parameters): Promise
; export declare namespace findMultiDelegatePda { interface Parameters { readonly mint: string; readonly programAddress?: string | undefined; readonly user: string; } } /** * Derives the `FixedDelegation` PDA for `(multiDelegate, delegator, delegatee, nonce)`. */ export declare function findFixedDelegationPda(parameters: findFixedDelegationPda.Parameters): Promise
; export declare namespace findFixedDelegationPda { interface Parameters { readonly delegatee: string; readonly delegator: string; readonly multiDelegate: string; readonly nonce: AmountLike; readonly programAddress?: string | undefined; } } /** * Builds an `InitMultiDelegate` instruction (discriminator `0x00`). * * Creates the `MultiDelegate` PDA for `(user, mint)` and approves it as the * SPL Token delegate on `userAta` with a `u64::MAX` allowance. Account order * matches `build_init_multi_delegate_ix` in `program/multi_delegator.rs`. */ export declare function buildInitMultiDelegateInstruction(parameters: buildInitMultiDelegateInstruction.Parameters): Promise; export declare namespace buildInitMultiDelegateInstruction { interface Parameters { readonly mint: string; readonly programAddress?: string | undefined; readonly tokenProgram: string; readonly user: string; readonly userAta: string; } } /** * Builds a `CreateFixedDelegation` instruction (discriminator `0x01`). * * Data layout: `[0x01] ++ nonce_le_u64 ++ amount_le_u64 ++ expiry_ts_le_i64`. * Account order matches `build_create_fixed_delegation_ix` in * `program/multi_delegator.rs`. */ export declare function buildCreateFixedDelegationInstruction(parameters: buildCreateFixedDelegationInstruction.Parameters): Promise; export declare namespace buildCreateFixedDelegationInstruction { interface Parameters { readonly amount: AmountLike; readonly delegatee: string; readonly delegator: string; /** Unix seconds; `0` means the delegation never expires. */ readonly expiryTs: AmountLike; readonly mint: string; readonly nonce: AmountLike; readonly programAddress?: string | undefined; } } /** * Shared parameters for the pre-signed multi-delegator transactions. */ export interface MultiDelegateTxParameters { /** Delegation cap in base units. */ readonly amount: AmountLike; /** Unix seconds; `0` means the delegation never expires. */ readonly expiryTs: AmountLike; readonly mint: string; readonly nonce?: AmountLike | undefined; /** Operator (delegatee) authorized to pull up to `amount`. */ readonly operator: string; readonly programAddress?: string | undefined; /** Server-provided recent blockhash (base58). */ readonly recentBlockhash: string; /** User wallet; signs the transaction and pays fees. */ readonly signer: TransactionSigner; readonly tokenProgram: string; /** User token account; derived as the ATA of `(signer, mint)` when omitted. */ readonly userAta?: string | undefined; } /** * Builds and signs the `initMultiDelegateTx` for a pull-mode session open. * * Two instructions in one transaction, mirroring `build_init_multi_delegate_tx` * in `client/multi_delegate.rs`: `InitMultiDelegate` followed by * `CreateFixedDelegation`. The user signs and pays fees; the result is the * base64-encoded wire transaction the server submits. */ export declare function buildInitMultiDelegateTx(parameters: MultiDelegateTxParameters): Promise; /** * Builds and signs the `updateDelegationTx` for a pull-mode session open. * * One `CreateFixedDelegation` instruction, mirroring * `build_update_delegation_tx` in `client/multi_delegate.rs`; used to raise an * existing cap or create a delegation at a fresh nonce. */ export declare function buildUpdateDelegationTx(parameters: Omit): Promise; /** * Derives the user's associated token account for the delegated mint. */ export declare function deriveDelegatedTokenAccount(parameters: { readonly mint: string; readonly owner: string; readonly tokenProgram: string; }): Promise
; //# sourceMappingURL=MultiDelegate.d.ts.map