@streamflow/stream 8.0.1-alpha.p287.54fe41f → 8.0.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.
@@ -2180,9 +2180,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
2180
2180
  ixs.push(...await solana.prepareWrappedAccount(this.connection, sender.publicKey, totalAmount));
2181
2181
  }
2182
2182
  await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
2183
- const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, sender.publicKey, void 0, [
2184
- metadata
2185
- ]);
2183
+ const { tx, hash, context } = await solana.prepareTransaction(this.connection, ixs, sender.publicKey, void 0, metadata);
2186
2184
  const signature = await solana.signAndExecuteTransaction(
2187
2185
  this.connection,
2188
2186
  extParams.sender,
@@ -2406,7 +2404,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
2406
2404
  ixs,
2407
2405
  extParams.sender.publicKey,
2408
2406
  void 0,
2409
- [metadata]
2407
+ metadata
2410
2408
  );
2411
2409
  const signature = await solana.signAndExecuteTransaction(
2412
2410
  this.connection,
@@ -2568,7 +2566,16 @@ var SolanaStreamClient = class extends BaseStreamClient {
2568
2566
  }
2569
2567
  const { value: hash, context } = await this.connection.getLatestBlockhashAndContext();
2570
2568
  for (const { ixs, metadata, recipient } of instructionsBatch) {
2571
- batch.push({ tx: solana.createVersionedTransaction(ixs, sender.publicKey, hash.blockhash, [metadata]), recipient });
2569
+ const messageV0 = new web3_js.TransactionMessage({
2570
+ payerKey: sender.publicKey,
2571
+ recentBlockhash: hash.blockhash,
2572
+ instructions: ixs
2573
+ }).compileToV0Message();
2574
+ const tx = new web3_js.VersionedTransaction(messageV0);
2575
+ if (metadata) {
2576
+ tx.sign([metadata]);
2577
+ }
2578
+ batch.push({ tx, recipient });
2572
2579
  }
2573
2580
  const prepareInstructions = await this.getCreateATAInstructions(
2574
2581
  [STREAMFLOW_TREASURY_PUBLIC_KEY, partnerPublicKey],
@@ -2582,8 +2589,14 @@ var SolanaStreamClient = class extends BaseStreamClient {
2582
2589
  prepareInstructions.push(...nativeInstructions);
2583
2590
  }
2584
2591
  if (prepareInstructions.length > 0) {
2592
+ const messageV0 = new web3_js.TransactionMessage({
2593
+ payerKey: sender.publicKey,
2594
+ recentBlockhash: hash.blockhash,
2595
+ instructions: prepareInstructions
2596
+ }).compileToV0Message();
2597
+ const tx = new web3_js.VersionedTransaction(messageV0);
2585
2598
  batch.push({
2586
- tx: solana.createVersionedTransaction(prepareInstructions, sender.publicKey, hash.blockhash),
2599
+ tx,
2587
2600
  recipient: sender.publicKey.toBase58()
2588
2601
  });
2589
2602
  }