import { AccountMeta, Connection, PublicKey, TransactionInstruction } from '@solana/web3.js'; export declare enum SealevelFeeInstruction { InitFee = 0, QuoteFee = 1, SetRemoteFeeRoute = 2, RemoveRemoteFeeRoute = 3, UpdateFeeParams = 4, SetBeneficiary = 5, TransferOwnership = 6, SetQuoteSigner = 7, SetMinIssuedAt = 8, SetWildcardQuoteSigners = 9, SubmitQuote = 10, CloseTransientQuote = 11, PruneExpiredQuotes = 12, GetQuoteAccountMetas = 13, GetSubmitQuoteAccountMetas = 14 } export declare class SealevelQuoteFeeInstruction { destination_domain: number; recipient: Uint8Array; amount: bigint; target_router: Uint8Array; constructor(fields: any); } export declare const SealevelQuoteFeeSchema: Map; export declare class SealevelGetQuoteAccountMetasInstruction { destination_domain: number; target_router: Uint8Array; scoped_salt: Uint8Array | null; constructor(fields: any); } export declare const SealevelGetQuoteAccountMetasSchema: Map; /** * Derive a fee account PDA. Seeds: * ["hyperlane_fee", "-", "fee", "-", salt]. * Matches `fee_account_pda_seeds` in * rust/sealevel/programs/hyperlane-sealevel-fee/src/pda_seeds.rs. */ export declare function deriveFeeAccountPda(programId: PublicKey, salt: Uint8Array): PublicKey; /** * Derive a fee standing quote PDA. Seeds: * ["hyperlane_fee", "-", "standing", "-", fee_account, "-", domain_le, "-", target_router]. * * For Leaf/Routing modes pass `targetRouter = null`; the helper substitutes * the H256::zero() sentinel per the on-chain seed macro. For CrossCollateral * routing pass the actual remote router H256. */ export declare function deriveFeeStandingQuotePda(programId: PublicKey, feeAccount: PublicKey, destinationDomain: number, targetRouter: Uint8Array | null): PublicKey; /** * Derive an IGP standing quote PDA. Seeds: * ["hyperlane_igp", "-", "standing_quote", "-", igp_account, "-", * fee_token_mint, "-", dest_domain_le, "-", sender]. * * Use Pubkey::default() (= SystemProgram.programId on the JS side, both are * the all-zero pubkey) for SOL-paying routes. The sender is the warp route * program ID. */ export declare function deriveIgpStandingQuotePda(programId: PublicKey, igpAccount: PublicKey, feeTokenMint: PublicKey, destinationDomain: number, sender: PublicKey): PublicKey; /** * Parse a borsh-encoded `Vec` (u32 LE length prefix * + N * 34 bytes) into the @solana/web3.js AccountMeta shape. */ export declare function parseSimulationAccountMetas(data: Buffer): AccountMeta[]; /** * Simulation-only: returns the account metas required for a `QuoteFee` call * on the fee program. Slot 0 of the returned vector is the fee account, * slot 1 is a payer placeholder (Pubkey::default()) that callers must * substitute with the real payer before passing into `simulateWarpFee` or a * `transfer_remote` instruction. */ export declare function simulateFeeQuoteAccountMetas(connection: Connection, feeProgram: PublicKey, feeAccount: PublicKey, payer: PublicKey, params: { destinationDomain: number; targetRouter: Uint8Array; scopedSalt?: Uint8Array; }): Promise; /** * Simulation-only: returns the account metas required for a `QuoteGasPayment` * call in the new-flow IGP path. The returned vector starts with system * program, payer placeholder, program_data, unique_gas_payment placeholder, * gas_payment_pda placeholder, IGP account, then the cascade PDAs. Callers * must substitute placeholders before passing accounts into a real call. */ export declare function simulateIgpQuoteAccountMetas(connection: Connection, igpProgram: PublicKey, igpAccount: PublicKey, payer: PublicKey, params: { destinationDomain: number; sender: PublicKey; scopedSalt?: Uint8Array; }): Promise; /** * Simulation-only: invokes `QuoteFee` on the fee program with the provided * account list and returns the u64 LE fee amount via return data. The * accounts must mirror the layout from `simulateFeeQuoteAccountMetas` with * the payer placeholder (slot 1) replaced by the real payer. */ export declare function simulateWarpFee(connection: Connection, feeProgram: PublicKey, payer: PublicKey, accounts: AccountMeta[], params: { destinationDomain: number; recipient: Uint8Array; amount: bigint; targetRouter: Uint8Array; }): Promise; /** * Simulation-only: invokes the IGP's `QuoteGasPayment` with the provided * account list (legacy or new-flow) and returns the u64 quote amount. */ export declare function simulateIgpQuote(connection: Connection, igpProgram: PublicKey, payer: PublicKey, accounts: AccountMeta[], params: { destinationDomain: number; gasAmount: bigint; }): Promise; /** * Wire form of `SvmSignedQuote`. Mirrors svm-sdk's `SvmSignedQuote` codec * (`@solana/kit` based) but built on the borsh-style schemas the SDK already * uses for SVM ix encoding. */ export declare class SealevelSvmSignedQuote { context: Uint8Array; data: Uint8Array; issued_at: Uint8Array; expiry: Uint8Array; client_salt: Uint8Array; signature: Uint8Array; constructor(fields: any); } /** * Schema for either `SubmitQuote` (fee) or `SubmitIgpQuote` (IGP). Caller * sets the wrapper's `instruction` discriminator at construction. */ export declare const SealevelSubmitQuoteSchema: Map; /** * `GetSubmitQuoteAccountMetas` data — simulation-only request returning the * variable account list the fee program needs to consume a quote. Mirrors * the on-chain instruction by the same name (fee program, disc 14). */ export declare class SealevelGetSubmitQuoteAccountMetasInstruction { destination_domain: number; target_router: Uint8Array; scoped_salt: Uint8Array | null; constructor(fields: any); } export declare const SealevelGetSubmitQuoteAccountMetasSchema: Map; /** * Derive an IGP transient-quote PDA. Seeds: * ["hyperlane_igp", "-", "transient_quote", "-", igp_account, "-", scoped_salt]. * * Mirrors svm-sdk's `deriveIgpTransientQuotePda` — the on-chain PDA the IGP * `SubmitIgpQuote` handler initializes for a transient (one-shot) quote. */ export declare function deriveIgpTransientQuotePda(programId: PublicKey, igpAccount: PublicKey, scopedSalt: Uint8Array): PublicKey; /** * Account-meta layout returned from `GetSubmitQuoteAccountMetas`: * [0] system program (readonly) * [1] payer placeholder (Pubkey::default — substituted before submit) * [2] fee account (readonly) * [3..N] route PDAs (readonly cascade) * [N+1] transient or standing quote PDA (writable) * * `simulateSubmitFeeQuoteAccountMetas` runs the simulation, asserts the * placeholder is at slot 1 (drift in the on-chain layout fails loudly here * rather than at submit), and substitutes the real payer (writable signer). */ export declare function simulateSubmitFeeQuoteAccountMetas(connection: Connection, feeProgram: PublicKey, feeAccount: PublicKey, payer: PublicKey, params: { destinationDomain: number; targetRouter: Uint8Array; scopedSalt?: Uint8Array; }): Promise; /** * Build a `SubmitQuote` instruction for the warp fee program. Account list * is discovered via `simulateSubmitFeeQuoteAccountMetas` and includes the * resolved cascade PDA(s) the on-chain handler will read/write. */ export declare function buildSubmitFeeQuoteIx(args: { connection: Connection; feeProgramId: PublicKey; feeAccount: PublicKey; payer: PublicKey; signedQuote: SealevelSvmSignedQuote; /** Required for transient mode (when `signedQuote.expiry === signedQuote.issued_at`). */ scopedSalt?: Uint8Array; /** Hyperlane destination domain ID. */ destinationDomain: number; /** 32-byte remote warp router (H256). */ targetRouter: Uint8Array; }): Promise; /** * Build a `SubmitIgpQuote` instruction for the IGP program. Unlike the fee * variant, the IGP submit has a fixed 4-account layout and the caller is * responsible for deriving the destination quote PDA (transient or standing). * * Wire layout: * [0] system program (readonly) * [1] payer (writable signer) * [2] igp account (readonly) * [3] quote PDA (writable) */ export declare function buildSubmitIgpQuoteIx(args: { igpProgramId: PublicKey; igpAccount: PublicKey; payer: PublicKey; /** * Pre-derived destination PDA: * - Transient: `deriveIgpTransientQuotePda(programId, igpAccount, scopedSalt)` * - Standing: `deriveIgpStandingQuotePda(programId, igpAccount, feeTokenMint, destDomain, sender)` */ quotePda: PublicKey; signedQuote: SealevelSvmSignedQuote; }): TransactionInstruction; //# sourceMappingURL=sealevelFee.d.ts.map