@streamflow/stream 8.0.0-alpha.p287.5172056 → 8.0.0

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.
@@ -4774,9 +4774,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
4774
4774
  ixs.push(...await solana.prepareWrappedAccount(this.connection, sender.publicKey, totalAmount));
4775
4775
  }
4776
4776
  await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
4777
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, sender.publicKey, void 0, [
4778
- metadata
4779
- ]);
4777
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, sender.publicKey, void 0, metadata);
4780
4778
  const signature = await solana.signAndExecuteTransaction(
4781
4779
  this.connection,
4782
4780
  extParams.sender,
@@ -5000,7 +4998,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5000
4998
  ixs,
5001
4999
  extParams.sender.publicKey,
5002
5000
  void 0,
5003
- [metadata]
5001
+ metadata
5004
5002
  );
5005
5003
  const signature = await solana.signAndExecuteTransaction(
5006
5004
  this.connection,
@@ -5162,7 +5160,16 @@ var SolanaStreamClient = class extends BaseStreamClient {
5162
5160
  }
5163
5161
  const { value: hash, context } = await this.connection.getLatestBlockhashAndContext();
5164
5162
  for (const { ixs, metadata, recipient } of instructionsBatch) {
5165
- batch.push({ tx: solana.createVersionedTransaction(ixs, sender.publicKey, hash.blockhash, [metadata]), recipient });
5163
+ const messageV0 = new web3_js.TransactionMessage({
5164
+ payerKey: sender.publicKey,
5165
+ recentBlockhash: hash.blockhash,
5166
+ instructions: ixs
5167
+ }).compileToV0Message();
5168
+ const tx = new web3_js.VersionedTransaction(messageV0);
5169
+ if (metadata) {
5170
+ tx.sign([metadata]);
5171
+ }
5172
+ batch.push({ tx, recipient });
5166
5173
  }
5167
5174
  const prepareInstructions = await this.getCreateATAInstructions(
5168
5175
  [STREAMFLOW_TREASURY_PUBLIC_KEY, partnerPublicKey],
@@ -5176,8 +5183,14 @@ var SolanaStreamClient = class extends BaseStreamClient {
5176
5183
  prepareInstructions.push(...nativeInstructions);
5177
5184
  }
5178
5185
  if (prepareInstructions.length > 0) {
5186
+ const messageV0 = new web3_js.TransactionMessage({
5187
+ payerKey: sender.publicKey,
5188
+ recentBlockhash: hash.blockhash,
5189
+ instructions: prepareInstructions
5190
+ }).compileToV0Message();
5191
+ const tx = new web3_js.VersionedTransaction(messageV0);
5179
5192
  batch.push({
5180
- tx: solana.createVersionedTransaction(prepareInstructions, sender.publicKey, hash.blockhash),
5193
+ tx,
5181
5194
  recipient: sender.publicKey.toBase58()
5182
5195
  });
5183
5196
  }