@streamflow/stream 5.10.2 → 5.10.4

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.
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
29
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
30
  if (y = 0, t) op = [op[0] & 2, t.value];
31
31
  switch (op[0]) {
@@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
40
40
  function verb(n) { return function (v) { return step([n, v]); }; }
41
41
  function step(op) {
42
42
  if (f) throw new TypeError("Generator is already executing.");
43
- while (_) try {
43
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
44
44
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
45
  if (y = 0, t) op = [op[0] & 2, t.value];
46
46
  switch (op[0]) {
@@ -5,7 +5,7 @@ import { Stream, StreamType } from "../common/types";
5
5
  export interface ICreateStreamAptosExt {
6
6
  senderWallet: WalletContextState | AptosAccount;
7
7
  }
8
- export declare type ITransactionAptosExt = ICreateStreamAptosExt & {
8
+ export type ITransactionAptosExt = ICreateStreamAptosExt & {
9
9
  tokenId: string;
10
10
  };
11
11
  export interface StreamResource {
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -34,17 +34,17 @@ export interface SuiStreamClientOptions {
34
34
  ids?: ISuiIdParameters;
35
35
  }
36
36
  /** Type referencing options for specific Chain Client */
37
- declare type StreamClientOptions<T extends IChain> = T extends IChain.Solana ? SolanaStreamClientOptions : T extends IChain.Aptos ? AptosStreamClientOptions : T extends IChain.Sui ? SuiStreamClientOptions : EvmStreamClientOptions;
37
+ type StreamClientOptions<T extends IChain> = T extends IChain.Solana ? SolanaStreamClientOptions : T extends IChain.Aptos ? AptosStreamClientOptions : T extends IChain.Sui ? SuiStreamClientOptions : EvmStreamClientOptions;
38
38
  /** Type referencing Chain Client implementation */
39
- declare type StreamClientType<T extends IChain> = T extends IChain.Solana ? SolanaStreamClient : T extends IChain.Aptos ? AptosStreamClient : T extends IChain.Sui ? SuiStreamClient : EvmStreamClient;
39
+ type StreamClientType<T extends IChain> = T extends IChain.Solana ? SolanaStreamClient : T extends IChain.Aptos ? AptosStreamClient : T extends IChain.Sui ? SuiStreamClient : EvmStreamClient;
40
40
  /** Type referencing additional parameters used by a Chain Client */
41
- declare type ChainSpecificParams<T, SolanaExt, AptosExt, SuiExt> = T extends SolanaStreamClient ? SolanaExt : T extends AptosStreamClient ? AptosExt : T extends SuiStreamClient ? SuiExt : undefined;
41
+ type ChainSpecificParams<T, SolanaExt, AptosExt, SuiExt> = T extends SolanaStreamClient ? SolanaExt : T extends AptosStreamClient ? AptosExt : T extends SuiStreamClient ? SuiExt : undefined;
42
42
  /** Type referencing additional parameters used on Create by a Chain Client */
43
- declare type CreateSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, ICreateStreamSolanaExt, ICreateStreamAptosExt, ICreateStreamSuiExt>;
43
+ type CreateSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, ICreateStreamSolanaExt, ICreateStreamAptosExt, ICreateStreamSuiExt>;
44
44
  /** Type referencing additional parameters used on Topup by a Chain Client */
45
- declare type TopupSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, ITopUpStreamSolanaExt, ITransactionAptosExt, ITransactionSuiExt>;
45
+ type TopupSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, ITopUpStreamSolanaExt, ITransactionAptosExt, ITransactionSuiExt>;
46
46
  /** Type referencing additional parameters used on other interactions by a Chain Client */
47
- declare type InteractSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, IInteractStreamSolanaExt, ITransactionAptosExt, ITransactionSuiExt>;
47
+ type InteractSpecificParams<T extends IChain> = ChainSpecificParams<StreamClientType<T>, IInteractStreamSolanaExt, ITransactionAptosExt, ITransactionSuiExt>;
48
48
  /** Generic Stream Client implementation that wrap Chain Client methods and enriches error messages if possible
49
49
  * @property {StreamClientType} - Chain Client implementation
50
50
  * @property {chain} - Chain
@@ -24,8 +24,8 @@ export interface IStreamConfig {
24
24
  canUpdateRate?: boolean;
25
25
  partner?: string;
26
26
  }
27
- export declare type ICreateStreamData = IStreamConfig & IRecipient;
28
- export declare type ICreateMultipleStreamData = IStreamConfig & {
27
+ export type ICreateStreamData = IStreamConfig & IRecipient;
28
+ export type ICreateMultipleStreamData = IStreamConfig & {
29
29
  recipients: IRecipient[];
30
30
  };
31
31
  export interface IWithdrawData {
@@ -65,7 +65,7 @@ export interface ICreateMultiError {
65
65
  error: string;
66
66
  contractErrorCode?: string;
67
67
  }
68
- declare type MetadataId = string;
68
+ type MetadataId = string;
69
69
  export interface ITransactionResult {
70
70
  ixs: (TransactionInstruction | Types.TransactionPayload)[];
71
71
  txId: string;
@@ -23,20 +23,20 @@ var ICluster;
23
23
  ICluster["Devnet"] = "devnet";
24
24
  ICluster["Testnet"] = "testnet";
25
25
  ICluster["Local"] = "local";
26
- })(ICluster = exports.ICluster || (exports.ICluster = {}));
26
+ })(ICluster || (exports.ICluster = ICluster = {}));
27
27
  var StreamDirection;
28
28
  (function (StreamDirection) {
29
29
  StreamDirection["Outgoing"] = "outgoing";
30
30
  StreamDirection["Incoming"] = "incoming";
31
31
  StreamDirection["All"] = "all";
32
- })(StreamDirection = exports.StreamDirection || (exports.StreamDirection = {}));
32
+ })(StreamDirection || (exports.StreamDirection = StreamDirection = {}));
33
33
  var StreamType;
34
34
  (function (StreamType) {
35
35
  StreamType["All"] = "all";
36
36
  StreamType["Payment"] = "payment";
37
37
  StreamType["Vesting"] = "vesting";
38
38
  StreamType["Lock"] = "lock";
39
- })(StreamType = exports.StreamType || (exports.StreamType = {}));
39
+ })(StreamType || (exports.StreamType = StreamType = {}));
40
40
  var IChain;
41
41
  (function (IChain) {
42
42
  IChain["Solana"] = "Solana";
@@ -45,7 +45,7 @@ var IChain;
45
45
  IChain["BNB"] = "BNB";
46
46
  IChain["Polygon"] = "Polygon";
47
47
  IChain["Sui"] = "Sui";
48
- })(IChain = exports.IChain || (exports.IChain = {}));
48
+ })(IChain || (exports.IChain = IChain = {}));
49
49
  /**
50
50
  * Error codes raised by all protocols except for Solana
51
51
  */
@@ -85,7 +85,7 @@ var ContractErrorCode;
85
85
  ContractErrorCode["ENOTPAUSED"] = "ENOTPAUSED";
86
86
  /** Aptos: user opt out from direct coin transfers feature and has not coin wallet registered */
87
87
  ContractErrorCode["ENO_RECIPIENT_COIN_ADDRESS"] = "ENO_RECIPIENT_COIN_ADDRESS";
88
- })(ContractErrorCode = exports.ContractErrorCode || (exports.ContractErrorCode = {}));
88
+ })(ContractErrorCode || (exports.ContractErrorCode = ContractErrorCode = {}));
89
89
  /**
90
90
  * Error codes raised by Solana protocol specifically
91
91
  */
@@ -137,7 +137,7 @@ var SolanaContractErrorCode;
137
137
  SolanaContractErrorCode["NotPaused"] = "NotPaused";
138
138
  /** Meta account is not rent exempt */
139
139
  SolanaContractErrorCode["MetadataNotRentExempt"] = "MetadataNotRentExempt";
140
- })(SolanaContractErrorCode = exports.SolanaContractErrorCode || (exports.SolanaContractErrorCode = {}));
140
+ })(SolanaContractErrorCode || (exports.SolanaContractErrorCode = SolanaContractErrorCode = {}));
141
141
  /**
142
142
  * Error wrapper for calls made to the contract on chain
143
143
  */
