@typus/typus-sdk 1.0.119 → 1.0.121

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.
@@ -0,0 +1,2 @@
1
+ export declare function getExpEarn(u64_padding: Map<string, string>): number;
2
+ export declare function getExpEarnPerMinute(u64_padding: Map<string, string>): number;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExpEarnPerMinute = exports.getExpEarn = void 0;
4
+ function getExpEarn(u64_padding) {
5
+ var usd_in_deposit = Number(u64_padding.get("usd_in_deposit"));
6
+ // console.log(`usd_in_deposit: ${usd_in_deposit}`);
7
+ var snapshot_ms = Number(u64_padding.get("snapshot_ms"));
8
+ // console.log(`snapshot_ms: ${snapshot_ms}`);
9
+ var minutes = round((new Date().getTime() - snapshot_ms) / 60000);
10
+ // console.log(`minutes: ${minutes}`);
11
+ var exp_earn = round((usd_in_deposit * minutes) / 6000);
12
+ // console.log(`exp_earn: ${exp_earn}`);
13
+ return exp_earn;
14
+ }
15
+ exports.getExpEarn = getExpEarn;
16
+ function getExpEarnPerMinute(u64_padding) {
17
+ var usd_in_deposit = Number(u64_padding.get("usd_in_deposit"));
18
+ // console.log(`usd_in_deposit: ${usd_in_deposit}`);
19
+ var exp_earn = usd_in_deposit / 6000;
20
+ // console.log(`exp_earn: ${exp_earn}`);
21
+ return exp_earn;
22
+ }
23
+ exports.getExpEarnPerMinute = getExpEarnPerMinute;
24
+ function round(a) {
25
+ return a - (a % 1);
26
+ }
@@ -170,6 +170,11 @@ function getUnstakeNftTx(gasBudget, nftPackageId, registry, kiosk, kiosk_cap) {
170
170
  var tx;
171
171
  return __generator(this, function (_a) {
172
172
  tx = new sui_js_1.TransactionBlock();
173
+ tx.moveCall({
174
+ target: "".concat(nftPackageId, "::tails_staking::snapshot"),
175
+ typeArguments: [],
176
+ arguments: [tx.object(registry), tx.object(constants_1.CLOCK)],
177
+ });
173
178
  tx.moveCall({
174
179
  target: "".concat(nftPackageId, "::tails_staking::unstake_nft"),
175
180
  typeArguments: [],
@@ -181,14 +181,14 @@ function getBatchClaimHarvestTx(gasBudget, packageId, registry, additional_confi
181
181
  tx.moveCall({
182
182
  target: "".concat(packageId, "::typus_dov_single::claim"),
183
183
  typeArguments: request.typeArguments,
184
- arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(request.index)],
184
+ arguments: [tx.object(registry), tx.object(additional_config_registry), tx.pure(request.index)],
185
185
  });
186
186
  });
187
187
  harvestRequests.forEach(function (request) {
188
188
  tx.moveCall({
189
189
  target: "".concat(packageId, "::typus_dov_single::harvest"),
190
190
  typeArguments: request.typeArguments,
191
- arguments: [tx.pure(registry), tx.pure(additional_config_registry), tx.pure(request.index)],
191
+ arguments: [tx.object(registry), tx.object(additional_config_registry), tx.pure(request.index)],
192
192
  });
193
193
  });
194
194
  tx.setGasBudget(gasBudget);
@@ -14,7 +14,8 @@ export interface Info {
14
14
  expirationTsMs: string;
15
15
  depositToken: string;
16
16
  bidToken: string;
17
- oracleToken: string;
17
+ settlementBase: string;
18
+ settlementQuote: string;
18
19
  dTokenDecimal: string;
19
20
  bTokenDecimal: string;
20
21
  oTokenDecimal: string;
@@ -67,6 +68,8 @@ export interface Config {
67
68
  bidLotSize: string;
68
69
  minDepositSize: string;
69
70
  minBidSize: string;
71
+ maxDepositEntry: string;
72
+ maxBidEntry: string;
70
73
  depositFeeBp: string;
71
74
  depositFeeShareBp: string;
72
75
  depositSharedFeePool: string | undefined;
@@ -75,6 +78,7 @@ export interface Config {
75
78
  bidIncentiveBp: string;
76
79
  auctionDelayTsMs: string;
77
80
  auctionDurationTsMs: string;
81
+ recoupDelayTsMs: string;
78
82
  capacity: string;
79
83
  leverage: string;
80
84
  riskLevel: string;
@@ -88,7 +88,8 @@ function getVaults(provider, packageId, registry, indexes) {
88
88
  expirationTsMs: reader.read64(),
89
89
  depositToken: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
90
90
  bidToken: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
91
- oracleToken: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
91
+ settlementBase: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
92
+ settlementQuote: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
92
93
  dTokenDecimal: reader.read64(),
93
94
  bTokenDecimal: reader.read64(),
94
95
  oTokenDecimal: reader.read64(),
@@ -147,6 +148,8 @@ function getVaults(provider, packageId, registry, indexes) {
147
148
  bidLotSize: reader.read64(),
148
149
  minDepositSize: reader.read64(),
149
150
  minBidSize: reader.read64(),
151
+ maxDepositEntry: reader.read64(),
152
+ maxBidEntry: reader.read64(),
150
153
  depositFeeBp: reader.read64(),
151
154
  depositFeeShareBp: reader.read64(),
152
155
  depositSharedFeePool: reader
@@ -159,6 +162,7 @@ function getVaults(provider, packageId, registry, indexes) {
159
162
  bidIncentiveBp: reader.read64(),
160
163
  auctionDelayTsMs: reader.read64(),
161
164
  auctionDurationTsMs: reader.read64(),
165
+ recoupDelayTsMs: reader.read64(),
162
166
  capacity: reader.read64(),
163
167
  leverage: reader.read64(),
164
168
  riskLevel: reader.read64(),
@@ -445,7 +449,7 @@ function getBidShares(provider, typusFrameworkPackageId, packageId, registry, re
445
449
  transactionBlockArguments = [
446
450
  transactionBlock.pure(registry),
447
451
  transactionBlock.makeMoveVec({
448
- type: "".concat(typusFrameworkPackageId, "::vault::TypusDepositReceipt"),
452
+ type: "".concat(typusFrameworkPackageId, "::vault::TypusBidReceipt"),
449
453
  objects: receipts.map(function (id) { return transactionBlock.object(id); }),
450
454
  }),
451
455
  ];
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.119",
5
+ "version": "1.0.121",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "^0.3.3",