@streamflow/stream 7.4.9 → 7.4.11
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/dist/cjs/index.js
CHANGED
|
@@ -37,6 +37,7 @@ exports.StreamflowSui = __importStar(require("./sui/index.js"));
|
|
|
37
37
|
__exportStar(require("./common/types.js"), exports);
|
|
38
38
|
__exportStar(require("./common/utils.js"), exports);
|
|
39
39
|
__exportStar(require("./common/constants.js"), exports);
|
|
40
|
+
__exportStar(require("./solana/constants.js"), exports);
|
|
40
41
|
__exportStar(require("./common/contractUtils.js"), exports);
|
|
41
42
|
var GenericStreamClient_js_1 = require("./common/GenericStreamClient.js");
|
|
42
43
|
Object.defineProperty(exports, "GenericStreamClient", { enumerable: true, get: function () { return __importDefault(GenericStreamClient_js_1).default; } });
|
|
@@ -174,14 +174,15 @@ class SolanaStreamClient extends BaseStreamClient_js_1.BaseStreamClient {
|
|
|
174
174
|
canTopup,
|
|
175
175
|
oracleType: (!!oracleType ? { [oracleType]: {} } : { none: {} }),
|
|
176
176
|
streamName: streamNameArray,
|
|
177
|
-
minPrice: (0, common_1.getBN)(minPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
178
|
-
maxPrice: (0, common_1.getBN)(maxPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
179
|
-
minPercentage: (0, common_1.getBN)(minPercentage, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
180
|
-
maxPercentage: (0, common_1.getBN)(maxPercentage, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
177
|
+
minPrice: minPrice instanceof bn_js_1.default ? minPrice : (0, common_1.getBN)(minPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
178
|
+
maxPrice: maxPrice instanceof bn_js_1.default ? maxPrice : (0, common_1.getBN)(maxPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
179
|
+
minPercentage: minPercentage instanceof bn_js_1.default ? minPercentage : (0, common_1.getBN)(minPercentage, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
180
|
+
maxPercentage: maxPercentage instanceof bn_js_1.default ? maxPercentage : (0, common_1.getBN)(maxPercentage, constants_js_1.ALIGNED_PRECISION_FACTOR_POW),
|
|
181
181
|
tickSize: new bn_js_1.default(tickSize || 1),
|
|
182
182
|
skipInitial: skipInitial ?? false,
|
|
183
183
|
})
|
|
184
184
|
.accountsPartial({
|
|
185
|
+
payer: sender.publicKey,
|
|
185
186
|
sender: sender.publicKey,
|
|
186
187
|
streamMetadata: metadataPubKey,
|
|
187
188
|
escrowTokens: escrowPDA,
|
|
@@ -32,10 +32,10 @@ export interface IBaseStreamConfig {
|
|
|
32
32
|
tokenProgramId?: string | PublicKey;
|
|
33
33
|
}
|
|
34
34
|
export type IAlignedStreamConfig = {
|
|
35
|
-
minPrice: number;
|
|
36
|
-
maxPrice: number;
|
|
37
|
-
minPercentage: number;
|
|
38
|
-
maxPercentage: number;
|
|
35
|
+
minPrice: number | BN;
|
|
36
|
+
maxPrice: number | BN;
|
|
37
|
+
minPercentage: number | BN;
|
|
38
|
+
maxPercentage: number | BN;
|
|
39
39
|
oracleType?: OracleTypeName;
|
|
40
40
|
priceOracle?: Address;
|
|
41
41
|
skipInitial?: boolean;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export * as StreamflowSui from "./sui/index.js";
|
|
|
5
5
|
export * from "./common/types.js";
|
|
6
6
|
export * from "./common/utils.js";
|
|
7
7
|
export * from "./common/constants.js";
|
|
8
|
+
export * from "./solana/constants.js";
|
|
8
9
|
export * from "./common/contractUtils.js";
|
|
9
10
|
export { default as GenericStreamClient } from "./common/GenericStreamClient.js";
|
package/dist/esm/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export * as StreamflowSui from "./sui/index.js";
|
|
|
5
5
|
export * from "./common/types.js";
|
|
6
6
|
export * from "./common/utils.js";
|
|
7
7
|
export * from "./common/constants.js";
|
|
8
|
+
export * from "./solana/constants.js";
|
|
8
9
|
export * from "./common/contractUtils.js";
|
|
9
10
|
export { default as GenericStreamClient } from "./common/GenericStreamClient.js";
|
|
@@ -150,14 +150,15 @@ export class SolanaStreamClient extends BaseStreamClient {
|
|
|
150
150
|
canTopup,
|
|
151
151
|
oracleType: (!!oracleType ? { [oracleType]: {} } : { none: {} }),
|
|
152
152
|
streamName: streamNameArray,
|
|
153
|
-
minPrice: getBN(minPrice, ALIGNED_PRECISION_FACTOR_POW),
|
|
154
|
-
maxPrice: getBN(maxPrice, ALIGNED_PRECISION_FACTOR_POW),
|
|
155
|
-
minPercentage: getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
156
|
-
maxPercentage: getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
153
|
+
minPrice: minPrice instanceof BN ? minPrice : getBN(minPrice, ALIGNED_PRECISION_FACTOR_POW),
|
|
154
|
+
maxPrice: maxPrice instanceof BN ? maxPrice : getBN(maxPrice, ALIGNED_PRECISION_FACTOR_POW),
|
|
155
|
+
minPercentage: minPercentage instanceof BN ? minPercentage : getBN(minPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
156
|
+
maxPercentage: maxPercentage instanceof BN ? maxPercentage : getBN(maxPercentage, ALIGNED_PRECISION_FACTOR_POW),
|
|
157
157
|
tickSize: new BN(tickSize || 1),
|
|
158
158
|
skipInitial: skipInitial ?? false,
|
|
159
159
|
})
|
|
160
160
|
.accountsPartial({
|
|
161
|
+
payer: sender.publicKey,
|
|
161
162
|
sender: sender.publicKey,
|
|
162
163
|
streamMetadata: metadataPubKey,
|
|
163
164
|
escrowTokens: escrowPDA,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamflow/stream",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.11",
|
|
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": "pnpm run lint && pnpm run test run && pnpm run build"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "cbe263f2543972d1d5747cef39b9fed51f3bfb0e",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@streamflow/eslint-config": "7.4.
|
|
47
|
+
"@streamflow/eslint-config": "7.4.11",
|
|
48
48
|
"@types/bn.js": "5.1.1",
|
|
49
49
|
"@types/ethereum-checksum-address": "^0.0.0",
|
|
50
50
|
"date-fns": "2.28.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@solana/spl-token": "0.4.9",
|
|
60
60
|
"@solana/wallet-adapter-base": "0.9.19",
|
|
61
61
|
"@solana/web3.js": "1.95.4",
|
|
62
|
-
"@streamflow/common": "7.4.
|
|
62
|
+
"@streamflow/common": "7.4.11",
|
|
63
63
|
"@suiet/wallet-kit": "^0.3.3",
|
|
64
64
|
"aptos": "1.21.0",
|
|
65
65
|
"bn.js": "5.2.1",
|