@streamflow/stream 9.3.4 → 9.4.0-alpha.p325.15b4539

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.
Files changed (29) hide show
  1. package/dist/cjs/{BaseStreamClient-CHsnYIS9.d.cts → BaseStreamClient-BRangMb7.d.cts} +5 -0
  2. package/dist/cjs/aptos/index.d.cts +2 -2
  3. package/dist/cjs/evm/index.d.cts +2 -2
  4. package/dist/cjs/{index-C23IQA_J.d.cts → index-BLHxwbFK.d.cts} +1 -1
  5. package/dist/cjs/{index-W_ordLlY.d.cts → index-Bk3BX3xT.d.cts} +1 -1
  6. package/dist/cjs/{index-BPXCu9SM.d.cts → index-CQ0MapA9.d.cts} +1 -1
  7. package/dist/cjs/{index-BUzIZ0Xt.d.cts → index-odfplH5I.d.cts} +48 -10
  8. package/dist/cjs/index.cjs +60 -22
  9. package/dist/cjs/index.cjs.map +1 -1
  10. package/dist/cjs/index.d.cts +10 -10
  11. package/dist/cjs/solana/index.cjs +57 -22
  12. package/dist/cjs/solana/index.cjs.map +1 -1
  13. package/dist/cjs/solana/index.d.cts +2 -2
  14. package/dist/cjs/sui/index.d.cts +2 -2
  15. package/dist/esm/{BaseStreamClient-CHsnYIS9.d.ts → BaseStreamClient-BRangMb7.d.ts} +5 -0
  16. package/dist/esm/aptos/index.d.ts +2 -2
  17. package/dist/esm/evm/index.d.ts +2 -2
  18. package/dist/esm/{index-NAVXCAs6.d.ts → index-C2SrwWri.d.ts} +1 -1
  19. package/dist/esm/{index-DeXLiSzq.d.ts → index-D_k66_bp.d.ts} +1 -1
  20. package/dist/esm/{index-Dy_mbGDE.d.ts → index-DfKoIGsU.d.ts} +48 -10
  21. package/dist/esm/{index-Qi50rkRx.d.ts → index-DnUf1qd8.d.ts} +1 -1
  22. package/dist/esm/index.d.ts +10 -10
  23. package/dist/esm/index.js +58 -23
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/solana/index.d.ts +2 -2
  26. package/dist/esm/solana/index.js +57 -22
  27. package/dist/esm/solana/index.js.map +1 -1
  28. package/dist/esm/sui/index.d.ts +2 -2
  29. package/package.json +4 -4
@@ -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-BUzIZ0Xt.cjs';
1
+ export { a1 as Account, a8 as AlignedContract, R as AlignedUnlocksContract, ab as BatchItem, ad as BatchItemError, ae as BatchItemResult, ac as BatchItemSuccess, Y as ChangeOracleParams, G as ClientCreationOptions, a7 as Contract, X as CreateParams, Z as CreateTestOracleParams, a9 as DecodedStream, a2 as ICreateSolanaExt, a6 as ICreateStreamInstructions, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, a4 as IPrepareCreateStreamSolanaExt, a5 as IPrepareStreamSolanaExt, a0 as ISearchStreams, b as ITopUpStreamSolanaExt, a3 as ITransactionSolanaExtWithInstructions, af as InstructionGenerator, aa as MetadataRecipientHashMap, U as OracleType, S as SolanaStreamClient, V as TestOracle, $ as UpdateTestOracleParams, ak as cancelStreamInstruction, B as constants, ag as createStreamInstruction, ah as createUncheckedStreamInstruction, H as decodeStream, M as deriveContractPDA, N as deriveEscrowPDA, Q as deriveTestOraclePDA, L as extractSolanaErrorCode, K as sendAndConfirmStreamRawTransaction, J as signAllTransactionWithRecipients, _ as timelockIDL, am as topupStreamInstruction, al as transferStreamInstruction, aj as updateStreamInstruction, ai as withdrawStreamInstruction } from '../index-odfplH5I.cjs';
2
2
  export { ContractError, IChain, ICluster } from '@streamflow/common';
3
3
  import 'p-queue';
4
4
  import '@solana/web3.js';
@@ -6,7 +6,7 @@ import '@streamflow/common/solana';
6
6
  import '@coral-xyz/anchor';
7
7
  import '@solana/wallet-adapter-base';
8
8
  import 'bn.js';
9
- import '../BaseStreamClient-CHsnYIS9.cjs';
9
+ import '../BaseStreamClient-BRangMb7.cjs';
10
10
  import 'ethers';
11
11
  import 'aptos';
12
12
  import '@mysten/sui/cryptography';
