@streamflow/stream 9.0.2 → 9.0.3

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.
@@ -1,4 +1,4 @@
1
- export { Z as Account, a5 as AlignedContract, M as AlignedUnlocksContract, a8 as BatchItem, aa as BatchItemError, ab as BatchItemResult, a9 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a4 as Contract, R as CreateParams, V as CreateTestOracleParams, a6 as DecodedStream, $ as ICreateSolanaExt, a3 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, a1 as IPrepareCreateStreamSolanaExt, a2 as IPrepareStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, ac as InstructionGenerator, a7 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, ah as cancelStreamInstruction, x as constants, ad as createStreamInstruction, ae as createUncheckedStreamInstruction, z as decodeStream, J as deriveContractPDA, K as deriveEscrowPDA, L as deriveTestOraclePDA, H as extractSolanaErrorCode, G as sendAndConfirmStreamRawTransaction, B as signAllTransactionWithRecipients, _ as timelockIDL, aj as topupStreamInstruction, ai as transferStreamInstruction, ag as updateStreamInstruction, af as withdrawStreamInstruction } from '../index-BNQVJtIE.js';
1
+ export { Z as Account, a5 as AlignedContract, M as AlignedUnlocksContract, a8 as BatchItem, aa as BatchItemError, ab as BatchItemResult, a9 as BatchItemSuccess, U as ChangeOracleParams, y as ClientCreationOptions, a4 as Contract, R as CreateParams, V as CreateTestOracleParams, a6 as DecodedStream, $ as ICreateSolanaExt, a3 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, a1 as IPrepareCreateStreamSolanaExt, a2 as IPrepareStreamSolanaExt, Y as ISearchStreams, b as ITopUpStreamSolanaExt, a0 as ITransactionSolanaExtWithInstructions, ac as InstructionGenerator, a7 as MetadataRecipientHashMap, N as OracleType, S as SolanaStreamClient, Q as TestOracle, X as UpdateTestOracleParams, ah as cancelStreamInstruction, x as constants, ad as createStreamInstruction, ae as createUncheckedStreamInstruction, z as decodeStream, J as deriveContractPDA, K as deriveEscrowPDA, L as deriveTestOraclePDA, H as extractSolanaErrorCode, G as sendAndConfirmStreamRawTransaction, B as signAllTransactionWithRecipients, _ as timelockIDL, aj as topupStreamInstruction, ai as transferStreamInstruction, ag as updateStreamInstruction, af as withdrawStreamInstruction } from '../index-Dp5DXxr-.js';
2
2
  export { ContractError, IChain, ICluster } from '@streamflow/common';
3
3
  import 'p-queue';
4
4
  import '@solana/web3.js';
@@ -2428,6 +2428,9 @@ var SolanaStreamClient = class extends BaseStreamClient {
2428
2428
  getProgramId() {
2429
2429
  return this.programId.toBase58();
2430
2430
  }
2431
+ getAlignedProxyProgramId() {
2432
+ return this.alignedProxyProgram.programId.toBase58();
2433
+ }
2431
2434
  /**
2432
2435
  * Builds transaction instructions for creating a new stream/vesting contract without creating a transaction.
2433
2436
  * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
@@ -3656,6 +3659,13 @@ var SolanaStreamClient = class extends BaseStreamClient {
3656
3659
  const logs = "logs" in err && Array.isArray(err.logs) ? err.logs : void 0;
3657
3660
  return extractSolanaErrorCode(err.toString() ?? "Unknown error!", logs);
3658
3661
  }
3662
+ /**
3663
+ * Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
3664
+ */
3665
+ isAlignedUnlock(streamPublicKey, senderPublicKey) {
3666
+ const pda = deriveContractPDA(this.alignedProxyProgram.programId, streamPublicKey);
3667
+ return senderPublicKey.equals(pda);
3668
+ }
3659
3669
  /**
3660
3670
  * Utility function to generate metadata for a Contract or return existing Pubkey
3661
3671
  */
@@ -3670,13 +3680,6 @@ var SolanaStreamClient = class extends BaseStreamClient {
3670
3680
  }
3671
3681
  return { metadata, metadataPubKey };
3672
3682
  }
3673
- /**
3674
- * Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
3675
- */
3676
- isAlignedUnlock(streamPublicKey, senderPublicKey) {
3677
- const pda = deriveContractPDA(this.alignedProxyProgram.programId, streamPublicKey);
3678
- return senderPublicKey.equals(pda);
3679
- }
3680
3683
  /**
3681
3684
  * Returns insrtuctions for creating associated token accounts for the provided owners
3682
3685
  */