@typus/typus-sdk 1.2.85-tails-exp → 1.2.85

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.
@@ -16,121 +16,416 @@ 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.getReduceFundTx = exports.getRaiseFundTx = 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
20
  var transactions_1 = require("@mysten/sui.js/transactions");
21
21
  var constants_1 = require("../../constants");
22
22
  /**
23
- public fun public_raise_fund<D_TOKEN, B_TOKEN>(
24
- typus_ecosystem_version: &TypusEcosystemVersion,
25
- typus_user_registry: &mut TypusUserRegistry,
26
- typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
23
+ public fun deposit<D_TOKEN, B_TOKEN>(
27
24
  registry: &mut Registry,
28
25
  index: u64,
26
+ coins: vector<Coin<D_TOKEN>>,
27
+ amount: u64,
29
28
  receipts: vector<TypusDepositReceipt>,
30
- raise_balance: Balance<D_TOKEN>,
31
- raise_from_premium: bool,
32
- raise_from_inactive: bool,
33
29
  clock: &Clock,
34
30
  ctx: &mut TxContext,
35
- ): (TypusDepositReceipt, vector<u64>) {
36
- */
37
- function getRaiseFundTx(input) {
38
- var raiseBalance = input.tx.moveCall({
39
- target: "".concat(input.typusFrameworkPackageId, "::utils::delegate_extract_balance"),
40
- typeArguments: [input.typeArguments[0]],
31
+ )
32
+ */
33
+ function getDepositTx(input) {
34
+ if (!input.usingSponsoredGasCoin &&
35
+ (input.typeArguments[0] == "0x2::sui::SUI" ||
36
+ input.typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
37
+ var _a = __read(input.tx.splitCoins(input.tx.gas, [input.tx.pure(input.amount)]), 1), coin = _a[0];
38
+ var result = input.tx.moveCall({
39
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::deposit"),
40
+ typeArguments: input.typeArguments,
41
+ arguments: [
42
+ input.tx.object(input.typusDovSingleRegistry),
43
+ input.tx.pure(input.index),
44
+ input.tx.makeMoveVec({ objects: [coin] }),
45
+ input.tx.pure(input.amount),
46
+ input.tx.makeMoveVec({
47
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
48
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
49
+ }),
50
+ input.tx.pure(constants_1.CLOCK),
51
+ ],
52
+ });
53
+ input.tx.moveCall({
54
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_coins"),
55
+ typeArguments: [input.typeArguments[0]],
56
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
57
+ });
58
+ input.tx.transferObjects([input.tx.object(result[1])], input.user);
59
+ }
60
+ else {
61
+ var result = input.tx.moveCall({
62
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::deposit"),
63
+ typeArguments: input.typeArguments,
64
+ arguments: [
65
+ input.tx.object(input.typusDovSingleRegistry),
66
+ input.tx.pure(input.index),
67
+ input.tx.makeMoveVec({ objects: input.coins.map(function (coin) { return input.tx.object(coin); }) }),
68
+ input.tx.pure(input.amount),
69
+ input.tx.makeMoveVec({
70
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
71
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
72
+ }),
73
+ input.tx.pure(constants_1.CLOCK),
74
+ ],
75
+ });
76
+ input.tx.moveCall({
77
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_coins"),
78
+ typeArguments: [input.typeArguments[0]],
79
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
80
+ });
81
+ input.tx.transferObjects([input.tx.object(result[1])], input.user);
82
+ }
83
+ return input.tx;
84
+ }
85
+ exports.getDepositTx = getDepositTx;
86
+ /**
87
+ public fun withdraw<D_TOKEN, B_TOKEN>(
88
+ registry: &mut Registry,
89
+ index: u64,
90
+ receipts: vector<TypusDepositReceipt>,
91
+ share: Option<u64>,
92
+ clock: &Clock,
93
+ ctx: &mut TxContext,
94
+ )
95
+ */
96
+ function getWithdrawTx(input) {
97
+ var result = input.tx.moveCall({
98
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::withdraw"),
99
+ typeArguments: input.typeArguments,
41
100
  arguments: [
42
- input.tx.pure(input.user),
101
+ input.tx.object(input.typusDovSingleRegistry),
102
+ input.tx.pure(input.index),
43
103
  input.tx.makeMoveVec({
44
- type: "0x2::coin::Coin<".concat(input.typeArguments[0], ">"),
45
- objects: input.raiseCoins,
104
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
105
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
46
106
  }),
47
- input.tx.pure(input.raiseAmount),
107
+ input.tx.pure(input.share ? [input.share] : []),
108
+ input.tx.pure(constants_1.CLOCK),
48
109
  ],
49
110
  });
111
+ input.tx.moveCall({
112
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
113
+ typeArguments: [input.typeArguments[0]],
114
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
115
+ });
116
+ input.tx.moveCall({
117
+ target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
118
+ arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
119
+ });
120
+ return input.tx;
121
+ }
122
+ exports.getWithdrawTx = getWithdrawTx;
123
+ /**
124
+ public fun unsubscribe<D_TOKEN, B_TOKEN>(
125
+ registry: &mut Registry,
126
+ index: u64,
127
+ receipts: vector<TypusDepositReceipt>,
128
+ share: Option<u64>,
129
+ clock: &Clock,
130
+ ctx: &mut TxContext,
131
+ )
132
+ */
133
+ function getUnsubscribeTx(input) {
50
134
  var result = input.tx.moveCall({
51
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_raise_fund"),
135
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::unsubscribe"),
52
136
  typeArguments: input.typeArguments,
53
137
  arguments: [
54
- input.tx.object(input.typusEcosystemVersion),
55
- input.tx.object(input.typusUserRegistry),
56
- input.tx.object(input.typusLeaderboardRegistry),
57
138
  input.tx.object(input.typusDovSingleRegistry),
58
139
  input.tx.pure(input.index),
59
140
  input.tx.makeMoveVec({
60
141
  type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
61
142
  objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
62
143
  }),
63
- input.tx.object(raiseBalance),
64
- input.tx.pure(input.raiseFromPremium),
65
- input.tx.pure(input.raiseFromInactive),
144
+ input.tx.pure(input.share ? [input.share] : []),
66
145
  input.tx.pure(constants_1.CLOCK),
67
146
  ],
68
147
  });
69
148
  input.tx.transferObjects([input.tx.object(result[0])], input.user);
70
149
  return input.tx;
71
150
  }
72
- exports.getRaiseFundTx = getRaiseFundTx;
151
+ exports.getUnsubscribeTx = getUnsubscribeTx;
73
152
  /**
74
- public fun public_reduce_fund<D_TOKEN, B_TOKEN, I_TOKEN>(
75
- typus_ecosystem_version: &TypusEcosystemVersion,
76
- typus_user_registry: &mut TypusUserRegistry,
77
- typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
153
+ public fun compound<D_TOKEN, B_TOKEN>(
78
154
  registry: &mut Registry,
79
155
  index: u64,
80
156
  receipts: vector<TypusDepositReceipt>,
81
- reduce_from_warmup: u64,
82
- reduce_from_active: u64,
83
- reduce_from_premium: bool,
84
- reduce_from_inactive: bool,
85
- reduce_from_incentive: bool,
86
157
  clock: &Clock,
87
158
  ctx: &mut TxContext,
88
- ): (Option<TypusDepositReceipt>, Balance<D_TOKEN>, Balance<B_TOKEN>, Balance<I_TOKEN>, vector<u64>) {
89
- */
90
- function getReduceFundTx(input) {
159
+ )
160
+ */
161
+ function getCompoundTx(input) {
91
162
  var result = input.tx.moveCall({
92
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_reduce_fund"),
163
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::compound"),
93
164
  typeArguments: input.typeArguments,
94
165
  arguments: [
95
- input.tx.object(input.typusEcosystemVersion),
96
- input.tx.object(input.typusUserRegistry),
97
- input.tx.object(input.typusLeaderboardRegistry),
98
166
  input.tx.object(input.typusDovSingleRegistry),
99
167
  input.tx.pure(input.index),
100
168
  input.tx.makeMoveVec({
101
169
  type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
102
170
  objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
103
171
  }),
104
- input.tx.pure(input.reduceFromWarmup),
105
- input.tx.pure(input.reduceFromActive),
106
- input.tx.pure(input.reduceFromPremium),
107
- input.tx.pure(input.reduceFromInactive),
108
- input.tx.pure(input.reduceFromIncentive),
109
- input.tx.pure(constants_1.CLOCK),
172
+ input.tx.object(constants_1.CLOCK),
110
173
  ],
111
174
  });
112
- input.tx.moveCall({
113
- target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
114
- arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
175
+ if (input.incentiveToken) {
176
+ input.typeArguments.push(input.incentiveToken);
177
+ input.tx = getRedeemTx({
178
+ tx: input.tx,
179
+ typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
180
+ typusFrameworkPackageId: input.typusFrameworkPackageId,
181
+ typusDovSinglePackageId: input.typusDovSinglePackageId,
182
+ typusDovSingleRegistry: input.typusDovSingleRegistry,
183
+ typeArguments: input.typeArguments,
184
+ index: input.index,
185
+ receipts: [input.tx.object(result[0])],
186
+ user: input.user,
187
+ });
188
+ }
189
+ else {
190
+ input.tx.transferObjects([input.tx.object(result[0])], input.user);
191
+ }
192
+ return input.tx;
193
+ }
194
+ exports.getCompoundTx = getCompoundTx;
195
+ /**
196
+ public fun claim<D_TOKEN, B_TOKEN>(
197
+ registry: &mut Registry,
198
+ index: u64,
199
+ receipts: vector<TypusDepositReceipt>,
200
+ ctx: &mut TxContext,
201
+ )
202
+ */
203
+ function getClaimTx(input) {
204
+ var result = input.tx.moveCall({
205
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::claim"),
206
+ typeArguments: input.typeArguments,
207
+ arguments: [
208
+ input.tx.object(input.typusDovSingleRegistry),
209
+ input.tx.pure(input.index),
210
+ input.tx.makeMoveVec({
211
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
212
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
213
+ }),
214
+ ],
115
215
  });
116
216
  input.tx.moveCall({
117
217
  target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
118
218
  typeArguments: [input.typeArguments[0]],
219
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
220
+ });
221
+ input.tx.moveCall({
222
+ target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
119
223
  arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
120
224
  });
225
+ return input.tx;
226
+ }
227
+ exports.getClaimTx = getClaimTx;
228
+ /**
229
+ public fun harvest<D_TOKEN, B_TOKEN>(
230
+ registry: &mut Registry,
231
+ index: u64,
232
+ receipts: vector<TypusDepositReceipt>,
233
+ ctx: &mut TxContext,
234
+ )
235
+ */
236
+ function getHarvestTx(input) {
237
+ var result = input.tx.moveCall({
238
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::harvest"),
239
+ typeArguments: input.typeArguments,
240
+ arguments: [
241
+ input.tx.object(input.typusDovSingleRegistry),
242
+ input.tx.pure(input.index),
243
+ input.tx.makeMoveVec({
244
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
245
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
246
+ }),
247
+ ],
248
+ });
121
249
  input.tx.moveCall({
122
250
  target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
123
251
  typeArguments: [input.typeArguments[1]],
124
- arguments: [input.tx.object(result[2]), input.tx.pure(input.user)],
252
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
253
+ });
254
+ if (input.incentiveToken) {
255
+ input.typeArguments.push(input.incentiveToken);
256
+ var receipt = input.tx.moveCall({
257
+ target: "0x1::option::destroy_some",
258
+ typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
259
+ arguments: [input.tx.object(result[1])],
260
+ });
261
+ input.tx = getRedeemTx({
262
+ tx: input.tx,
263
+ typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
264
+ typusFrameworkPackageId: input.typusFrameworkPackageId,
265
+ typusDovSinglePackageId: input.typusDovSinglePackageId,
266
+ typusDovSingleRegistry: input.typusDovSingleRegistry,
267
+ typeArguments: input.typeArguments,
268
+ index: input.index,
269
+ receipts: [input.tx.object(receipt)],
270
+ user: input.user,
271
+ });
272
+ }
273
+ else {
274
+ input.tx.moveCall({
275
+ target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
276
+ arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
277
+ });
278
+ }
279
+ return input.tx;
280
+ }
281
+ exports.getHarvestTx = getHarvestTx;
282
+ /**
283
+ public fun redeem<D_TOKEN, B_TOKEN, I_TOKEN>(
284
+ registry: &mut Registry,
285
+ index: u64,
286
+ receipts: vector<TypusDepositReceipt>,
287
+ ctx: &mut TxContext,
288
+ )
289
+ */
290
+ function getRedeemTx(input) {
291
+ var result = input.tx.moveCall({
292
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::redeem"),
293
+ typeArguments: input.typeArguments,
294
+ arguments: [
295
+ input.tx.object(input.typusDovSingleRegistry),
296
+ input.tx.pure(input.index),
297
+ input.tx.makeMoveVec({
298
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
299
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
300
+ }),
301
+ ],
125
302
  });
126
303
  input.tx.moveCall({
127
304
  target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
128
305
  typeArguments: [input.typeArguments[2]],
129
- arguments: [input.tx.object(result[3]), input.tx.pure(input.user)],
306
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
307
+ });
308
+ input.tx.moveCall({
309
+ target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
310
+ arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
130
311
  });
131
312
  return input.tx;
132
313
  }
133
- exports.getReduceFundTx = getReduceFundTx;
314
+ exports.getRedeemTx = getRedeemTx;
315
+ function getWithdrawHarvestClaimTx(input) {
316
+ var result = input.withdraw
317
+ ? input.tx.moveCall({
318
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::withdraw"),
319
+ typeArguments: input.typeArguments,
320
+ arguments: [
321
+ input.tx.object(input.typusDovSingleRegistry),
322
+ input.tx.pure(input.index),
323
+ input.tx.makeMoveVec({
324
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
325
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
326
+ }),
327
+ input.tx.pure([]),
328
+ input.tx.pure(constants_1.CLOCK),
329
+ ],
330
+ })
331
+ : undefined;
332
+ if (input.withdraw) {
333
+ input.tx.moveCall({
334
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
335
+ typeArguments: [input.typeArguments[0]],
336
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
337
+ });
338
+ }
339
+ result = input.harvest
340
+ ? input.tx.moveCall({
341
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::harvest"),
342
+ typeArguments: input.typeArguments,
343
+ arguments: [
344
+ input.tx.object(input.typusDovSingleRegistry),
345
+ input.tx.pure(input.index),
346
+ input.tx.makeMoveVec({
347
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
348
+ objects: result
349
+ ? [
350
+ input.tx.object(input.tx.moveCall({
351
+ target: "0x1::option::destroy_some",
352
+ typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
353
+ arguments: [input.tx.object(result[1])],
354
+ })),
355
+ ]
356
+ : input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
357
+ }),
358
+ ],
359
+ })
360
+ : result;
361
+ if (input.harvest) {
362
+ input.tx.moveCall({
363
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
364
+ typeArguments: [input.typeArguments[1]],
365
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
366
+ });
367
+ }
368
+ result = input.claim
369
+ ? input.tx.moveCall({
370
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::claim"),
371
+ typeArguments: input.typeArguments,
372
+ arguments: [
373
+ input.tx.object(input.typusDovSingleRegistry),
374
+ input.tx.pure(input.index),
375
+ input.tx.makeMoveVec({
376
+ type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
377
+ objects: result
378
+ ? [
379
+ input.tx.object(input.tx.moveCall({
380
+ target: "0x1::option::destroy_some",
381
+ typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
382
+ arguments: [input.tx.object(result[1])],
383
+ })),
384
+ ]
385
+ : input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
386
+ }),
387
+ ],
388
+ })
389
+ : result;
390
+ if (input.claim) {
391
+ input.tx.moveCall({
392
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
393
+ typeArguments: [input.typeArguments[0]],
394
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
395
+ });
396
+ }
397
+ if (input.incentiveToken) {
398
+ input.typeArguments.push(input.incentiveToken);
399
+ var receipts = result
400
+ ? [
401
+ input.tx.object(input.tx.moveCall({
402
+ target: "0x1::option::destroy_some",
403
+ typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
404
+ arguments: [input.tx.object(result[1])],
405
+ })),
406
+ ]
407
+ : input.receipts.map(function (receipt) { return input.tx.object(receipt); });
408
+ input.tx = getRedeemTx({
409
+ tx: input.tx,
410
+ typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
411
+ typusFrameworkPackageId: input.typusFrameworkPackageId,
412
+ typusDovSinglePackageId: input.typusDovSinglePackageId,
413
+ typusDovSingleRegistry: input.typusDovSingleRegistry,
414
+ typeArguments: input.typeArguments,
415
+ index: input.index,
416
+ receipts: receipts,
417
+ user: input.user,
418
+ });
419
+ }
420
+ else {
421
+ input.tx.moveCall({
422
+ target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
423
+ arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
424
+ });
425
+ }
426
+ return input.tx;
427
+ }
428
+ exports.getWithdrawHarvestClaimTx = getWithdrawHarvestClaimTx;
134
429
  /**
135
430
  public(friend) entry fun new_bid<D_TOKEN, B_TOKEN>(
136
431
  registry: &mut Registry,
@@ -147,7 +442,7 @@ function getNewBidTx(input) {
147
442
  input.typeArguments[1] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
148
443
  var _a = __read(input.tx.splitCoins(input.tx.gas, [input.tx.pure(input.premium_required)]), 1), coin = _a[0];
149
444
  var result = input.tx.moveCall({
150
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_bid"),
445
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::bid"),
151
446
  typeArguments: input.typeArguments,
152
447
  arguments: [
153
448
  input.tx.object(input.typusEcosystemVersion),
@@ -158,7 +453,7 @@ function getNewBidTx(input) {
158
453
  input.tx.pure(input.index),
159
454
  input.tx.makeMoveVec({ objects: [coin] }),
160
455
  input.tx.pure(input.size),
161
- input.tx.pure(constants_1.CLOCK),
456
+ input.tx.pure("0x6"),
162
457
  ],
163
458
  });
164
459
  input.tx.transferObjects([input.tx.object(result[0])], input.user);
@@ -183,7 +478,7 @@ function getNewBidTx(input) {
183
478
  arguments: [input.tx.object(balance)],
184
479
  });
185
480
  var result = input.tx.moveCall({
186
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_bid"),
481
+ target: "".concat(input.typusDovSinglePackageId, "::tails_staking::bid"),
187
482
  typeArguments: input.typeArguments,
188
483
  arguments: [
189
484
  input.tx.object(input.typusEcosystemVersion),
@@ -1,6 +1,6 @@
1
1
  import { SuiClient } from "@mysten/sui.js/client";
2
2
  export declare const SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
3
- export declare function getUserMetadata(input: {
3
+ export declare function getAirdrop(input: {
4
4
  provider: SuiClient;
5
5
  typusPackageId: string;
6
6
  typusEcosystemVersion: string;
@@ -36,11 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getUserMetadata = exports.SENDER = void 0;
39
+ exports.getAirdrop = exports.SENDER = void 0;
40
40
  var transactions_1 = require("@mysten/sui.js/transactions");
41
41
  var bcs_1 = require("@mysten/bcs");
42
42
  exports.SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
43
- function getUserMetadata(input) {
43
+ function getAirdrop(input) {
44
44
  return __awaiter(this, void 0, void 0, function () {
45
45
  var transactionBlock, results, bytes, reader;
46
46
  return __generator(this, function (_a) {
@@ -68,4 +68,4 @@ function getUserMetadata(input) {
68
68
  });
69
69
  });
70
70
  }
71
- exports.getUserMetadata = getUserMetadata;
71
+ exports.getAirdrop = getAirdrop;
package/package.json CHANGED
@@ -2,11 +2,13 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.2.85-tails-exp",
5
+ "version": "1.2.85",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",
9
9
  "@mysten/sui.js": "0.54.1",
10
+ "@pythnetwork/client": "^2.21.0",
11
+ "@solana/web3.js": "^1.91.8",
10
12
  "@types/node": "^20.5.7",
11
13
  "aftermath-ts-sdk": "^1.1.14",
12
14
  "bignumber.js": "^9.1.1",
@@ -33,12 +35,13 @@
33
35
  "js-tokens": "^8.0.1",
34
36
  "js-yaml": "^4.1.0",
35
37
  "json2csv": "^6.0.0-alpha.2",
38
+ "lodash": "^4.17.21",
36
39
  "math-erf": "^1.0.0",
37
40
  "minimatch": "^9.0.3",
38
41
  "minimist": "^1.2.5",
39
42
  "mkdirp": "^3.0.1",
40
43
  "mocha": "^10.1.0",
41
- "moment": "^2.29.4",
44
+ "moment": "^2.30.1",
42
45
  "node-cron": "^3.0.2",
43
46
  "once": "^1.4.0",
44
47
  "path-is-absolute": "^2.0.0",