@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
50 lines • 2.79 kB
TypeScript
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
import { Address, HexString } from '@hyperlane-xyz/utils';
import { BaseSealevelAdapter } from '../../app/MultiProtocolApp.js';
import type { MultiProviderAdapter } from '../../providers/MultiProviderAdapter.js';
import { TypedTransactionReceipt } from '../../providers/ProviderType.js';
import { ChainName } from '../../types.js';
import { ICoreAdapter } from './types.js';
export declare class SealevelCoreAdapter extends BaseSealevelAdapter implements ICoreAdapter {
readonly chainName: ChainName;
readonly multiProvider: MultiProviderAdapter;
readonly addresses: {
mailbox: Address;
};
constructor(chainName: ChainName, multiProvider: MultiProviderAdapter, addresses: {
mailbox: Address;
});
extractMessageIds(sourceTx: TypedTransactionReceipt): Promise<Array<{
messageId: HexString;
destination: ChainName;
}>>;
waitForMessageProcessed(messageId: string, destination: ChainName, delayMs?: number, maxAttempts?: number): Promise<boolean>;
isDelivered(messageId: HexString, _blockTag?: string | number): Promise<boolean>;
static parseMessageDispatchLogs(logs: string[]): Array<{
destination: string;
messageId: string;
}>;
static deriveMailboxInboxPda(mailboxProgramId: string | PublicKey): PublicKey;
static deriveMailboxOutboxPda(mailboxProgramId: string | PublicKey): PublicKey;
static deriveMailboxDispatchedMessagePda(mailboxProgramId: string | PublicKey, uniqueMessageAccount: string | PublicKey): PublicKey;
static deriveMailboxDispatchAuthorityPda(programId: string | PublicKey): PublicKey;
static deriveMailboxProcessAuthorityPda(mailboxProgramId: string | PublicKey, recipient: string | PublicKey): PublicKey;
static deriveMailboxMessageProcessedPda(mailboxProgramId: string | PublicKey, messageId: HexString): PublicKey;
/**
* Create a SetDefaultIsm instruction
* @param mailboxProgramId - The mailbox program ID
* @param owner - The current owner who can set the ISM
* @param newIsm - The new ISM program address to set as default
* @returns TransactionInstruction
*/
createSetDefaultIsmInstruction(mailboxProgramId: PublicKey, owner: PublicKey, newIsm: PublicKey): TransactionInstruction;
/**
* Create a TransferOwnership instruction
* @param mailboxProgramId - The mailbox program ID
* @param owner - The current owner
* @param newOwner - The new owner (null to renounce ownership)
* @returns TransactionInstruction
*/
createTransferOwnershipInstruction(mailboxProgramId: PublicKey, owner: PublicKey, newOwner: PublicKey | null): TransactionInstruction;
}
//# sourceMappingURL=SealevelCoreAdapter.d.ts.map