Make {@link TransactionInstruction} for post_vaa
instruction.
This is used in {@link createPostSignedVaaTransactions}'s last transaction.
signatureSet
is a {@link web3.Keypair} generated outside of this method, which was used
to write signatures and the message hash to.
https://github.com/certusone/wormhole/blob/main/solana/bridge/program/src/api/post_vaa.rs
wormhole program address
transaction signer address
either signed VAA bytes or parsed VAA (use parseVaa on signed VAA)
key for signature set account
Create {@link TransactionInstruction} for {@link Secp256k1Program}.
65-byte signatures (64 bytes + 1 byte recovery id)
20-byte ethereum public keys
32-byte hash
Solana instruction for Secp256k1 program
This is used in {@link createPostSignedVaaTransactions}'s initial transactions.
Signatures are batched in groups of 7 due to instruction
data limits. These signatures are passed through to the Secp256k1
program to verify that the guardian public keys can be recovered.
This instruction is paired with verify_signatures
to validate the
pubkey recovery.
There are at most three pairs of instructions created.
https://github.com/certusone/wormhole/blob/main/solana/bridge/program/src/api/verify_signature.rs
Solana web3 connection
wormhole program address
transaction signer address
either signed VAA bytes or parsed VAA (use parseVaa on signed VAA)
address to account of verified signatures
Find valid program address. See {@link PublicKey.findProgramAddressSync} for details.
seeds for PDA
program address
PDA
Get serialized data from account
Solana AccountInfo
serialized data as Buffer
Generate accounts needed to perform complete_native_with_payload
instruction
as cross-program invocation.
Note: toFeesTokenAccount
is the same as toTokenAccount
. For your program,
you only need to pass your toTokenAccount
into the complete transfer
instruction for the toFeesTokenAccount
.
Generate accounts needed to perform complete_wrapped_with_payload
instruction
as cross-program invocation.
Note: toFeesTokenAccount
is the same as toTokenAccount
. For your program,
you only need to pass your toTokenAccount
into the complete transfer
instruction for the toFeesTokenAccount
.
Generate accounts needed to perform post_message
instruction
as cross-program invocation.
Generate Token Bridge PDAs.
Generate accounts needed to perform transfer_wrapped_with_payload
instruction
as cross-program invocation.
Generate accounts needed to perform transfer_wrapped_with_payload
instruction
as cross-program invocation.
Generate Wormhole PDAs.
Factory to create AccountMeta with isWritable
set to true
account address
whether account authorized transaction
metadata for writable account
Factory to create AccountMeta with isWritable
set to false
account address
whether account authorized transaction
metadata for read-only account
The transactions provided to this function should be ready to send. This function will do the following:
Generated using TypeDoc
Resembles WalletContextState and Anchor's NodeWallet's signTransaction function signature