import { BN, Program } from "@coral-xyz/anchor"; import { WormholeCoreBridgeSolana } from "./idl"; import { Keypair, PublicKey, Signer, TransactionInstruction } from "@solana/web3.js"; export declare function getGuardianSetIndex(vaa: Buffer): number; export declare const DEFAULT_REDUCED_GUARDIAN_SET_SIZE = 5; export declare const VAA_SIGNATURE_SIZE = 66; export declare function trimSignatures(vaa: Buffer, n?: number): Buffer; export declare function isAccumulatorUpdateData(updateBytes: Buffer): boolean; export type AccumulatorUpdateData = { vaa: Buffer; updates: { message: Buffer; proof: number[][]; }[]; }; export declare function parseAccumulatorUpdateData(data: Buffer): AccumulatorUpdateData; /** * An instruction with some extra information that will be used to build transactions. */ export type InstructionWithEphemeralSigners = { /** The instruction */ instruction: TransactionInstruction; /** The ephemeral signers that need to sign the transaction where this instruction will be */ signers: Signer[]; /** The compute units that this instruction requires, useful if greater than `DEFAULT_COMPUTE_BUDGET_UNITS` */ computeUnits?: number; }; export declare function buildPostEncodedVaaInstructions(wormhole: Program, vaa: Buffer): Promise<{ encodedVaaAddress: PublicKey; postInstructions: InstructionWithEphemeralSigners[]; closeInstructions: InstructionWithEphemeralSigners[]; }>; /** * Build an instruction to create an encoded VAA account. * * This is the first step to post a VAA to the Wormhole program. */ export declare function buildEncodedVaaCreateInstruction(wormhole: Program, vaa: Buffer, encodedVaaKeypair: Keypair): Promise; /** * Returns the address of a guardian set account from the Wormhole program. */ export declare const getGuardianSetPda: (guardianSetIndex: number, wormholeProgramId: PublicKey) => PublicKey; export type PriceFeedMessage = { feedId: Buffer; price: BN; confidence: BN; exponent: number; publishTime: BN; prevPublishTime: BN; emaPrice: BN; emaConf: BN; }; export declare function parsePriceFeedMessage(message: Buffer): PriceFeedMessage; //# sourceMappingURL=pyth.utils.d.ts.map