@typus/typus-sdk 1.1.57 → 1.2.0
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/utils/auto-bid/user-entry.d.ts +27 -0
- package/lib/utils/auto-bid/user-entry.js +102 -0
- package/lib/utils/auto-bid/view-function.d.ts +33 -0
- package/lib/utils/auto-bid/view-function.js +215 -0
- package/lib/utils/nft-staking/authorized-entry.d.ts +2 -2
- package/lib/utils/nft-staking/authorized-entry.js +29 -9
- package/lib/utils/nft-staking/user-entry.d.ts +3 -3
- package/lib/utils/nft-staking/user-entry.js +6 -6
- package/lib/utils/tails-exp-dice/fetch.d.ts +1 -0
- package/lib/utils/tails-exp-dice/fetch.js +9 -6
- package/lib/utils/token.js +4 -0
- package/lib/utils/typus-dov-single-v2/authorized-entry.d.ts +1 -0
- package/lib/utils/typus-dov-single-v2/authorized-entry.js +1 -0
- package/lib/utils/typus-dov-single-v2/mfud-user-entry.d.ts +125 -0
- package/lib/utils/typus-dov-single-v2/mfud-user-entry.js +270 -0
- package/lib/utils/typus-dov-single-v2/user-entry.d.ts +133 -30
- package/lib/utils/typus-dov-single-v2/user-entry.js +333 -253
- package/package.json +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { TransactionBlock, TransactionObjectArgument } from "@mysten/sui.js/transactions";
|
|
2
|
+
export declare function getDepositTx(input: {
|
|
3
|
+
tx: TransactionBlock;
|
|
4
|
+
typusFrameworkOriginPackageId: string;
|
|
5
|
+
typusDovSinglePackageId: string;
|
|
6
|
+
typusDovSingleRegistry: string;
|
|
7
|
+
mfudPackageId: string;
|
|
8
|
+
mfudRegistry: string;
|
|
9
|
+
mfudAmount: string;
|
|
10
|
+
typeArguments: string[];
|
|
11
|
+
index: string;
|
|
12
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
13
|
+
user: string;
|
|
14
|
+
coins: string[];
|
|
15
|
+
}): TransactionBlock;
|
|
16
|
+
export declare function getWithdrawTx(input: {
|
|
17
|
+
tx: TransactionBlock;
|
|
18
|
+
typusFrameworkOriginPackageId: string;
|
|
19
|
+
typusFrameworkPackageId: string;
|
|
20
|
+
typusDovSinglePackageId: string;
|
|
21
|
+
typusDovSingleRegistry: string;
|
|
22
|
+
mfudPackageId: string;
|
|
23
|
+
mfudRegistry: string;
|
|
24
|
+
typeArguments: string[];
|
|
25
|
+
index: string;
|
|
26
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
27
|
+
user: string;
|
|
28
|
+
amount?: string;
|
|
29
|
+
}): TransactionBlock;
|
|
30
|
+
export declare function getUnsubscribeTx(input: {
|
|
31
|
+
tx: TransactionBlock;
|
|
32
|
+
typusFrameworkOriginPackageId: string;
|
|
33
|
+
typusDovSinglePackageId: string;
|
|
34
|
+
typusDovSingleRegistry: string;
|
|
35
|
+
typeArguments: string[];
|
|
36
|
+
index: string;
|
|
37
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
38
|
+
user: string;
|
|
39
|
+
amount?: string;
|
|
40
|
+
}): TransactionBlock;
|
|
41
|
+
export declare function getCompoundTx(input: {
|
|
42
|
+
tx: TransactionBlock;
|
|
43
|
+
typusFrameworkOriginPackageId: string;
|
|
44
|
+
typusDovSinglePackageId: string;
|
|
45
|
+
typusDovSingleRegistry: string;
|
|
46
|
+
typeArguments: string[];
|
|
47
|
+
index: string;
|
|
48
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
49
|
+
user: string;
|
|
50
|
+
}): TransactionBlock;
|
|
51
|
+
export declare function getClaimTx(input: {
|
|
52
|
+
tx: TransactionBlock;
|
|
53
|
+
typusFrameworkOriginPackageId: string;
|
|
54
|
+
typusFrameworkPackageId: string;
|
|
55
|
+
typusDovSinglePackageId: string;
|
|
56
|
+
typusDovSingleRegistry: string;
|
|
57
|
+
mfudPackageId: string;
|
|
58
|
+
mfudRegistry: string;
|
|
59
|
+
typeArguments: string[];
|
|
60
|
+
index: string;
|
|
61
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
62
|
+
user: string;
|
|
63
|
+
}): TransactionBlock;
|
|
64
|
+
export declare function getHarvestTx(input: {
|
|
65
|
+
tx: TransactionBlock;
|
|
66
|
+
typusFrameworkOriginPackageId: string;
|
|
67
|
+
typusFrameworkPackageId: string;
|
|
68
|
+
typusDovSinglePackageId: string;
|
|
69
|
+
typusDovSingleRegistry: string;
|
|
70
|
+
mfudPackageId: string;
|
|
71
|
+
mfudRegistry: string;
|
|
72
|
+
typeArguments: string[];
|
|
73
|
+
index: string;
|
|
74
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
75
|
+
user: string;
|
|
76
|
+
}): TransactionBlock;
|
|
77
|
+
export declare function getRedeemTx(input: {
|
|
78
|
+
tx: TransactionBlock;
|
|
79
|
+
typusFrameworkOriginPackageId: string;
|
|
80
|
+
typusFrameworkPackageId: string;
|
|
81
|
+
typusDovSinglePackageId: string;
|
|
82
|
+
typusDovSingleRegistry: string;
|
|
83
|
+
mfudPackageId: string;
|
|
84
|
+
mfudRegistry: string;
|
|
85
|
+
typeArguments: string[];
|
|
86
|
+
index: string;
|
|
87
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
88
|
+
user: string;
|
|
89
|
+
}): TransactionBlock;
|
|
90
|
+
export declare function getNewBidTx(input: {
|
|
91
|
+
tx: TransactionBlock;
|
|
92
|
+
typusDovSinglePackageId: string;
|
|
93
|
+
typusDovSingleRegistry: string;
|
|
94
|
+
mfudPackageId: string;
|
|
95
|
+
mfudRegistry: string;
|
|
96
|
+
typeArguments: string[];
|
|
97
|
+
index: string;
|
|
98
|
+
coins: string[];
|
|
99
|
+
size: string;
|
|
100
|
+
premium_required: string;
|
|
101
|
+
user: string;
|
|
102
|
+
}): TransactionBlock;
|
|
103
|
+
export declare function getExerciseTx(input: {
|
|
104
|
+
tx: TransactionBlock;
|
|
105
|
+
typusFrameworkOriginPackageId: string;
|
|
106
|
+
typusFrameworkPackageId: string;
|
|
107
|
+
typusDovSinglePackageId: string;
|
|
108
|
+
typusDovSingleRegistry: string;
|
|
109
|
+
mfudPackageId: string;
|
|
110
|
+
mfudRegistry: string;
|
|
111
|
+
typeArguments: string[];
|
|
112
|
+
index: string;
|
|
113
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
114
|
+
user: string;
|
|
115
|
+
}): TransactionBlock;
|
|
116
|
+
export declare function getRebateTx(input: {
|
|
117
|
+
tx: TransactionBlock;
|
|
118
|
+
typusFrameworkPackageId: string;
|
|
119
|
+
typusDovSinglePackageId: string;
|
|
120
|
+
typusDovSingleRegistry: string;
|
|
121
|
+
mfudPackageId: string;
|
|
122
|
+
mfudRegistry: string;
|
|
123
|
+
typeArgument: string;
|
|
124
|
+
user: string;
|
|
125
|
+
}): TransactionBlock;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRebateTx = exports.getExerciseTx = exports.getNewBidTx = exports.getRedeemTx = exports.getHarvestTx = exports.getClaimTx = exports.getCompoundTx = exports.getUnsubscribeTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
|
|
4
|
+
var constants_1 = require("../../constants");
|
|
5
|
+
function getDepositTx(input) {
|
|
6
|
+
var mfud = input.tx.moveCall({
|
|
7
|
+
target: "".concat(input.mfudPackageId, "::mfud::mint"),
|
|
8
|
+
arguments: [
|
|
9
|
+
input.tx.object(input.mfudRegistry),
|
|
10
|
+
input.tx.makeMoveVec({ objects: input.coins.map(function (id) { return input.tx.object(id); }) }),
|
|
11
|
+
input.tx.pure(input.mfudAmount),
|
|
12
|
+
],
|
|
13
|
+
});
|
|
14
|
+
var result = input.tx.moveCall({
|
|
15
|
+
target: "".concat(input.typusDovSinglePackageId, "::tails_staking::deposit"),
|
|
16
|
+
typeArguments: input.typeArguments,
|
|
17
|
+
arguments: [
|
|
18
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
19
|
+
input.tx.pure(input.index),
|
|
20
|
+
input.tx.makeMoveVec({ objects: [mfud] }),
|
|
21
|
+
input.tx.pure(input.mfudAmount),
|
|
22
|
+
input.tx.makeMoveVec({
|
|
23
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
24
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
25
|
+
}),
|
|
26
|
+
input.tx.pure(constants_1.CLOCK),
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
input.tx.moveCall({
|
|
30
|
+
target: "0x1::vector::destroy_empty",
|
|
31
|
+
typeArguments: ["0x2::coin::Coin<" + input.typeArguments[0] + ">"],
|
|
32
|
+
arguments: [input.tx.object(result[0])],
|
|
33
|
+
});
|
|
34
|
+
input.tx.transferObjects([input.tx.object(result[1])], input.user);
|
|
35
|
+
return input.tx;
|
|
36
|
+
}
|
|
37
|
+
exports.getDepositTx = getDepositTx;
|
|
38
|
+
function getWithdrawTx(input) {
|
|
39
|
+
var result = input.tx.moveCall({
|
|
40
|
+
target: "".concat(input.typusDovSinglePackageId, "::tails_staking::withdraw"),
|
|
41
|
+
typeArguments: input.typeArguments,
|
|
42
|
+
arguments: [
|
|
43
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
44
|
+
input.tx.pure(input.index),
|
|
45
|
+
input.tx.makeMoveVec({
|
|
46
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
47
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
48
|
+
}),
|
|
49
|
+
input.tx.pure(input.amount ? [input.amount] : []),
|
|
50
|
+
input.tx.pure(constants_1.CLOCK),
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
var mfud_coin = input.tx.moveCall({
|
|
54
|
+
target: "0x2::coin::from_balance",
|
|
55
|
+
typeArguments: [input.typeArguments[0]],
|
|
56
|
+
arguments: [input.tx.object(result[0])],
|
|
57
|
+
});
|
|
58
|
+
var fud_coin = input.tx.moveCall({
|
|
59
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
60
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
61
|
+
});
|
|
62
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
63
|
+
input.tx.moveCall({
|
|
64
|
+
target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
|
|
65
|
+
arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
|
|
66
|
+
});
|
|
67
|
+
return input.tx;
|
|
68
|
+
}
|
|
69
|
+
exports.getWithdrawTx = getWithdrawTx;
|
|
70
|
+
function getUnsubscribeTx(input) {
|
|
71
|
+
var result = input.tx.moveCall({
|
|
72
|
+
target: "".concat(input.typusDovSinglePackageId, "::tails_staking::unsubscribe"),
|
|
73
|
+
typeArguments: input.typeArguments,
|
|
74
|
+
arguments: [
|
|
75
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
76
|
+
input.tx.pure(input.index),
|
|
77
|
+
input.tx.makeMoveVec({
|
|
78
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
79
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
80
|
+
}),
|
|
81
|
+
input.tx.pure(input.amount ? [input.amount] : []),
|
|
82
|
+
input.tx.pure(constants_1.CLOCK),
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
86
|
+
return input.tx;
|
|
87
|
+
}
|
|
88
|
+
exports.getUnsubscribeTx = getUnsubscribeTx;
|
|
89
|
+
function getCompoundTx(input) {
|
|
90
|
+
var result = input.tx.moveCall({
|
|
91
|
+
target: "".concat(input.typusDovSinglePackageId, "::tails_staking::compound"),
|
|
92
|
+
typeArguments: input.typeArguments,
|
|
93
|
+
arguments: [
|
|
94
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
95
|
+
input.tx.pure(input.index),
|
|
96
|
+
input.tx.makeMoveVec({
|
|
97
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
98
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
99
|
+
}),
|
|
100
|
+
input.tx.object(constants_1.CLOCK),
|
|
101
|
+
],
|
|
102
|
+
});
|
|
103
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
104
|
+
return input.tx;
|
|
105
|
+
}
|
|
106
|
+
exports.getCompoundTx = getCompoundTx;
|
|
107
|
+
function getClaimTx(input) {
|
|
108
|
+
var result = input.tx.moveCall({
|
|
109
|
+
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::claim"),
|
|
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
|
+
],
|
|
119
|
+
});
|
|
120
|
+
var mfud_coin = input.tx.moveCall({
|
|
121
|
+
target: "0x2::coin::from_balance",
|
|
122
|
+
typeArguments: [input.typeArguments[0]],
|
|
123
|
+
arguments: [input.tx.object(result[0])],
|
|
124
|
+
});
|
|
125
|
+
var fud_coin = input.tx.moveCall({
|
|
126
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
127
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
128
|
+
});
|
|
129
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
130
|
+
input.tx.moveCall({
|
|
131
|
+
target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
|
|
132
|
+
arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
|
|
133
|
+
});
|
|
134
|
+
return input.tx;
|
|
135
|
+
}
|
|
136
|
+
exports.getClaimTx = getClaimTx;
|
|
137
|
+
function getHarvestTx(input) {
|
|
138
|
+
var result = input.tx.moveCall({
|
|
139
|
+
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::harvest"),
|
|
140
|
+
typeArguments: input.typeArguments,
|
|
141
|
+
arguments: [
|
|
142
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
143
|
+
input.tx.pure(input.index),
|
|
144
|
+
input.tx.makeMoveVec({
|
|
145
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
146
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
147
|
+
}),
|
|
148
|
+
],
|
|
149
|
+
});
|
|
150
|
+
var mfud_coin = input.tx.moveCall({
|
|
151
|
+
target: "0x2::coin::from_balance",
|
|
152
|
+
typeArguments: [input.typeArguments[1]],
|
|
153
|
+
arguments: [input.tx.object(result[0])],
|
|
154
|
+
});
|
|
155
|
+
var fud_coin = input.tx.moveCall({
|
|
156
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
157
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
158
|
+
});
|
|
159
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
160
|
+
input.tx.moveCall({
|
|
161
|
+
target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
|
|
162
|
+
arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
|
|
163
|
+
});
|
|
164
|
+
return input.tx;
|
|
165
|
+
}
|
|
166
|
+
exports.getHarvestTx = getHarvestTx;
|
|
167
|
+
function getRedeemTx(input) {
|
|
168
|
+
var result = input.tx.moveCall({
|
|
169
|
+
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::redeem"),
|
|
170
|
+
typeArguments: input.typeArguments,
|
|
171
|
+
arguments: [
|
|
172
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
173
|
+
input.tx.pure(input.index),
|
|
174
|
+
input.tx.makeMoveVec({
|
|
175
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
176
|
+
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
177
|
+
}),
|
|
178
|
+
],
|
|
179
|
+
});
|
|
180
|
+
var mfud_coin = input.tx.moveCall({
|
|
181
|
+
target: "0x2::coin::from_balance",
|
|
182
|
+
typeArguments: [input.typeArguments[2]],
|
|
183
|
+
arguments: [input.tx.object(result[0])],
|
|
184
|
+
});
|
|
185
|
+
var fud_coin = input.tx.moveCall({
|
|
186
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
187
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
188
|
+
});
|
|
189
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
190
|
+
input.tx.moveCall({
|
|
191
|
+
target: "".concat(input.typusFrameworkPackageId, "::vault::transfer_deposit_receipt"),
|
|
192
|
+
arguments: [input.tx.object(result[1]), input.tx.pure(input.user)],
|
|
193
|
+
});
|
|
194
|
+
return input.tx;
|
|
195
|
+
}
|
|
196
|
+
exports.getRedeemTx = getRedeemTx;
|
|
197
|
+
function getNewBidTx(input) {
|
|
198
|
+
var mfud = input.tx.moveCall({
|
|
199
|
+
target: "".concat(input.mfudPackageId, "::mfud::mint"),
|
|
200
|
+
arguments: [
|
|
201
|
+
input.tx.object(input.mfudRegistry),
|
|
202
|
+
input.tx.makeMoveVec({ objects: input.coins.map(function (id) { return input.tx.object(id); }) }),
|
|
203
|
+
input.tx.pure(input.premium_required),
|
|
204
|
+
],
|
|
205
|
+
});
|
|
206
|
+
var result = input.tx.moveCall({
|
|
207
|
+
target: "".concat(input.typusDovSinglePackageId, "::tails_staking::new_bid"),
|
|
208
|
+
typeArguments: input.typeArguments,
|
|
209
|
+
arguments: [
|
|
210
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
211
|
+
input.tx.pure(input.index),
|
|
212
|
+
input.tx.makeMoveVec({ objects: [mfud] }),
|
|
213
|
+
input.tx.pure(input.size),
|
|
214
|
+
input.tx.pure("0x6"),
|
|
215
|
+
],
|
|
216
|
+
});
|
|
217
|
+
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
218
|
+
return input.tx;
|
|
219
|
+
}
|
|
220
|
+
exports.getNewBidTx = getNewBidTx;
|
|
221
|
+
function getExerciseTx(input) {
|
|
222
|
+
var result = input.tx.moveCall({
|
|
223
|
+
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::exercise"),
|
|
224
|
+
typeArguments: input.typeArguments,
|
|
225
|
+
arguments: [
|
|
226
|
+
input.tx.object(input.typusDovSingleRegistry),
|
|
227
|
+
input.tx.pure(input.index),
|
|
228
|
+
input.tx.makeMoveVec({
|
|
229
|
+
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusBidReceipt"),
|
|
230
|
+
objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
|
|
231
|
+
}),
|
|
232
|
+
],
|
|
233
|
+
});
|
|
234
|
+
var mfud_coin = input.tx.moveCall({
|
|
235
|
+
target: "0x2::coin::from_balance",
|
|
236
|
+
typeArguments: [input.typeArguments[0]],
|
|
237
|
+
arguments: [input.tx.object(result[0])],
|
|
238
|
+
});
|
|
239
|
+
var fud_coin = input.tx.moveCall({
|
|
240
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
241
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
242
|
+
});
|
|
243
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
244
|
+
return input.tx;
|
|
245
|
+
}
|
|
246
|
+
exports.getExerciseTx = getExerciseTx;
|
|
247
|
+
function getRebateTx(input) {
|
|
248
|
+
var result = input.tx.moveCall({
|
|
249
|
+
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::rebate"),
|
|
250
|
+
typeArguments: [input.typeArgument],
|
|
251
|
+
arguments: [input.tx.object(input.typusDovSingleRegistry)],
|
|
252
|
+
});
|
|
253
|
+
var balance = input.tx.moveCall({
|
|
254
|
+
target: "0x1::option::destroy_some",
|
|
255
|
+
typeArguments: ["0x2::balance::Balance<" + input.typeArgument + ">"],
|
|
256
|
+
arguments: [input.tx.object(result[0])],
|
|
257
|
+
});
|
|
258
|
+
var mfud_coin = input.tx.moveCall({
|
|
259
|
+
target: "0x2::coin::from_balance",
|
|
260
|
+
typeArguments: [input.typeArgument],
|
|
261
|
+
arguments: [input.tx.object(balance)],
|
|
262
|
+
});
|
|
263
|
+
var fud_coin = input.tx.moveCall({
|
|
264
|
+
target: "".concat(input.mfudPackageId, "::mfud::burn"),
|
|
265
|
+
arguments: [input.tx.object(input.mfudRegistry), input.tx.object(mfud_coin)],
|
|
266
|
+
});
|
|
267
|
+
input.tx.transferObjects([input.tx.object(fud_coin)], input.user);
|
|
268
|
+
return input.tx;
|
|
269
|
+
}
|
|
270
|
+
exports.getRebateTx = getRebateTx;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
1
|
+
import { TransactionBlock, TransactionObjectArgument } from "@mysten/sui.js/transactions";
|
|
2
2
|
/**
|
|
3
3
|
public fun deposit<D_TOKEN, B_TOKEN>(
|
|
4
4
|
registry: &mut Registry,
|
|
@@ -10,7 +10,20 @@ import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
|
10
10
|
ctx: &mut TxContext,
|
|
11
11
|
)
|
|
12
12
|
*/
|
|
13
|
-
export declare function getDepositTx(
|
|
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;
|
|
14
27
|
/**
|
|
15
28
|
public fun withdraw<D_TOKEN, B_TOKEN>(
|
|
16
29
|
registry: &mut Registry,
|
|
@@ -21,7 +34,18 @@ export declare function getDepositTx(tx: TransactionBlock, typusFrameworkOriginP
|
|
|
21
34
|
ctx: &mut TxContext,
|
|
22
35
|
)
|
|
23
36
|
*/
|
|
24
|
-
export declare function getWithdrawTx(
|
|
37
|
+
export declare function getWithdrawTx(input: {
|
|
38
|
+
tx: TransactionBlock;
|
|
39
|
+
typusFrameworkOriginPackageId: string;
|
|
40
|
+
typusFrameworkPackageId: string;
|
|
41
|
+
typusDovSinglePackageId: string;
|
|
42
|
+
typusDovSingleRegistry: string;
|
|
43
|
+
typeArguments: string[];
|
|
44
|
+
index: string;
|
|
45
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
46
|
+
user: string;
|
|
47
|
+
share?: string;
|
|
48
|
+
}): TransactionBlock;
|
|
25
49
|
/**
|
|
26
50
|
public fun unsubscribe<D_TOKEN, B_TOKEN>(
|
|
27
51
|
registry: &mut Registry,
|
|
@@ -32,7 +56,17 @@ export declare function getWithdrawTx(tx: TransactionBlock, typusFrameworkOrigin
|
|
|
32
56
|
ctx: &mut TxContext,
|
|
33
57
|
)
|
|
34
58
|
*/
|
|
35
|
-
export declare function getUnsubscribeTx(
|
|
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
|
+
}): TransactionBlock;
|
|
36
70
|
/**
|
|
37
71
|
public fun compound<D_TOKEN, B_TOKEN>(
|
|
38
72
|
registry: &mut Registry,
|
|
@@ -42,7 +76,18 @@ export declare function getUnsubscribeTx(tx: TransactionBlock, typusFrameworkOri
|
|
|
42
76
|
ctx: &mut TxContext,
|
|
43
77
|
)
|
|
44
78
|
*/
|
|
45
|
-
export declare function getCompoundTx(
|
|
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;
|
|
46
91
|
/**
|
|
47
92
|
public fun claim<D_TOKEN, B_TOKEN>(
|
|
48
93
|
registry: &mut Registry,
|
|
@@ -51,7 +96,17 @@ export declare function getCompoundTx(tx: TransactionBlock, typusFrameworkOrigin
|
|
|
51
96
|
ctx: &mut TxContext,
|
|
52
97
|
)
|
|
53
98
|
*/
|
|
54
|
-
export declare function getClaimTx(
|
|
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;
|
|
55
110
|
/**
|
|
56
111
|
public fun harvest<D_TOKEN, B_TOKEN>(
|
|
57
112
|
registry: &mut Registry,
|
|
@@ -60,7 +115,18 @@ export declare function getClaimTx(tx: TransactionBlock, typusFrameworkOriginPac
|
|
|
60
115
|
ctx: &mut TxContext,
|
|
61
116
|
)
|
|
62
117
|
*/
|
|
63
|
-
export declare function getHarvestTx(
|
|
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;
|
|
64
130
|
/**
|
|
65
131
|
public fun redeem<D_TOKEN, B_TOKEN, I_TOKEN>(
|
|
66
132
|
registry: &mut Registry,
|
|
@@ -69,7 +135,32 @@ export declare function getHarvestTx(tx: TransactionBlock, typusFrameworkOriginP
|
|
|
69
135
|
ctx: &mut TxContext,
|
|
70
136
|
)
|
|
71
137
|
*/
|
|
72
|
-
export declare function getRedeemTx(
|
|
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: {
|
|
150
|
+
tx: TransactionBlock;
|
|
151
|
+
typusFrameworkOriginPackageId: string;
|
|
152
|
+
typusFrameworkPackageId: string;
|
|
153
|
+
typusDovSinglePackageId: string;
|
|
154
|
+
typusDovSingleRegistry: string;
|
|
155
|
+
typeArguments: string[];
|
|
156
|
+
index: string;
|
|
157
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
158
|
+
user: string;
|
|
159
|
+
withdraw: boolean;
|
|
160
|
+
harvest: boolean;
|
|
161
|
+
claim: boolean;
|
|
162
|
+
incentiveToken?: string;
|
|
163
|
+
}): TransactionBlock;
|
|
73
164
|
/**
|
|
74
165
|
public(friend) entry fun new_bid<D_TOKEN, B_TOKEN>(
|
|
75
166
|
registry: &mut Registry,
|
|
@@ -80,8 +171,18 @@ export declare function getRedeemTx(tx: TransactionBlock, typusFrameworkOriginPa
|
|
|
80
171
|
ctx: &mut TxContext,
|
|
81
172
|
)
|
|
82
173
|
*/
|
|
83
|
-
export declare function getNewBidTx(
|
|
84
|
-
|
|
174
|
+
export declare function getNewBidTx(input: {
|
|
175
|
+
tx: TransactionBlock;
|
|
176
|
+
typusDovSinglePackageId: string;
|
|
177
|
+
typusDovSingleRegistry: string;
|
|
178
|
+
typeArguments: string[];
|
|
179
|
+
index: string;
|
|
180
|
+
coins: string[];
|
|
181
|
+
size: string;
|
|
182
|
+
premium_required: string;
|
|
183
|
+
user: string;
|
|
184
|
+
usingSponsoredGasCoin?: boolean;
|
|
185
|
+
}): TransactionBlock;
|
|
85
186
|
/**
|
|
86
187
|
public(friend) entry fun exercise<D_TOKEN, B_TOKEN>(
|
|
87
188
|
registry: &mut Registry,
|
|
@@ -90,7 +191,17 @@ user: string, usingSponsoredGasCoin?: boolean): TransactionBlock;
|
|
|
90
191
|
ctx: &mut TxContext,
|
|
91
192
|
)
|
|
92
193
|
*/
|
|
93
|
-
export declare function getExerciseTx(
|
|
194
|
+
export declare function getExerciseTx(input: {
|
|
195
|
+
tx: TransactionBlock;
|
|
196
|
+
typusFrameworkOriginPackageId: string;
|
|
197
|
+
typusFrameworkPackageId: string;
|
|
198
|
+
typusDovSinglePackageId: string;
|
|
199
|
+
typusDovSingleRegistry: string;
|
|
200
|
+
typeArguments: string[];
|
|
201
|
+
index: string;
|
|
202
|
+
receipts: string[] | TransactionObjectArgument[];
|
|
203
|
+
user: string;
|
|
204
|
+
}): TransactionBlock;
|
|
94
205
|
/**
|
|
95
206
|
public(friend) entry fun transfer_bid_receipt<D_TOKEN, B_TOKEN>(
|
|
96
207
|
registry: &mut Registry,
|
|
@@ -102,11 +213,11 @@ export declare function getExerciseTx(tx: TransactionBlock, typusFrameworkOrigin
|
|
|
102
213
|
) {
|
|
103
214
|
*/
|
|
104
215
|
export declare function getTransferBidReceiptTx(input: {
|
|
105
|
-
|
|
216
|
+
tx: TransactionBlock;
|
|
106
217
|
typusFrameworkOriginPackageId: string;
|
|
107
|
-
|
|
218
|
+
typusDovSinglePackageId: string;
|
|
219
|
+
typusDovSingleRegistry: string;
|
|
108
220
|
typeArguments: string[];
|
|
109
|
-
registry: string;
|
|
110
221
|
index: string;
|
|
111
222
|
receipts: string[];
|
|
112
223
|
share?: string;
|
|
@@ -118,19 +229,11 @@ export declare function getTransferBidReceiptTx(input: {
|
|
|
118
229
|
ctx: &mut TxContext,
|
|
119
230
|
)
|
|
120
231
|
*/
|
|
121
|
-
export declare function getRebateTx(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
max_times: u64,
|
|
130
|
-
target_rounds: vector<u64>,
|
|
131
|
-
coin: Coin<B_TOKEN>,
|
|
132
|
-
ctx: &mut TxContext
|
|
133
|
-
)
|
|
134
|
-
*/
|
|
135
|
-
export declare function getNewStrategyTx(gasBudget: number, packageId: string, typeArguments: string[], // B_TOKEN
|
|
136
|
-
strategy_pool: string, vault_index: string, signal_index: string, coins: string[], amount: string, size: string, price_percentage: string, max_times: string, target_rounds: string[]): TransactionBlock;
|
|
232
|
+
export declare function getRebateTx(input: {
|
|
233
|
+
tx: TransactionBlock;
|
|
234
|
+
typusFrameworkPackageId: string;
|
|
235
|
+
typusDovSinglePackageId: string;
|
|
236
|
+
typusDovSingleRegistry: string;
|
|
237
|
+
typeArgument: string;
|
|
238
|
+
user: string;
|
|
239
|
+
}): TransactionBlock;
|