@interest-protocol/vortex-sdk 11.2.0 → 11.3.1
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/index.js +1035 -874
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1035 -874
- package/dist/index.mjs.map +1 -1
- package/dist/vortex-api.d.ts +3 -1
- package/dist/vortex-api.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/vortex-api.ts +11 -2
package/dist/vortex-api.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ export declare class VortexAPI {
|
|
|
8
8
|
hideAccounts(args: HideAccountsRequest): Promise<HideAccountsResponse>;
|
|
9
9
|
getPools(args?: GetPoolsArgs): Promise<PoolsResponse>;
|
|
10
10
|
getCommitments(args: GetCommitmentsArgs): Promise<CommitmentsResponse>;
|
|
11
|
-
getAllCommitments(args: Omit<GetCommitmentsArgs, 'page'>
|
|
11
|
+
getAllCommitments(args: Omit<GetCommitmentsArgs, 'page'> & {
|
|
12
|
+
sleepMs?: number;
|
|
13
|
+
}): Promise<Commitment[]>;
|
|
12
14
|
getMerklePath(args: MerklePathRequest): Promise<MerklePathResponse>;
|
|
13
15
|
executeTransaction(args: ExecuteTransactionRequest): Promise<TransactionResponse>;
|
|
14
16
|
getRelayer(): Promise<RelayerResponse>;
|
package/dist/vortex-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vortex-api.d.ts","sourceRoot":"","sources":["../src/vortex-api.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EAExB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AAE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I,GAAE,YAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAyBzD,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA4BtE,iBAAiB,CACrB,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5D,OAAO,CAAC,UAAU,EAAE,CAAC;IAwBlB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAmBnE,kBAAkB,CACtB,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,mBAAmB,CAAC;IAczB,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;CAuD7C;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interest-protocol/vortex-sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@mysten/sui": "^1.
|
|
21
|
-
"@noble/ciphers": "^2.
|
|
20
|
+
"@mysten/sui": "^1.45.2",
|
|
21
|
+
"@noble/ciphers": "^2.1.1",
|
|
22
22
|
"@noble/curves": "^2.0.1",
|
|
23
23
|
"@noble/hashes": "^2.0.1",
|
|
24
24
|
"@polymedia/suitcase-core": "^0.0.67",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@interest-protocol/sui-core-sdk": "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/bn.js": "^5.
|
|
33
|
-
"@types/jest": "^29.5.
|
|
32
|
+
"@types/bn.js": "^5.2.0",
|
|
33
|
+
"@types/jest": "^29.5.14",
|
|
34
34
|
"@types/ramda": "^0.30.2",
|
|
35
35
|
"jest": "^29.7.0",
|
|
36
36
|
"jest-environment-node": "^29.7.0",
|
|
37
|
-
"rimraf": "^6.
|
|
38
|
-
"ts-jest": "^29.
|
|
39
|
-
"tsup": "^8.
|
|
37
|
+
"rimraf": "^6.1.2",
|
|
38
|
+
"ts-jest": "^29.4.6",
|
|
39
|
+
"tsup": "^8.5.1",
|
|
40
40
|
"@interest-protocol/prettier-config": "1.0.0",
|
|
41
41
|
"@interest-protocol/typescript-config": "1.0.0"
|
|
42
42
|
},
|
package/src/vortex-api.ts
CHANGED
|
@@ -146,17 +146,26 @@ export class VortexAPI {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
async getAllCommitments(
|
|
149
|
-
args: Omit<GetCommitmentsArgs, 'page'>
|
|
149
|
+
args: Omit<GetCommitmentsArgs, 'page'> & { sleepMs?: number }
|
|
150
150
|
): Promise<Commitment[]> {
|
|
151
|
+
const sleepMs = Math.max(args.sleepMs ?? 200, 200);
|
|
151
152
|
const allCommitments: Commitment[] = [];
|
|
152
153
|
let page = 1;
|
|
153
154
|
let hasNext = true;
|
|
154
155
|
|
|
155
156
|
while (hasNext) {
|
|
156
|
-
const response = await this.getCommitments({
|
|
157
|
+
const response = await this.getCommitments({
|
|
158
|
+
...args,
|
|
159
|
+
page,
|
|
160
|
+
apiKey: args.apiKey,
|
|
161
|
+
});
|
|
157
162
|
allCommitments.push(...response.data.items);
|
|
158
163
|
hasNext = response.data.pagination.hasNext;
|
|
159
164
|
page++;
|
|
165
|
+
|
|
166
|
+
if (hasNext) {
|
|
167
|
+
await new Promise((resolve) => setTimeout(resolve, sleepMs));
|
|
168
|
+
}
|
|
160
169
|
}
|
|
161
170
|
|
|
162
171
|
return allCommitments;
|