@streamflow/stream 7.0.0-alpha.2 → 7.0.0-alpha.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.
@@ -89,7 +89,7 @@ var types_js_1 = require("../../common/types.js");
89
89
  recipient: "0xtest",
90
90
  amount: (0, bignumber_js_1.BigNumber)(1000),
91
91
  name: "test name",
92
- cliffAmount: 1,
92
+ cliffAmount: (0, bignumber_js_1.BigNumber)(1),
93
93
  amountPerPeriod: (0, bignumber_js_1.BigNumber)(1),
94
94
  };
95
95
  mockData = {
@@ -33,6 +33,6 @@ exports.constants = exports.AptosStreamClient = exports.default = void 0;
33
33
  var StreamClient_js_1 = require("./StreamClient.js");
34
34
  Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(StreamClient_js_1).default; } });
35
35
  Object.defineProperty(exports, "AptosStreamClient", { enumerable: true, get: function () { return __importDefault(StreamClient_js_1).default; } });
36
- __exportStar(require("./utils"), exports);
37
- __exportStar(require("./types"), exports);
38
- exports.constants = __importStar(require("./constants"));
36
+ __exportStar(require("./utils.js"), exports);
37
+ __exportStar(require("./types.js"), exports);
38
+ exports.constants = __importStar(require("./constants.js"));
@@ -18,10 +18,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  var BaseStreamClient_js_1 = require("./BaseStreamClient.js");
19
19
  var types_js_1 = require("./types.js");
20
20
  var utils_js_1 = require("./utils.js");
21
- var aptos_1 = require("../aptos");
22
- var evm_1 = require("../evm");
23
- var solana_1 = require("../solana");
24
- var sui_1 = require("../sui");
21
+ var index_js_1 = require("../aptos/index.js");
22
+ var index_js_2 = require("../evm/index.js");
23
+ var index_js_3 = require("../solana/index.js");
24
+ var index_js_4 = require("../sui/index.js");
25
25
  var constants_js_1 = require("./constants.js");
