@typus/typus-sdk 1.0.53 → 1.0.55

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.
@@ -76,7 +76,6 @@ var executeSponsorTransactionBlock = function (provider, sponsoredResponse, send
76
76
  })];
77
77
  case 1:
78
78
  executeResponse = _c.sent();
79
- console.log("Sponsor transaction RESPONSE:", executeResponse);
80
79
  console.log("Execution Status:", (_a = executeResponse.effects) === null || _a === void 0 ? void 0 : _a.status.status);
81
80
  return [2 /*return*/, (_b = executeResponse.effects) === null || _b === void 0 ? void 0 : _b.status.status];
82
81
  }
@@ -60,3 +60,4 @@ export interface PayoffConfig {
60
60
  strike?: string;
61
61
  }
62
62
  export declare function getPortfolioVaults(provider: JsonRpcProvider, registry: string, deposit_vault_registry: string, bid_vault_registry: string, index?: string): Promise<Map<string, PortfolioVault>>;
63
+ export declare function getPortfolioVaultAuctionDelayTsMs(provider: JsonRpcProvider, portfolio_vault: PortfolioVault): Promise<string>;
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getPortfolioVaults = void 0;
39
+ exports.getPortfolioVaultAuctionDelayTsMs = exports.getPortfolioVaults = void 0;
40
40
  var sui_js_1 = require("@mysten/sui.js");
41
41
  var vault_1 = require("../typus-framework/vault");
42
42
  var dutch_1 = require("../typus-framework/dutch");
