@typus/typus-sdk 1.0.82 → 1.0.84

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/lib/config.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "VERSION": "2.17.1",
3
3
  "DB_NAME": "testnet_2_8_0",
4
4
  "RPC_ENDPOINT": "https://api.shinami.com:443/node/v1/sui_testnet_c702de54dad05016124f2cfabc1de7e8",
5
- "SINGLE_COLLATERAL_PACKAGE": "0xb3ec573f0a541cccde140094e8c72383c8db327b49114708687b26cf4ba36d2d",
5
+ "SINGLE_COLLATERAL_PACKAGE": "0xe3af58d0e5a6c7b8fc97f6565b504d31067c2e0302882591abda980246da4669",
6
6
  "SINGLE_COLLATERAL_PACKAGE_ORIGIN": "0x867a84b70d1f44ea10c02cb099dad5a46c074675afa3b728bd0c11f653e2cb18",
7
7
  "SINGLE_COLLATERAL_MANAGER_CAP": "0x7040e5c1a4691d7df2208a577802b05784b8926ad157ebf99b46a185636f2e07",
8
8
  "SINGLE_COLLATERAL_REGISTRY": "0x7808d2e668101969e67b6713df9dd96a57deba23baf4cd6754258756f332ef88",
@@ -9,5 +9,6 @@ interface TxHistory {
9
9
  Amount: number;
10
10
  Fee: number;
11
11
  BidSize: number;
12
+ BidPaid: number;
12
13
  }
13
14
  export {};
@@ -86,7 +86,7 @@ function parseTxHistory(datas, originPackage) {
86
86
  return type.startsWith(originPackage);
87
87
  })
88
88
  .reduce(function (promise, event) { return __awaiter(_this, void 0, void 0, function () {
89
- var txHistory, functionType, action, matches, typeArgs, assets, asset, parsedJson;
89
+ var txHistory, functionType, action, matches, typeArgs, assets, asset, b_asset, parsedJson;
90
90
  var _a;
91
91
  return __generator(this, function (_b) {
92
92
  switch (_b.label) {
@@ -100,6 +100,7 @@ function parseTxHistory(datas, originPackage) {
100
100
  typeArgs = matches[1].split(", ");
101
101
  assets = (0, token_1.typeArgsToAssets)(typeArgs);
102
102
  asset = action == "NewBid" ? assets[2] : assets[0];
103
+ b_asset = assets[1];
103
104
  parsedJson = event.parsedJson;
104
105
  txHistory.push({
105
106
  Vault: parsedJson.index,
@@ -110,6 +111,7 @@ function parseTxHistory(datas, originPackage) {
110
111
  Amount: Number(parsedJson.amount) / Math.pow(10, (0, token_1.assetToDecimal)(asset)),
111
112
  Fee: Number(parsedJson.fee) / Math.pow(10, (0, token_1.assetToDecimal)(asset)),
112
113
  BidSize: Number(parsedJson.size) / Math.pow(10, (0, token_1.assetToDecimal)(asset)),
114
+ BidPaid: Number(parsedJson.coin_value) / Math.pow(10, (0, token_1.assetToDecimal)(b_asset)),
113
115
  });
114
116
  return [2 /*return*/, txHistory];
115
117
  }
@@ -37,6 +37,8 @@ export interface AdditionalConfig {
37
37
  min_deposit: string;
38
38
  incentive_flag: string;
39
39
  incentive_rate_bp: string;
40
+ remaining_incentive_sui: string;
41
+ depositor_incentive_rate_bp: string;
40
42
  current_portfolio_step: string;
41
43
  }
42
44
  export declare function getUserShares(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[], user: string): Promise<Map<string, UserShare>>;
@@ -403,6 +403,16 @@ function getAdditionalConfigs(provider, packageId, typeArguments, registry, addi
403
403
  return reader.read64();
404
404
  })
405
405
  .at(0);
406
+ var remaining_incentive_sui = reader
407
+ .readVec(function (reader) {
408
+ return reader.read64();
409
+ })
410
+ .at(0);
411
+ var depositor_incentive_rate_bp = reader
412
+ .readVec(function (reader) {
413
+ return reader.read64();
414
+ })
415
+ .at(0);
406
416
  var current_portfolio_step = reader
407
417
  .readVec(function (reader) {
408
418
  return reader.read64();
@@ -419,6 +429,8 @@ function getAdditionalConfigs(provider, packageId, typeArguments, registry, addi
419
429
  min_deposit: min_deposit ? min_deposit : "0",
420
430
  incentive_flag: incentive_flag ? incentive_flag : "0",
421
431
  incentive_rate_bp: incentive_rate_bp ? incentive_rate_bp : "0",
432
+ remaining_incentive_sui: remaining_incentive_sui ? remaining_incentive_sui : "0",
433
+ depositor_incentive_rate_bp: depositor_incentive_rate_bp ? depositor_incentive_rate_bp : "0",
422
434
  current_portfolio_step: current_portfolio_step ? current_portfolio_step : "0",
423
435
  };
424
436
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.0.82",
5
+ "version": "1.0.84",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/sui.js": "^0.37.1",