26
26
  /** Generic Stream Client implementation that wrap Chain Client methods and enriches error messages if possible
27
27
  * @property {StreamClientType} - Chain Client implementation
@@ -34,18 +34,18 @@ var GenericStreamClient = /** @class */ (function (_super) {
34
34
  _this.chain = options.chain;
35
35
  switch (options.chain) {
36
36
  case types_js_1.IChain.Solana:
37
- _this.nativeStreamClient = new solana_1.SolanaStreamClient(options.clusterUrl, options.cluster, options.commitment, options.programId, options.sendRate, options.sendThrottler);
37
+ _this.nativeStreamClient = new index_js_3.SolanaStreamClient(options.clusterUrl, options.cluster, options.commitment, options.programId, options.sendRate, options.sendThrottler);
38
38
  break;
39
39
  case types_js_1.IChain.Aptos:
40
- _this.nativeStreamClient = new aptos_1.AptosStreamClient(options.clusterUrl, options.cluster, options.maxGas, options.programId);
40
+ _this.nativeStreamClient = new index_js_1.AptosStreamClient(options.clusterUrl, options.cluster, options.maxGas, options.programId);
41
41
  break;
42
42
  case types_js_1.IChain.BNB:
43
43
  case types_js_1.IChain.Ethereum:
44
44
  case types_js_1.IChain.Polygon:
45
- _this.nativeStreamClient = new evm_1.EvmStreamClient(options.clusterUrl, options.chain, options.signer, options.cluster, options.programId);
45
+ _this.nativeStreamClient = new index_js_2.EvmStreamClient(options.clusterUrl, options.chain, options.signer, options.cluster, options.programId);
46
46
  break;
47
47
  case types_js_1.IChain.Sui:
48
- _this.nativeStreamClient = new sui_1.SuiStreamClient(options.clusterUrl, options.cluster, options.ids);
48
+ _this.nativeStreamClient = new index_js_4.SuiStreamClient(options.clusterUrl, options.cluster, options.ids);
49
49
  }
50
50
  return _this;
51
51
  }
package/dist/cjs/index.js CHANGED
@@ -30,13 +30,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.GenericStreamClient = exports.StreamflowSui = exports.StreamflowSolana = exports.StreamflowEVM = exports.StreamflowAptos = void 0;
33
- exports.StreamflowAptos = __importStar(require("./aptos"));
34
- exports.StreamflowEVM = __importStar(require("./evm"));
35
- exports.StreamflowSolana = __importStar(require("./solana"));
36
- exports.StreamflowSui = __importStar(require("./sui"));
37
- __exportStar(require("./common/types"), exports);
38
- __exportStar(require("./common/utils"), exports);
39
- __exportStar(require("./common/constants"), exports);
40
- __exportStar(require("./common/contractUtils"), exports);
41
- var GenericStreamClient_1 = require("./common/GenericStreamClient");
42
- Object.defineProperty(exports, "GenericStreamClient", { enumerable: true, get: function () { return __importDefault(GenericStreamClient_1).default; } });
33
+ exports.StreamflowAptos = __importStar(require("./aptos/index.js"));
34
+ exports.StreamflowEVM = __importStar(require("./evm/index.js"));
35
+ exports.StreamflowSolana = __importStar(require("./solana/index.js"));
36
+ exports.StreamflowSui = __importStar(require("./sui/index.js"));
37
+ __exportStar(require("./common/types.js"), exports);
38
+ __exportStar(require("./common/utils.js"), exports);
39
+ __exportStar(require("./common/constants.js"), exports);
40
+ __exportStar(require("./common/contractUtils.js"), exports);
41
+ var GenericStreamClient_js_1 = require("./common/GenericStreamClient.js");
42
+ Object.defineProperty(exports, "GenericStreamClient", { enumerable: true, get: function () { return __importDefault(GenericStreamClient_js_1).default; } });
@@ -34,7 +34,7 @@ describe("AptosStreamClient", () => {
34
34
  recipient: "0xtest",
35
35
  amount: BigNumber(1000),
36
36
  name: "test name",
37
- cliffAmount: 1,
37
+ cliffAmount: BigNumber(1),
38
38
  amountPerPeriod: BigNumber(1),
39
39
  };
40
40
  const mockData = {
@@ -1,4 +1,4 @@
1
1
  export { default, default as AptosStreamClient } from "./StreamClient.js";
2
- export * from "./utils";
3
- export * from "./types";
4
- export * as constants from "./constants";
2
+ export * from "./utils.js";
3
+ export * from "./types.js";
4
+ export * as constants from "./constants.js";
@@ -1,4 +1,4 @@
1
1
  export { default, default as AptosStreamClient } from "./StreamClient.js";
2
- export * from "./utils";
3
- export * from "./types";
4
- export * as constants from "./constants";
2
+ export * from "./utils.js";
3
+ export * from "./types.js";
4
+ export * as constants from "./constants.js";
@@ -3,10 +3,10 @@ import { Signer } from "ethers";
3
3
  import PQueue from "p-queue";
4
4
  import { BaseStreamClient } from "./BaseStreamClient.js";
5
5
  import { ICancelData, IChain, ICluster, ICreateMultipleStreamData, ICreateStreamData, IGetOneData, ITopUpData, ITransferData, IUpdateData, IWithdrawData, ITransactionResult, IMultiTransactionResult, ICreateResult, IGetAllData, Stream, IFees, IGetFeesData } from "./types.js";
6
- import { AptosStreamClient, ICreateStreamAptosExt, ITransactionAptosExt } from "../aptos";
7
- import { EvmStreamClient } from "../evm";
8
- import { SolanaStreamClient, ICreateStreamSolanaExt, IInteractStreamSolanaExt, ITopUpStreamSolanaExt } from "../solana";
9
- import { ICreateStreamSuiExt, ITransactionSuiExt, ISuiIdParameters, SuiStreamClient } from "../sui";
6
+ import { AptosStreamClient, ICreateStreamAptosExt, ITransactionAptosExt } from "../aptos/index.js";
7
+ import { EvmStreamClient } from "../evm/index.js";
8
+ import { SolanaStreamClient, ICreateStreamSolanaExt, IInteractStreamSolanaExt, ITopUpStreamSolanaExt } from "../solana/index.js";
9
+ import { ICreateStreamSuiExt, ITransactionSuiExt, ISuiIdParameters, SuiStreamClient } from "../sui/index.js";
10
10
  export interface SolanaStreamClientOptions {
11
11
  chain: IChain.Solana;
12
12
  clusterUrl: string;
@@ -1,10 +1,10 @@
1
1
  import { BaseStreamClient } from "./BaseStreamClient.js";
2
2
  import { IChain, } from "./types.js";
3
3
  import { handleContractError } from "./utils.js";
4
- import { AptosStreamClient } from "../aptos";
5
- import { EvmStreamClient } from "../evm";
6
- import { SolanaStreamClient } from "../solana";
7
- import { SuiStreamClient } from "../sui";
4
+ import { AptosStreamClient } from "../aptos/index.js";
5
+ import { EvmStreamClient } from "../evm/index.js";
6
+ import { SolanaStreamClient, } from "../solana/index.js";
7
+ import { SuiStreamClient } from "../sui/index.js";
8
8
  import { WITHDRAW_AVAILABLE_AMOUNT } from "./constants.js";
9
9
  /** Generic Stream Client implementation that wrap Chain Client methods and enriches error messages if possible
10
10
  * @property {StreamClientType} - Chain Client implementation
@@ -6,7 +6,7 @@ export interface IRecipient {
6
6
  recipient: string;
7
7
  amount: BigNumber;
8
8
  name: string;
9
- cliffAmount: string | number;
9
+ cliffAmount: BigNumber;
10
10
  amountPerPeriod: BigNumber;
11
11
  }
12
12
  export interface IStreamConfig {
@@ -1,9 +1,9 @@
1
- export * as StreamflowAptos from "./aptos";
2
- export * as StreamflowEVM from "./evm";
3
- export * as StreamflowSolana from "./solana";
4
- export * as StreamflowSui from "./sui";
5
- export * from "./common/types";
6
- export * from "./common/utils";
7
- export * from "./common/constants";
8
- export * from "./common/contractUtils";
9
- export { default as GenericStreamClient } from "./common/GenericStreamClient";
1
+ export * as StreamflowAptos from "./aptos/index.js";
2
+ export * as StreamflowEVM from "./evm/index.js";
3
+ export * as StreamflowSolana from "./solana/index.js";
4
+ export * as StreamflowSui from "./sui/index.js";
5
+ export * from "./common/types.js";
6
+ export * from "./common/utils.js";
7
+ export * from "./common/constants.js";
8
+ export * from "./common/contractUtils.js";
9
+ export { default as GenericStreamClient } from "./common/GenericStreamClient.js";
package/dist/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
- export * as StreamflowAptos from "./aptos";
2
- export * as StreamflowEVM from "./evm";
3
- export * as StreamflowSolana from "./solana";
4
- export * as StreamflowSui from "./sui";
5
- export * from "./common/types";
6
- export * from "./common/utils";
7
- export * from "./common/constants";
8
- export * from "./common/contractUtils";
9
- export { default as GenericStreamClient } from "./common/GenericStreamClient";
1
+ export * as StreamflowAptos from "./aptos/index.js";
2
+ export * as StreamflowEVM from "./evm/index.js";
3
+ export * as StreamflowSolana from "./solana/index.js";
4
+ export * as StreamflowSui from "./sui/index.js";
5
+ export * from "./common/types.js";
6
+ export * from "./common/utils.js";
7
+ export * from "./common/constants.js";
8
+ export * from "./common/contractUtils.js";
9
+ export { default as GenericStreamClient } from "./common/GenericStreamClient.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/stream",
3
- "version": "7.0.0-alpha.2",
3
+ "version": "7.0.0-alpha.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/esm/index.js",
@@ -42,9 +42,9 @@
42
42
  "lint": "eslint --fix .",
43
43
  "prepublishOnly": "npm run lint && npm test && npm run build"
44
44
  },
45
- "gitHead": "64926e169007ef5a65c5342a57d8e37047831015",
45
+ "gitHead": "1f0ce4ebcbbf9ac79f744a7ef232543b9e6d2a5b",
46
46
  "devDependencies": {
47
- "@streamflow/eslint-config": "7.0.0-alpha.2",
47
+ "@streamflow/eslint-config": "7.0.0-alpha.3",
48
48
  "@types/ethereum-checksum-address": "^0.0.0",
49
49
  "date-fns": "2.28.0",
50
50
  "typescript": "^5.3.3"
@@ -57,7 +57,7 @@
57
57
  "@solana/spl-token": "0.3.6",
58
58
  "@solana/wallet-adapter-base": "0.9.19",
59
59
  "@solana/web3.js": "1.70.1",
60
- "@streamflow/common": "7.0.0-alpha.2",
60
+ "@streamflow/common": "7.0.0-alpha.3",
61
61
  "@suiet/wallet-kit": "0.2.22",
62
62
  "aptos": "1.4.0",
63
63
  "bignumber.js": "^9.1.2",