@streamflow/stream 9.0.3 → 10.0.0-alpha.p313.3ce4d29

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 (42) hide show
  1. package/README.md +6 -62
  2. package/dist/cjs/index.cjs +421 -3786
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/index.d.cts +3 -186
  5. package/dist/cjs/solana/index.cjs +376 -301
  6. package/dist/cjs/solana/index.cjs.map +1 -1
  7. package/dist/cjs/solana/index.d.cts +1134 -17
  8. package/dist/esm/index.d.ts +3 -186
  9. package/dist/esm/index.js +239 -3617
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/solana/index.d.ts +1134 -17
  12. package/dist/esm/solana/index.js +257 -232
  13. package/dist/esm/solana/index.js.map +1 -1
  14. package/package.json +4 -43
  15. package/dist/cjs/BaseStreamClient-DOyJqO7R.d.cts +0 -551
  16. package/dist/cjs/aptos/index.cjs +0 -456
  17. package/dist/cjs/aptos/index.cjs.map +0 -1
  18. package/dist/cjs/aptos/index.d.cts +0 -14
  19. package/dist/cjs/evm/index.cjs +0 -1915
  20. package/dist/cjs/evm/index.cjs.map +0 -1
  21. package/dist/cjs/evm/index.d.cts +0 -13
  22. package/dist/cjs/index-BMZATAYa.d.cts +0 -213
  23. package/dist/cjs/index-BgGtpOPg.d.cts +0 -850
  24. package/dist/cjs/index-DYIamO0j.d.cts +0 -203
  25. package/dist/cjs/index-Y0HH2ugY.d.cts +0 -136
  26. package/dist/cjs/sui/index.cjs +0 -1021
  27. package/dist/cjs/sui/index.cjs.map +0 -1
  28. package/dist/cjs/sui/index.d.cts +0 -13
  29. package/dist/esm/BaseStreamClient-DOyJqO7R.d.ts +0 -551
  30. package/dist/esm/aptos/index.d.ts +0 -14
  31. package/dist/esm/aptos/index.js +0 -443
  32. package/dist/esm/aptos/index.js.map +0 -1
  33. package/dist/esm/evm/index.d.ts +0 -13
  34. package/dist/esm/evm/index.js +0 -1902
  35. package/dist/esm/evm/index.js.map +0 -1
  36. package/dist/esm/index-D54wSYym.d.ts +0 -203
  37. package/dist/esm/index-Dp5DXxr-.d.ts +0 -850
  38. package/dist/esm/index-DrzqsoIB.d.ts +0 -136
  39. package/dist/esm/index-elpYUBph.d.ts +0 -213
  40. package/dist/esm/sui/index.d.ts +0 -13
  41. package/dist/esm/sui/index.js +0 -1011
  42. package/dist/esm/sui/index.js.map +0 -1
