@typus/typus-sdk 1.2.4 → 1.2.5

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/mainnet.json CHANGED
@@ -30,12 +30,12 @@
30
30
  "SCALLOP_MARKET": "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9",
31
31
  "SCALLOP_REWARD_POOL_FOR_SUI": "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
32
32
  "SCALLOP_REWARD_POOL_FOR_USDC": "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8",
33
- "VERSION": "2.11.1",
33
+ "VERSION": "2.12.0",
34
34
  "EXP_GUESS_PACKAGE": "0x32d670520a10a87b8c042d2259c2d1f7c319329bafcf6f893ad9aaf01a43db8b",
35
35
  "EXP_GUESS_PACKAGE_ORIGIN": "0x32d670520a10a87b8c042d2259c2d1f7c319329bafcf6f893ad9aaf01a43db8b",
36
36
  "EXP_GUESS_REGISTRY": "0x70c6cbe6764b315cee1b24f483a0fc8307f047f1fab2a0d4438624845e6ba3f2",
37
37
  "FRAMEWORK_PACKAGE": "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274",
38
- "SINGLE_COLLATERAL_PACKAGE": "0x936e250c06624db833f4118b6cf3166859dee868d1305fbf6c4ed064c939d9e6",
38
+ "SINGLE_COLLATERAL_PACKAGE": "0x44bb378242396440e1fd6d7befcb35bb8df5623605db5d79313924ad5e8946a6",
39
39
  "SINGLE_COLLATERAL_PACKAGE_ORIGIN": "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a",
40
40
  "SINGLE_COLLATERAL_REGISTRY": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8",
41
41
  "SINGLE_COLLATERAL_PORTFOLIO_VAULT_REGISTRY": "0xa1a186d050e3172ef4701c16048c99b11f785969874fa2642b9cbcf59cde7fc0",
@@ -76,6 +76,8 @@ function assetToDecimal(asset) {
76
76
  return 8;
77
77
  case "SEI":
78
78
  return 8;
79
+ case "BUCK":
80
+ return 9;
79
81
  }
80
82
  }
81
83
  exports.assetToDecimal = assetToDecimal;
@@ -223,6 +223,18 @@ export declare function getTransferBidReceiptTx(input: {
223
223
  share?: string;
224
224
  recipient: string;
225
225
  }): TransactionBlock;
226
+ export declare function getMultiTransferBidReceiptTx(input: {
227
+ typusFrameworkPackageId: string;
228
+ typusFrameworkOriginPackageId: string;
229
+ typusDovSinglePackageId: string;
230
+ typusDovSingleRegistry: string;
231
+ typeArguments: string[];
232
+ index: string;
233
+ receipts: string[];
234
+ shares: string[];
235
+ recipients: string[];
236
+ sender: string;
237
+ }): TransactionBlock;
226
238
  /**
227
239
  public(friend) entry fun refund<TOKEN>(
228
240
  registry: &mut Registry,
@@ -16,7 +16,8 @@ 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.getTransferBidReceiptTx = exports.getExerciseTx = exports.getNewBidTx = exports.getWithdrawHarvestClaimTx = exports.getRedeemTx = exports.getHarvestTx = exports.getClaimTx = exports.getCompoundTx = exports.getUnsubscribeTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
19
+ exports.getRebateTx = exports.getMultiTransferBidReceiptTx = exports.getTransferBidReceiptTx = exports.getExerciseTx = exports.getNewBidTx = exports.getWithdrawHarvestClaimTx = exports.getRedeemTx = exports.getHarvestTx = exports.getClaimTx = exports.getCompoundTx = exports.getUnsubscribeTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
20
+ var transactions_1 = require("@mysten/sui.js/transactions");
20
21
  var constants_1 = require("../../constants");
21
22
  /**
22
23
  public fun deposit<D_TOKEN, B_TOKEN>(
@@ -510,6 +511,43 @@ function getTransferBidReceiptTx(input) {
510
511
  return input.tx;
511
512
  }
512
513
  exports.getTransferBidReceiptTx = getTransferBidReceiptTx;
514
+ function getMultiTransferBidReceiptTx(input) {
515
+ var tx = new transactions_1.TransactionBlock();
516
+ console.assert(input.shares.length == input.recipients.length, "shares.length != recipients.length");
517
+ var receipts = {
518
+ // type: `${input.typusFrameworkOriginPackageId}::vault::TypusBidReceipt`,
519
+ objects: input.receipts.map(function (receipt) { return tx.object(receipt); }),
520
+ };
521
+ var i = 0;
522
+ while (i < input.shares.length) {
523
+ var share = input.shares[i];
524
+ var recipient = input.recipients[i];
525
+ var result = tx.moveCall({
526
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_transfer_bid_receipt"),
527
+ typeArguments: input.typeArguments,
528
+ arguments: [
529
+ tx.object(input.typusDovSingleRegistry),
530
+ tx.pure(input.index),
531
+ tx.makeMoveVec(receipts),
532
+ tx.pure([share]),
533
+ tx.pure(recipient),
534
+ ],
535
+ });
536
+ var unwrap = tx.moveCall({
537
+ target: "0x1::option::destroy_some",
538
+ typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusBidReceipt")],
539
+ arguments: [tx.object(result[0])],
540
+ });
541
+ receipts = { objects: [unwrap] };
542
+ i += 1;
543
+ if (i == input.shares.length) {
544
+ tx.transferObjects([tx.object(unwrap)], input.sender);
545
+ }
546
+ }
547
+ tx.setGasBudget(100000000);
548
+ return tx;
549
+ }
550
+ exports.getMultiTransferBidReceiptTx = getMultiTransferBidReceiptTx;
513
551
  /**
514
552
  public(friend) entry fun refund<TOKEN>(
515
553
  registry: &mut Registry,
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.4",
5
+ "version": "1.2.5",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "0.7.12",