UNPKG

@exodus/solana-web3.js

Version:
52 lines (51 loc) 2.35 kB
import { Blockhash } from '../blockhash.js'; import { MessageHeader, MessageAddressTableLookup, MessageCompiledInstruction } from './index.js'; import { PublicKey } from '../publickey.js'; import { TransactionInstruction } from '../transaction/index.js'; import { AddressLookupTableAccount } from '../programs/index.js'; import { AccountKeysFromLookups, MessageAccountKeys } from './account-keys.js'; /** * Message constructor arguments */ export declare type MessageV0Args = { /** The message header, identifying signed and read-only `accountKeys` */ header: MessageHeader; /** The static account keys used by this transaction */ staticAccountKeys: PublicKey[]; /** The hash of a recent ledger block */ recentBlockhash: Blockhash; /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */ compiledInstructions: MessageCompiledInstruction[]; /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */ addressTableLookups: MessageAddressTableLookup[]; }; export declare type CompileV0Args = { payerKey: PublicKey; instructions: Array<TransactionInstruction>; recentBlockhash: Blockhash; addressLookupTableAccounts?: Array<AddressLookupTableAccount>; }; export declare type GetAccountKeysArgs = { accountKeysFromLookups?: AccountKeysFromLookups | null; } | { addressLookupTableAccounts?: AddressLookupTableAccount[] | null; }; export declare class MessageV0 { header: MessageHeader; staticAccountKeys: Array<PublicKey>; recentBlockhash: Blockhash; compiledInstructions: Array<MessageCompiledInstruction>; addressTableLookups: Array<MessageAddressTableLookup>; constructor(args: MessageV0Args); get version(): 0; get numAccountKeysFromLookups(): number; getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys; isAccountSigner(index: number): boolean; isAccountWritable(index: number): boolean; resolveAddressTableLookups(addressLookupTableAccounts: AddressLookupTableAccount[]): AccountKeysFromLookups; static compile(args: CompileV0Args): MessageV0; serialize(): Uint8Array; private serializeInstructions; private serializeAddressTableLookups; static deserialize(serializedMessage: Uint8Array): MessageV0; }