@@ -1,850 +0,0 @@
1
- import PQueue from 'p-queue';
2
- import { Keypair, TransactionInstruction, PublicKey, VersionedTransaction, AccountInfo, Commitment, ConnectionConfig, Connection } from '@solana/web3.js';
3
- import { ITransactionSolanaExt, IProgramAccount, ConfirmationParams, ThrottleParams } from '@streamflow/common/solana';
4
- import { IdlAccounts, IdlTypes, Program } from '@coral-xyz/anchor';
5
- import { SignerWalletAdapter } from '@solana/wallet-adapter-base';
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-DOyJqO7R.cjs';
8
- import { StreamflowAlignedUnlocks } from './solana/descriptor/streamflow_aligned_unlocks.cjs';
9
- import { ICluster, ContractError, IChain } from '@streamflow/common';
10
- import { Buffer as Buffer$1 } from 'buffer';
11
-
12
- type AlignedUnlocksTypes = IdlTypes<StreamflowAlignedUnlocks>;
13
- type AlignedUnlocksAccounts = IdlAccounts<StreamflowAlignedUnlocks>;
14
- type AlignedUnlocksContract = AlignedUnlocksAccounts["contract"];
15
- type OracleType = IdlTypes<StreamflowAlignedUnlocks>["oracleType"];
16
- type TestOracle = AlignedUnlocksAccounts["testOracle"];
17
- type CreateParams = AlignedUnlocksTypes["createParams"];
18
- type ChangeOracleParams = AlignedUnlocksTypes["changeOracleParams"];
19
- type CreateTestOracleParams = AlignedUnlocksTypes["createTestOracleParams"];
20
- type UpdateTestOracleParams = AlignedUnlocksTypes["updateTestOracleParams"];
21
- interface ISearchStreams {
22
- mint?: string;
23
- sender?: string;
24
- recipient?: string;
25
- closed?: boolean;
26
- }
27
- interface Account {
28
- pubkey: PublicKey;
29
- account: AccountInfo<Buffer>;
30
- }
31
- interface ICreateSolanaExt {
32
- sender: SignerWalletAdapter | Keypair;
33
- isNative?: boolean;
34
- }
35
- interface ITransactionSolanaExtWithInstructions extends ITransactionSolanaExt {
36
- customInstructions?: {
37
- after?: InstructionGenerator;
38
- };
39
- }
40
- interface ICreateStreamSolanaExt extends ICreateSolanaExt, ITransactionSolanaExtWithInstructions {
41
- metadataPubKeys?: PublicKey[];
42
- partner?: string | null;
43
- }
44
- interface IPrepareCreateStreamSolanaExt extends Omit<ICreateStreamSolanaExt, "sender"> {
45
- sender: {
46
- publicKey: PublicKey | null;
47
- };
48
- }
49
- interface IInteractStreamSolanaExt extends ITransactionSolanaExtWithInstructions {
50
- invoker: SignerWalletAdapter | Keypair;
51
- checkTokenAccounts?: boolean;
52
- }
53
- interface IPrepareStreamSolanaExt extends Omit<IInteractStreamSolanaExt, "invoker"> {
54
- invoker: {
55
- publicKey: PublicKey | null;
56
- };
57
- }
58
- interface ITopUpStreamSolanaExt extends ITransactionSolanaExt {
59
- invoker: SignerWalletAdapter | Keypair;
60
- isNative?: boolean;
61
- }
62
- interface ICreateStreamInstructions {
63
- ixs: TransactionInstruction[];
64
- metadata: Keypair | undefined;
65
- metadataPubKey: PublicKey;
66
- }
67
- declare class Contract implements LinearStream {
68
- magic: number;
69
- version: number;
70
- createdAt: number;
71
- withdrawnAmount: BN;
72
- canceledAt: number;
73
- end: number;
74
- lastWithdrawnAt: number;
75
- sender: string;
76
- senderTokens: string;
77
- recipient: string;
78
- recipientTokens: string;
79
- mint: string;
80
- escrowTokens: string;
81
- streamflowTreasury: string;
82
- streamflowTreasuryTokens: string;
83
- streamflowFeeTotal: BN;
84
- streamflowFeeWithdrawn: BN;
85
- streamflowFeePercent: number;
86
- partnerFeeTotal: BN;
87
- partnerFeeWithdrawn: BN;
88
- partnerFeePercent: number;
89
- partner: string;
90
- partnerTokens: string;
91
- start: number;
92
- depositedAmount: BN;
93
- period: number;
94
- amountPerPeriod: BN;
95
- cliff: number;
96
- cliffAmount: BN;
97
- cancelableBySender: boolean;
98
- cancelableByRecipient: boolean;
99
- automaticWithdrawal: boolean;
100
- transferableBySender: boolean;
101
- transferableByRecipient: boolean;
102
- canTopup: boolean;
103
- name: string;
104
- withdrawalFrequency: number;
105
- closed: boolean;
106
- currentPauseStart: number;
107
- pauseCumulative: BN;
108
- lastRateChangeTime: number;
109
- fundsUnlockedAtLastRateChange: BN;
110
- type: StreamType;
111
- isAligned?: boolean;
112
- constructor(stream: DecodedStream);
113
- unlocked(currentTimestamp: number): BN;
114
- remaining(decimals: number): number;
115
- }
116
- declare class AlignedContract extends Contract implements AlignedStream {
117
- minPrice: number;
118
- maxPrice: number;
119
- minPercentage: number;
120
- maxPercentage: number;
121
- tickSize: number;
122
- proxyAddress: string;
123
- priceOracle: string | undefined;
124
- oracleType: OracleTypeName;
125
- initialAmountPerPeriod: BN;
126
- initialPrice: number;
127
- lastPrice: number;
128
- lastAmountUpdateTime: number;
129
- initialNetAmount: BN;
130
- expiryTime: number;
131
- expiryPercentage: number;
132
- floorPrice: number;
133
- constructor(stream: DecodedStream, alignedProxy: AlignedUnlocksContract);
134
- }
135
- interface DecodedStream {
136
- magic: BN;
137
- version: BN;
138
- createdAt: BN;
139
- withdrawnAmount: BN;
140
- canceledAt: BN;
141
- end: BN;
142
- lastWithdrawnAt: BN;
143
- sender: PublicKey;
144
- senderTokens: PublicKey;
145
- recipient: PublicKey;
146
- recipientTokens: PublicKey;
147
- mint: PublicKey;
148
- escrowTokens: PublicKey;
149
- streamflowTreasury: PublicKey;
150
- streamflowTreasuryTokens: PublicKey;
151
- streamflowFeeTotal: BN;
152
- streamflowFeeWithdrawn: BN;
153
- streamflowFeePercent: number;
154
- partnerFeeTotal: BN;
155
- partnerFeeWithdrawn: BN;
156
- partnerFeePercent: number;
157
- partner: PublicKey;
158
- partnerTokens: PublicKey;
159
- start: BN;
160
- depositedAmount: BN;
161
- period: BN;
162
- amountPerPeriod: BN;
163
- cliff: BN;
164
- cliffAmount: BN;
165
- cancelableBySender: boolean;
166
- cancelableByRecipient: boolean;
167
- automaticWithdrawal: boolean;
168
- transferableBySender: boolean;
169
- transferableByRecipient: boolean;
170
- canTopup: boolean;
171
- name: string;
172
- withdrawFrequency: BN;
173
- closed: boolean;
174
- currentPauseStart: BN;
175
- pauseCumulative: BN;
176
- lastRateChangeTime: BN;
177
- fundsUnlockedAtLastRateChange: BN;
178
- }
179
- interface MetadataRecipientHashMap {
180
- [metadataPubKey: string]: IRecipient;
181
- }
182
- interface BatchItem {
183
- recipient: string;
184
- tx: VersionedTransaction;
185
- }
186
- interface BatchItemSuccess extends BatchItem {
187
- signature: string;
188
- }
189
- interface BatchItemError extends BatchItem {
190
- error: string;
191
- }
192
- type BatchItemResult = BatchItemSuccess | BatchItemError;
193
- type InstructionGenerator = TransactionInstruction[] | ((params: {
194
- instructions: TransactionInstruction[];
195
- metadata?: PublicKey;
196
- }) => TransactionInstruction[] | Promise<TransactionInstruction[]>);
197
-
198
- /**
199
- * Solana Client creation options
200
- * @property cluster {@link ICluster} cluster type
201
- * @property clusterUrl cluster url
202
- * @interface ClientCreationOptions
203
- */
204
- type ClientCreationOptions = Omit<SolanaStreamClientOptions, "chain" | "sendRate" | "sendThrottler">;
205
- declare class SolanaStreamClient extends BaseStreamClient {
206
- private readonly connection;
207
- private readonly programId;
208
- private readonly commitment;
209
- readonly alignedProxyProgram: Program<StreamflowAlignedUnlocks>;
210
- private readonly schedulingParams;
211
- /**
212
- * Create Stream instance with flat arguments
213
- */
214
- constructor(clusterUrl: string, cluster?: ICluster, commitment?: Commitment | ConnectionConfig, programId?: string, sendRate?: number, sendThrottler?: PQueue);
215
- /**
216
- * Create Stream instance with options
217
- */
218
- constructor(options: ClientCreationOptions);
219
- getConnection(): Connection;
220
- getCommitment(): Commitment | undefined;
221
- getProgramId(): string;
222
- getAlignedProxyProgramId(): string;
223
- /**
224
- * Builds transaction instructions for creating a new stream/vesting contract without creating a transaction.
225
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
226
- *
227
- * For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order
228
- * (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes.
229
- *
230
- * @param {ICreateStreamData} data - Stream parameters including recipient, token, amount, schedule, and permissions
231
- * @param {Omit<ICreateStreamSolanaExt, "sender"> & { senderPublicKey: PublicKey }} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
232
- * @returns Transaction instructions and metadata ID
233
- */
234
- buildCreateTransactionInstructions(data: ICreateStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<{
235
- ixs: TransactionInstruction[];
236
- metadataId: string;
237
- metadata?: Keypair;
238
- }>;
239
- /**
240
- * Builds a transaction for creating a new stream/vesting contract without signing or executing it.
241
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
242
- *
243
- * For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order
244
- * (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes.
245
- *
246
- * @param {ICreateStreamData} data - Stream parameters including recipient, token, amount, schedule, and permissions
247
- * @param {Omit<ICreateStreamSolanaExt, "sender"> & { senderPublicKey: PublicKey }} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
248
- * @returns Transaction and metadata information
249
- */
250
- buildCreateTransaction(data: ICreateStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<{
251
- tx: VersionedTransaction;
252
- metadataId: string;
253
- metadata?: Keypair;
254
- hash: string;
255
- context: any;
256
- }>;
257
- /**
258
- * Creates a new stream/vesting contract.
259
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
260
- * @param {ICreateStreamData} data - Stream parameters including recipient, token, amount, schedule, and permissions
261
- * @param {ICreateStreamSolanaExt} extParams - Transaction configuration including sender wallet, native token handling, and compute settings
262
- * @returns Create result
263
- */
264
- create(data: ICreateStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateResult>;
265
- prepareCreateInstructions(streamParams: ICreateStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
266
- prepareCreateAlignedUnlockInstructions(streamParams: ICreateAlignedStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
267
- /**
268
- * Creates a new stream/vesting contract.
269
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
270
- * @param {ICreateStreamData} data - Stream parameters including recipient, token, amount, schedule, and permissions
271
- * @param {IPrepareCreateStreamSolanaExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
272
- * @returns Create stream instructions
273
- */
274
- prepareCreateStreamInstructions({ 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 }: IPrepareCreateStreamSolanaExt): Promise<ICreateStreamInstructions>;
275
- /**
276
- * Creates a new stream/vesting contract using unchecked instruction.
277
- *
278
- * Unchecked instruction differs from the regular in:
279
- * - does not check for initialized associated token account (wallets with no control over their ATA should not be used
280
- * as sender/recipient/partner or there are risks of funds being locked in the contract)
281
- * - initialized contract PDA off chain
282
- *
283
- * If you are not sure if you should use create or create_unchecked, go for create to be safer.
284
- * @param {ICreateStreamData} data - Stream parameters including recipient, token, amount, schedule, and permissions
285
- * @param {ICreateStreamSolanaExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
286
- * @returns Create result
287
- */
288
- createUnchecked(data: ICreateStreamData, extParams: ICreateStreamSolanaExt): Promise<ICreateResult>;
289
- /**
290
- * Create Transaction instructions for `createUnchecked`
291
- */
292
- 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 }: IPrepareCreateStreamSolanaExt): Promise<{
293
- ixs: TransactionInstruction[];
294
- metadata: Keypair | undefined;
295
- metadataPubKey: PublicKey;
296
- }>;
297
- /**
298
- * Builds transaction instructions for creating multiple stream/vesting contracts without creating transactions.
299
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
300
- * @param {ICreateMultipleStreamData} data - Stream base parameters and array of recipients with individual amounts and settings
301
- * @param {IPrepareCreateStreamSolanaExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
302
- * @returns Create multiple transaction instructions
303
- */
304
- buildCreateMultipleTransactionInstructions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<{
305
- instructionsBatch: {
306
- ixs: TransactionInstruction[];
307
- metadata: Keypair | undefined;
308
- recipient: string;
309
- }[];
310
- metadatas: string[];
311
- metadataToRecipient: MetadataRecipientHashMap;
312
- prepareInstructions: TransactionInstruction[];
313
- }>;
314
- /**
315
- * Builds multiple transactions for creating stream/vesting contracts without signing or executing them.
316
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
317
- *
318
- * IMPORTANT: When using native SOL (isNative: true), you MUST execute the prepareTx FIRST and wait for confirmation
319
- * before executing the stream creation transactions. Otherwise, stream creation will fail with "InvalidAccountData".
320
- *
321
- * @example
322
- * ```typescript
323
- * const result = await streamClient.buildCreateMultipleTransactions(data, { isNative: true, senderPublicKey });
324
- *
325
- * // CRITICAL: Execute prepareTx first if it exists
326
- * if (result.prepareTx) {
327
- * await connection.sendAndConfirmTransaction(result.prepareTx, [signer]);
328
- * }
329
- *
330
- * // Only then execute stream creation transactions
331
- * for (const item of result.transactions) {
332
- * await connection.sendAndConfirmTransaction(item.tx, [signer]);
333
- * }
334
- * ```
335
- *
336
- * @param {ICreateMultipleStreamData} data - Stream base parameters and array of recipients with individual amounts and settings
337
- * @param {IPrepareCreateStreamSolanaExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
338
- * @returns Multiple transaction information
339
- */
340
- buildCreateMultipleTransactions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamSolanaExt): Promise<{
341
- transactions: BatchItem[];
342
- metadatas: string[];
343
- metadataToRecipient: MetadataRecipientHashMap;
344
- hash: Readonly<{
345
- blockhash: string;
346
- lastValidBlockHeight: number;
347
- }>;
348
- context: any;
349
- prepareTx?: VersionedTransaction;
350
- }>;
351
- /**
352
- * Creates multiple stream/vesting contracts.
353
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
354
- * @param {ICreateMultipleStreamData} data - Stream base parameters and array of recipients with individual amounts and settings
355
- * @param {ICreateStreamSolanaExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
356
- * @returns Multiple transaction information
357
- */
358
- createMultiple(data: ICreateMultipleStreamData, extParams: ICreateStreamSolanaExt): Promise<IMultiTransactionResult>;
359
- /**
360
- * Creates multiple stream/vesting contracts, and send all transactions sequentially.
361
- * All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
362
- * In most cases, createMultiple should be used instead.
363
- * @param {ICreateMultipleStreamData} data - Stream base parameters and array of recipients with individual amounts and settings
364
- * @param {ICreateStreamSolanaExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
365
- * @returns Multiple transaction information
366
- */
367
- createMultipleSequential(data: ICreateMultipleStreamData, extParams: ICreateStreamSolanaExt): Promise<IMultiTransactionResult>;
368
- /**
369
- * Attempts withdrawing from the specified stream.
370
- * @param {IWithdrawData} withdrawData - Withdrawal parameters including stream ID and amount to withdraw
371
- * @param {IInteractStreamSolanaExt} extParams - Transaction configuration including invoker wallet, token account validation, and compute settings
372
- * @returns Transaction result
373
- */
374
- withdraw({ id, amount }: IWithdrawData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
375
- /**
376
- * Creates Transaction Instructions for withdrawal
377
- * @param {IWithdrawData} withdrawData - Withdrawal parameters including stream ID and amount to withdraw
378
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet address, token account validation, and compute settings
379
- * @returns Transaction instructions
380
- */
381
- prepareWithdrawInstructions({ id, amount }: IWithdrawData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
382
- /**
383
- * Attempts canceling the specified stream.
384
- * @param {ICancelData} cancelData - Cancellation parameters including stream ID
385
- * @param {IInteractStreamSolanaExt} extParams - Transaction configuration including invoker wallet, token account validation, and compute settings
386
- * @returns Transaction result
387
- */
388
- cancel(cancelData: ICancelData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
389
- /**
390
- * Creates Transaction Instructions for cancel
391
- * @param {ICancelData} cancelData - Cancellation parameters including stream ID
392
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet address, token account validation, and compute settings
393
- * @returns Transaction instructions
394
- */
395
- prepareCancelInstructions(cancelData: ICancelData, extParams: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
396
- /**
397
- * Creates Transaction Instructions for cancel
398
- * @param {ICancelData} cancelData - Cancellation parameters including stream ID
399
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet, token account validation, and compute settings
400
- * @returns Transaction instructions
401
- */
402
- prepareCancelAlignedUnlockInstructions({ id }: ICancelData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
403
- /**
404
- * Creates Transaction Instructions for cancel
405
- * @param {ICancelData} cancelData - Cancellation parameters including stream ID
406
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet, token account validation, and compute settings
407
- * @returns Transaction instructions
408
- */
409
- prepareCancelStreamInstructions({ id }: ICancelData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
410
- /**
411
- * Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
412
- * Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
413
- * @param {ITransferData} transferData - Transfer parameters including stream ID and new recipient address
414
- * @param {IInteractStreamSolanaExt} extParams - Transaction configuration including invoker wallet and compute settings
415
- * @returns Transaction result
416
- */
417
- transfer({ id, newRecipient }: ITransferData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
418
- /**
419
- * Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
420
- * Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
421
- * @param {ITransferData} transferData - Transfer parameters including stream ID and new recipient address
422
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet and compute settings
423
- * @returns Transaction instructions
424
- */
425
- prepareTransferInstructions({ id, newRecipient }: ITransferData, { invoker, computePrice, computeLimit }: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
426
- /**
427
- * Tops up stream account with specified amount.
428
- * @param {ITopUpData} topupData - Top-up parameters including stream ID and amount to add
429
- * @param {ITopUpStreamSolanaExt} extParams - Transaction configuration including invoker wallet, native token handling, and compute settings
430
- * @returns Transaction result
431
- */
432
- topup({ id, amount }: ITopUpData, extParams: ITopUpStreamSolanaExt): Promise<ITransactionResult>;
433
- /**
434
- * Create Transaction instructions for topup
435
- * @param {ITopUpData} topupData - Top-up parameters including stream ID and amount to add
436
- * @param {ITopUpStreamSolanaExt} extParams - Transaction configuration including invoker wallet, native token handling, and compute settings
437
- * @returns Transaction instructions
438
- */
439
- prepareTopupInstructions({ id, amount }: ITopUpData, { invoker, isNative, computePrice, computeLimit }: ITopUpStreamSolanaExt): Promise<TransactionInstruction[]>;
440
- /**
441
- * Fetch stream data by its id (address).
442
- * @param {IGetOneData} getData - Query parameters containing the stream ID to fetch
443
- * @returns Stream data
444
- */
445
- getOne({ id }: IGetOneData): Promise<Stream>;
446
- /**
447
- * Fetch all aligned outgoing streams/contracts by the provided public key.
448
- * @param {string} sender - Sender public key
449
- * @returns Record of stream data
450
- */
451
- private getOutgoingAlignedStreams;
452
- private getIncomingAlignedStreams;
453
- /**
454
- * Fetch streams/contracts by providing direction.
455
- * Streams are sorted by start time in ascending order.
456
- * @param {IGetAllData} getData - Query parameters including address, stream type filter, and direction filter
457
- * @returns Record of stream data
458
- */
459
- get({ address, type, direction, }: IGetAllData): Promise<[string, Stream][]>;
460
- /**
461
- * Searches for streams/contracts by providing filters.
462
- * @param {ISearchStreams} data - Search by mint, sender, recipient or closed status
463
- * @returns Record of stream data
464
- */
465
- searchStreams(data: ISearchStreams): Promise<IProgramAccount<Stream>[]>;
466
- /**
467
- * Attempts updating the stream auto withdrawal params and amount per period
468
- * @param {IUpdateData} data - Update parameters including stream ID and new settings
469
- * @param {IInteractStreamSolanaExt} extParams - Transaction configuration including invoker wallet and compute settings
470
- * @returns Transaction result
471
- */
472
- update(data: IUpdateData, extParams: IInteractStreamSolanaExt): Promise<ITransactionResult>;
473
- /**
474
- * Create Transaction instructions for update
475
- * @param {IUpdateData} data - Update parameters including stream ID and new settings
476
- * @param {IPrepareStreamSolanaExt} extParams - Transaction configuration including invoker wallet and compute settings
477
- * @returns Transaction instructions
478
- */
479
- prepareUpdateInstructions(data: IUpdateData, { invoker, computePrice, computeLimit }: IPrepareStreamSolanaExt): Promise<TransactionInstruction[]>;
480
- /**
481
- * Gets fees for a given address
482
- * @param {IGetFeesData} getData - Query parameters containing the partner address to check for custom fees
483
- * @returns Fees
484
- */
485
- getFees({ address }: IGetFeesData): Promise<IFees | null>;
486
- /**
487
- * Gets default streamflow fee
488
- * @returns Default streamflow fee
489
- */
490
- getDefaultStreamflowFee(): Promise<number>;
491
- /**
492
- * Extracts error code from an error
493
- * @param {Error} err - Error
494
- * @returns Error code
495
- */
496
- extractErrorCode(err: Error): string | null;
497
- /**
498
- * Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
499
- */
500
- isAlignedUnlock(streamPublicKey: PublicKey, senderPublicKey: PublicKey): boolean;
501
- /**
502
- * Utility function to generate metadata for a Contract or return existing Pubkey
503
- */
504
- private getOrCreateStreamMetadata;
505
- /**
506
- * Returns insrtuctions for creating associated token accounts for the provided owners
507
- */
508
- private getCreateATAInstructions;
509
- private applyCustomAfterInstructions;
510
- }
511
-
512
- declare const decodeStream: (buf: Buffer) => DecodedStream;
513
- /**
514
- * Sign passed BatchItems with wallet request or KeyPair
515
- * @param {Keypair | SignerWalletAdapter} sender - Wallet or Keypair of sendin account
516
- * @param {BatchItem[]} items - Multiple recipient contracts split into separate items
517
- * @return {BatchItem[]} - Returns items with signatures.
518
- */
519
- declare function signAllTransactionWithRecipients(sender: Keypair | SignerWalletAdapter, items: BatchItem[]): Promise<BatchItem[]>;
520
- /**
521
- * Sign passed BatchItems with wallet request or KeyPair
522
- * @param {Connection} connection - Solana web3 connection object.
523
- * @param {BatchItem} batchItem - Signed transaction ready to be send.
524
- * @param confirmationParams - Confirmation Params that will be used for execution
525
- * @param throttleParams - rate or throttler instance to throttle TX sending - to not spam the blockchain too much
526
- * @return {Promise<BatchItemResult>} - Returns settled transaction item
527
- */
528
- declare function sendAndConfirmStreamRawTransaction(connection: Connection, batchItem: BatchItem, confirmationParams: ConfirmationParams, throttleParams: ThrottleParams): Promise<BatchItemResult>;
529
- declare function extractSolanaErrorCode(errorText: string, logs?: string[]): string | null;
530
-
531
- declare const deriveContractPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
532
- declare const deriveEscrowPDA: (programId: PublicKey, streamMetadata: PublicKey) => PublicKey;
533
- declare const deriveTestOraclePDA: (programId: PublicKey, mint: PublicKey, creator: PublicKey) => PublicKey;
534
-
535
- interface CreateStreamData {
536
- start: BN;
537
- depositedAmount: BN;
538
- period: BN;
539
- amountPerPeriod: BN;
540
- cliff: BN;
541
- cliffAmount: BN;
542
- cancelableBySender: boolean;
543
- cancelableByRecipient: boolean;
544
- automaticWithdrawal: boolean;
545
- transferableBySender: boolean;
546
- transferableByRecipient: boolean;
547
- canTopup: boolean;
548
- canUpdateRate: boolean;
549
- canPause: boolean;
550
- name: string;
551
- withdrawFrequency: BN;
552
- }
553
- interface CreateStreamAccounts {
554
- sender: PublicKey;
555
- senderTokens: PublicKey;
556
- recipient: PublicKey;
557
- recipientTokens: PublicKey;
558
- metadata: PublicKey;
559
- escrowTokens: PublicKey;
560
- streamflowTreasury: PublicKey;
561
- streamflowTreasuryTokens: PublicKey;
562
- partner: PublicKey;
563
- partnerTokens: PublicKey;
564
- mint: PublicKey;
565
- feeOracle: PublicKey;
566
- rent: PublicKey;
567
- timelockProgram: PublicKey;
568
- tokenProgram: PublicKey;
569
- associatedTokenProgram: PublicKey;
570
- withdrawor: PublicKey;
571
- systemProgram: PublicKey;
572
- }
573
- declare const createStreamInstruction: (data: CreateStreamData, programId: PublicKey, accounts: CreateStreamAccounts) => Promise<TransactionInstruction>;
574
- interface CreateUncheckedStreamData {
575
- start: BN;
576
- depositedAmount: BN;
577
- period: BN;
578
- amountPerPeriod: BN;
579
- cliff: BN;
580
- cliffAmount: BN;
581
- cancelableBySender: boolean;
582
- cancelableByRecipient: boolean;
583
- automaticWithdrawal: boolean;
584
- transferableBySender: boolean;
585
- transferableByRecipient: boolean;
586
- canTopup: boolean;
587
- canUpdateRate: boolean;
588
- canPause: boolean;
589
- name: string;
590
- withdrawFrequency: BN;
591
- recipient: PublicKey;
592
- partner: PublicKey;
593
- }
594
- interface CreateUncheckedStreamAccounts {
595
- payer?: PublicKey;
596
- sender: PublicKey;
597
- senderTokens: PublicKey;
598
- metadata: PublicKey;
599
- escrowTokens: PublicKey;
600
- mint: PublicKey;
601
- feeOracle: PublicKey;
602
- rent: PublicKey;
603
- timelockProgram: PublicKey;
604
- tokenProgram: PublicKey;
605
- withdrawor: PublicKey;
606
- systemProgram: PublicKey;
607
- }
608
- declare const createUncheckedStreamInstruction: (data: CreateUncheckedStreamData, programId: PublicKey, accounts: CreateUncheckedStreamAccounts) => Promise<TransactionInstruction>;
609
- interface WithdrawAccounts {
610
- authority: PublicKey;
611
- recipient: PublicKey;
612
- recipientTokens: PublicKey;
613
- metadata: PublicKey;
614
- escrowTokens: PublicKey;
615
- streamflowTreasury: PublicKey;
616
- streamflowTreasuryTokens: PublicKey;
617
- partner: PublicKey;
618
- partnerTokens: PublicKey;
619
- mint: PublicKey;
620
- tokenProgram: PublicKey;
621
- }
622
- declare const withdrawStreamInstruction: (amount: BN, programId: PublicKey, { authority, recipient, recipientTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, }: WithdrawAccounts) => Promise<TransactionInstruction>;
623
- interface UpdateAccounts {
624
- authority: PublicKey;
625
- metadata: PublicKey;
626
- withdrawor: PublicKey;
627
- systemProgram: PublicKey;
628
- }
629
- declare const updateStreamInstruction: (params: IUpdateData, programId: PublicKey, { authority, metadata, withdrawor, systemProgram }: UpdateAccounts) => Promise<TransactionInstruction>;
630
- interface CancelAccounts {
631
- authority: PublicKey;
632
- sender: PublicKey;
633
- senderTokens: PublicKey;
634
- recipient: PublicKey;
635
- recipientTokens: PublicKey;
636
- metadata: PublicKey;
637
- escrowTokens: PublicKey;
638
- streamflowTreasury: PublicKey;
639
- streamflowTreasuryTokens: PublicKey;
640
- partner: PublicKey;
641
- partnerTokens: PublicKey;
642
- mint: PublicKey;
643
- tokenProgram: PublicKey;
644
- }
645
- declare const cancelStreamInstruction: (programId: PublicKey, { authority, sender, senderTokens, recipient, recipientTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, }: CancelAccounts) => Promise<TransactionInstruction>;
646
- interface TransferAccounts {
647
- authority: PublicKey;
648
- newRecipient: PublicKey;
649
- newRecipientTokens: PublicKey;
650
- metadata: PublicKey;
651
- mint: PublicKey;
652
- rent: PublicKey;
653
- tokenProgram: PublicKey;
654
- associatedTokenProgram: PublicKey;
655
- systemProgram: PublicKey;
656
- }
657
- declare const transferStreamInstruction: (programId: PublicKey, { authority, newRecipient, newRecipientTokens, metadata, mint, rent, tokenProgram, associatedTokenProgram, systemProgram, }: TransferAccounts) => Promise<TransactionInstruction>;
658
- interface TopupAccounts {
659
- sender: PublicKey;
660
- senderTokens: PublicKey;
661
- metadata: PublicKey;
662
- escrowTokens: PublicKey;
663
- streamflowTreasury: PublicKey;
664
- streamflowTreasuryTokens: PublicKey;
665
- partner: PublicKey;
666
- partnerTokens: PublicKey;
667
- mint: PublicKey;
668
- tokenProgram: PublicKey;
669
- withdrawor: PublicKey;
670
- systemProgram: PublicKey;
671
- }
672
- declare const topupStreamInstruction: (amount: BN, programId: PublicKey, { sender, senderTokens, metadata, escrowTokens, streamflowTreasury, streamflowTreasuryTokens, partner, partnerTokens, mint, tokenProgram, withdrawor, systemProgram, }: TopupAccounts) => Promise<TransactionInstruction>;
673
-
674
- declare const TX_FINALITY_CONFIRMED = "confirmed";
675
- declare const ORIGINAL_CONTRACT_SENDER_OFFSET = 9;
676
- declare const STREAM_STRUCT_OFFSET_SENDER = 49;
677
- declare const STREAM_STRUCT_OFFSET_RECIPIENT = 113;
678
- declare const STREAM_STRUCT_OFFSET_MINT = 177;
679
- declare const STREAM_STRUCT_OFFSET_CLOSED = 671;
680
- declare const ALIGNED_PRECISION_FACTOR_POW = 9;
681
- declare const STREAM_STRUCT_OFFSETS: Record<keyof ISearchStreams, number>;
682
- declare const CREATE_PARAMS_PADDING = 126;
683
- declare const PROGRAM_ID: {
684
- devnet: string;
685
- mainnet: string;
686
- testnet: string;
687
- local: string;
688
- };
689
- declare const ALIGNED_UNLOCKS_PROGRAM_ID: {
690
- devnet: string;
691
- mainnet: string;
692
- testnet: string;
693
- local: string;
694
- };
695
- declare const ALIGNED_COMPUTE_LIMIT = 300000;
696
- declare const CONTRACT_DISCRIMINATOR: number[];
697
- declare const TEST_ORACLE_DISCRIMINATOR: number[];
698
- declare const CONTRACT_SEED: Buffer$1;
699
- declare const ESCROW_SEED: Buffer$1;
700
- declare const TEST_ORACLE_SEED: Buffer$1;
701
- declare const PARTNER_ORACLE_PROGRAM_ID = "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa";
702
- declare const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey;
703
- declare const WITHDRAWOR_PUBLIC_KEY: PublicKey;
704
- declare const FEE_ORACLE_PUBLIC_KEY: PublicKey;
705
- declare const AIRDROP_TEST_TOKEN = "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj";
706
- declare const FEES_METADATA_SEED: Buffer$1;
707
- declare const DEFAULT_STREAMFLOW_FEE = 0.99;
708
- declare const AIRDROP_AMOUNT = 1;
709
- declare const PARTNER_SCHEMA: {
710
- struct: {
711
- pubkey: {
712
- array: {
713
- type: string;
714
- len: number;
715
- };
716
- };
717
- partner_fee: string;
718
- strm_fee: string;
719
- };
720
- };
721
- declare const PARTNERS_SCHEMA: {
722
- array: {
723
- type: {
724
- struct: {
725
- pubkey: {
726
- array: {
727
- type: string;
728
- len: number;
729
- };
730
- };
731
- partner_fee: string;
732
- strm_fee: string;
733
- };
734
- };
735
- };
736
- };
737
- declare const SOLANA_ERROR_MATCH_REGEX: RegExp;
738
- declare const SOLANA_ERROR_MAP: {
739
- [key: number]: string;
740
- };
741
-
742
- declare const constants_AIRDROP_AMOUNT: typeof AIRDROP_AMOUNT;
743
- declare const constants_AIRDROP_TEST_TOKEN: typeof AIRDROP_TEST_TOKEN;
744
- declare const constants_ALIGNED_COMPUTE_LIMIT: typeof ALIGNED_COMPUTE_LIMIT;
745
- declare const constants_ALIGNED_PRECISION_FACTOR_POW: typeof ALIGNED_PRECISION_FACTOR_POW;
746
- declare const constants_ALIGNED_UNLOCKS_PROGRAM_ID: typeof ALIGNED_UNLOCKS_PROGRAM_ID;
747
- declare const constants_CONTRACT_DISCRIMINATOR: typeof CONTRACT_DISCRIMINATOR;
748
- declare const constants_CONTRACT_SEED: typeof CONTRACT_SEED;
749
- declare const constants_CREATE_PARAMS_PADDING: typeof CREATE_PARAMS_PADDING;
750
- declare const constants_DEFAULT_STREAMFLOW_FEE: typeof DEFAULT_STREAMFLOW_FEE;
751
- declare const constants_ESCROW_SEED: typeof ESCROW_SEED;
752
- declare const constants_FEES_METADATA_SEED: typeof FEES_METADATA_SEED;
753
- declare const constants_FEE_ORACLE_PUBLIC_KEY: typeof FEE_ORACLE_PUBLIC_KEY;
754
- declare const constants_ORIGINAL_CONTRACT_SENDER_OFFSET: typeof ORIGINAL_CONTRACT_SENDER_OFFSET;
755
- declare const constants_PARTNERS_SCHEMA: typeof PARTNERS_SCHEMA;
756
- declare const constants_PARTNER_ORACLE_PROGRAM_ID: typeof PARTNER_ORACLE_PROGRAM_ID;
757
- declare const constants_PARTNER_SCHEMA: typeof PARTNER_SCHEMA;
758
- declare const constants_PROGRAM_ID: typeof PROGRAM_ID;
759
- declare const constants_SOLANA_ERROR_MAP: typeof SOLANA_ERROR_MAP;
760
- declare const constants_SOLANA_ERROR_MATCH_REGEX: typeof SOLANA_ERROR_MATCH_REGEX;
761
- declare const constants_STREAMFLOW_TREASURY_PUBLIC_KEY: typeof STREAMFLOW_TREASURY_PUBLIC_KEY;
762
- declare const constants_STREAM_STRUCT_OFFSETS: typeof STREAM_STRUCT_OFFSETS;
763
- declare const constants_STREAM_STRUCT_OFFSET_CLOSED: typeof STREAM_STRUCT_OFFSET_CLOSED;
764
- declare const constants_STREAM_STRUCT_OFFSET_MINT: typeof STREAM_STRUCT_OFFSET_MINT;
765
- declare const constants_STREAM_STRUCT_OFFSET_RECIPIENT: typeof STREAM_STRUCT_OFFSET_RECIPIENT;
766
- declare const constants_STREAM_STRUCT_OFFSET_SENDER: typeof STREAM_STRUCT_OFFSET_SENDER;
767
- declare const constants_TEST_ORACLE_DISCRIMINATOR: typeof TEST_ORACLE_DISCRIMINATOR;
768
- declare const constants_TEST_ORACLE_SEED: typeof TEST_ORACLE_SEED;
769
- declare const constants_TX_FINALITY_CONFIRMED: typeof TX_FINALITY_CONFIRMED;
770
- declare const constants_WITHDRAWOR_PUBLIC_KEY: typeof WITHDRAWOR_PUBLIC_KEY;
771
- declare namespace constants {
772
- 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 };
773
- }
774
-
775
- declare const _default: {
776
- version: string;
777
- name: string;
778
- instructions: {
779
- name: string;
780
- accounts: {
781
- name: string;
782
- isMut: boolean;
783
- isSigner: boolean;
784
- }[];
785
- args: ({
786
- name: string;
787
- type: string;
788
- } | {
789
- name: string;
790
- type: {
791
- array: (string | number)[];
792
- };
793
- })[];
794
- }[];
795
- };
796
-
797
- type index_Account = Account;
798
- type index_AlignedContract = AlignedContract;
799
- declare const index_AlignedContract: typeof AlignedContract;
800
- type index_AlignedUnlocksContract = AlignedUnlocksContract;
801
- type index_BatchItem = BatchItem;
802
- type index_BatchItemError = BatchItemError;
803
- type index_BatchItemResult = BatchItemResult;
804
- type index_BatchItemSuccess = BatchItemSuccess;
805
- type index_ChangeOracleParams = ChangeOracleParams;
806
- type index_ClientCreationOptions = ClientCreationOptions;
807
- type index_Contract = Contract;
808
- declare const index_Contract: typeof Contract;
809
- declare const index_ContractError: typeof ContractError;
810
- type index_CreateParams = CreateParams;
811
- type index_CreateTestOracleParams = CreateTestOracleParams;
812
- type index_DecodedStream = DecodedStream;
813
- declare const index_IChain: typeof IChain;
814
- declare const index_ICluster: typeof ICluster;
815
- type index_ICreateSolanaExt = ICreateSolanaExt;
816
- type index_ICreateStreamInstructions = ICreateStreamInstructions;
817
- type index_ICreateStreamSolanaExt = ICreateStreamSolanaExt;
818
- type index_IInteractStreamSolanaExt = IInteractStreamSolanaExt;
819
- type index_IPrepareCreateStreamSolanaExt = IPrepareCreateStreamSolanaExt;
820
- type index_IPrepareStreamSolanaExt = IPrepareStreamSolanaExt;
821
- type index_ISearchStreams = ISearchStreams;
822
- type index_ITopUpStreamSolanaExt = ITopUpStreamSolanaExt;
823
- type index_ITransactionSolanaExtWithInstructions = ITransactionSolanaExtWithInstructions;
824
- type index_InstructionGenerator = InstructionGenerator;
825
- type index_MetadataRecipientHashMap = MetadataRecipientHashMap;
826
- type index_OracleType = OracleType;
827
- type index_SolanaStreamClient = SolanaStreamClient;
828
- declare const index_SolanaStreamClient: typeof SolanaStreamClient;
829
- type index_TestOracle = TestOracle;
830
- type index_UpdateTestOracleParams = UpdateTestOracleParams;
831
- declare const index_cancelStreamInstruction: typeof cancelStreamInstruction;
832
- declare const index_constants: typeof constants;
833
- declare const index_createStreamInstruction: typeof createStreamInstruction;
834
- declare const index_createUncheckedStreamInstruction: typeof createUncheckedStreamInstruction;
835
- declare const index_decodeStream: typeof decodeStream;
836
- declare const index_deriveContractPDA: typeof deriveContractPDA;
837
- declare const index_deriveEscrowPDA: typeof deriveEscrowPDA;
838
- declare const index_deriveTestOraclePDA: typeof deriveTestOraclePDA;
839
- declare const index_extractSolanaErrorCode: typeof extractSolanaErrorCode;
840
- declare const index_sendAndConfirmStreamRawTransaction: typeof sendAndConfirmStreamRawTransaction;
841
- declare const index_signAllTransactionWithRecipients: typeof signAllTransactionWithRecipients;
842
- declare const index_topupStreamInstruction: typeof topupStreamInstruction;
843
- declare const index_transferStreamInstruction: typeof transferStreamInstruction;
844
- declare const index_updateStreamInstruction: typeof updateStreamInstruction;
845
- declare const index_withdrawStreamInstruction: typeof withdrawStreamInstruction;
846
- declare namespace index {
847
- 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 };
848
- }
849
-
850
- 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 };