@streamflow/stream 6.3.9 → 6.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ Most common imports:
23
23
 
24
24
  ```javascript
25
25
  import { BN } from "bn.js";
26
- import { Types, GenericStreamClient, getBN, getNumberFromBN } from "@streamflow/stream";
26
+ import { GenericStreamClient, getBN, getNumberFromBN } from "@streamflow/stream";
27
27
  ```
28
28
 
29
29
  _Check the SDK for other types and utility functions._
@@ -35,10 +35,7 @@ Before creating and manipulating streams chain specific or generic StreamClient
35
35
  ### Solana
36
36
 
37
37
  ```javascript
38
- import {
39
- StreamflowSolana,
40
- Types,
41
- } from "@streamflow/stream";
38
+ import { StreamflowSolana } from "@streamflow/stream";
42
39
 
43
40
  const solanaClient = new StreamflowSolana.SolanaStreamClient(
44
41
  "https://api.mainnet-beta.solana.com"
@@ -48,10 +45,7 @@ const solanaClient = new StreamflowSolana.SolanaStreamClient(
48
45
  ### Aptos
49
46
 
50
47
  ```javascript
51
- import {
52
- StreamflowAptos,
53
- Types,
54
- } from "@streamflow/stream";
48
+ import { StreamflowAptos } from "@streamflow/stream";
55
49
 
