import { AccountMeta, PublicKey, Transaction, TransactionInstruction } from '@solana/web3.js'; import { Address, Domain } from '@hyperlane-xyz/utils'; import { BaseSealevelAdapter } from '../../app/MultiProtocolApp.js'; import { MultiProtocolProvider } from '../../providers/MultiProtocolProvider.js'; import { ChainName } from '../../types.js'; import { SealevelGasOracle, SealevelGasOracleConfig, SealevelGasOverheadConfig, SealevelIgpData, SealevelOverheadIgpData, SealevelRemoteGasData } from './serialization.js'; export interface IgpPaymentKeys { programId: PublicKey; igpAccount: PublicKey; overheadIgpAccount?: PublicKey; } export declare abstract class SealevelIgpProgramAdapter extends BaseSealevelAdapter { readonly chainName: ChainName; readonly multiProvider: MultiProtocolProvider; readonly addresses: { programId: Address; }; protected readonly programId: PublicKey; constructor(chainName: ChainName, multiProvider: MultiProtocolProvider, addresses: { programId: Address; }); abstract getPaymentKeys(): Promise; quoteGasPayment(destination: Domain, gasAmount: bigint, payerKey: PublicKey): Promise; static deriveIgpProgramPda(igpProgramId: string | PublicKey): PublicKey; static deriveGasPaymentPda(igpProgramId: string | PublicKey, randomWalletPubKey: PublicKey): PublicKey; static deriveIgpAccountPda(programId: string | PublicKey, salt: Uint8Array): PublicKey; static deriveIgpAccountPdaWithBump(programId: string | PublicKey, salt: Uint8Array): [PublicKey, number]; static deriveOverheadIgpAccountPda(programId: string | PublicKey, salt: Uint8Array): PublicKey; static deriveOverheadIgpAccountPdaWithBump(programId: string | PublicKey, salt: Uint8Array): [PublicKey, number]; } export declare class SealevelIgpAdapter extends SealevelIgpProgramAdapter { readonly chainName: ChainName; readonly multiProvider: MultiProtocolProvider; readonly addresses: { igp: Address; programId: Address; }; protected readonly igp: PublicKey; constructor(chainName: ChainName, multiProvider: MultiProtocolProvider, addresses: { igp: Address; programId: Address; }); getPaymentKeys(): Promise; getAccountInfo(): Promise; getClaimInstructionKeyList(beneficiary: PublicKey): Array; /** * Constructs a Transaction for . * @param {PublicKey} beneficiary - The IGP's configured beneficiary. * @returns {Promise} The claim instruction. */ populateClaimTx(beneficiary: PublicKey): Promise; /** * Create a SetGasOracleConfigs instruction */ createSetGasOracleConfigsInstruction(igpAccount: PublicKey, owner: PublicKey, configs: SealevelGasOracleConfig[]): TransactionInstruction; /** * Create a gas oracle config from remote gas data */ createGasOracleConfig(domain: number, remoteGasData: SealevelRemoteGasData | null): SealevelGasOracleConfig; /** * Check if gas oracle matches expected config */ gasOracleMatches(currentOracle: SealevelGasOracle | undefined, expected: SealevelRemoteGasData): { matches: boolean; actual: SealevelRemoteGasData | null; }; } export declare class SealevelOverheadIgpAdapter extends SealevelIgpProgramAdapter { readonly chainName: ChainName; readonly multiProvider: MultiProtocolProvider; readonly addresses: { overheadIgp: Address; programId: Address; }; protected readonly overheadIgp: PublicKey; constructor(chainName: ChainName, multiProvider: MultiProtocolProvider, addresses: { overheadIgp: Address; programId: Address; }); getAccountInfo(): Promise; getPaymentKeys(): Promise; /** * Create a SetDestinationGasOverheads instruction */ createSetDestinationGasOverheadsInstruction(overheadIgpAccount: PublicKey, owner: PublicKey, configs: SealevelGasOverheadConfig[]): TransactionInstruction; /** * Create a gas overhead config */ createGasOverheadConfig(destination_domain: number, gas_overhead: bigint | null): SealevelGasOverheadConfig; } //# sourceMappingURL=SealevelIgpAdapter.d.ts.map