@streamflow/stream 10.0.0-alpha.p313.85091cd → 10.0.0-alpha.p313.ac76c04

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.
@@ -2995,7 +2995,7 @@ var SolanaStreamClient = class {
2995
2995
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
2996
2996
  * @returns Create multiple transaction instructions
2997
2997
  */
2998
- async buildCreateMultipleTransactionInstructions(data, extParams) {
2998
+ async buildCreateMultipleTransactionInstructions(data, extParams, applyCustomAfterInstructions = true) {
2999
2999
  const { recipients, ...streamParams } = data;
3000
3000
  const { sender, metadataPubKeys: metadataPubKeysExt, isNative, customInstructions } = extParams;
3001
3001
  common.assertHasPublicKey(sender, "Sender's PublicKey is not available, check passed wallet adapter!");
@@ -3019,7 +3019,9 @@ var SolanaStreamClient = class {
3019
3019
  createStreamData,
3020
3020
  createStreamExtParams
3021
3021
  );
3022
- await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
3022
+ if (applyCustomAfterInstructions) {
3023
+ await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
3024
+ }
3023
3025
  metadataToRecipient[metadataPubKey.toBase58()] = recipientData;
3024
3026
  metadatas.push(metadataPubKey.toBase58());
3025
3027
  instructionsBatch.push({
@@ -3067,9 +3069,9 @@ var SolanaStreamClient = class {
3067
3069
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
3068
3070
  * @returns Multiple transaction information
3069
3071
  */
3070
- async buildCreateMultipleTransactions(data, extParams) {
3072
+ async buildCreateMultipleTransactions(data, extParams, applyCustomAfterInstructions = true) {
3071
3073
  const { sender } = extParams;
3072
- const { instructionsBatch, metadatas, metadataToRecipient, prepareInstructions } = await this.buildCreateMultipleTransactionInstructions(data, extParams);
3074
+ const { instructionsBatch, metadatas, metadataToRecipient, prepareInstructions } = await this.buildCreateMultipleTransactionInstructions(data, extParams, applyCustomAfterInstructions);
3073
3075
  const { value: hash, context } = await this.connection.getLatestBlockhashAndContext();
3074
3076
  const batch = [];
3075
3077
  for (const { ixs, metadata, recipient } of instructionsBatch) {
@@ -3820,7 +3822,7 @@ var SolanaStreamClient = class {
3820
3822
  async flatBuildCreateMultipleTransactionInstructions(data, extParams) {
3821
3823
  const dataArray = Array.isArray(data) ? data : [data];
3822
3824
  const results = await Promise.all(
3823
- dataArray.map((item) => this.buildCreateMultipleTransactionInstructions(item, extParams))
3825
+ dataArray.map((item, index) => this.buildCreateMultipleTransactionInstructions(item, extParams, index === 0))
3824
3826
  );
3825
3827
  return {
3826
3828
  instructionsBatch: results.flatMap((r) => r.instructionsBatch),