56
50
  const aptosClient = new StreamflowAptos.AptosStreamClient(
57
51
  "https://fullnode.mainnet.aptoslabs.com/v1"
@@ -61,14 +55,11 @@ const aptosClient = new StreamflowAptos.AptosStreamClient(
61
55
  ### Ethereum
62
56
 
63
57
  ```javascript
64
- import {
65
- StreamflowEVM,
66
- Types,
67
- } from "@streamflow/stream";
58
+ import { StreamflowEVM } from "@streamflow/stream";
68
59
 
69
60
  const ethereumClient = new StreamflowEVM.EvmStreamClient(
70
61
  "YOUR_ETHEREUM_NODE_URL",
71
- Types.IChain.Ethereum,
62
+ IChain.Ethereum,
72
63
  signer // will be sender in a stream and authority for all stream related transactions
73
64
  );
74
65
  ```
@@ -76,14 +67,11 @@ const ethereumClient = new StreamflowEVM.EvmStreamClient(
76
67
  ### Polygon
77
68
 
78
69
  ```javascript
79
- import {
80
- StreamflowEVM,
81
- Types,
82
- } from "@streamflow/stream";
70
+ import { StreamflowEVM } from "@streamflow/stream";
83
71
 
84
72
  const polygonClient = new StreamflowEVM.EvmStreamClient(
85
73
  "YOUR_POLYGON_NODE_URL",
86
- Types.IChain.Polygon,
74
+ IChain.Polygon,
87
75
  signer // will be sender in a stream and authority for all stream related transactions
88
76
  );
89
77
  ```
@@ -91,14 +79,11 @@ const polygonClient = new StreamflowEVM.EvmStreamClient(
91
79
  ### BNB
92
80
 
93
81
  ```javascript
94
- import {
95
- StreamflowEVM,
96
- Types,
97
- } from "@streamflow/stream";
82
+ import { StreamflowEVM } from "@streamflow/stream";
98
83
 
99
84
  const bnbClient = new StreamflowEVM.EvmStreamClient(
100
85
  "https://bsc-dataseed1.binance.org/",
101
- Types.IChain.BNB,
86
+ IChain.BNB,
102
87
  signer // will be sender in a stream and authority for all stream related transactions
103
88
  );
104
89
  ```
@@ -106,10 +91,7 @@ const bnbClient = new StreamflowEVM.EvmStreamClient(
106
91
  ### Sui
107
92
 
108
93
  ```javascript
109
- import {
110
- StreamflowSui,
111
- Types,
112
- } from "@streamflow/stream";
94
+ import { StreamflowSui } from "@streamflow/stream";
113
95
 
114
96
  const suiClient = new StreamflowSui.SuiStreamClient(
115
97
  "https://fullnode.testnet.sui.io:443"
@@ -121,13 +103,13 @@ const suiClient = new StreamflowSui.SuiStreamClient(
121
103
  GenericStreamClient provides isomorphic interface to work with streams agnostic of chain.
122
104
 
123
105
  ```javascript
124
- import { GenericStreamClient, Types } from "@streamflow/stream";
106
+ import { GenericStreamClient } from "@streamflow/stream";
125
107
 
126
108
  const client =
127
109
  new GenericStreamClient<Types.IChain.Solana>({
128
- chain: Types.IChain.Solana, // Blockchain
110
+ chain: IChain.Solana, // Blockchain
129
111
  clusterUrl: "https://api.mainnet-beta.solana.com", // RPC cluster URL
130
- cluster: Types.ICluster.Mainnet, // (optional) (default: Mainnet)
112
+ cluster: ICluster.Mainnet, // (optional) (default: Mainnet)
131
113
  // ...rest chain specific params e.g. commitment for Solana
132
114
  });
133
115
  ```
@@ -149,7 +131,7 @@ const createStreamParams: Types.ICreateStreamData = {
149
131
  cliffAmount: new BN(10), // Amount unlocked at the "cliff" timestamp.
150
132
  amountPerPeriod: getBN(5, 9), // Release rate: how many tokens are unlocked per each period.
151
133
  name: "Transfer to Jane Doe.", // The stream name or subject.
152
- canTopup: false, // setting to FALSE will effectively create a vesting contract.
134
+ canTopup: false, // Whether additional tokens can be deposited after creation, setting to FALSE will effectively create a vesting contract.
153
135
  canUpdateRate: false, // settings to TRUE allows sender to update amountPerPeriod
154
136
  cancelableBySender: true, // Whether or not sender can cancel the stream.
155
137
  cancelableByRecipient: false, // Whether or not recipient can cancel the stream.
@@ -157,12 +139,12 @@ const createStreamParams: Types.ICreateStreamData = {
157
139
  transferableByRecipient: false, // Whether or not recipient can transfer the stream.
158
140
  automaticWithdrawal: true, // Whether or not a 3rd party (e.g. cron job, "cranker") can initiate a token withdraw/transfer.
159
141
  withdrawalFrequency: 10, // Relevant when automatic withdrawal is enabled. If greater than 0 our withdrawor will take care of withdrawals. If equal to 0 our withdrawor will skip, but everyone else can initiate withdrawals.
160
- partner: null, // (optional) Partner's wallet address (string | null).
142
+ partner: undefined, // (optional) Partner's wallet address (string | undefined).
161
143
  };
162
144
 
163
145
  const solanaParams = {
164
146
  sender: wallet, // SignerWalletAdapter or Keypair of Sender account
165
- isNative: false // [optional] [WILL CREATE A wSOL STREAM] Wether Stream or Vesting should be paid with Solana native token or not
147
+ isNative: false // [optional] [WILL CREATE A wSOL STREAM] Whether Stream or Vesting should be paid with Solana native token or not
166
148
  };
167
149
 
168
150
  const aptosParams = {
@@ -194,7 +176,7 @@ const recipients = [
194
176
  amountPerPeriod: getBN(1, 9), //amount released every specified period epoch
195
177
  },
196
178
  ];
197
- const createStreamParams: Types.ICreateMultipleStreamData = {
179
+ const createMultiStreamsParams: ICreateMultipleStreamData = {
198
180
  recipients: recipients, // Solana recipient address.
199
181
  tokenId: "DNw99999M7e24g99999999WJirKeZ5fQc6KY999999gK", // SPL Token mint.
200
182
  start: 1643363040, // Timestamp (in seconds) when the stream/token vesting starts.
@@ -207,7 +189,7 @@ const createStreamParams: Types.ICreateMultipleStreamData = {
207
189
  transferableByRecipient: false, // Whether or not recipient can transfer the stream.
208
190
  automaticWithdrawal: true, // Whether or not a 3rd party (e.g. cron job, "cranker") can initiate a token withdraw/transfer.
209
191
  withdrawalFrequency: 10, // Relevant when automatic withdrawal is enabled. If greater than 0 our withdrawor will take care of withdrawals. If equal to 0 our withdrawor will skip, but everyone else can initiate withdrawals.
210
- partner: null, // (optional) Partner's wallet address (string | null).
192
+ partner: undefined, // (optional) Partner's wallet address (string | undefined).
211
193
  };
212
194
 
213
195
  const solanaParams = {
@@ -236,11 +218,11 @@ Please note that transaction fees for the scheduled transfers are paid upfront b
236
218
 
237
219
  ## Identifying created contracts (streams or vesting)
238
220
 
239
- All Stream Clients return `Types.ICreateResult` object (`createdMultiple` returns an Array) that has the following structure
221
+ All Stream Clients return `ICreateResult` object (`createMultiple` returns an Array) that has the following structure
240
222
 
241
223
  ```javascript
242
224
  interface ICreateResult {
243
- ixs: (TransactionInstruction | Types.TransactionPayload)[];
225
+ ixs: (TransactionInstruction | TransactionPayload)[];
244
226
  txId: string;
245
227
  metadataId: MetadataId;
246
228
  }
@@ -252,7 +234,7 @@ interface ICreateResult {
252
234
 
253
235
  ```javascript
254
236
  const withdrawStreamParams: Types.IWithdrawData = {
255
- id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier of a stream to be withdrawn from.
237
+ id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier (address) of a stream to be withdrawn from.
256
238
  amount: getBN(100, 9), // Requested amount to withdraw. If stream is completed, the whole amount will be withdrawn.
257
239
  };
258
240
 
@@ -282,14 +264,14 @@ try {
282
264
  ## Topup stream
283
265
 
284
266
  ```javascript
285
- const topupStreamParams: Types.ITopUpData = {
286
- id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier of a stream to be topped up.
267
+ const topupStreamParams: ITopUpData = {
268
+ id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier (address) of a stream to be topped up.
287
269
  amount: getBN(100, 9), // Specified amount to topup (increases deposited amount).
288
270
  };
289
271
 
290
272
  const solanaParams = {
291
273
  invoker: wallet, // SignerWalletAdapter or Keypair signing the transaction
292
- isNative: // [ONLY FOR wSOL STREAMS] [optional] Wether topup is with Native Solanas
274
+ isNative: true // [ONLY FOR wSOL STREAMS] [optional] Wether topup is with Native Solanas
293
275
  };
294
276
 
295
277
  const aptosParams = {
@@ -314,9 +296,9 @@ try {
314
296
  ## Transfer stream to another recipient
315
297
 
316
298
  ```javascript
317
- const data: Types.ITransferData = {
318
- id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA",
319
- newRecipient: "99h00075bKjVg000000tLdk4w42NyG3Mv0000dc0M99", // Identifier of a stream to be transferred.
299
+ const data: ITransferData = {
300
+ id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier (address) of the stream to be transferred
301
+ newRecipient: "99h00075bKjVg000000tLdk4w42NyG3Mv0000dc0M99", // Identifier (address) of a stream to be transferred.
320
302
  };
321
303
 
322
304
  const solanaParams = {
@@ -345,7 +327,7 @@ try {
345
327
  ## Cancel stream
346
328
 
347
329
  ```javascript
348
- const cancelStreamParams: Types.ICancelData = {
330
+ const cancelStreamParams: ICancelData = {
349
331
  id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier of a stream to be canceled.
350
332
  };
351
333
 
@@ -375,7 +357,7 @@ try {
375
357
  ## Update a stream
376
358
 
377
359
  ```javascript
378
- const updateStreamParams: Types.IUpdateData = {
360
+ const updateStreamParams: IUpdateData = {
379
361
  id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier of a stream to update.
380
362
  enableAutomaticWithdrawal: true, // [optional], allows to enable AW if it wasn't, disable is not possible
381
363
  withdrawFrequency: 60, // [optional], allows to update withdrawal frequency, may result in additional AW fees
@@ -406,7 +388,7 @@ try {
406
388
  ## Get one stream by its ID
407
389
 
408
390
  ```javascript
409
- const data: Types.IGetOneData = {
391
+ const data: IGetOneData = {
410
392
  id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA", // Identifier of a stream
411
393
  };
412
394
 
@@ -424,8 +406,8 @@ const stream = await client.getOne({
424
406
  id: "AAAAyotqTZZMAAAAmsD1JAgksT8NVAAAASfrGB5RAAAA",
425
407
  });
426
408
 
427
- const unlocked = stream.unlocked(tsInSeconds); // bn amount unlocked at the tsInSeconds
428
- console.log(getNumberFromBN(unlocked, 9));
409
+ const unlocked = stream.unlocked(tsInSeconds); // BN amount unlocked at the tsInSeconds
410
+ console.log(getNumberFromBN(unlocked, 9));
429
411
  ```
430
412
 
431
413
  - Note: unlocked amount is determined based on configuration set on creation, no dynamic data is involved.
@@ -445,10 +427,10 @@ console.log(remaining);
445
427
  ## Get multiple streams for a specific wallet address
446
428
 
447
429
  ```javascript
448
- const data: Types.IGetAllData = {
430
+ const data: IGetAllData = {
449
431
  address: "99h00075bKjVg000000tLdk4w42NyG3Mv0000dc0M99",
450
- type: Types.StreamType.All,
451
- direction: Types.StreamDirection.All,
432
+ type: StreamType.All, // StreamType.Vesting, StreamType.Lock, StreamType.Payment
433
+ direction: StreamDirection.All, // StreamDirection.Outgoing, StreamDirection.Incoming
452
434
  };
453
435
 
454
436
  try {
@@ -458,6 +440,22 @@ try {
458
440
  }
459
441
  ```
460
442
 
443
+ ## Search Solana Streams
444
+
445
+ Solana RPC is pretty rich in what data it can allow to filter by, so we expose a separate `searchStreams` method on `SolanaStreamClient`:
446
+
447
+ ```javascript
448
+ // All parameters are optional, so in theory you can just fetch all Streams
449
+ const params = {
450
+ mint: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
451
+ sender: "AKp8CxGbhsrsEsCFUtx7e3MWyW7SWi1uuSqv6N4BEohJ",
452
+ recipient: "9mqcpDjCHCPmttJp2t477oJ71NdAvJeSus8BcCrrvwy5",
453
+ }
454
+ // nativeStreamClient is exposed on a GenericStreamClient, you can also use SolanaStreamClient directly
455
+ // Return an Array of objects {publicKey: PublicKey, account: Stream}
456
+ const streams = await client.nativeStreamClient.searchStreams(params);
457
+ ```
458
+
461
459
  ## Handling errors
462
460
 
463
461
  `GenericStreamClient` wraps all errors when making on-chain calls with `ContractError` error class:
@@ -499,3 +497,7 @@ E.g, if the amount is 1 SOL than this amount in lamports is `1000 \* 10^9 = 1_00
499
497
  And `new BN(1_000_000_000)` is used.
500
498
 
501
499
  Use `getBN` and `getNumberFromBN` utility functions for conversions between `BN` and `Number` types.
500
+
501
+ `getBN(1, 9)` is equal to `new BN(1_000_000_000)`
502
+
503
+ `getNumberFromBN(new BN(1_000_000_000), 9)` will return 1
@@ -1,6 +1,7 @@
1
1
  import PQueue from "p-queue";
2
2
  import { Connection, Keypair, PublicKey, TransactionInstruction, Commitment, ConnectionConfig } from "@solana/web3.js";
3
- import { ICreateStreamSolanaExt, IInteractStreamSolanaExt, ITopUpStreamSolanaExt } from "./types";
3
+ import { IProgramAccount } from "@streamflow/common/solana";
4
+ import { ICreateStreamSolanaExt, IInteractStreamSolanaExt, ITopUpStreamSolanaExt, ISearchStreams } from "./types";
4
5
  import { ICancelData, ICluster, ICreateMultipleStreamData, ICreateResult, ICreateStreamData, IGetAllData, IGetFeesData, IGetOneData, IFees, IMultiTransactionResult, ITopUpData, ITransactionResult, ITransferData, IUpdateData, IWithdrawData, Stream } from "../common/types";
5
6
  import { BaseStreamClient } from "../common/BaseStreamClient";
6
7
  export default class SolanaStreamClient extends BaseStreamClient {
@@ -96,6 +97,7 @@ export default class SolanaStreamClient extends BaseStreamClient {
96
97
  * Streams are sorted by start time in ascending order.
97
98
  */
98
99
  get({ address, type, direction, }: IGetAllData): Promise<[string, Stream][]>;
100
+ searchStreams(data: ISearchStreams): Promise<IProgramAccount<Stream>[]>;
99
101
  /**
100
102
  * Attempts updating the stream auto withdrawal params and amount per period
101
103
  */
@@ -228,7 +228,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
228
228
  return [4 /*yield*/, (0, solana_1.ata)(mintPublicKey, constants_1.STREAMFLOW_TREASURY_PUBLIC_KEY, tokenProgramId)];
229
229
  case 4:
230
230
  streamflowTreasuryTokens = _m.sent();
231
- partnerPublicKey = partner ? new web3_js_1.PublicKey(partner) : constants_1.STREAMFLOW_TREASURY_PUBLIC_KEY;
231
+ partnerPublicKey = partner ? new web3_js_1.PublicKey(partner) : constants_1.WITHDRAWOR_PUBLIC_KEY;
232
232
  return [4 /*yield*/, (0, solana_1.ata)(mintPublicKey, partnerPublicKey, tokenProgramId)];
233
233
  case 5:
234
234
  partnerTokens = _m.sent();
@@ -356,7 +356,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
356
356
  return [4 /*yield*/, (0, solana_1.ata)(mintPublicKey, sender.publicKey, tokenProgramId)];
357
357
  case 3:
358
358
  senderTokens = _m.sent();
359
- partnerPublicKey = partner ? new web3_js_1.PublicKey(partner) : constants_1.STREAMFLOW_TREASURY_PUBLIC_KEY;
359
+ partnerPublicKey = partner ? new web3_js_1.PublicKey(partner) : constants_1.WITHDRAWOR_PUBLIC_KEY;
360
360
  ixs = (0, solana_1.prepareBaseInstructions)(this.connection, {
361
361
  computePrice: computePrice,
362
362
  computeLimit: computeLimit,
@@ -985,6 +985,41 @@ var SolanaStreamClient = /** @class */ (function (_super) {
985
985
  });
986
986
  });
987
987
  };
988
+ SolanaStreamClient.prototype.searchStreams = function (data) {
989
+ return __awaiter(this, void 0, void 0, function () {
990
+ var filters, accounts;
991
+ return __generator(this, function (_a) {
992
+ switch (_a.label) {
993
+ case 0:
994
+ filters = Object.entries(data)
995
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
996
+ .filter(function (_a) {
997
+ var _b = __read(_a, 2), _ = _b[0], value = _b[1];
998
+ return value;
999
+ }) // Only keep entries where the value is truthy
1000
+ .map(function (_a) {
1001
+ var _b = __read(_a, 2), key = _b[0], value = _b[1];
1002
+ return ({
1003
+ memcmp: {
1004
+ offset: constants_1.STREAM_STRUCT_OFFSETS[key],
1005
+ bytes: value,
1006
+ },
1007
+ });
1008
+ });
1009
+ return [4 /*yield*/, this.connection.getProgramAccounts(this.programId, { filters: filters })];
1010
+ case 1:
1011
+ accounts = _a.sent();
1012
+ return [2 /*return*/, accounts.map(function (_a) {
1013
+ var pubkey = _a.pubkey, account = _a.account;
1014
+ return ({
1015
+ publicKey: pubkey,
1016
+ account: new types_1.Contract((0, utils_1.decodeStream)(account.data)),
1017
+ });
1018
+ })];
1019
+ }
1020
+ });
1021
+ });
1022
+ };
988
1023
  /**
989
1024
  * Attempts updating the stream auto withdrawal params and amount per period
990
1025
  */
@@ -1,7 +1,10 @@
1
1
  import { PublicKey } from "@solana/web3.js";
2
+ import { ISearchStreams } from "./types";
2
3
  export declare const TX_FINALITY_CONFIRMED = "confirmed";
3
4
  export declare const STREAM_STRUCT_OFFSET_SENDER = 49;
4
5
  export declare const STREAM_STRUCT_OFFSET_RECIPIENT = 113;
6
+ export declare const STREAM_STRUCT_OFFSET_MINT = 177;
7
+ export declare const STREAM_STRUCT_OFFSETS: Record<keyof ISearchStreams, number>;
5
8
  export declare const CREATE_PARAMS_PADDING = 126;
6
9
  export declare const PROGRAM_ID: {
7
10
  devnet: string;
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SOLANA_ERROR_MAP = exports.SOLANA_ERROR_MATCH_REGEX = exports.PARTNERS_SCHEMA = exports.PARTNER_SCHEMA = exports.AIRDROP_AMOUNT = exports.DEFAULT_STREAMFLOW_FEE = exports.FEES_METADATA_SEED = exports.AIRDROP_TEST_TOKEN = exports.FEE_ORACLE_PUBLIC_KEY = exports.WITHDRAWOR_PUBLIC_KEY = exports.STREAMFLOW_TREASURY_PUBLIC_KEY = exports.PARTNER_ORACLE_PROGRAM_ID = exports.PROGRAM_ID = exports.CREATE_PARAMS_PADDING = exports.STREAM_STRUCT_OFFSET_RECIPIENT = exports.STREAM_STRUCT_OFFSET_SENDER = exports.TX_FINALITY_CONFIRMED = void 0;
4
+ exports.SOLANA_ERROR_MAP = exports.SOLANA_ERROR_MATCH_REGEX = exports.PARTNERS_SCHEMA = exports.PARTNER_SCHEMA = exports.AIRDROP_AMOUNT = exports.DEFAULT_STREAMFLOW_FEE = exports.FEES_METADATA_SEED = exports.AIRDROP_TEST_TOKEN = exports.FEE_ORACLE_PUBLIC_KEY = exports.WITHDRAWOR_PUBLIC_KEY = exports.STREAMFLOW_TREASURY_PUBLIC_KEY = exports.PARTNER_ORACLE_PROGRAM_ID = exports.PROGRAM_ID = exports.CREATE_PARAMS_PADDING = exports.STREAM_STRUCT_OFFSETS = exports.STREAM_STRUCT_OFFSET_MINT = exports.STREAM_STRUCT_OFFSET_RECIPIENT = exports.STREAM_STRUCT_OFFSET_SENDER = exports.TX_FINALITY_CONFIRMED = void 0;
5
5
  var web3_js_1 = require("@solana/web3.js");
6
6
  var types_1 = require("../common/types");
7
7
  exports.TX_FINALITY_CONFIRMED = "confirmed";
8
8
  exports.STREAM_STRUCT_OFFSET_SENDER = 49;
9
9
  exports.STREAM_STRUCT_OFFSET_RECIPIENT = 113;
10
+ exports.STREAM_STRUCT_OFFSET_MINT = 177;
11
+ exports.STREAM_STRUCT_OFFSETS = {
12
+ mint: exports.STREAM_STRUCT_OFFSET_MINT,
13
+ recipient: exports.STREAM_STRUCT_OFFSET_RECIPIENT,
14
+ sender: exports.STREAM_STRUCT_OFFSET_SENDER,
15
+ };
10
16
  // Defined: https://github.com/streamflow-finance/protocol/blob/main/programs/protocol/src/state.rs#L25
11
17
  exports.CREATE_PARAMS_PADDING = 126;
12
18
  exports.PROGRAM_ID = (_a = {},
@@ -3,6 +3,11 @@ import { AccountInfo, PublicKey, Keypair, VersionedTransaction } from "@solana/w
3
3
  import { ITransactionSolanaExt } from "@streamflow/common/solana";
4
4
  import BN from "bn.js";
5
5
  import { IRecipient, Stream, StreamType } from "../common/types";
6
+ export interface ISearchStreams {
7
+ mint?: string;
8
+ sender?: string;
9
+ recipient?: string;
10
+ }
6
11
  export interface Account {
7
12
  pubkey: PublicKey;
8
13
  account: AccountInfo<Buffer>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/stream",
3
- "version": "6.3.9",
3
+ "version": "6.4.3",
4
4
  "description": "JavaScript SDK to interact with Streamflow protocol.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "dist/index.js",
@@ -35,9 +35,9 @@
35
35
  "lint": "eslint --fix .",
36
36
  "prepublishOnly": "npm run lint && npm test && npm run build"
37
37
  },
38
- "gitHead": "b1f7b91920868a65feee3e04837357a1cb521f5b",
38
+ "gitHead": "234546ef34a41540e93b05fb20e1675582e9c0c3",
39
39
  "devDependencies": {
40
- "@streamflow/eslint-config": "6.3.9",
40
+ "@streamflow/eslint-config": "6.4.2",
41
41
  "@types/bn.js": "5.1.1",
42
42
  "@types/ethereum-checksum-address": "^0.0.0",
43
43
  "@types/jest": "29.2.4",
@@ -47,16 +47,16 @@
47
47
  "typescript": "^5.3.3"
48
48
  },
49
49
  "dependencies": {
50
- "@coral-xyz/borsh": "^0.29.0",
51
- "@manahippo/aptos-wallet-adapter": "1.0.6",
52
- "@mysten/sui.js": "^0.45.1",
50
+ "@coral-xyz/borsh": "0.30.1",
51
+ "@manahippo/aptos-wallet-adapter": "1.0.10",
52
+ "@mysten/sui.js": "0.54.1",
53
53
  "@solana/buffer-layout": "4.0.1 ",
54
54
  "@solana/spl-token": "0.3.6",
55
55
  "@solana/wallet-adapter-base": "0.9.19",
56
- "@solana/web3.js": "1.70.1",
57
- "@streamflow/common": "6.3.9",
56
+ "@solana/web3.js": "1.90.2",
57
+ "@streamflow/common": "6.4.3",
58
58
  "@suiet/wallet-kit": "0.2.22",
59
- "aptos": "1.4.0",
59
+ "aptos": "1.21.0",
60
60
  "bn.js": "5.2.1",
61
61
  "borsh": "^2.0.0",
62
62
  "bs58": "5.0.0",