@streamflow/stream 11.1.0 → 11.2.0

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.
@@ -14,6 +14,7 @@ interface IRecipient {
14
14
  name: string;
15
15
  cliffAmount: BN;
16
16
  amountPerPeriod: BN;
17
+ nonce?: number;
17
18
  }
18
19
  interface IBaseStreamConfig {
19
20
  period: number;
@@ -164,12 +165,16 @@ interface LinearStream {
164
165
  canTopup: boolean;
165
166
  name: string;
166
167
  withdrawalFrequency: number;
168
+ isPda: boolean;
169
+ nonce: number;
167
170
  closed: boolean;
168
171
  currentPauseStart: number;
169
172
  pauseCumulative: BN;
170
173
  lastRateChangeTime: number;
171
174
  fundsUnlockedAtLastRateChange: BN;
172
175
  oldMetadata: PublicKey;
176
+ payer: string;
177
+ bump: number;
173
178
  type: StreamType;
174
179
  unlocked(currentTimestamp: number): BN;
175
180
  remaining(decimals: number): number;
@@ -394,12 +399,16 @@ declare class Contract implements LinearStream {
394
399
  canTopup: boolean;
395
400
  name: string;
396
401
  withdrawalFrequency: number;
402
+ isPda: boolean;
403
+ nonce: number;
397
404
  closed: boolean;
398
405
  currentPauseStart: number;
399
406
  pauseCumulative: BN;
400
407
  lastRateChangeTime: number;
401
408
  fundsUnlockedAtLastRateChange: BN;
402
409
  oldMetadata: PublicKey;
410
+ payer: string;
411
+ bump: number;
403
412
  type: StreamType;
404
413
  isAligned: boolean;
405
414
  constructor(stream: DecodedStream);
@@ -463,12 +472,16 @@ interface DecodedStream {
463
472
  canTopup: boolean;
464
473
  name: string;
465
474
  withdrawFrequency: BN;
475
+ isPda: boolean;
476
+ nonce: number;
466
477
  closed: boolean;
467
478
  currentPauseStart: BN;
468
479
  pauseCumulative: BN;
469
480
  lastRateChangeTime: BN;
470
481
  fundsUnlockedAtLastRateChange: BN;
471
482
  oldMetadata: PublicKey;
483
+ payer: PublicKey;
484
+ bump: number;
472
485
  }
473
486
  interface MetadataRecipientHashMap {
474
487
  [metadataPubKey: string]: IRecipient;
@@ -568,7 +581,7 @@ declare class SolanaStreamClient {
568
581
  * @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
569
582
  * @returns Create stream instructions
570
583
  */
571
- prepareCreateLinearStreamInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canPause, canUpdateRate, canTopup, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, tokenProgramId: streamTokenProgramId, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: IPrepareCreateStreamExt): Promise<ICreateStreamInstructions>;
584
+ prepareCreateLinearStreamInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canPause, canUpdateRate, canTopup, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, tokenProgramId: streamTokenProgramId, nonce, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: IPrepareCreateStreamExt): Promise<ICreateStreamInstructions>;
572
585
  /**
573
586
  * Creates a new stream/vesting contract using unchecked instruction.
574
587
  *
@@ -586,7 +599,7 @@ declare class SolanaStreamClient {
586
599
  /**
587
600
  * Create Transaction instructions for `createUnchecked`
588
601
  */
589
- prepareCreateUncheckedInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canTopup, canUpdateRate, canPause, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: IPrepareCreateStreamExt): Promise<{
602
+ prepareCreateUncheckedInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canTopup, canUpdateRate, canPause, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, nonce, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: IPrepareCreateStreamExt): Promise<{
590
603
  ixs: TransactionInstruction[];
591
604
  metadata: Keypair | undefined;
592
605
  metadataPubKey: PublicKey;
@@ -877,6 +890,7 @@ declare function extractSolanaErrorCode(errorText: string, logs?: string[]): str
877
890
  declare const deriveContractPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
878
891
  declare const deriveEscrowPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
879
892
  declare const deriveTestOraclePDA: (programId: PublicKey, mint: PublicKey, creator: PublicKey) => PublicKey;
893
+ declare const deriveStreamMetadataPDA: (programId: PublicKey, mint: PublicKey, sender: PublicKey, nonce: number) => PublicKey;
880
894
  declare const deriveRepopulatedMetadataPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
881
895
 
882
896
  interface CreateStreamData {
@@ -953,6 +967,48 @@ interface CreateUncheckedStreamAccounts {
953
967
  systemProgram: PublicKey;
954
968
  }
955
969
  declare const createUncheckedStreamInstruction: (data: CreateUncheckedStreamData, programId: PublicKey, accounts: CreateUncheckedStreamAccounts) => Promise<TransactionInstruction>;
970
+ interface CreateStreamV2Data {
971
+ start: BN;
972
+ depositedAmount: BN;
973
+ period: BN;
974
+ amountPerPeriod: BN;
975
+ cliff: BN;
976
+ cliffAmount: BN;
977
+ cancelableBySender: boolean;
978
+ cancelableByRecipient: boolean;
979
+ automaticWithdrawal: boolean;
980
+ transferableBySender: boolean;
981
+ transferableByRecipient: boolean;
982
+ canTopup: boolean;
983
+ canUpdateRate: boolean;
984
+ canPause: boolean;
985
+ name: string;
986
+ withdrawFrequency: BN;
987
+ nonce: number;
988
+ }
989
+ declare const createStreamV2Instruction: (data: CreateStreamV2Data, programId: PublicKey, accounts: CreateStreamAccounts) => Promise<TransactionInstruction>;
990
+ interface CreateUncheckedStreamV2Data {
991
+ start: BN;
992
+ depositedAmount: BN;
993
+ period: BN;
994
+ amountPerPeriod: BN;
995
+ cliff: BN;
996
+ cliffAmount: BN;
997
+ cancelableBySender: boolean;
998
+ cancelableByRecipient: boolean;
999
+ automaticWithdrawal: boolean;
1000
+ transferableBySender: boolean;
1001
+ transferableByRecipient: boolean;
1002
+ canTopup: boolean;
1003
+ canUpdateRate: boolean;
1004
+ canPause: boolean;
1005
+ name: string;
1006
+ withdrawFrequency: BN;
1007
+ recipient: PublicKey;
1008
+ partner: PublicKey;
1009
+ nonce: number;
1010
+ }
1011
+ declare const createUncheckedStreamV2Instruction: (data: CreateUncheckedStreamV2Data, programId: PublicKey, accounts: CreateUncheckedStreamAccounts) => Promise<TransactionInstruction>;
956
1012
  interface WithdrawAccounts {
957
1013
  authority: PublicKey;
958
1014
  recipient: PublicKey;
@@ -1086,7 +1142,7 @@ declare const MAX_SAFE_UNIX_TIME_VALUE = 8640000000000;
1086
1142
  declare const WITHDRAW_AVAILABLE_AMOUNT: BN;
1087
1143
  declare const ALIGNED_PRECISION_FACTOR_POW = 9;
1088
1144
  declare const STREAM_STRUCT_OFFSETS: Record<keyof ISearchStreams, number>;
1089
- declare const CREATE_PARAMS_PADDING = 126;
1145
+ declare const CREATE_PARAMS_PADDING = 121;
1090
1146
  declare const PROGRAM_ID: {
1091
1147
  devnet: string;
1092
1148
  mainnet: string;
@@ -1117,6 +1173,7 @@ declare const TEST_ORACLE_DISCRIMINATOR: number[];
1117
1173
  declare const CONTRACT_SEED: Buffer$1;
1118
1174
  declare const ESCROW_SEED: Buffer$1;
1119
1175
  declare const TEST_ORACLE_SEED: Buffer$1;
1176
+ declare const METADATA_SEED: Buffer$1;
1120
1177
  declare const REPOPULATED_METADATA_SEED: Buffer$1;
1121
1178
  declare const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey;
1122
1179
  declare const WITHDRAWOR = "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u";
@@ -1261,6 +1318,10 @@ interface ContractSchema {
1261
1318
  autoClaimFee: number | null;
1262
1319
  autoClaimFeeClaimed: boolean | null;
1263
1320
  lastUpdateSlot: number | null;
1321
+ isPda: boolean;
1322
+ nonce: number | null;
1323
+ payer: string | null;
1324
+ bump: number | null;
1264
1325
  dynamicContract: DynamicContractSchema | null;
1265
1326
  }
1266
1327
  /**
@@ -1361,4 +1422,4 @@ declare const createClient: (options?: ApiClientOptions) => ApiClient;
1361
1422
 
1362
1423
  declare const transformContract: (schema: ContractSchema) => Promise<Stream>;
1363
1424
 
1364
- export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, type Account, AlignedContract, AlignedProxyErrorCode, type AlignedStream, type AlignedStreamData, type AlignedUnlocksContract, type ApiClient, type ApiClientOptions, type BatchItem, type BatchItemError, type BatchItemResult, type BatchItemSuccess, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, type Chain, type ChangeOracleParams, type ClientCreationOptions, Contract, ContractErrorCode, type ContractSchema, type ContractType, type CreateParams, type CreateTestOracleParams, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, type DecodedStream, type DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, type GetContractsOptions, type IAlignedStreamConfig, type IBaseStreamConfig, type ICancelData, type ICreateAlignedStreamData, type ICreateExt, type ICreateLinearStreamData, type ICreateMultiError, type ICreateMultipleAlignedStreamData, type ICreateMultipleLinearStreamData, type ICreateMultipleStreamData, type ICreateResult, type ICreateStreamData, type ICreateStreamExt, type ICreateStreamInstructions, type IFees, type IGetAllData, type IGetFeesData, type IGetOneData, type IInteractData, type IInteractStreamExt, type IMultiTransactionResult, type IPrepareCreateStreamExt, type IPrepareStreamExt, type IRecipient, type ISearchStreams, type ITopUpData, type ITopUpStreamExt, type ITransactionExtWithInstructions, type ITransactionResult, type ITransferData, type IUpdateData, type IWithdrawData, type InstructionGenerator, type LinearStream, MAX_SAFE_UNIX_TIME_VALUE, type MetadataRecipientHashMap, ORIGINAL_CONTRACT_SENDER_OFFSET, type OracleType, type OracleTypeName, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, type PriceOracleType, REPOPULATED_METADATA_SEED, 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_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaStreamClient, type Stream, type StreamClientOptions, StreamDirection, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, type TabulariumContract, type TestOracle, type TransactionSchedulingOptions, type UpdateTestOracleParams, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, createClient, createStreamInstruction, createUncheckedStreamInstruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveTestOraclePDA, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isTokenLock, isVesting, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, _default as timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawStreamInstruction };
1425
+ export { AIRDROP_AMOUNT, AIRDROP_TEST_TOKEN, ALIGNED_COMPUTE_LIMIT, ALIGNED_PRECISION_FACTOR_POW, ALIGNED_UNLOCKS_PROGRAM_ID, type Account, AlignedContract, AlignedProxyErrorCode, type AlignedStream, type AlignedStreamData, type AlignedUnlocksContract, type ApiClient, type ApiClientOptions, type BatchItem, type BatchItemError, type BatchItemResult, type BatchItemSuccess, CONTRACT_DISCRIMINATOR, CONTRACT_SEED, CREATE_PARAMS_PADDING, type Chain, type ChangeOracleParams, type ClientCreationOptions, Contract, ContractErrorCode, type ContractSchema, type ContractType, type CreateParams, type CreateTestOracleParams, DEFAULT_AUTO_CLAIM_FEE_SOL, DEFAULT_CREATION_FEE_SOL, DEFAULT_STREAMFLOW_FEE, type DecodedStream, type DynamicContractSchema, ESCROW_SEED, FEES_METADATA_SEED, FEE_ORACLE_PUBLIC_KEY, type GetContractsOptions, type IAlignedStreamConfig, type IBaseStreamConfig, type ICancelData, type ICreateAlignedStreamData, type ICreateExt, type ICreateLinearStreamData, type ICreateMultiError, type ICreateMultipleAlignedStreamData, type ICreateMultipleLinearStreamData, type ICreateMultipleStreamData, type ICreateResult, type ICreateStreamData, type ICreateStreamExt, type ICreateStreamInstructions, type IFees, type IGetAllData, type IGetFeesData, type IGetOneData, type IInteractData, type IInteractStreamExt, type IMultiTransactionResult, type IPrepareCreateStreamExt, type IPrepareStreamExt, type IRecipient, type ISearchStreams, type ITopUpData, type ITopUpStreamExt, type ITransactionExtWithInstructions, type ITransactionResult, type ITransferData, type IUpdateData, type IWithdrawData, type InstructionGenerator, type LinearStream, MAX_SAFE_UNIX_TIME_VALUE, METADATA_SEED, type MetadataRecipientHashMap, ORIGINAL_CONTRACT_SENDER_OFFSET, type OracleType, type OracleTypeName, PARTNERS_SCHEMA, PARTNER_ORACLE_PROGRAM_ID, PARTNER_SCHEMA, PROGRAM_ID, type PriceOracleType, REPOPULATED_METADATA_SEED, 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_OLD_METADATA_KEY, STREAM_STRUCT_OFFSET_RECIPIENT, STREAM_STRUCT_OFFSET_SENDER, SolanaStreamClient, type Stream, type StreamClientOptions, StreamDirection, StreamType, TEST_ORACLE_DISCRIMINATOR, TEST_ORACLE_SEED, TX_FINALITY_CONFIRMED, type TabulariumContract, type TestOracle, type TransactionSchedulingOptions, type UpdateTestOracleParams, WITHDRAWOR, WITHDRAWOR_PUBLIC_KEY, WITHDRAW_AVAILABLE_AMOUNT, buildStreamType, calculateTotalAmountToDeposit, calculateUnlockedAmount, cancelStreamInstruction, createClient, createStreamInstruction, createStreamV2Instruction, createUncheckedStreamInstruction, createUncheckedStreamV2Instruction, decodeEndTime, decodeStream, deriveContractPDA, deriveEscrowPDA, deriveRepopulatedMetadataPDA, deriveStreamMetadataPDA, deriveTestOraclePDA, extractSolanaErrorCode, getMetadataKey, handleContractError, isAligned, isCliffCloseToDepositedAmount, isCreateAlignedStreamData, isDynamicLock, isTokenLock, isVesting, sendAndConfirmStreamRawTransaction, signAllTransactionWithRecipients, _default as timelockIDL, topupStreamInstruction, transferStreamInstruction, transformContract, updateStreamInstruction, withdrawStreamInstruction };