@lightprotocol/stateless.js 0.9.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6989,15 +6989,16 @@ if (import.meta.vitest) {
6989
6989
  * @param instructions instructions to include
6990
6990
  * @param payerPublicKey fee payer public key
6991
6991
  * @param blockhash blockhash to use
6992
+ * @param lookupTableAccounts lookup table accounts to include
6992
6993
  *
6993
6994
  * @return VersionedTransaction
6994
6995
  */
6995
- function buildTx(instructions, payerPublicKey, blockhash) {
6996
+ function buildTx(instructions, payerPublicKey, blockhash, lookupTableAccounts) {
6996
6997
  const messageV0 = new TransactionMessage({
6997
6998
  payerKey: payerPublicKey,
6998
6999
  recentBlockhash: blockhash,
6999
7000
  instructions,
7000
- }).compileToV0Message();
7001
+ }).compileToV0Message(lookupTableAccounts);
7001
7002
  return new VersionedTransaction(messageV0);
7002
7003
  }
7003
7004
  /**
@@ -7053,12 +7054,13 @@ async function confirmTx(rpc, txId, confirmOptions, blockHashCtx) {
7053
7054
  * @param payer payer of the transaction
7054
7055
  * @param blockhash recent blockhash to use in the transaction
7055
7056
  * @param additionalSigners non-feepayer signers to include in the transaction
7057
+ * @param lookupTableAccounts lookup table accounts to include in the transaction
7056
7058
  */
7057
- function buildAndSignTx(instructions, payer, blockhash, additionalSigners = []) {
7059
+ function buildAndSignTx(instructions, payer, blockhash, additionalSigners = [], lookupTableAccounts) {
7058
7060
  if (additionalSigners.includes(payer))
7059
7061
  throw new Error('payer must not be in additionalSigners');
7060
7062
  const allSigners = [payer, ...additionalSigners];
7061
- const tx = buildTx(instructions, payer.publicKey, blockhash);
7063
+ const tx = buildTx(instructions, payer.publicKey, blockhash, lookupTableAccounts);
7062
7064
  tx.sign(allSigners);
7063
7065
  return tx;
7064
7066
  }