prepareTransaction()
prepareTransaction()
function prepareTransaction(
connection,
ixs,
payer,
commitment?,
partialSigners?,
lookupTables?): Promise<{
context: Context;
hash: BlockhashWithExpiryBlockHeight;
tx: VersionedTransaction;
}>;Defined in: utils.ts:122
Creates a Transaction with given instructions and optionally signs it.
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | Connection | Solana client connection |
ixs | TransactionInstruction[] | Instructions to add to the Transaction |
payer | PublicKey | PublicKey of payer |
commitment? | Commitment | optional Commitment that will be used to fetch latest blockhash |
partialSigners? | Keypair[] | optional signers that will be used to partially sign a Transaction |
lookupTables? | AddressLookupTableAccount[] | lookup table accounts to use in the transaction |
Returns
Promise<{
context: Context;
hash: BlockhashWithExpiryBlockHeight;
tx: VersionedTransaction;
}>
Transaction and Blockhash