@@ -149,7 +149,7 @@ var ContractError = /** @class */ (function (_super) {
149
149
  * @param code extracted code from the error if managed to parse it
150
150
  */
151
151
  function ContractError(error, code) {
152
- var _this = _super.call(this, error.message) || this;
152
+ var _this = _super.call(this, error.message) || this; // Call the base class constructor with the error message
153
153
  _this.contractErrorCode = code !== null && code !== void 0 ? code : null;
154
154
  // Copy properties from the original error
155
155
  Object.setPrototypeOf(_this, ContractError.prototype);
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
40
40
  function verb(n) { return function (v) { return step([n, v]); }; }
41
41
  function step(op) {
42
42
  if (f) throw new TypeError("Generator is already executing.");
43
- while (_) try {
43
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
44
44
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
45
  if (y = 0, t) op = [op[0] & 2, t.value];
46
46
  switch (op[0]) {
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  function verb(n) { return function (v) { return step([n, v]); }; }
65
65
  function step(op) {
66
66
  if (f) throw new TypeError("Generator is already executing.");
67
- while (_) try {
67
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
68
68
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
69
69
  if (y = 0, t) op = [op[0] & 2, t.value];
70
70
  switch (op[0]) {
@@ -129,7 +129,6 @@ var bn_js_1 = __importDefault(require("bn.js"));
129
129
  var buffer_1 = require("buffer");
130
130
  var spl_token_1 = require("@solana/spl-token");
131
131
  var web3_js_1 = require("@solana/web3.js");
132
- var spl_token_2 = require("@solana/spl-token");
133
132
  var borsh = __importStar(require("borsh"));
134
133
  var types_1 = require("./types");
135
134
  var utils_1 = require("./utils");
@@ -1027,7 +1026,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
1027
1026
  response = _b.sent();
1028
1027
  for (i = 0; i < response.length; i++) {
1029
1028
  if (!response[i]) {
1030
- ixs.push((0, spl_token_2.createAssociatedTokenAccountInstruction)(invoker.publicKey, accountArrays[i][1], accountArrays[i][0], data.mint));
1029
+ ixs.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(invoker.publicKey, accountArrays[i][1], accountArrays[i][0], data.mint));
1031
1030
  }
1032
1031
  }
1033
1032
  return [2 /*return*/];
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
40
- while (_) try {
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
41
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
42
  if (y = 0, t) op = [op[0] & 2, t.value];
43
43
  switch (op[0]) {
@@ -306,4 +306,4 @@ export interface AtaParams {
306
306
  mint: PublicKey;
307
307
  owner: PublicKey;
308
308
  }
309
- export declare type BatchItemResult = BatchItemSuccess | BatchItemError;
309
+ export type BatchItemResult = BatchItemSuccess | BatchItemError;
@@ -78,4 +78,4 @@ var TransferCancelOptions;
78
78
  TransferCancelOptions["Sender"] = "sender";
79
79
  TransferCancelOptions["Both"] = "both";
80
80
  TransferCancelOptions["Neither"] = "neither";
81
- })(TransferCancelOptions = exports.TransferCancelOptions || (exports.TransferCancelOptions = {}));
81
+ })(TransferCancelOptions || (exports.TransferCancelOptions = TransferCancelOptions = {}));
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
29
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
30
  if (y = 0, t) op = [op[0] & 2, t.value];
31
31
  switch (op[0]) {
@@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
40
40
  function verb(n) { return function (v) { return step([n, v]); }; }
41
41
  function step(op) {
42
42
  if (f) throw new TypeError("Generator is already executing.");
43
- while (_) try {
43
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
44
44
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
45
  if (y = 0, t) op = [op[0] & 2, t.value];
46
46
  switch (op[0]) {
@@ -7,7 +7,7 @@ var types_1 = require("../common/types");
7
7
  exports.SUI_PROGRAM_IDS = (_a = {},
8
8
  _a[types_1.ICluster.Mainnet] = "0x19007172b22fcfc00c22f1598a9cec7ab52de2b0ea0d111813bc1295a136fc10",
9
9
  _a[types_1.ICluster.Devnet] = "0xf1916c119a6c917d4b36f96ffc0443930745789f3126a716e05a62223c48993a",
10
- _a[types_1.ICluster.Testnet] = "0xf1916c119a6c917d4b36f96ffc0443930745789f3126a716e05a62223c48993a",
10
+ _a[types_1.ICluster.Testnet] = "0xc76590fa8711cd77b9360e00761d80cd09ceb8638e6c8ebcbcd749dcd21a9466",
11
11
  _a[types_1.ICluster.Local] = "0xf1916c119a6c917d4b36f96ffc0443930745789f3126a716e05a62223c48993a",
12
12
  _a);
13
13
  exports.SUI_CONFIG_IDS = (_b = {},
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
29
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
30
  if (y = 0, t) op = [op[0] & 2, t.value];
31
31
  switch (op[0]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/stream",
3
- "version": "5.10.2",
3
+ "version": "5.10.4",
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",
@@ -11,7 +11,7 @@
11
11
  "lint": "eslint .",
12
12
  "prepublishOnly": "npm run lint && npm test && npm run build"
13
13
  },
14
- "gitHead": "d410590014861b421cc7daf79b8e803092663959",
14
+ "gitHead": "6391e45fba526e981e5fb576109f79b5d6418197",
15
15
  "devDependencies": {
16
16
  "@types/bn.js": "5.1.1",
17
17
  "@types/ethereum-checksum-address": "^0.0.0",
@@ -25,17 +25,16 @@
25
25
  "jest": "29.3.1",
26
26
  "prettier": "2.8.1",
27
27
  "ts-jest": "29.0.3",
28
- "typescript": "4.6.4"
28
+ "typescript": "^5.3.3"
29
29
  },
30
30
  "dependencies": {
31
31
  "@manahippo/aptos-wallet-adapter": "1.0.6",
32
- "@mysten/sui.js": "^0.40.0",
33
- "@mysten/wallet-standard": "^0.6.0",
32
+ "@mysten/sui.js": "^0.45.1",
34
33
  "@solana/buffer-layout": "4.0.1 ",
35
34
  "@solana/spl-token": "0.3.6",
36
35
  "@solana/wallet-adapter-base": "0.9.19",
37
36
  "@solana/web3.js": "1.70.1",
38
- "@suiet/wallet-kit": "0.2.18",
37
+ "@suiet/wallet-kit": "0.2.22",
39
38
  "aptos": "1.4.0",
40
39
  "bn.js": "5.2.1",
41
40
  "borsh": "^2.0.0",