@typus/typus-sdk 1.2.74-dappkit → 1.2.75-tails-exp

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,288 +16,168 @@ var __read = (this && this.__read) || function (o, n) {
16
16
  return ar;
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.getWithdrawProfitStrategyTx = exports.getCloseStrategyTx = exports.getUpdateStrategyTx = exports.getNewStrategyTx = exports.getRebateTx = exports.getExerciseTx = exports.getNewBidTx = exports.getRedeemTx = exports.getHarvestTx = exports.getClaimTx = exports.getCompoundTx = exports.getUnsubscribeTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
19
+ exports.getWithdrawProfitStrategyTx = exports.getCloseStrategyTx = exports.getUpdateStrategyTx = exports.getNewStrategyTx = exports.getRebateTx = exports.getExerciseTx = exports.getNewBidTx = exports.getDepositTx = exports.getReduceFundTx = exports.getRaiseFundTx = void 0;
20
20
  var transactions_1 = require("@mysten/sui.js/transactions");
21
21
  var constants_1 = require("../../constants");
22
- var user_entry_1 = require("./user-entry");
23
- function getDepositTx(input) {
24
- var mfud = input.tx.moveCall({
25
- target: "".concat(input.mfudPackageId, "::mfud::mint"),
22
+ function getRaiseFundTx(input) {
23
+ var typusToken = input.tx.moveCall({
24
+ target: "".concat(input.typusTokenPackageId, "::").concat(input.typusTokenType.split("::")[1], "::mint"),
26
25
  arguments: [
27
- input.tx.object(input.mfudRegistry),
28
- input.tx.makeMoveVec({ objects: input.coins.map(function (id) { return input.tx.object(id); }) }),
29
- input.tx.pure(input.mfudAmount),
26
+ input.tx.object(input.typusTokenPackageId),
27
+ input.tx.makeMoveVec({ objects: input.raiseCoins }),
28
+ input.tx.pure(input.raiseAmount),
30
29
  ],
31
30
  });
31
+ var typusTokenBalance = input.tx.moveCall({
32
+ target: "0x2::coin::into_balance",
33
+ typeArguments: [input.typusTokenType],
34
+ arguments: [input.tx.object(typusToken)],
35
+ });
32
36
  var result = input.tx.moveCall({
33
- target: "".concat(input.typusDovSinglePackageId, "::tails_staking::deposit"),
37
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_raise_fund"),
34
38
  typeArguments: input.typeArguments,
35
39
  arguments: [
40
+ input.tx.object(input.typusEcosystemVersion),
41
+ input.tx.object(input.typusUserRegistry),
42
+ input.tx.object(input.typusLeaderboardRegistry),
36
43
  input.tx.object(input.typusDovSingleRegistry),
37
44
  input.tx.pure(input.index),
38
- input.tx.makeMoveVec({ objects: [mfud] }),
39
- input.tx.pure(input.mfudAmount),
40
45
  input.tx.makeMoveVec({
41
46
  type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
42
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
47
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
43
48
  }),
49
+ input.tx.object(typusTokenBalance),
50
+ input.tx.pure(input.raiseFromPremium),
51
+ input.tx.pure(input.raiseFromInactive),
44
52
  input.tx.pure(constants_1.CLOCK),
45
53
  ],
46
54
  });
47
- input.tx.moveCall({
48
- target: "0x1::vector::destroy_empty",
49
- typeArguments: ["0x2::coin::Coin<" + input.typeArguments[0] + ">"],
50
- arguments: [input.tx.object(result[0])],
51
- });
52
- input.tx.transferObjects([input.tx.object(result[1])], input.user);
55
+ input.tx.transferObjects([input.tx.object(result[0])], input.user);
53
56
  return input.tx;
54
57
  }
55
- exports.getDepositTx = getDepositTx;
56
- function getWithdrawTx(input) {
58
+ exports.getRaiseFundTx = getRaiseFundTx;
59
+ function getReduceFundTx(input) {
57
60
  var result = input.tx.moveCall({
58
- target: "".concat(input.typusDovSinglePackageId, "::tails_staking::withdraw"),
61
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_reduce_fund"),
59
62
  typeArguments: input.typeArguments,
60
63
  arguments: [
64
+ input.tx.object(input.typusEcosystemVersion),
65
+ input.tx.object(input.typusUserRegistry),
66
+ input.tx.object(input.typusLeaderboardRegistry),
61
67
  input.tx.object(input.typusDovSingleRegistry),
62
68
  input.tx.pure(input.index),
63
69
  input.tx.makeMoveVec({
64
70
  type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
65
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
71
+ objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
66
72
  }),
67
- input.tx.pure(input.amount ? [input.amount] : []),
73
+ input.tx.pure(input.reduceFromWarmup),
74
+ input.tx.pure(input.reduceFromActive),
75
+ input.tx.pure(input.reduceFromPremium),
76
+ input.tx.pure(input.reduceFromInactive),
77
+ input.tx.pure(input.reduceFromIncentive),
68
78
  input.tx.pure(constants_1.CLOCK),
69
79
  ],
70
80
  });
71
- var mfud_coin = input.tx.moveCall({
72
- target: "0x2::coin::from_balance",
73
- typeArguments: [input.typeArguments[0]],
74
- arguments: [input.tx.object(result[0])],
75
- });
76
- var fud_coin = input.tx.moveCall({
77
- target: "".concat(input.mfudPackageId, "::mfud::burn"),
78
- arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
79
- });
80
- input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
81
81
  input.tx.moveCall({
82
82
  target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
83
- arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
83
+ arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
84
84
  });
85
- return input.tx;
86
- }
87
- exports.getWithdrawTx = getWithdrawTx;
88
- function getUnsubscribeTx(input) {
89
- var result = input.tx.moveCall({
90
- target: "".concat(input.typusDovSinglePackageId, "::tails_staking::unsubscribe"),
91
- typeArguments: input.typeArguments,
92
- arguments: [
93
- input.tx.object(input.typusDovSingleRegistry),
94
- input.tx.pure(input.index),
95
- input.tx.makeMoveVec({
96
- type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
97
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
98
- }),
99
- input.tx.pure(input.amount ? [input.amount] : []),
100
- input.tx.pure(constants_1.CLOCK),
101
- ],
102
- });
103
- input.tx.transferObjects([input.tx.object(result[0])], input.user);
104
- return input.tx;
105
- }
106
- exports.getUnsubscribeTx = getUnsubscribeTx;
107
- function getCompoundTx(input) {
108
- var result = input.tx.moveCall({
109
- target: "".concat(input.typusDovSinglePackageId, "::tails_staking::compound"),
110
- typeArguments: input.typeArguments,
111
- arguments: [
112
- input.tx.object(input.typusDovSingleRegistry),
113
- input.tx.pure(input.index),
114
- input.tx.makeMoveVec({
115
- type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
116
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
117
- }),
118
- input.tx.object(constants_1.CLOCK),
119
- ],
120
- });
121
- if (input.incentiveToken) {
122
- input.typeArguments.push(input.incentiveToken);
123
- if (input.incentiveToken == "".concat(input.mfudPackageId, "::mfud::MFUD")) {
124
- var receipt = input.tx.moveCall({
125
- target: "0x1::option::destroy_some",
126
- typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
127
- arguments: [input.tx.object(result[1])],
128
- });
129
- input.tx = getRedeemTx({
130
- tx: input.tx,
131
- typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
132
- typusFrameworkPackageId: input.typusFrameworkPackageId,
133
- typusDovSinglePackageId: input.typusDovSinglePackageId,
134
- typusDovSingleRegistry: input.typusDovSingleRegistry,
135
- mfudPackageId: input.mfudPackageId,
136
- mfudRegistry: input.mfudRegistry,
137
- typeArguments: input.typeArguments,
138
- index: input.index,
139
- receipts: [input.tx.object(receipt)],
140
- user: input.user,
141
- });
142
- }
143
- else {
144
- var receipt = input.tx.moveCall({
145
- target: "0x1::option::destroy_some",
146
- typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
147
- arguments: [input.tx.object(result[1])],
148
- });
149
- input.tx = (0, user_entry_1.getRedeemTx)({
150
- tx: input.tx,
151
- typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
152
- typusFrameworkPackageId: input.typusFrameworkPackageId,
153
- typusDovSinglePackageId: input.typusDovSinglePackageId,
154
- typusDovSingleRegistry: input.typusDovSingleRegistry,
155
- typeArguments: input.typeArguments,
156
- index: input.index,
157
- receipts: [input.tx.object(receipt)],
158
- user: input.user,
159
- });
160
- }
85
+ if (input.typeArguments[0] == input.typusTokenType) {
86
+ var typusToken = input.tx.moveCall({
87
+ target: "0x2::coin::from_balance",
88
+ typeArguments: [input.typeArguments[0]],
89
+ arguments: [input.tx.object(result[1])],
90
+ });
91
+ var token = input.tx.moveCall({
92
+ target: "".concat(input.typusTokenPackageId, "::").concat(input.typusTokenType.split("::")[1], "::burn"),
93
+ arguments: [input.tx.object(input.typusTokenRegistry), input.tx.object(typusToken)],
94
+ });
95
+ input.tx.transferObjects([input.tx.object(token)], input.user);
161
96
  }
162
97
  else {
163
- input.tx.transferObjects([input.tx.object(result[0])], input.user);
98
+ input.tx.moveCall({
99
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
100
+ typeArguments: [input.typeArguments[0]],
101
+ arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
102
+ });
164
103
  }
165
- return input.tx;
166
- }
167
- exports.getCompoundTx = getCompoundTx;
168
- function getClaimTx(input) {
169
- var result = input.tx.moveCall({
170
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::claim"),
171
- typeArguments: input.typeArguments,
172
- arguments: [
173
- input.tx.object(input.typusDovSingleRegistry),
174
- input.tx.pure(input.index),
175
- input.tx.makeMoveVec({
176
- type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
177
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
178
- }),
179
- ],
180
- });
181
- var mfud_coin = input.tx.moveCall({
182
- target: "0x2::coin::from_balance",
183
- typeArguments: [input.typeArguments[0]],
184
- arguments: [input.tx.object(result[0])],
185
- });
186
- var fud_coin = input.tx.moveCall({
187
- target: "".concat(input.mfudPackageId, "::mfud::burn"),
188
- arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
189
- });
190
- input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
191
- input.tx.moveCall({
192
- target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
193
- arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
194
- });
195
- return input.tx;
196
- }
197
- exports.getClaimTx = getClaimTx;
198
- function getHarvestTx(input) {
199
- var result = input.tx.moveCall({
200
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::harvest"),
201
- typeArguments: input.typeArguments,
202
- arguments: [
203
- input.tx.object(input.typusDovSingleRegistry),
204
- input.tx.pure(input.index),
205
- input.tx.makeMoveVec({
206
- type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
207
- objects: input.receipts.map(function (id) { return input.tx.object(id); }),
208
- }),
209
- ],
210
- });
211
- var mfud_coin = input.tx.moveCall({
212
- target: "0x2::coin::from_balance",
213
- typeArguments: [input.typeArguments[1]],
214
- arguments: [input.tx.object(result[0])],
215
- });
216
- var fud_coin = input.tx.moveCall({
217
- target: "".concat(input.mfudPackageId, "::mfud::burn"),
218
- arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
219
- });
220
- input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
221
- if (input.incentiveToken) {
222
- input.typeArguments.push(input.incentiveToken);
223
- if (input.incentiveToken == "".concat(input.mfudPackageId, "::mfud::MFUD")) {
224
- var receipt = input.tx.moveCall({
225
- target: "0x1::option::destroy_some",
226
- typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
227
- arguments: [input.tx.object(result[1])],
228
- });
229
- input.tx = getRedeemTx({
230
- tx: input.tx,
231
- typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
232
- typusFrameworkPackageId: input.typusFrameworkPackageId,
233
- typusDovSinglePackageId: input.typusDovSinglePackageId,
234
- typusDovSingleRegistry: input.typusDovSingleRegistry,
235
- mfudPackageId: input.mfudPackageId,
236
- mfudRegistry: input.mfudRegistry,
237
- typeArguments: input.typeArguments,
238
- index: input.index,
239
- receipts: [input.tx.object(receipt)],
240
- user: input.user,
241
- });
242
- }
243
- else {
244
- var receipt = input.tx.moveCall({
245
- target: "0x1::option::destroy_some",
246
- typeArguments: ["".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt")],
247
- arguments: [input.tx.object(result[1])],
248
- });
249
- input.tx = (0, user_entry_1.getRedeemTx)({
250
- tx: input.tx,
251
- typusFrameworkOriginPackageId: input.typusFrameworkOriginPackageId,
252
- typusFrameworkPackageId: input.typusFrameworkPackageId,
253
- typusDovSinglePackageId: input.typusDovSinglePackageId,
254
- typusDovSingleRegistry: input.typusDovSingleRegistry,
255
- typeArguments: input.typeArguments,
256
- index: input.index,
257
- receipts: [input.tx.object(receipt)],
258
- user: input.user,
259
- });
260
- }
104
+ if (input.typeArguments[1] == input.typusTokenType) {
105
+ var typusToken = input.tx.moveCall({
106
+ target: "0x2::coin::from_balance",
107
+ typeArguments: [input.typeArguments[1]],
108
+ arguments: [input.tx.object(result[2])],
109
+ });
110
+ var token = input.tx.moveCall({
111
+ target: "".concat(input.typusTokenPackageId, "::").concat(input.typusTokenType.split("::")[1], "::burn"),
112
+ arguments: [input.tx.object(input.typusTokenRegistry), input.tx.object(typusToken)],
113
+ });
114
+ input.tx.transferObjects([input.tx.object(token)], input.user);
261
115
  }
262
116
  else {
263
117
  input.tx.moveCall({
264
- target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
265
- arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
118
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
119
+ typeArguments: [input.typeArguments[1]],
120
+ arguments: [input.tx.object(result[2]), input.tx.pure(input.user)],
121
+ });
122
+ }
123
+ if (input.typeArguments[2] == input.typusTokenType) {
124
+ var typusToken = input.tx.moveCall({
125
+ target: "0x2::coin::from_balance",
126
+ typeArguments: [input.typeArguments[2]],
127
+ arguments: [input.tx.object(result[3])],
128
+ });
129
+ var token = input.tx.moveCall({
130
+ target: "".concat(input.typusTokenPackageId, "::").concat(input.typusTokenType.split("::")[1], "::burn"),
131
+ arguments: [input.tx.object(input.typusTokenRegistry), input.tx.object(typusToken)],
132
+ });
133
+ input.tx.transferObjects([input.tx.object(token)], input.user);
134
+ }
135
+ else {
136
+ input.tx.moveCall({
137
+ target: "".concat(input.typusFrameworkPackageId, "::utils::transfer_balance"),
138
+ typeArguments: [input.typeArguments[2]],
139
+ arguments: [input.tx.object(result[3]), input.tx.pure(input.user)],
266
140
  });
267
141
  }
268
142
  return input.tx;
269
143
  }
270
- exports.getHarvestTx = getHarvestTx;
271
- function getRedeemTx(input) {
144
+ exports.getReduceFundTx = getReduceFundTx;
145
+ function getDepositTx(input) {
146
+ var mfud = input.tx.moveCall({
147
+ target: "".concat(input.mfudPackageId, "::mfud::mint"),
148
+ arguments: [
149
+ input.tx.object(input.mfudRegistry),
150
+ input.tx.makeMoveVec({ objects: input.coins.map(function (id) { return input.tx.object(id); }) }),
151
+ input.tx.pure(input.mfudAmount),
152
+ ],
153
+ });
272
154
  var result = input.tx.moveCall({
273
- target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::redeem"),
155
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_deposit"),
274
156
  typeArguments: input.typeArguments,
275
157
  arguments: [
158
+ input.tx.object(input.typusEcosystemVersion),
159
+ input.tx.object(input.typusUserRegistry),
160
+ input.tx.object(input.typusLeaderboardRegistry),
276
161
  input.tx.object(input.typusDovSingleRegistry),
277
162
  input.tx.pure(input.index),
163
+ input.tx.makeMoveVec({ objects: [mfud] }),
164
+ input.tx.pure(input.mfudAmount),
278
165
  input.tx.makeMoveVec({
279
166
  type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
280
167
  objects: input.receipts.map(function (id) { return input.tx.object(id); }),
281
168
  }),
169
+ input.tx.pure(constants_1.CLOCK),
282
170
  ],
283
171
  });
284
- var mfud_coin = input.tx.moveCall({
285
- target: "0x2::coin::from_balance",
286
- typeArguments: [input.typeArguments[2]],
287
- arguments: [input.tx.object(result[0])],
288
- });
289
- var fud_coin = input.tx.moveCall({
290
- target: "".concat(input.mfudPackageId, "::mfud::burn"),
291
- arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
292
- });
293
- input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
294
172
  input.tx.moveCall({
295
- target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
296
- arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
173
+ target: "0x1::vector::destroy_empty",
174
+ typeArguments: ["0x2::coin::Coin<" + input.typeArguments[0] + ">"],
175
+ arguments: [input.tx.object(result[0])],
297
176
  });
177
+ input.tx.transferObjects([input.tx.object(result[1])], input.user);
298
178
  return input.tx;
299
179
  }
300
- exports.getRedeemTx = getRedeemTx;
180
+ exports.getDepositTx = getDepositTx;
301
181
  function getNewBidTx(input) {
302
182
  var mfud = input.tx.moveCall({
303
183
  target: "".concat(input.mfudPackageId, "::mfud::mint"),
@@ -308,7 +188,7 @@ function getNewBidTx(input) {
308
188
  ],
309
189
  });
310
190
  var result = input.tx.moveCall({
311
- target: "".concat(input.typusDovSinglePackageId, "::tails_staking::bid"),
191
+ target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_bid"),
312
192
  typeArguments: input.typeArguments,
313
193
  arguments: [
314
194
  input.tx.object(input.typusEcosystemVersion),
@@ -1,41 +1,24 @@
1
1
  import { TransactionBlock, TransactionObjectArgument } from "@mysten/sui.js/transactions";
2
2
  /**
3
- public fun deposit<D_TOKEN, B_TOKEN>(
3
+ public fun public_raise_fund<D_TOKEN, B_TOKEN>(
4
+ typus_ecosystem_version: &TypusEcosystemVersion,
5
+ typus_user_registry: &mut TypusUserRegistry,
6
+ typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
4
7
  registry: &mut Registry,
5
8
  index: u64,
6
- coins: vector<Coin<D_TOKEN>>,
7
- amount: u64,
8
9
  receipts: vector<TypusDepositReceipt>,
10
+ raise_balance: Balance<D_TOKEN>,
11
+ raise_from_premium: bool,
12
+ raise_from_inactive: bool,
9
13
  clock: &Clock,
10
14
  ctx: &mut TxContext,
11
- )
12
- */
13
- export declare function getDepositTx(input: {
14
- tx: TransactionBlock;
15
- typusFrameworkOriginPackageId: string;
16
- typusFrameworkPackageId: string;
17
- typusDovSinglePackageId: string;
18
- typusDovSingleRegistry: string;
19
- typeArguments: string[];
20
- index: string;
21
- coins: string[];
22
- amount: string;
23
- receipts: string[] | TransactionObjectArgument[];
24
- user: string;
25
- usingSponsoredGasCoin?: boolean;
26
- }): TransactionBlock;
27
- /**
28
- public fun withdraw<D_TOKEN, B_TOKEN>(
29
- registry: &mut Registry,
30
- index: u64,
31
- receipts: vector<TypusDepositReceipt>,
32
- share: Option<u64>,
33
- clock: &Clock,
34
- ctx: &mut TxContext,
35
- )
36
- */
37
- export declare function getWithdrawTx(input: {
15
+ ): (TypusDepositReceipt, vector<u64>) {
16
+ */
17
+ export declare function getRaiseFundTx(input: {
38
18
  tx: TransactionBlock;
19
+ typusEcosystemVersion: string;
20
+ typusUserRegistry: string;
21
+ typusLeaderboardRegistry: string;
39
22
  typusFrameworkOriginPackageId: string;
40
23
  typusFrameworkPackageId: string;
41
24
  typusDovSinglePackageId: string;
@@ -43,111 +26,34 @@ export declare function getWithdrawTx(input: {
43
26
  typeArguments: string[];
44
27
  index: string;
45
28
  receipts: string[] | TransactionObjectArgument[];
29
+ raiseCoins: string[];
30
+ raiseAmount: string;
31
+ raiseFromPremium: boolean;
32
+ raiseFromInactive: boolean;
46
33
  user: string;
47
- share?: string;
48
- }): TransactionBlock;
49
- /**
50
- public fun unsubscribe<D_TOKEN, B_TOKEN>(
51
- registry: &mut Registry,
52
- index: u64,
53
- receipts: vector<TypusDepositReceipt>,
54
- share: Option<u64>,
55
- clock: &Clock,
56
- ctx: &mut TxContext,
57
- )
58
- */
59
- export declare function getUnsubscribeTx(input: {
60
- tx: TransactionBlock;
61
- typusFrameworkOriginPackageId: string;
62
- typusDovSinglePackageId: string;
63
- typusDovSingleRegistry: string;
64
- typeArguments: string[];
65
- index: string;
66
- receipts: string[] | TransactionObjectArgument[];
67
- user: string;
68
- share?: string;
69
34
  }): TransactionBlock;
70
35
  /**
71
- public fun compound<D_TOKEN, B_TOKEN>(
36
+ public fun public_reduce_fund<D_TOKEN, B_TOKEN, I_TOKEN>(
37
+ typus_ecosystem_version: &TypusEcosystemVersion,
38
+ typus_user_registry: &mut TypusUserRegistry,
39
+ typus_leaderboard_registry: &mut TypusLeaderboardRegistry,
72
40
  registry: &mut Registry,
73
41
  index: u64,
74
42
  receipts: vector<TypusDepositReceipt>,
43
+ reduce_from_warmup: u64,
44
+ reduce_from_active: u64,
45
+ reduce_from_premium: bool,
46
+ reduce_from_inactive: bool,
47
+ reduce_from_incentive: bool,
75
48
  clock: &Clock,
76
49
  ctx: &mut TxContext,
77
- )
78
- */
79
- export declare function getCompoundTx(input: {
80
- tx: TransactionBlock;
81
- typusFrameworkOriginPackageId: string;
82
- typusFrameworkPackageId: string;
83
- typusDovSinglePackageId: string;
84
- typusDovSingleRegistry: string;
85
- typeArguments: string[];
86
- index: string;
87
- receipts: string[] | TransactionObjectArgument[];
88
- user: string;
89
- incentiveToken?: string;
90
- }): TransactionBlock;
91
- /**
92
- public fun claim<D_TOKEN, B_TOKEN>(
93
- registry: &mut Registry,
94
- index: u64,
95
- receipts: vector<TypusDepositReceipt>,
96
- ctx: &mut TxContext,
97
- )
98
- */
99
- export declare function getClaimTx(input: {
100
- tx: TransactionBlock;
101
- typusFrameworkOriginPackageId: string;
102
- typusFrameworkPackageId: string;
103
- typusDovSinglePackageId: string;
104
- typusDovSingleRegistry: string;
105
- typeArguments: string[];
106
- index: string;
107
- receipts: string[] | TransactionObjectArgument[];
108
- user: string;
109
- }): TransactionBlock;
110
- /**
111
- public fun harvest<D_TOKEN, B_TOKEN>(
112
- registry: &mut Registry,
113
- index: u64,
114
- receipts: vector<TypusDepositReceipt>,
115
- ctx: &mut TxContext,
116
- )
117
- */
118
- export declare function getHarvestTx(input: {
119
- tx: TransactionBlock;
120
- typusFrameworkOriginPackageId: string;
121
- typusFrameworkPackageId: string;
122
- typusDovSinglePackageId: string;
123
- typusDovSingleRegistry: string;
124
- typeArguments: string[];
125
- index: string;
126
- receipts: string[] | TransactionObjectArgument[];
127
- user: string;
128
- incentiveToken?: string;
129
- }): TransactionBlock;
130
- /**
131
- public fun redeem<D_TOKEN, B_TOKEN, I_TOKEN>(
132
- registry: &mut Registry,
133
- index: u64,
134
- receipts: vector<TypusDepositReceipt>,
135
- ctx: &mut TxContext,
136
- )
137
- */
138
- export declare function getRedeemTx(input: {
139
- tx: TransactionBlock;
140
- typusFrameworkOriginPackageId: string;
141
- typusFrameworkPackageId: string;
142
- typusDovSinglePackageId: string;
143
- typusDovSingleRegistry: string;
144
- typeArguments: string[];
145
- index: string;
146
- receipts: string[] | TransactionObjectArgument[];
147
- user: string;
148
- }): TransactionBlock;
149
- export declare function getWithdrawHarvestClaimTx(input: {
50
+ ): (Option<TypusDepositReceipt>, Balance<D_TOKEN>, Balance<B_TOKEN>, Balance<I_TOKEN>, vector<u64>) {
51
+ */
52
+ export declare function getReduceFundTx(input: {
150
53
  tx: TransactionBlock;
54
+ typusEcosystemVersion: string;
55
+ typusUserRegistry: string;
56
+ typusLeaderboardRegistry: string;
151
57
  typusFrameworkOriginPackageId: string;
152
58
  typusFrameworkPackageId: string;
153
59
  typusDovSinglePackageId: string;
@@ -155,11 +61,12 @@ export declare function getWithdrawHarvestClaimTx(input: {
155
61
  typeArguments: string[];
156
62
  index: string;
157
63
  receipts: string[] | TransactionObjectArgument[];
64
+ reduceFromWarmup: string;
65
+ reduceFromActive: string;
66
+ reduceFromPremium: boolean;
67
+ reduceFromInactive: boolean;
68
+ reduceFromIncentive: boolean;
158
69
  user: string;
159
- withdraw: boolean;
160
- harvest: boolean;
161
- claim: boolean;
162
- incentiveToken?: string;
163
70
  }): TransactionBlock;
164
71
  /**
165
72
  public(friend) entry fun new_bid<D_TOKEN, B_TOKEN>(