import { PublicKey } from '@solana/web3.js'; import { Domain } from '@hyperlane-xyz/utils'; /** * Offchain quoting configuration on an Igp account (trailing optional field * introduced in the SVM fee-flow upgrade). Mirrors `IgpFeeConfig` in * rust/sealevel/programs/hyperlane-sealevel-igp/src/accounts.rs. */ export interface SealevelIgpFeeConfig { signers: string[]; domain_id: number; min_issued_at: bigint; } /** * Decode the optional trailing IgpFeeConfig from an Igp account's raw data. * The trailing field is an `OptionalDiscriminatedData`: empty * when absent, or `[DISCRIMINATOR (8)][signers (borsh set)][domain_id (u32)] * [min_issued_at (i64)]` when present. * * The payload is hand-decoded (no borsh dependency) because borsh-js 0.7 * lacks native i64 support for `min_issued_at`. */ export declare function decodeTrailingIgpFeeConfig(rawAccountData: Buffer, consumedSize: number): SealevelIgpFeeConfig | undefined; export declare enum SealevelInterchainGasPaymasterType { Igp = 0, OverheadIgp = 1 } /** * IGP Config Borsh Schema */ export declare class SealevelInterchainGasPaymasterConfig { readonly fields: any; program_id: Uint8Array; program_id_pubkey: PublicKey; type: SealevelInterchainGasPaymasterType; igp_account?: Uint8Array; igp_account_pub_key?: PublicKey; constructor(fields: any); } export declare const SealevelInterchainGasPaymasterConfigSchema: { kind: string; fields: (string | number[])[][]; }; /** * Gas Oracle Borsh Schema */ export declare class SealevelRemoteGasData { readonly fields: any; token_exchange_rate: bigint; gas_price: bigint; token_decimals: number; constructor(fields: any); } export declare const SealevelRemoteGasDataSchema: { kind: string; fields: string[][]; }; export declare enum SealevelGasOracleType { RemoteGasData = 0 } export declare class SealevelGasOracle { readonly fields: any; type: SealevelGasOracleType; data: SealevelRemoteGasData; constructor(fields: any); } export declare const SealevelGasOracleSchema: { kind: string; fields: (string | typeof SealevelRemoteGasData)[][]; }; /** * IGP Program Data Borsh Schema */ export declare class SealevelOverheadIgpData { readonly fields: any; bump: number; salt: Uint8Array; owner?: Uint8Array; owner_pub_key?: PublicKey; inner: Uint8Array; inner_pub_key: PublicKey; gas_overheads: Map; constructor(fields: any); } export declare const SealevelOverheadIgpDataSchema: Map; export declare class SealevelIgpData { bump_seed: number; salt: Uint8Array; owner?: Uint8Array | null; owner_pub_key?: PublicKey; beneficiary: Uint8Array; beneficiary_pub_key: PublicKey; gas_oracles: Map; fee_config?: SealevelIgpFeeConfig; constructor(fields: any); } export declare const SealevelIgpDataSchema: Map; /** * IGP instruction Borsh Schema */ export declare enum SealevelIgpInstruction { Init = 0, InitIgp = 1, InitOverheadIgp = 2, PayForGas = 3, QuoteGasPayment = 4, TransferIgpOwnership = 5, TransferOverheadIgpOwnership = 6, SetIgpBeneficiary = 7, SetDestinationGasOverheads = 8, SetGasOracleConfigs = 9, Claim = 10, SetIgpQuoteConfig = 11, SetIgpQuoteSigner = 12, SetIgpMinIssuedAt = 13, SubmitIgpQuote = 14, CloseIgpTransientQuote = 15, CloseIgpStandingQuote = 16, GetIgpQuoteAccountMetas = 17 } export declare class SealevelGetIgpQuoteAccountMetasInstruction { destination_domain: number; sender: Uint8Array; scoped_salt: Uint8Array | null; constructor(fields: any); } export declare const SealevelGetIgpQuoteAccountMetasSchema: Map; export declare class SealevelIgpQuoteGasPaymentInstruction { readonly fields: any; destination_domain: number; gas_amount: bigint; constructor(fields: any); } export declare const SealevelIgpQuoteGasPaymentSchema: Map; export declare class SealevelIgpQuoteGasPaymentResponse { readonly fields: any; payment_quote: bigint; constructor(fields: any); } export declare const SealevelIgpQuoteGasPaymentResponseSchema: Map; /** * Gas Oracle Configuration Schemas */ export declare class SealevelGasOracleConfig { domain: number; gas_oracle: SealevelGasOracle | null; constructor(domain: number, gasOracle: SealevelGasOracle | null); } export declare const SealevelGasOracleConfigSchema: { kind: 'struct'; fields: (string | { kind: 'option'; type: typeof SealevelGasOracle; })[][]; }; export declare class SealevelGasOverheadConfig { destination_domain: number; gas_overhead: bigint | null; constructor(destination_domain: number, gas_overhead: bigint | null); } export declare const SealevelGasOverheadConfigSchema: { kind: 'struct'; fields: (string | { kind: 'option'; type: string; })[][]; }; /** * Instruction Schemas */ export declare class SealevelSetGasOracleConfigsInstruction { configs: SealevelGasOracleConfig[]; constructor(configs: SealevelGasOracleConfig[]); } export declare const SealevelSetGasOracleConfigsInstructionSchema: Map; export declare class SealevelSetDestinationGasOverheadsInstruction { configs: SealevelGasOverheadConfig[]; constructor(configs: SealevelGasOverheadConfig[]); } export declare const SealevelSetDestinationGasOverheadsInstructionSchema: Map; //# sourceMappingURL=serialization.d.ts.map