@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.
@@ -583,7 +583,7 @@ declare class SolanaStreamClient {
583
583
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
584
584
  * @returns Create multiple transaction instructions
585
585
  */
586
- buildCreateMultipleTransactionInstructions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt): Promise<{
586
+ buildCreateMultipleTransactionInstructions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt, applyCustomAfterInstructions?: boolean): Promise<{
587
587
  instructionsBatch: {
588
588
  ixs: TransactionInstruction[];
589
589
  metadata: Keypair | undefined;
@@ -619,7 +619,7 @@ declare class SolanaStreamClient {
619
619
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
620
620
  * @returns Multiple transaction information
621
621
  */
622
- buildCreateMultipleTransactions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt): Promise<{
622
+ buildCreateMultipleTransactions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt, applyCustomAfterInstructions?: boolean): Promise<{
623
623
  transactions: BatchItem[];
624
624
  metadatas: string[];
625
625
  metadataToRecipient: MetadataRecipientHashMap;
@@ -2969,7 +2969,7 @@ var SolanaStreamClient = class {
2969
2969
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
2970
2970
  * @returns Create multiple transaction instructions
2971
2971
  */
2972
- async buildCreateMultipleTransactionInstructions(data, extParams) {
2972
+ async buildCreateMultipleTransactionInstructions(data, extParams, applyCustomAfterInstructions = true) {
2973
2973
  const { recipients, ...streamParams } = data;
2974
2974
  const { sender, metadataPubKeys: metadataPubKeysExt, isNative, customInstructions } = extParams;
2975
2975
  assertHasPublicKey(sender, "Sender's PublicKey is not available, check passed wallet adapter!");
@@ -2993,7 +2993,9 @@ var SolanaStreamClient = class {
2993
2993
  createStreamData,
2994
2994
  createStreamExtParams
2995
2995
  );
2996
- await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
2996
+ if (applyCustomAfterInstructions) {
2997
+ await this.applyCustomAfterInstructions(ixs, customInstructions, metadataPubKey);
2998
+ }
2997
2999
  metadataToRecipient[metadataPubKey.toBase58()] = recipientData;
2998
3000
  metadatas.push(metadataPubKey.toBase58());
2999
3001
  instructionsBatch.push({
@@ -3041,9 +3043,9 @@ var SolanaStreamClient = class {
3041
3043
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
3042
3044
  * @returns Multiple transaction information
3043
3045
  */
3044
- async buildCreateMultipleTransactions(data, extParams) {
3046
+ async buildCreateMultipleTransactions(data, extParams, applyCustomAfterInstructions = true) {
3045
3047
  const { sender } = extParams;
3046
- const { instructionsBatch, metadatas, metadataToRecipient, prepareInstructions } = await this.buildCreateMultipleTransactionInstructions(data, extParams);
3048
+ const { instructionsBatch, metadatas, metadataToRecipient, prepareInstructions } = await this.buildCreateMultipleTransactionInstructions(data, extParams, applyCustomAfterInstructions);
3047
3049
  const { value: hash, context } = await this.connection.getLatestBlockhashAndContext();
3048
3050
  const batch = [];
3049
3051
  for (const { ixs, metadata, recipient } of instructionsBatch) {
@@ -3794,7 +3796,7 @@ var SolanaStreamClient = class {
3794
3796
  async flatBuildCreateMultipleTransactionInstructions(data, extParams) {
3795
3797
  const dataArray = Array.isArray(data) ? data : [data];
3796
3798
  const results = await Promise.all(
3797
- dataArray.map((item) => this.buildCreateMultipleTransactionInstructions(item, extParams))
3799
+ dataArray.map((item, index) => this.buildCreateMultipleTransactionInstructions(item, extParams, index === 0))
3798
3800
  );
3799
3801
  return {
3800
3802
  instructionsBatch: results.flatMap((r) => r.instructionsBatch),