@typus/typus-sdk 1.2.95 → 1.2.96

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
@@ -68,7 +68,7 @@
68
68
  "LOCKED_VAULT": "0xe79b7ba69b750d30ac7ae171483a4064d0bb34090493fef3c844a11b05818d79"
69
69
  },
70
70
  "PACKAGE": {
71
- "DOV_SINGLE": "0x37c6a2425e87fcad23faeae753a01a98c0880346f3b81ba412de1edb2a9d3f81",
71
+ "DOV_SINGLE": "0x974da22ade734483d86d4635e3ff39116b6ea4d04c45bb9cd8d30b55f5174986",
72
72
  "FRAMEWORK": "0xa304e225551b619b07c06d8965462b268138b2c5774fd22ad8853ef91fbb9771",
73
73
  "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
74
74
  "NFT": "0x0f5162014f18686640b8d0adefd60c3fe5b377413ec4f1e77001c67d96f8501a",
@@ -186,3 +186,17 @@ export declare function getRebateTx(input: {
186
186
  typeArgument: string;
187
187
  user: string;
188
188
  }): TransactionBlock;
189
+ export declare function getCompoundWithRedeemTx(input: {
190
+ tx: TransactionBlock;
191
+ typusEcosystemVersion: string;
192
+ typusUserRegistry: string;
193
+ typusLeaderboardRegistry: string;
194
+ typusFrameworkOriginPackageId: string;
195
+ typusFrameworkPackageId: string;
196
+ typusDovSinglePackageId: string;
197
+ typusDovSingleRegistry: string;
198
+ typeArguments: string[];
199
+ index: string;
200
+ receipts: string[] | TransactionObjectArgument[];
201
+ user: string;
202
+ }): TransactionBlock;
@@ -16,7 +16,7 @@ var __read = (this && this.__read) || function (o, n) {
16
16
  return ar;
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.getRebateTx = exports.getMultiTransferBidReceiptTx = exports.getTransferBidReceiptTx = exports.getExerciseTx = exports.getNewBidTx = exports.getRefreshDepositSnapshotTx = exports.getReduceFundTx = exports.getRaiseFundTx = void 0;
19
+ exports.getCompoundWithRedeemTx = exports.getRebateTx = exports.getMultiTransferBidReceiptTx = exports.getTransferBidReceiptTx = exports.getExerciseTx = exports.getNewBidTx = exports.getRefreshDepositSnapshotTx = exports.getReduceFundTx = exports.getRaiseFundTx = void 0;
20
20
  var transactions_1 = require("@mysten/sui.js/transactions");
21
21
  var constants_1 = require("../../constants");
22
22
  /**
@@ -373,3 +373,50 @@ function getRebateTx(input) {
373
373
  return input.tx;
374
374
  }
375
375
  exports.getRebateTx = getRebateTx;
376
+ function getCompoundWithRedeemTx(input) {
377
+ var raiseBalance = input.tx.moveCall({
378
+ target: "0x2::balance::zero",
379
+ typeArguments: [input.typeArguments[0]],
380
+ arguments: [],
381
+ });
382
+ var result = input.tx.moveCall({
383
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_raise_fund"),
384
+ typeArguments: input.typeArguments,
385
+ arguments: [
386
+ input.tx.object(input.typusEcosystemVersion),
387
+ input.tx.object(input.typusUserRegistry),
388
+ input.tx.object(input.typusLeaderboardRegistry),
389
+ input.tx.object(input.typusDovSingleRegistry),
390
+ input.tx.pure(input.index),
391
+ input.tx.makeMoveVec({
392
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
393
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
394
+ }),
395
+ input.tx.object(raiseBalance),
396
+ input.tx.pure(true),
397
+ input.tx.pure(false),
398
+ input.tx.object(constants_1.CLOCK),
399
+ ],
400
+ });
401
+ input.tx.transferObjects([input.tx.object(result[0])], input.user);
402
+ return getReduceFundTx({
403
+ tx: input.tx,
404
+ typusEcosystemVersion: input.typusEcosystemVersion,
405
+ typusUserRegistry: input.typusUserRegistry,
406
+ typusLeaderboardRegistry: input.typusLeaderboardRegistry,
407
+ typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
408
+ typusFrameworkPackageId: input.typusFrameworkPackageId,
409
+ typusDovSinglePackageId: input.typusDovSinglePackageId,
410
+ typusDovSingleRegistry: input.typusDovSingleRegistry,
411
+ typeArguments: input.typeArguments,
412
+ index: input.index,
413
+ receipts: [result[0]],
414
+ reduceFromWarmup: "0",
415
+ reduceFromActive: "0",
416
+ reduceFromPremium: false,
417
+ reduceFromInactive: false,
418
+ reduceFromIncentive: true,
419
+ user: input.user,
420
+ });
421
+ }
422
+ exports.getCompoundWithRedeemTx = getCompoundWithRedeemTx;
@@ -343,7 +343,7 @@ function parseTxHistory(datas, originPackage, vaults) {
343
343
  }
344
344
  if (event.parsedJson.log[10] > 0) {
345
345
  // redeem
346
- Action = "Redeem";
346
+ Action = "Harvest Reward";
347
347
  token = (0, token_1.typeArgToAsset)("0x" + event.parsedJson.i_token.name);
348
348
  amount = Number(event.parsedJson.log[10]) / Math.pow(10, (0, token_1.assetToDecimal)(token));
349
349
  Amount = "".concat((0, bignumber_js_1.default)(amount).toFixed(), " ").concat(token);
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.2.95",
5
+ "version": "1.2.96",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",