@@ -1,5 +1,5 @@
1
- export { S as SuiStreamClient, c as constants, e as extractSuiErrorInfo, g as getTransactionBlock } from '../index-BPXCu9SM.cjs';
2
- export { R as ClassResource, P as Contract, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, f as ICreateStreamSuiExt, N as ISuiIdParameters, k as ITransactionSuiExt, X as StreamResource, Q as SuiErrorInfo, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from '../BaseStreamClient-CHsnYIS9.cjs';
1
+ export { S as SuiStreamClient, c as constants, e as extractSuiErrorInfo, g as getTransactionBlock } from '../index-CQ0MapA9.cjs';
2
+ export { R as ClassResource, P as Contract, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, f as ICreateStreamSuiExt, N as ISuiIdParameters, k as ITransactionSuiExt, X as StreamResource, Q as SuiErrorInfo, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from '../BaseStreamClient-BRangMb7.cjs';
3
3
  import '@streamflow/common';
4
4
  import '@mysten/sui/client';
5
5
  import '@coral-xyz/anchor';
@@ -257,7 +257,12 @@ interface ITransactionResult {
257
257
  ixs: (TransactionInstruction | Types.TransactionPayload)[];
258
258
  txId: string;
259
259
  }
260
+ /**
261
+ * Schema outlining vesting protocol fees.
262
+ */
260
263
  interface IFees {
264
+ creationFeeSol?: number;
265
+ autoClaimFeeSol?: number;
261
266
  streamflowFee: number;
262
267
  partnerFee: number;
263
268
  }
@@ -1,5 +1,5 @@
1
- export { A as AptosStreamClient, C as ConfigResource, b as Contract, F as FeeTableResource, I as ICreateStreamAptosExt, a as ITransactionAptosExt, S as StreamResource, c as constants, A as default, e as extractAptosErrorCode, n as normalizeAptosAddress } from '../index-NAVXCAs6.js';
2
- import '../BaseStreamClient-CHsnYIS9.js';
1
+ export { A as AptosStreamClient, C as ConfigResource, b as Contract, F as FeeTableResource, I as ICreateStreamAptosExt, a as ITransactionAptosExt, S as StreamResource, c as constants, A as default, e as extractAptosErrorCode, n as normalizeAptosAddress } from '../index-C2SrwWri.js';
2
+ import '../BaseStreamClient-BRangMb7.js';
3
3
  import '@coral-xyz/anchor';
4
4
  import '@solana/web3.js';
5
5
  import '@streamflow/common';
@@ -1,7 +1,7 @@
1
- export { a as EvmContract, E as EvmStreamClient, F as FeesAbiResult, S as StreamAbiResult, c as constants, E as default, _ as ercAbi, e as extractEvmErrorCode } from '../index-DeXLiSzq.js';
1
+ export { a as EvmContract, E as EvmStreamClient, F as FeesAbiResult, S as StreamAbiResult, c as constants, E as default, _ as ercAbi, e as extractEvmErrorCode } from '../index-D_k66_bp.js';
2
2
  import 'ethers';
3
3
  import 'bn.js';
4
- import '../BaseStreamClient-CHsnYIS9.js';
4
+ import '../BaseStreamClient-BRangMb7.js';
5
5
  import '@coral-xyz/anchor';
6
6
  import '@solana/web3.js';
7
7
  import '@streamflow/common';
@@ -1,4 +1,4 @@
1
- import { L as LinearStream, b as StreamType, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-CHsnYIS9.js';
1
+ import { L as LinearStream, b as StreamType, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-BRangMb7.js';
2
2
  import { WalletContextState } from '@manahippo/aptos-wallet-adapter';
3
3
  import BN from 'bn.js';
4
4
  import { AptosAccount } from 'aptos';
@@ -1,6 +1,6 @@
1
1
  import { ethers, BigNumber } from 'ethers';
2
2
  import BN from 'bn.js';
3
- import { B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, r as IUpdateData, p as IGetOneData, S as Stream, q as IGetAllData, s as IGetFeesData, t as IFees, L as LinearStream, b as StreamType, G as ContractErrorCode } from './BaseStreamClient-CHsnYIS9.js';
3
+ import { B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, r as IUpdateData, p as IGetOneData, S as Stream, q as IGetAllData, s as IGetFeesData, t as IFees, L as LinearStream, b as StreamType, G as ContractErrorCode } from './BaseStreamClient-BRangMb7.js';
4
4
  import { IChain, ICluster } from '@streamflow/common';
5
5
 
6
6
  declare class EvmStreamClient extends BaseStreamClient {
@@ -4,7 +4,7 @@ import { ITransactionSolanaExt, IProgramAccount, ConfirmationParams, ThrottlePar
4
4
  import { IdlAccounts, IdlTypes, Program } from '@coral-xyz/anchor';
5
5
  import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
6
6
  import BN from 'bn.js';
7
- import { u as IRecipient, L as LinearStream, b as StreamType, A as AlignedStream, O as OracleTypeName, c as SolanaStreamClientOptions, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, a as ICreateAlignedStreamData, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, S as Stream, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-CHsnYIS9.js';
7
+ import { u as IRecipient, L as LinearStream, b as StreamType, A as AlignedStream, O as OracleTypeName, c as SolanaStreamClientOptions, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, a as ICreateAlignedStreamData, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, S as Stream, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-BRangMb7.js';
8
8
  import { StreamflowAlignedUnlocks } from './solana/descriptor/streamflow_aligned_unlocks.js';
9
9
  import { ICluster, ContractError, IChain } from '@streamflow/common';
10
10
  import { Buffer as Buffer$1 } from 'buffer';
@@ -205,6 +205,8 @@ type ClientCreationOptions = Omit<SolanaStreamClientOptions, "chain" | "sendRate
205
205
  declare class SolanaStreamClient extends BaseStreamClient {
206
206
  private readonly connection;
207
207
  private readonly programId;
208
+ private readonly partnerOracleProgramId;
209
+ private readonly feeOraclePublicKey;
208
210
  private readonly commitment;
209
211
  readonly alignedProxyProgram: Program<StreamflowAlignedUnlocks>;
210
212
  private readonly schedulingParams;
@@ -492,6 +494,12 @@ declare class SolanaStreamClient extends BaseStreamClient {
492
494
  * @returns Default streamflow fee
493
495
  */
494
496
  getDefaultStreamflowFee(): Promise<number>;
497
+ /**
498
+ * Get all defaults fees applied by the protocol.
499
+ *
500
+ * Protocol will use fees set for WITHDRAWOR as default if they are set.
501
+ */
502
+ getDefaultFees(): Promise<IFees>;
495
503
  /**
496
504
  * Extracts error code from an error
497
505
  * @param {Error} err - Error
@@ -696,19 +704,32 @@ declare const ALIGNED_UNLOCKS_PROGRAM_ID: {
696
704
  testnet: string;
697
705
  local: string;
698
706
  };
707
+ declare const PARTNER_ORACLE_PROGRAM_ID: {
708
+ devnet: string;
709
+ mainnet: string;
710
+ testnet: string;
711
+ local: string;
712
+ };
713
+ declare const FEE_ORACLE_PUBLIC_KEY: {
714
+ devnet: string;
715
+ mainnet: string;
716
+ testnet: string;
717
+ local: string;
718
+ };
699
719
  declare const ALIGNED_COMPUTE_LIMIT = 300000;
700
720
  declare const CONTRACT_DISCRIMINATOR: number[];
701
721
  declare const TEST_ORACLE_DISCRIMINATOR: number[];
702
722
  declare const CONTRACT_SEED: Buffer$1;
703
723
  declare const ESCROW_SEED: Buffer$1;
704
724
  declare const TEST_ORACLE_SEED: Buffer$1;
705
- declare const PARTNER_ORACLE_PROGRAM_ID = "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa";
706
725
  declare const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey;
726
+ declare const WITHDRAWOR = "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u";
707
727
  declare const WITHDRAWOR_PUBLIC_KEY: PublicKey;
708
- declare const FEE_ORACLE_PUBLIC_KEY: PublicKey;
709
728
  declare const AIRDROP_TEST_TOKEN = "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj";
710
729
  declare const FEES_METADATA_SEED: Buffer$1;
711
- declare const DEFAULT_STREAMFLOW_FEE = 0.99;
730
+ declare const DEFAULT_CREATION_FEE_SOL = 90000000;
731
+ declare const DEFAULT_AUTO_CLAIM_FEE_SOL = 190000000;
732
+ declare const DEFAULT_STREAMFLOW_FEE = 0.19;
712
733
  declare const AIRDROP_AMOUNT = 1;
713
734
  declare const PARTNER_SCHEMA: {
714
735
  struct: {
@@ -718,8 +739,15 @@ declare const PARTNER_SCHEMA: {
718
739
  len: number;
719
740
  };
720
741
  };
721
- partner_fee: string;
722
- strm_fee: string;
742
+ creation_fee: string;
743
+ auto_claim_fee: string;
744
+ token_fee_percent: string;
745
+ buffer: {
746
+ array: {
747
+ type: string;
748
+ len: number;
749
+ };
750
+ };
723
751
  };
724
752
  };
725
753
  declare const PARTNERS_SCHEMA: {
@@ -732,8 +760,15 @@ declare const PARTNERS_SCHEMA: {
732
760
  len: number;
733
761
  };
734
762
  };
735
- partner_fee: string;
736
- strm_fee: string;
763
+ creation_fee: string;
764
+ auto_claim_fee: string;
765
+ token_fee_percent: string;
766
+ buffer: {
767
+ array: {
768
+ type: string;
769
+ len: number;
770
+ };
771
+ };
737
772
  };
738
773
  };
739
774
  };
@@ -751,6 +786,8 @@ declare const constants_ALIGNED_UNLOCKS_PROGRAM_ID: typeof ALIGNED_UNLOCKS_PROGR
751
786
  declare const constants_CONTRACT_DISCRIMINATOR: typeof CONTRACT_DISCRIMINATOR;
752
787
  declare const constants_CONTRACT_SEED: typeof CONTRACT_SEED;
753
788
  declare const constants_CREATE_PARAMS_PADDING: typeof CREATE_PARAMS_PADDING;
789
+ declare const constants_DEFAULT_AUTO_CLAIM_FEE_SOL: typeof DEFAULT_AUTO_CLAIM_FEE_SOL;
790
+ declare const constants_DEFAULT_CREATION_FEE_SOL: typeof DEFAULT_CREATION_FEE_SOL;
754
791
  declare const constants_DEFAULT_STREAMFLOW_FEE: typeof DEFAULT_STREAMFLOW_FEE;
755
792
  declare const constants_ESCROW_SEED: typeof ESCROW_SEED;
756
793
  declare const constants_FEES_METADATA_SEED: typeof FEES_METADATA_SEED;
@@ -771,9 +808,10 @@ declare const constants_STREAM_STRUCT_OFFSET_SENDER: typeof STREAM_STRUCT_OFFSET
771
808
  declare const constants_TEST_ORACLE_DISCRIMINATOR: typeof TEST_ORACLE_DISCRIMINATOR;
772
809
  declare const constants_TEST_ORACLE_SEED: typeof TEST_ORACLE_SEED;
773
810
  declare const constants_TX_FINALITY_CONFIRMED: typeof TX_FINALITY_CONFIRMED;
811
+ declare const constants_WITHDRAWOR: typeof WITHDRAWOR;
774
812
  declare const constants_WITHDRAWOR_PUBLIC_KEY: typeof WITHDRAWOR_PUBLIC_KEY;
775
813
  declare namespace constants {
776
- export { constants_AIRDROP_AMOUNT as AIRDROP_AMOUNT, constants_AIRDROP_TEST_TOKEN as AIRDROP_TEST_TOKEN, constants_ALIGNED_COMPUTE_LIMIT as ALIGNED_COMPUTE_LIMIT, constants_ALIGNED_PRECISION_FACTOR_POW as ALIGNED_PRECISION_FACTOR_POW, constants_ALIGNED_UNLOCKS_PROGRAM_ID as ALIGNED_UNLOCKS_PROGRAM_ID, constants_CONTRACT_DISCRIMINATOR as CONTRACT_DISCRIMINATOR, constants_CONTRACT_SEED as CONTRACT_SEED, constants_CREATE_PARAMS_PADDING as CREATE_PARAMS_PADDING, constants_DEFAULT_STREAMFLOW_FEE as DEFAULT_STREAMFLOW_FEE, constants_ESCROW_SEED as ESCROW_SEED, constants_FEES_METADATA_SEED as FEES_METADATA_SEED, constants_FEE_ORACLE_PUBLIC_KEY as FEE_ORACLE_PUBLIC_KEY, constants_ORIGINAL_CONTRACT_SENDER_OFFSET as ORIGINAL_CONTRACT_SENDER_OFFSET, constants_PARTNERS_SCHEMA as PARTNERS_SCHEMA, constants_PARTNER_ORACLE_PROGRAM_ID as PARTNER_ORACLE_PROGRAM_ID, constants_PARTNER_SCHEMA as PARTNER_SCHEMA, constants_PROGRAM_ID as PROGRAM_ID, constants_SOLANA_ERROR_MAP as SOLANA_ERROR_MAP, constants_SOLANA_ERROR_MATCH_REGEX as SOLANA_ERROR_MATCH_REGEX, constants_STREAMFLOW_TREASURY_PUBLIC_KEY as STREAMFLOW_TREASURY_PUBLIC_KEY, constants_STREAM_STRUCT_OFFSETS as STREAM_STRUCT_OFFSETS, constants_STREAM_STRUCT_OFFSET_CLOSED as STREAM_STRUCT_OFFSET_CLOSED, constants_STREAM_STRUCT_OFFSET_MINT as STREAM_STRUCT_OFFSET_MINT, constants_STREAM_STRUCT_OFFSET_RECIPIENT as STREAM_STRUCT_OFFSET_RECIPIENT, constants_STREAM_STRUCT_OFFSET_SENDER as STREAM_STRUCT_OFFSET_SENDER, constants_TEST_ORACLE_DISCRIMINATOR as TEST_ORACLE_DISCRIMINATOR, constants_TEST_ORACLE_SEED as TEST_ORACLE_SEED, constants_TX_FINALITY_CONFIRMED as TX_FINALITY_CONFIRMED, constants_WITHDRAWOR_PUBLIC_KEY as WITHDRAWOR_PUBLIC_KEY };
814
+ export { constants_AIRDROP_AMOUNT as AIRDROP_AMOUNT, constants_AIRDROP_TEST_TOKEN as AIRDROP_TEST_TOKEN, constants_ALIGNED_COMPUTE_LIMIT as ALIGNED_COMPUTE_LIMIT, constants_ALIGNED_PRECISION_FACTOR_POW as ALIGNED_PRECISION_FACTOR_POW, constants_ALIGNED_UNLOCKS_PROGRAM_ID as ALIGNED_UNLOCKS_PROGRAM_ID, constants_CONTRACT_DISCRIMINATOR as CONTRACT_DISCRIMINATOR, constants_CONTRACT_SEED as CONTRACT_SEED, constants_CREATE_PARAMS_PADDING as CREATE_PARAMS_PADDING, constants_DEFAULT_AUTO_CLAIM_FEE_SOL as DEFAULT_AUTO_CLAIM_FEE_SOL, constants_DEFAULT_CREATION_FEE_SOL as DEFAULT_CREATION_FEE_SOL, constants_DEFAULT_STREAMFLOW_FEE as DEFAULT_STREAMFLOW_FEE, constants_ESCROW_SEED as ESCROW_SEED, constants_FEES_METADATA_SEED as FEES_METADATA_SEED, constants_FEE_ORACLE_PUBLIC_KEY as FEE_ORACLE_PUBLIC_KEY, constants_ORIGINAL_CONTRACT_SENDER_OFFSET as ORIGINAL_CONTRACT_SENDER_OFFSET, constants_PARTNERS_SCHEMA as PARTNERS_SCHEMA, constants_PARTNER_ORACLE_PROGRAM_ID as PARTNER_ORACLE_PROGRAM_ID, constants_PARTNER_SCHEMA as PARTNER_SCHEMA, constants_PROGRAM_ID as PROGRAM_ID, constants_SOLANA_ERROR_MAP as SOLANA_ERROR_MAP, constants_SOLANA_ERROR_MATCH_REGEX as SOLANA_ERROR_MATCH_REGEX, constants_STREAMFLOW_TREASURY_PUBLIC_KEY as STREAMFLOW_TREASURY_PUBLIC_KEY, constants_STREAM_STRUCT_OFFSETS as STREAM_STRUCT_OFFSETS, constants_STREAM_STRUCT_OFFSET_CLOSED as STREAM_STRUCT_OFFSET_CLOSED, constants_STREAM_STRUCT_OFFSET_MINT as STREAM_STRUCT_OFFSET_MINT, constants_STREAM_STRUCT_OFFSET_RECIPIENT as STREAM_STRUCT_OFFSET_RECIPIENT, constants_STREAM_STRUCT_OFFSET_SENDER as STREAM_STRUCT_OFFSET_SENDER, constants_TEST_ORACLE_DISCRIMINATOR as TEST_ORACLE_DISCRIMINATOR, constants_TEST_ORACLE_SEED as TEST_ORACLE_SEED, constants_TX_FINALITY_CONFIRMED as TX_FINALITY_CONFIRMED, constants_WITHDRAWOR as WITHDRAWOR, constants_WITHDRAWOR_PUBLIC_KEY as WITHDRAWOR_PUBLIC_KEY };
777
815
  }
778
816
 
779
817
  declare const _default: {
@@ -851,4 +889,4 @@ declare namespace index {
851
889
  export { type index_Account as Account, index_AlignedContract as AlignedContract, type index_AlignedUnlocksContract as AlignedUnlocksContract, type index_BatchItem as BatchItem, type index_BatchItemError as BatchItemError, type index_BatchItemResult as BatchItemResult, type index_BatchItemSuccess as BatchItemSuccess, type index_ChangeOracleParams as ChangeOracleParams, type index_ClientCreationOptions as ClientCreationOptions, index_Contract as Contract, index_ContractError as ContractError, type index_CreateParams as CreateParams, type index_CreateTestOracleParams as CreateTestOracleParams, type index_DecodedStream as DecodedStream, index_IChain as IChain, index_ICluster as ICluster, type index_ICreateSolanaExt as ICreateSolanaExt, type index_ICreateStreamInstructions as ICreateStreamInstructions, type index_ICreateStreamSolanaExt as ICreateStreamSolanaExt, type index_IInteractStreamSolanaExt as IInteractStreamSolanaExt, type index_IPrepareCreateStreamSolanaExt as IPrepareCreateStreamSolanaExt, type index_IPrepareStreamSolanaExt as IPrepareStreamSolanaExt, type index_ISearchStreams as ISearchStreams, type index_ITopUpStreamSolanaExt as ITopUpStreamSolanaExt, type index_ITransactionSolanaExtWithInstructions as ITransactionSolanaExtWithInstructions, type index_InstructionGenerator as InstructionGenerator, type index_MetadataRecipientHashMap as MetadataRecipientHashMap, type index_OracleType as OracleType, index_SolanaStreamClient as SolanaStreamClient, type index_TestOracle as TestOracle, type index_UpdateTestOracleParams as UpdateTestOracleParams, index_cancelStreamInstruction as cancelStreamInstruction, index_constants as constants, index_createStreamInstruction as createStreamInstruction, index_createUncheckedStreamInstruction as createUncheckedStreamInstruction, index_decodeStream as decodeStream, index_deriveContractPDA as deriveContractPDA, index_deriveEscrowPDA as deriveEscrowPDA, index_deriveTestOraclePDA as deriveTestOraclePDA, index_extractSolanaErrorCode as extractSolanaErrorCode, index_sendAndConfirmStreamRawTransaction as sendAndConfirmStreamRawTransaction, index_signAllTransactionWithRecipients as signAllTransactionWithRecipients, _default as timelockIDL, index_topupStreamInstruction as topupStreamInstruction, index_transferStreamInstruction as transferStreamInstruction, index_updateStreamInstruction as updateStreamInstruction, index_withdrawStreamInstruction as withdrawStreamInstruction };
852
890
  }
853
891
 
854
- export { type ICreateSolanaExt as $, ALIGNED_PRECISION_FACTOR_POW as A, signAllTransactionWithRecipients as B, CREATE_PARAMS_PADDING as C, DEFAULT_STREAMFLOW_FEE as D, ESCROW_SEED as E, FEE_ORACLE_PUBLIC_KEY as F, sendAndConfirmStreamRawTransaction as G, extractSolanaErrorCode as H, type ICreateStreamSolanaExt as I, deriveContractPDA as J, deriveEscrowPDA as K, deriveTestOraclePDA as L, type AlignedUnlocksContract as M, type OracleType as N, ORIGINAL_CONTRACT_SENDER_OFFSET as O, PROGRAM_ID as P, type TestOracle as Q, type CreateParams as R, SolanaStreamClient as S, TX_FINALITY_CONFIRMED as T, type ChangeOracleParams as U, type CreateTestOracleParams as V, WITHDRAWOR_PUBLIC_KEY as W, type UpdateTestOracleParams as X, type ISearchStreams as Y, type Account as Z, _default as _, type IInteractStreamSolanaExt as a, type ITransactionSolanaExtWithInstructions as a0, type IPrepareCreateStreamSolanaExt as a1, type IPrepareStreamSolanaExt as a2, type ICreateStreamInstructions as a3, Contract as a4, AlignedContract as a5, type DecodedStream as a6, type MetadataRecipientHashMap as a7, type BatchItem as a8, type BatchItemSuccess as a9, type BatchItemError as aa, type BatchItemResult as ab, type InstructionGenerator as ac, createStreamInstruction as ad, createUncheckedStreamInstruction as ae, withdrawStreamInstruction as af, updateStreamInstruction as ag, cancelStreamInstruction as ah, transferStreamInstruction as ai, topupStreamInstruction as aj, type ITopUpStreamSolanaExt as b, STREAM_STRUCT_OFFSET_SENDER as c, STREAM_STRUCT_OFFSET_RECIPIENT as d, STREAM_STRUCT_OFFSET_MINT as e, STREAM_STRUCT_OFFSET_CLOSED as f, STREAM_STRUCT_OFFSETS as g, ALIGNED_UNLOCKS_PROGRAM_ID as h, index as i, ALIGNED_COMPUTE_LIMIT as j, CONTRACT_DISCRIMINATOR as k, TEST_ORACLE_DISCRIMINATOR as l, CONTRACT_SEED as m, TEST_ORACLE_SEED as n, PARTNER_ORACLE_PROGRAM_ID as o, STREAMFLOW_TREASURY_PUBLIC_KEY as p, AIRDROP_TEST_TOKEN as q, FEES_METADATA_SEED as r, AIRDROP_AMOUNT as s, PARTNER_SCHEMA as t, PARTNERS_SCHEMA as u, SOLANA_ERROR_MATCH_REGEX as v, SOLANA_ERROR_MAP as w, constants as x, type ClientCreationOptions as y, decodeStream as z };
892
+ export { type UpdateTestOracleParams as $, ALIGNED_PRECISION_FACTOR_POW as A, constants as B, CREATE_PARAMS_PADDING as C, DEFAULT_CREATION_FEE_SOL as D, ESCROW_SEED as E, FEE_ORACLE_PUBLIC_KEY as F, type ClientCreationOptions as G, decodeStream as H, type ICreateStreamSolanaExt as I, signAllTransactionWithRecipients as J, sendAndConfirmStreamRawTransaction as K, extractSolanaErrorCode as L, deriveContractPDA as M, deriveEscrowPDA as N, ORIGINAL_CONTRACT_SENDER_OFFSET as O, PROGRAM_ID as P, deriveTestOraclePDA as Q, type AlignedUnlocksContract as R, SolanaStreamClient as S, TX_FINALITY_CONFIRMED as T, type OracleType as U, type TestOracle as V, WITHDRAWOR as W, type CreateParams as X, type ChangeOracleParams as Y, type CreateTestOracleParams as Z, _default as _, type IInteractStreamSolanaExt as a, type ISearchStreams as a0, type Account as a1, type ICreateSolanaExt as a2, type ITransactionSolanaExtWithInstructions as a3, type IPrepareCreateStreamSolanaExt as a4, type IPrepareStreamSolanaExt as a5, type ICreateStreamInstructions as a6, Contract as a7, AlignedContract as a8, type DecodedStream as a9, type MetadataRecipientHashMap as aa, type BatchItem as ab, type BatchItemSuccess as ac, type BatchItemError as ad, type BatchItemResult as ae, type InstructionGenerator as af, createStreamInstruction as ag, createUncheckedStreamInstruction as ah, withdrawStreamInstruction as ai, updateStreamInstruction as aj, cancelStreamInstruction as ak, transferStreamInstruction as al, topupStreamInstruction as am, type ITopUpStreamSolanaExt as b, STREAM_STRUCT_OFFSET_SENDER as c, STREAM_STRUCT_OFFSET_RECIPIENT as d, STREAM_STRUCT_OFFSET_MINT as e, STREAM_STRUCT_OFFSET_CLOSED as f, STREAM_STRUCT_OFFSETS as g, ALIGNED_UNLOCKS_PROGRAM_ID as h, index as i, PARTNER_ORACLE_PROGRAM_ID as j, ALIGNED_COMPUTE_LIMIT as k, CONTRACT_DISCRIMINATOR as l, TEST_ORACLE_DISCRIMINATOR as m, CONTRACT_SEED as n, TEST_ORACLE_SEED as o, STREAMFLOW_TREASURY_PUBLIC_KEY as p, WITHDRAWOR_PUBLIC_KEY as q, AIRDROP_TEST_TOKEN as r, FEES_METADATA_SEED as s, DEFAULT_AUTO_CLAIM_FEE_SOL as t, DEFAULT_STREAMFLOW_FEE as u, AIRDROP_AMOUNT as v, PARTNER_SCHEMA as w, PARTNERS_SCHEMA as x, SOLANA_ERROR_MATCH_REGEX as y, SOLANA_ERROR_MAP as z };
@@ -1,4 +1,4 @@
1
- import { B as BaseStreamClient, N as ISuiIdParameters, I as ICreateStreamData, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, P as Contract, r as IUpdateData, s as IGetFeesData, t as IFees, Q as SuiErrorInfo, R as ClassResource, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, X as StreamResource, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from './BaseStreamClient-CHsnYIS9.js';
1
+ import { B as BaseStreamClient, N as ISuiIdParameters, I as ICreateStreamData, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, P as Contract, r as IUpdateData, s as IGetFeesData, t as IFees, Q as SuiErrorInfo, R as ClassResource, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, X as StreamResource, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from './BaseStreamClient-BRangMb7.js';
2
2
  import { ICluster } from '@streamflow/common';
3
3
  import { SuiClient, GetTransactionBlockParams, SuiTransactionBlockResponse } from '@mysten/sui/client';
4
4
 
@@ -1,13 +1,13 @@
1
- import { A as AptosStreamClient, I as ICreateStreamAptosExt, a as ITransactionAptosExt } from './index-NAVXCAs6.js';
2
- export { i as StreamflowAptos } from './index-NAVXCAs6.js';
3
- import { E as EvmStreamClient } from './index-DeXLiSzq.js';
4
- export { i as StreamflowEVM } from './index-DeXLiSzq.js';
5
- import { S as SolanaStreamClient, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, b as ITopUpStreamSolanaExt } from './index-Dy_mbGDE.js';
6
- export { s as AIRDROP_AMOUNT, q as AIRDROP_TEST_TOKEN, j as ALIGNED_COMPUTE_LIMIT, A as ALIGNED_PRECISION_FACTOR_POW, h as ALIGNED_UNLOCKS_PROGRAM_ID, k as CONTRACT_DISCRIMINATOR, m as CONTRACT_SEED, C as CREATE_PARAMS_PADDING, D as DEFAULT_STREAMFLOW_FEE, E as ESCROW_SEED, r as FEES_METADATA_SEED, F as FEE_ORACLE_PUBLIC_KEY, O as ORIGINAL_CONTRACT_SENDER_OFFSET, u as PARTNERS_SCHEMA, o as PARTNER_ORACLE_PROGRAM_ID, t as PARTNER_SCHEMA, P as PROGRAM_ID, w as SOLANA_ERROR_MAP, v as SOLANA_ERROR_MATCH_REGEX, p as STREAMFLOW_TREASURY_PUBLIC_KEY, g as STREAM_STRUCT_OFFSETS, f as STREAM_STRUCT_OFFSET_CLOSED, e as STREAM_STRUCT_OFFSET_MINT, d as STREAM_STRUCT_OFFSET_RECIPIENT, c as STREAM_STRUCT_OFFSET_SENDER, i as StreamflowSolana, l as TEST_ORACLE_DISCRIMINATOR, n as TEST_ORACLE_SEED, T as TX_FINALITY_CONFIRMED, W as WITHDRAWOR_PUBLIC_KEY } from './index-Dy_mbGDE.js';
7
- import { S as SuiStreamClient } from './index-Qi50rkRx.js';
8
- export { i as StreamflowSui } from './index-Qi50rkRx.js';
9
- import { S as Stream, A as AlignedStream, I as ICreateStreamData, a as ICreateAlignedStreamData, b as StreamType, B as BaseStreamClient, c as SolanaStreamClientOptions, d as AptosStreamClientOptions, e as SuiStreamClientOptions, E as EvmStreamClientOptions, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-CHsnYIS9.js';
10
- export { H as AlignedStreamData, G as ContractErrorCode, w as IAlignedStreamConfig, v as IBaseStreamConfig, x as ICreateLinearStreamData, D as ICreateMultiError, z as ICreateMultipleAlignedStreamData, y as ICreateMultipleLinearStreamData, C as IInteractData, u as IRecipient, L as LinearStream, O as OracleTypeName, K as SolanaAlignedProxyErrorCode, J as SolanaContractErrorCode, M as SolanaTransactionSchedulingOptions, F as StreamDirection } from './BaseStreamClient-CHsnYIS9.js';
1
+ import { A as AptosStreamClient, I as ICreateStreamAptosExt, a as ITransactionAptosExt } from './index-C2SrwWri.js';
2
+ export { i as StreamflowAptos } from './index-C2SrwWri.js';
3
+ import { E as EvmStreamClient } from './index-D_k66_bp.js';
4
+ export { i as StreamflowEVM } from './index-D_k66_bp.js';
5
+ import { S as SolanaStreamClient, I as ICreateStreamSolanaExt, a as IInteractStreamSolanaExt, b as ITopUpStreamSolanaExt } from './index-DfKoIGsU.js';
6
+ export { v as AIRDROP_AMOUNT, r as AIRDROP_TEST_TOKEN, k as ALIGNED_COMPUTE_LIMIT, A as ALIGNED_PRECISION_FACTOR_POW, h as ALIGNED_UNLOCKS_PROGRAM_ID, l as CONTRACT_DISCRIMINATOR, n as CONTRACT_SEED, C as CREATE_PARAMS_PADDING, t as DEFAULT_AUTO_CLAIM_FEE_SOL, D as DEFAULT_CREATION_FEE_SOL, u as DEFAULT_STREAMFLOW_FEE, E as ESCROW_SEED, s as FEES_METADATA_SEED, F as FEE_ORACLE_PUBLIC_KEY, O as ORIGINAL_CONTRACT_SENDER_OFFSET, x as PARTNERS_SCHEMA, j as PARTNER_ORACLE_PROGRAM_ID, w as PARTNER_SCHEMA, P as PROGRAM_ID, z as SOLANA_ERROR_MAP, y as SOLANA_ERROR_MATCH_REGEX, p as STREAMFLOW_TREASURY_PUBLIC_KEY, g as STREAM_STRUCT_OFFSETS, f as STREAM_STRUCT_OFFSET_CLOSED, e as STREAM_STRUCT_OFFSET_MINT, d as STREAM_STRUCT_OFFSET_RECIPIENT, c as STREAM_STRUCT_OFFSET_SENDER, i as StreamflowSolana, m as TEST_ORACLE_DISCRIMINATOR, o as TEST_ORACLE_SEED, T as TX_FINALITY_CONFIRMED, W as WITHDRAWOR, q as WITHDRAWOR_PUBLIC_KEY } from './index-DfKoIGsU.js';
7
+ import { S as SuiStreamClient } from './index-DnUf1qd8.js';
8
+ export { i as StreamflowSui } from './index-DnUf1qd8.js';
9
+ import { S as Stream, A as AlignedStream, I as ICreateStreamData, a as ICreateAlignedStreamData, b as StreamType, B as BaseStreamClient, c as SolanaStreamClientOptions, d as AptosStreamClientOptions, e as SuiStreamClientOptions, E as EvmStreamClientOptions, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, q as IGetAllData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-BRangMb7.js';
10
+ export { H as AlignedStreamData, G as ContractErrorCode, w as IAlignedStreamConfig, v as IBaseStreamConfig, x as ICreateLinearStreamData, D as ICreateMultiError, z as ICreateMultipleAlignedStreamData, y as ICreateMultipleLinearStreamData, C as IInteractData, u as IRecipient, L as LinearStream, O as OracleTypeName, K as SolanaAlignedProxyErrorCode, J as SolanaContractErrorCode, M as SolanaTransactionSchedulingOptions, F as StreamDirection } from './BaseStreamClient-BRangMb7.js';
11
11
  import BN from 'bn.js';
12
12
  import { IChain } from '@streamflow/common';
13
13
  export { ContractError, IChain, ICluster } from '@streamflow/common';
package/dist/esm/index.js CHANGED
@@ -2706,6 +2706,8 @@ __export(constants_exports3, {
2706
2706
  CONTRACT_DISCRIMINATOR: () => CONTRACT_DISCRIMINATOR,
2707
2707
  CONTRACT_SEED: () => CONTRACT_SEED,
2708
2708
  CREATE_PARAMS_PADDING: () => CREATE_PARAMS_PADDING,
2709
+ DEFAULT_AUTO_CLAIM_FEE_SOL: () => DEFAULT_AUTO_CLAIM_FEE_SOL,
2710
+ DEFAULT_CREATION_FEE_SOL: () => DEFAULT_CREATION_FEE_SOL,
2709
2711
  DEFAULT_STREAMFLOW_FEE: () => DEFAULT_STREAMFLOW_FEE,
2710
2712
  ESCROW_SEED: () => ESCROW_SEED,
2711
2713
  FEES_METADATA_SEED: () => FEES_METADATA_SEED,
@@ -2726,6 +2728,7 @@ __export(constants_exports3, {
2726
2728
  TEST_ORACLE_DISCRIMINATOR: () => TEST_ORACLE_DISCRIMINATOR,
2727
2729
  TEST_ORACLE_SEED: () => TEST_ORACLE_SEED,
2728
2730
  TX_FINALITY_CONFIRMED: () => TX_FINALITY_CONFIRMED,
2731
+ WITHDRAWOR: () => WITHDRAWOR,
2729
2732
  WITHDRAWOR_PUBLIC_KEY: () => WITHDRAWOR_PUBLIC_KEY
2730
2733
  });
2731
2734
  var TX_FINALITY_CONFIRMED = "confirmed";
@@ -2754,25 +2757,40 @@ var ALIGNED_UNLOCKS_PROGRAM_ID = {
2754
2757
  [ICluster.Testnet]: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
2755
2758
  [ICluster.Local]: "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH"
2756
2759
  };
2760
+ var PARTNER_ORACLE_PROGRAM_ID = {
2761
+ [ICluster.Devnet]: "pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3",
2762
+ [ICluster.Mainnet]: "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa",
2763
+ [ICluster.Testnet]: "pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3",
2764
+ [ICluster.Local]: "pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"
2765
+ };
2766
+ var FEE_ORACLE_PUBLIC_KEY = {
2767
+ [ICluster.Devnet]: "Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs",
2768
+ [ICluster.Mainnet]: "B743wFVk2pCYhV91cn287e1xY7f1vt4gdY48hhNiuQmT",
2769
+ [ICluster.Testnet]: "Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs",
2770
+ [ICluster.Local]: "Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs"
2771
+ };
2757
2772
  var ALIGNED_COMPUTE_LIMIT = 3e5;
2758
2773
  var CONTRACT_DISCRIMINATOR = [172, 138, 115, 242, 121, 67, 183, 26];
2759
2774
  var TEST_ORACLE_DISCRIMINATOR = [198, 49, 63, 134, 232, 251, 168, 28];
2760
2775
  var CONTRACT_SEED = Buffer.from("contract", "utf-8");
2761
2776
  var ESCROW_SEED = Buffer.from("strm", "utf-8");
2762
2777
  var TEST_ORACLE_SEED = Buffer.from("test-oracle", "utf-8");
2763
- var PARTNER_ORACLE_PROGRAM_ID = "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa";
2764
2778
  var STREAMFLOW_TREASURY_PUBLIC_KEY = new PublicKey("5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw");
2765
- var WITHDRAWOR_PUBLIC_KEY = new PublicKey("wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u");
2766
- var FEE_ORACLE_PUBLIC_KEY = new PublicKey("B743wFVk2pCYhV91cn287e1xY7f1vt4gdY48hhNiuQmT");
2779
+ var WITHDRAWOR = "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u";
2780
+ var WITHDRAWOR_PUBLIC_KEY = new PublicKey(WITHDRAWOR);
2767
2781
  var AIRDROP_TEST_TOKEN = "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj";
2768
2782
  var FEES_METADATA_SEED = Buffer.from("strm_fees");
2769
- var DEFAULT_STREAMFLOW_FEE = 0.99;
2783
+ var DEFAULT_CREATION_FEE_SOL = 9e7;
2784
+ var DEFAULT_AUTO_CLAIM_FEE_SOL = 19e7;
2785
+ var DEFAULT_STREAMFLOW_FEE = 0.19;
2770
2786
  var AIRDROP_AMOUNT = 1;
2771
2787
  var PARTNER_SCHEMA = {
2772
2788
  struct: {
2773
2789
  pubkey: { array: { type: "u8", len: 32 } },
2774
- partner_fee: "f32",
2775
- strm_fee: "f32"
2790
+ creation_fee: "u32",
2791
+ auto_claim_fee: "u32",
2792
+ token_fee_percent: "f32",
2793
+ buffer: { array: { type: "u8", len: 16 } }
2776
2794
  }
2777
2795
  };
2778
2796
  var PARTNERS_SCHEMA = { array: { type: PARTNER_SCHEMA } };
@@ -5088,6 +5106,8 @@ var SolanaStreamClient = class extends BaseStreamClient {
5088
5106
  this.commitment = commitment;
5089
5107
  this.connection = new Connection(optionsOrClusterUrl, this.commitment);
5090
5108
  this.programId = programId !== "" ? new PublicKey(programId) : new PublicKey(PROGRAM_ID[cluster]);
5109
+ this.partnerOracleProgramId = new PublicKey(PARTNER_ORACLE_PROGRAM_ID[cluster]);
5110
+ this.feeOraclePublicKey = new PublicKey(FEE_ORACLE_PUBLIC_KEY[cluster]);
5091
5111
  this.schedulingParams = {
5092
5112
  sendThrottler: sendThrottler ?? buildSendThrottler(sendRate)
5093
5113
  };
@@ -5102,6 +5122,8 @@ var SolanaStreamClient = class extends BaseStreamClient {
5102
5122
  this.commitment = commitment2;
5103
5123
  this.connection = new Connection(clusterUrl, this.commitment);
5104
5124
  this.programId = programId2 !== "" ? new PublicKey(programId2) : new PublicKey(PROGRAM_ID[cluster2]);
5125
+ this.partnerOracleProgramId = new PublicKey(PARTNER_ORACLE_PROGRAM_ID[cluster2]);
5126
+ this.feeOraclePublicKey = new PublicKey(FEE_ORACLE_PUBLIC_KEY[cluster2]);
5105
5127
  const schedulingOptions = sendScheduler && "sendRate" in sendScheduler ? sendScheduler : void 0;
5106
5128
  const sendThrottler2 = !sendScheduler ? buildSendThrottler(1) : "sendRate" in sendScheduler ? buildSendThrottler(sendScheduler.sendRate ?? 1, sendScheduler.sendInterval) : sendScheduler;
5107
5129
  this.schedulingParams = {
@@ -5325,7 +5347,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5325
5347
  partner: partnerPublicKey,
5326
5348
  recipient: recipientPublicKey,
5327
5349
  withdrawor: WITHDRAWOR_PUBLIC_KEY,
5328
- feeOracle: FEE_ORACLE_PUBLIC_KEY,
5350
+ feeOracle: this.feeOraclePublicKey,
5329
5351
  priceOracle: oracle,
5330
5352
  tokenProgram: tokenProgramId,
5331
5353
  streamflowProgram: this.programId
@@ -5416,7 +5438,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5416
5438
  partner: partnerPublicKey,
5417
5439
  partnerTokens,
5418
5440
  mint: new PublicKey(mint),
5419
- feeOracle: FEE_ORACLE_PUBLIC_KEY,
5441
+ feeOracle: this.feeOraclePublicKey,
5420
5442
  rent: SYSVAR_RENT_PUBKEY,
5421
5443
  timelockProgram: this.programId,
5422
5444
  tokenProgram: tokenProgramId,
@@ -5543,7 +5565,7 @@ var SolanaStreamClient = class extends BaseStreamClient {
5543
5565
  metadata: metadataPubKey,
5544
5566
  escrowTokens,
5545
5567
  mint: new PublicKey(mint),
5546
- feeOracle: FEE_ORACLE_PUBLIC_KEY,
5568
+ feeOracle: this.feeOraclePublicKey,
5547
5569
  rent: SYSVAR_RENT_PUBKEY,
5548
5570
  timelockProgram: this.programId,
5549
5571
  tokenProgram: tokenProgramId,
@@ -6349,30 +6371,43 @@ var SolanaStreamClient = class extends BaseStreamClient {
6349
6371
  * @returns Fees
6350
6372
  */
6351
6373
  async getFees({ address }) {
6352
- const [metadataPubKey] = PublicKey.findProgramAddressSync(
6353
- [Buffer.from(FEES_METADATA_SEED)],
6354
- new PublicKey(PARTNER_ORACLE_PROGRAM_ID)
6355
- );
6356
- const data = await this.connection.getAccountInfo(metadataPubKey);
6374
+ const data = await this.connection.getAccountInfo(this.feeOraclePublicKey);
6357
6375
  if (!data) {
6358
6376
  return null;
6359
6377
  }
6360
6378
  const partners = borsh.deserialize(PARTNERS_SCHEMA, data.data);
6361
- const filteredPartners = partners.filter((item) => new PublicKey(item.pubkey).toString() === address);
6362
- if (filteredPartners.length === 0) {
6363
- return null;
6379
+ for (const partner of partners) {
6380
+ const partnerAddress = new PublicKey(partner.pubkey).toString();
6381
+ if (partnerAddress === address) {
6382
+ return {
6383
+ creationFeeSol: Number(partner.creation_fee),
6384
+ autoClaimFeeSol: Number(partner.auto_claim_fee),
6385
+ streamflowFee: Number(partner.token_fee_percent.toFixed(4)),
6386
+ partnerFee: 0
6387
+ };
6388
+ }
6364
6389
  }
6365
- return {
6366
- streamflowFee: Number(filteredPartners[0].strm_fee.toFixed(4)),
6367
- partnerFee: Number(filteredPartners[0].partner_fee.toFixed(4))
6368
- };
6390
+ return null;
6369
6391
  }
6370
6392
  /**
6371
6393
  * Gets default streamflow fee
6372
6394
  * @returns Default streamflow fee
6373
6395
  */
6374
6396
  async getDefaultStreamflowFee() {
6375
- return DEFAULT_STREAMFLOW_FEE;
6397
+ return (await this.getDefaultFees()).streamflowFee;
6398
+ }
6399
+ /**
6400
+ * Get all defaults fees applied by the protocol.
6401
+ *
6402
+ * Protocol will use fees set for WITHDRAWOR as default if they are set.
6403
+ */
6404
+ async getDefaultFees() {
6405
+ return await this.getFees({ address: WITHDRAWOR }) || {
6406
+ creationFeeSol: DEFAULT_CREATION_FEE_SOL,
6407
+ autoClaimFeeSol: DEFAULT_AUTO_CLAIM_FEE_SOL,
6408
+ streamflowFee: DEFAULT_STREAMFLOW_FEE,
6409
+ partnerFee: 0
6410
+ };
6376
6411
  }
6377
6412
  /**
6378
6413
  * Extracts error code from an error
@@ -7659,6 +7694,6 @@ var GenericStreamClient = class extends BaseStreamClient {
7659
7694
  }
7660
7695
  };
7661
7696
 
7662
- export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, BASE_FEE, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, ContractErrorCode, DEFAULT_STREAMFLOW_FEE, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, GenericStreamClient, MAX_SAFE_UNIX_TIME_VALUE, ORIGINAL_CONTRACT_SENDER_OFFSET, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaAlignedProxyErrorCode, SolanaContractErrorCode, StreamDirection, StreamType, aptos_exports as StreamflowAptos, evm_exports as StreamflowEVM, solana_exports as StreamflowSolana, sui_exports as StreamflowSui, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, decodeEndTime, getBN, getNumberFromBN, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isPayment, isTokenLock, isVesting };
7697
+ export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, BASE_FEE, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, ContractErrorCode, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, GenericStreamClient, MAX_SAFE_UNIX_TIME_VALUE, ORIGINAL_CONTRACT_SENDER_OFFSET, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, SOLANA_ERROR_MAP, SOLANA_ERROR_MATCH_REGEX, STREAMFLOW_TREASURY_PUBLIC_KEY, STREAM_STRUCT_OFFSETS, STREAM_STRUCT_OFFSET_CLOSED, STREAM_STRUCT_OFFSET_MINT, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaAlignedProxyErrorCode, SolanaContractErrorCode, StreamDirection, StreamType, aptos_exports as StreamflowAptos, evm_exports as StreamflowEVM, solana_exports as StreamflowSolana, sui_exports as StreamflowSui, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, decodeEndTime, getBN, getNumberFromBN, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isPayment, isTokenLock, isVesting };
7663
7698
  //# sourceMappingURL=index.js.map
7664
7699
  //# sourceMappingURL=index.js.map