@@ -68,22 +68,6 @@ function getPortfolioVaults(provider, registry, deposit_vault_registry, bid_vaul
68
68
  map = _a.sent();
69
69
  vaultId = portfolioVault.data.content.fields.id.id;
70
70
  auctionDelayTsMs = "0";
71
- return [4 /*yield*/, provider
72
- .getDynamicFieldObject({
73
- parentId: vaultId,
74
- name: {
75
- type: "vector<u8>",
76
- value: [97, 117, 99, 116, 105, 111, 110, 95, 115, 116, 97, 114, 116, 95, 100, 101, 108, 97, 121, 95, 116, 115, 95, 109, 115],
77
- },
78
- })
79
- .then(function (result) {
80
- if (result.error == undefined) {
81
- // @ts-ignore
82
- auctionDelayTsMs = result.data.content.fields.value;
83
- }
84
- })];
85
- case 2:
86
- _a.sent();
87
71
  typeArgs = new RegExp(".*<(.*), (.*), (.*)>").exec(portfolioVault.data.content.type).slice(1, 4);
88
72
  assets = typeArgs.map(function (x) {
89
73
  var typeArgs = x.split("::");
@@ -279,3 +263,32 @@ function getPortfolioVaults(provider, registry, deposit_vault_registry, bid_vaul
279
263
  });
280
264
  }
281
265
  exports.getPortfolioVaults = getPortfolioVaults;
266
+ function getPortfolioVaultAuctionDelayTsMs(provider, portfolio_vault) {
267
+ return __awaiter(this, void 0, void 0, function () {
268
+ var auctionDelayTsMs;
269
+ return __generator(this, function (_a) {
270
+ switch (_a.label) {
271
+ case 0:
272
+ auctionDelayTsMs = "0";
273
+ return [4 /*yield*/, provider
274
+ .getDynamicFieldObject({
275
+ parentId: portfolio_vault.vaultId,
276
+ name: {
277
+ type: "vector<u8>",
278
+ value: [97, 117, 99, 116, 105, 111, 110, 95, 115, 116, 97, 114, 116, 95, 100, 101, 108, 97, 121, 95, 116, 115, 95, 109, 115],
279
+ },
280
+ })
281
+ .then(function (result) {
282
+ if (result.error == undefined) {
283
+ // @ts-ignore
284
+ auctionDelayTsMs = result.data.content.fields.value;
285
+ }
286
+ })];
287
+ case 1:
288
+ _a.sent();
289
+ return [2 /*return*/, auctionDelayTsMs];
290
+ }
291
+ });
292
+ });
293
+ }
294
+ exports.getPortfolioVaultAuctionDelayTsMs = getPortfolioVaultAuctionDelayTsMs;
package/package.json CHANGED
@@ -1,84 +1,84 @@
1
1
  {
2
- "name": "@typus/typus-sdk",
3
- "author": "Typus",
4
- "description": "typus sdk",
5
- "version": "1.0.53",
6
- "dependencies": {
7
- "@mysten/sui.js": "^0.34.0",
8
- "@types/node": "^17.0.0",
9
- "bignumber.js": "^9.1.1",
10
- "bs58": "^4.0.1",
11
- "builtin-modules": "^1.1.1",
12
- "chai": "^4.3.7",
13
- "decimal.js": "^10.3.1",
14
- "diff": "^4.0.2",
15
- "dotenv": "^10.0.0",
16
- "encrypt-with-password": "^1.0.0",
17
- "escape-string-regexp": "^1.0.5",
18
- "esprima": "^4.0.1",
19
- "fetch": "^1.1.0",
20
- "fs.realpath": "^1.0.0",
21
- "function-bind": "^1.1.1",
22
- "glob": "^7.2.0",
23
- "has": "^1.0.3",
24
- "has-flag": "^3.0.0",
25
- "inflight": "^1.0.6",
26
- "inherits": "^2.0.4",
27
- "is-core-module": "^2.8.0",
28
- "js-sha3": "^0.8.0",
29
- "js-tokens": "^4.0.0",
30
- "js-yaml": "^3.14.1",
31
- "math-erf": "^1.0.0",
32
- "minimatch": "^3.0.4",
33
- "minimist": "^1.2.5",
34
- "mkdirp": "^0.5.5",
35
- "mocha": "^10.1.0",
36
- "moment": "^2.29.4",
37
- "node-cron": "^3.0.2",
38
- "once": "^1.4.0",
39
- "path-is-absolute": "^1.0.1",
40
- "path-parse": "^1.0.7",
41
- "random-bigint": "^0.0.1",
42
- "resolve": "^1.20.0",
43
- "rxjs": "^7.5.5",
44
- "semver": "^5.7.1",
45
- "sprintf-js": "^1.0.3",
46
- "superstruct": "^0.16.0",
47
- "supports-color": "^5.5.0",
48
- "ts-mocha": "^10.0.0",
49
- "tslib": "^1.14.1",
50
- "tsutils": "^2.29.0",
51
- "typed-rpc": "^3.0.0",
52
- "wrappy": "^1.0.2",
53
- "ws": "^8.11.0",
54
- "xmlhttprequest": "^1.8.0"
55
- },
56
- "devDependencies": {
57
- "@types/bs58": "^4.0.1",
58
- "@types/expect": "^24.3.0",
59
- "@types/mocha": "^9.0.0",
60
- "@types/rx": "^4.1.2",
61
- "prettier": "^2.5.1",
62
- "tslint": "^6.1.3",
63
- "tslint-config-prettier": "^1.18.0",
64
- "typescript": "^4.5.4"
65
- },
66
- "main": "lib/index.js",
67
- "files": [
68
- "lib"
69
- ],
70
- "types": "lib/index.d.ts",
71
- "scripts": {
72
- "test": "rm -rf lib && tsc && ts-mocha test/test*.ts",
73
- "build": "rm -rf lib && tsc"
74
- },
75
- "repository": {
76
- "type": "git",
77
- "url": "git+https://github.com/Typus-Lab/typus-sdk.git"
78
- },
79
- "license": "ISC",
80
- "bugs": {
81
- "url": "https://github.com/Typus-Lab/typus-sdk/issues"
82
- },
83
- "homepage": "https://github.com/Typus-Lab/typus-sdk#readme"
2
+ "name": "@typus/typus-sdk",
3
+ "author": "Typus",
4
+ "description": "typus sdk",
5
+ "version": "1.0.55",
6
+ "dependencies": {
7
+ "@mysten/sui.js": "^0.34.1",
8
+ "@types/node": "^17.0.0",
9
+ "bignumber.js": "^9.1.1",
10
+ "bs58": "^4.0.1",
11
+ "builtin-modules": "^1.1.1",
12
+ "chai": "^4.3.7",
13
+ "decimal.js": "^10.3.1",
14
+ "diff": "^4.0.2",
15
+ "dotenv": "^10.0.0",
16
+ "encrypt-with-password": "^1.0.0",
17
+ "escape-string-regexp": "^1.0.5",
18
+ "esprima": "^4.0.1",
19
+ "fetch": "^1.1.0",
20
+ "fs.realpath": "^1.0.0",
21
+ "function-bind": "^1.1.1",
22
+ "glob": "^7.2.0",
23
+ "has": "^1.0.3",
24
+ "has-flag": "^3.0.0",
25
+ "inflight": "^1.0.6",
26
+ "inherits": "^2.0.4",
27
+ "is-core-module": "^2.8.0",
28
+ "js-sha3": "^0.8.0",
29
+ "js-tokens": "^4.0.0",
30
+ "js-yaml": "^3.14.1",
31
+ "math-erf": "^1.0.0",
32
+ "minimatch": "^3.0.4",
33
+ "minimist": "^1.2.5",
34
+ "mkdirp": "^0.5.5",
35
+ "mocha": "^10.1.0",
36
+ "moment": "^2.29.4",
37
+ "node-cron": "^3.0.2",
38
+ "once": "^1.4.0",
39
+ "path-is-absolute": "^1.0.1",
40
+ "path-parse": "^1.0.7",
41
+ "random-bigint": "^0.0.1",
42
+ "resolve": "^1.20.0",
43
+ "rxjs": "^7.5.5",
44
+ "semver": "^5.7.1",
45
+ "sprintf-js": "^1.0.3",
46
+ "superstruct": "^0.16.0",
47
+ "supports-color": "^5.5.0",
48
+ "ts-mocha": "^10.0.0",
49
+ "tslib": "^1.14.1",
50
+ "tsutils": "^2.29.0",
51
+ "typed-rpc": "^3.0.0",
52
+ "wrappy": "^1.0.2",
53
+ "ws": "^8.11.0",
54
+ "xmlhttprequest": "^1.8.0"
55
+ },
56
+ "devDependencies": {
57
+ "@types/bs58": "^4.0.1",
58
+ "@types/expect": "^24.3.0",
59
+ "@types/mocha": "^9.0.0",
60
+ "@types/rx": "^4.1.2",
61
+ "prettier": "^2.5.1",
62
+ "tslint": "^6.1.3",
63
+ "tslint-config-prettier": "^1.18.0",
64
+ "typescript": "^4.5.4"
65
+ },
66
+ "main": "lib/index.js",
67
+ "files": [
68
+ "lib"
69
+ ],
70
+ "types": "lib/index.d.ts",
71
+ "scripts": {
72
+ "test": "rm -rf lib && tsc && ts-mocha test/test*.ts",
73
+ "build": "rm -rf lib && tsc"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "git+https://github.com/Typus-Lab/typus-sdk.git"
78
+ },
79
+ "license": "ISC",
80
+ "bugs": {
81
+ "url": "https://github.com/Typus-Lab/typus-sdk/issues"
82
+ },
83
+ "homepage": "https://github.com/Typus-Lab/typus-sdk#readme"
84
84
  }