@typus/typus-sdk 1.3.2 → 1.3.21
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 +30 -20
- package/lib/load_env.d.ts +1 -0
- package/lib/load_env.js +9 -0
- package/lib/utils/airdrop/user-entry.js +1 -1
- package/lib/utils/nft-staking/user-entry.d.ts +0 -84
- package/lib/utils/nft-staking/user-entry.js +591 -594
- package/lib/utils/tails-exp-dice/user-entry.d.ts +43 -0
- package/lib/utils/tails-exp-dice/user-entry.js +89 -1
- package/lib/utils/tails-staking/authorized-entry.d.ts +182 -0
- package/lib/utils/tails-staking/authorized-entry.js +248 -0
- package/lib/utils/tails-staking/user-entry.d.ts +155 -0
- package/lib/utils/tails-staking/user-entry.js +388 -0
- package/lib/utils/tails-staking/view-function.d.ts +21 -0
- package/lib/utils/tails-staking/view-function.js +118 -0
- package/lib/utils/typus-dov-single-v2/function/bidding.js +12 -13
- package/lib/utils/typus-dov-single-v2/user-history.js +51 -2
- package/lib/utils/typus-nft/fetch.d.ts +1 -1
- package/lib/utils/typus-nft/fetch.js +2 -2
- package/package.json +1 -1
|
@@ -25,3 +25,46 @@ registry: string, index: string, coins: string[], amount: string): Promise<Trans
|
|
|
25
25
|
export declare function playGuessTx(gasBudget: number, packageId: string, registry: string, index: string, guess_1: string, larger_than_1: boolean, guess_2: string, larger_than_2: boolean): Promise<TransactionBlock>;
|
|
26
26
|
export declare function newGamePlayGuessTx(gasBudget: number, packageId: string, typeArguments: string[], // [TOKEN]
|
|
27
27
|
registry: string, index: string, coins: string[], amount: string, guess_1: string, larger_than_1: boolean, guess_2: string, larger_than_2: boolean): Promise<TransactionBlock>;
|
|
28
|
+
/**
|
|
29
|
+
public fun consume_exp_coin_staked(
|
|
30
|
+
registry: &mut Registry,
|
|
31
|
+
version: &Version,
|
|
32
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
33
|
+
tails: address,
|
|
34
|
+
coin: Coin<TAILS_EXP>,
|
|
35
|
+
) {
|
|
36
|
+
*/
|
|
37
|
+
export declare function getConsumeExpCoinStakedTx(input: {
|
|
38
|
+
tx: TransactionBlock;
|
|
39
|
+
packageId: string;
|
|
40
|
+
tailsExpRegistry: string;
|
|
41
|
+
typusEcosystemVersion: string;
|
|
42
|
+
tailsStakingRegistry: string;
|
|
43
|
+
tails: string;
|
|
44
|
+
coins: string[];
|
|
45
|
+
amount: string;
|
|
46
|
+
}): TransactionBlock;
|
|
47
|
+
/**
|
|
48
|
+
public fun consume_exp_coin_unstaked(
|
|
49
|
+
registry: &mut Registry,
|
|
50
|
+
version: &Version,
|
|
51
|
+
tails_staking_registry: &TailsStakingRegistry,
|
|
52
|
+
kiosk: &mut Kiosk,
|
|
53
|
+
kiosk_owner_cap: &KioskOwnerCap,
|
|
54
|
+
tails: address,
|
|
55
|
+
coin: Coin<TAILS_EXP>,
|
|
56
|
+
) {
|
|
57
|
+
*/
|
|
58
|
+
export declare function getConsumeExpCoinUnstakedTx(input: {
|
|
59
|
+
tx: TransactionBlock;
|
|
60
|
+
packageId: string;
|
|
61
|
+
tailsExpRegistry: string;
|
|
62
|
+
typusEcosystemVersion: string;
|
|
63
|
+
tailsStakingRegistry: string;
|
|
64
|
+
kiosk: string;
|
|
65
|
+
kioskCap: string;
|
|
66
|
+
tails: string;
|
|
67
|
+
coins: string[];
|
|
68
|
+
amount: string;
|
|
69
|
+
personalKioskPackageId: string | undefined;
|
|
70
|
+
}): TransactionBlock;
|
|
@@ -52,7 +52,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
52
52
|
return ar;
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.newGamePlayGuessTx = exports.playGuessTx = exports.newGameTx = void 0;
|
|
55
|
+
exports.getConsumeExpCoinUnstakedTx = exports.getConsumeExpCoinStakedTx = exports.newGamePlayGuessTx = exports.playGuessTx = exports.newGameTx = void 0;
|
|
56
56
|
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
57
|
/**
|
|
58
58
|
public(friend) entry fun new_game<TOKEN>(
|
|
@@ -152,6 +152,7 @@ registry, index, coins, amount, guess_1, larger_than_1, guess_2, larger_than_2)
|
|
|
152
152
|
tx.pure(larger_than_1),
|
|
153
153
|
tx.pure(guess_2),
|
|
154
154
|
tx.pure(larger_than_2),
|
|
155
|
+
// tx.object("0x8"), // TODO: waiting for upgrade
|
|
155
156
|
],
|
|
156
157
|
});
|
|
157
158
|
tx.setGasBudget(gasBudget);
|
|
@@ -160,3 +161,90 @@ registry, index, coins, amount, guess_1, larger_than_1, guess_2, larger_than_2)
|
|
|
160
161
|
});
|
|
161
162
|
}
|
|
162
163
|
exports.newGamePlayGuessTx = newGamePlayGuessTx;
|
|
164
|
+
/**
|
|
165
|
+
public fun consume_exp_coin_staked(
|
|
166
|
+
registry: &mut Registry,
|
|
167
|
+
version: &Version,
|
|
168
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
169
|
+
tails: address,
|
|
170
|
+
coin: Coin<TAILS_EXP>,
|
|
171
|
+
) {
|
|
172
|
+
*/
|
|
173
|
+
function getConsumeExpCoinStakedTx(input) {
|
|
174
|
+
var coin = input.coins.pop();
|
|
175
|
+
if (input.coins.length > 0) {
|
|
176
|
+
input.tx.mergeCoins(input.tx.object(coin), input.coins.map(function (id) { return input.tx.object(id); }));
|
|
177
|
+
}
|
|
178
|
+
var _a = __read(input.tx.splitCoins(input.tx.object(coin), [input.tx.pure(input.amount)]), 1), input_coin = _a[0];
|
|
179
|
+
input.tx.moveCall({
|
|
180
|
+
target: "".concat(input.packageId, "::tails_exp::consume_exp_coin_staked"),
|
|
181
|
+
typeArguments: [],
|
|
182
|
+
arguments: [
|
|
183
|
+
input.tx.object(input.tailsExpRegistry),
|
|
184
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
185
|
+
input.tx.object(input.tailsStakingRegistry),
|
|
186
|
+
input.tx.pure(input.tails),
|
|
187
|
+
input.tx.object(input_coin),
|
|
188
|
+
],
|
|
189
|
+
});
|
|
190
|
+
return input.tx;
|
|
191
|
+
}
|
|
192
|
+
exports.getConsumeExpCoinStakedTx = getConsumeExpCoinStakedTx;
|
|
193
|
+
/**
|
|
194
|
+
public fun consume_exp_coin_unstaked(
|
|
195
|
+
registry: &mut Registry,
|
|
196
|
+
version: &Version,
|
|
197
|
+
tails_staking_registry: &TailsStakingRegistry,
|
|
198
|
+
kiosk: &mut Kiosk,
|
|
199
|
+
kiosk_owner_cap: &KioskOwnerCap,
|
|
200
|
+
tails: address,
|
|
201
|
+
coin: Coin<TAILS_EXP>,
|
|
202
|
+
) {
|
|
203
|
+
*/
|
|
204
|
+
function getConsumeExpCoinUnstakedTx(input) {
|
|
205
|
+
var coin = input.coins.pop();
|
|
206
|
+
if (input.coins.length > 0) {
|
|
207
|
+
input.tx.mergeCoins(input.tx.object(coin), input.coins.map(function (id) { return input.tx.object(id); }));
|
|
208
|
+
}
|
|
209
|
+
var _a = __read(input.tx.splitCoins(input.tx.object(coin), [input.tx.pure(input.amount)]), 1), input_coin = _a[0];
|
|
210
|
+
if (input.personalKioskPackageId) {
|
|
211
|
+
var _b = __read(input.tx.moveCall({
|
|
212
|
+
target: "".concat(input.personalKioskPackageId, "::personal_kiosk::borrow_val"),
|
|
213
|
+
arguments: [input.tx.object(input.kioskCap)],
|
|
214
|
+
}), 2), personalKioskCap = _b[0], borrow = _b[1];
|
|
215
|
+
input.tx.moveCall({
|
|
216
|
+
target: "".concat(input.packageId, "::tails_exp::consume_exp_coin_unstaked"),
|
|
217
|
+
typeArguments: [],
|
|
218
|
+
arguments: [
|
|
219
|
+
input.tx.object(input.tailsExpRegistry),
|
|
220
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
221
|
+
input.tx.object(input.tailsStakingRegistry),
|
|
222
|
+
input.tx.object(input.kiosk),
|
|
223
|
+
personalKioskCap,
|
|
224
|
+
input.tx.pure(input.tails),
|
|
225
|
+
input.tx.object(input_coin),
|
|
226
|
+
],
|
|
227
|
+
});
|
|
228
|
+
input.tx.moveCall({
|
|
229
|
+
target: "".concat(input.personalKioskPackageId, "::personal_kiosk::return_val"),
|
|
230
|
+
arguments: [input.tx.object(input.kioskCap), personalKioskCap, borrow],
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
input.tx.moveCall({
|
|
235
|
+
target: "".concat(input.packageId, "::tails_exp::consume_exp_coin_unstaked"),
|
|
236
|
+
typeArguments: [],
|
|
237
|
+
arguments: [
|
|
238
|
+
input.tx.object(input.tailsExpRegistry),
|
|
239
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
240
|
+
input.tx.object(input.tailsStakingRegistry),
|
|
241
|
+
input.tx.object(input.kiosk),
|
|
242
|
+
input.tx.object(input.kioskCap),
|
|
243
|
+
input.tx.pure(input.tails),
|
|
244
|
+
input.tx.object(input_coin),
|
|
245
|
+
],
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return input.tx;
|
|
249
|
+
}
|
|
250
|
+
exports.getConsumeExpCoinUnstakedTx = getConsumeExpCoinUnstakedTx;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { TransactionBlock, TransactionObjectInput } from "@mysten/sui.js/transactions";
|
|
2
|
+
/**
|
|
3
|
+
entry fun upload_ids(
|
|
4
|
+
version: &Version,
|
|
5
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
6
|
+
mut ids: vector<address>, // reverse
|
|
7
|
+
ctx: &TxContext,
|
|
8
|
+
) {
|
|
9
|
+
*/
|
|
10
|
+
export declare function getUploadIdsTx(input: {
|
|
11
|
+
tx: TransactionBlock;
|
|
12
|
+
typusPackageId: string;
|
|
13
|
+
typusEcosystemVersion: string;
|
|
14
|
+
typusTailsStakingRegistry: string;
|
|
15
|
+
ids: string[];
|
|
16
|
+
}): TransactionBlock;
|
|
17
|
+
/**
|
|
18
|
+
entry fun remove_ids(
|
|
19
|
+
version: &Version,
|
|
20
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
21
|
+
mut count: u64,
|
|
22
|
+
ctx: &TxContext,
|
|
23
|
+
) {
|
|
24
|
+
*/
|
|
25
|
+
export declare function getRemoveIdsTx(input: {
|
|
26
|
+
tx: TransactionBlock;
|
|
27
|
+
typusPackageId: string;
|
|
28
|
+
typusEcosystemVersion: string;
|
|
29
|
+
typusTailsStakingRegistry: string;
|
|
30
|
+
count: string;
|
|
31
|
+
}): TransactionBlock;
|
|
32
|
+
/**
|
|
33
|
+
entry fun upload_levels(
|
|
34
|
+
version: &Version,
|
|
35
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
36
|
+
mut count: u64,
|
|
37
|
+
ctx: &TxContext,
|
|
38
|
+
) {
|
|
39
|
+
*/
|
|
40
|
+
export declare function getUploadLevelsTx(input: {
|
|
41
|
+
tx: TransactionBlock;
|
|
42
|
+
typusPackageId: string;
|
|
43
|
+
typusEcosystemVersion: string;
|
|
44
|
+
typusTailsStakingRegistry: string;
|
|
45
|
+
count: string;
|
|
46
|
+
}): TransactionBlock;
|
|
47
|
+
/**
|
|
48
|
+
entry fun remove_levels(
|
|
49
|
+
version: &Version,
|
|
50
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
51
|
+
mut count: u64,
|
|
52
|
+
ctx: &TxContext,
|
|
53
|
+
) {
|
|
54
|
+
*/
|
|
55
|
+
export declare function getRemoveLevelsTx(input: {
|
|
56
|
+
tx: TransactionBlock;
|
|
57
|
+
typusPackageId: string;
|
|
58
|
+
typusEcosystemVersion: string;
|
|
59
|
+
typusTailsStakingRegistry: string;
|
|
60
|
+
count: string;
|
|
61
|
+
}): TransactionBlock;
|
|
62
|
+
/**
|
|
63
|
+
entry fun upload_ipfs_urls(
|
|
64
|
+
version: &Version,
|
|
65
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
66
|
+
level: u64,
|
|
67
|
+
mut urls: vector<vector<u8>>, // reverse
|
|
68
|
+
ctx: &TxContext,
|
|
69
|
+
) {
|
|
70
|
+
*/
|
|
71
|
+
export declare function getUploadIpfsUrlsTx(input: {
|
|
72
|
+
tx: TransactionBlock;
|
|
73
|
+
typusPackageId: string;
|
|
74
|
+
typusEcosystemVersion: string;
|
|
75
|
+
typusTailsStakingRegistry: string;
|
|
76
|
+
level: string;
|
|
77
|
+
urls: string[][];
|
|
78
|
+
}): TransactionBlock;
|
|
79
|
+
/**
|
|
80
|
+
entry fun remove_ipfs_urls(
|
|
81
|
+
version: &Version,
|
|
82
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
83
|
+
level: u64,
|
|
84
|
+
ctx: &mut TxContext,
|
|
85
|
+
) {
|
|
86
|
+
*/
|
|
87
|
+
export declare function getRemoveIpfsUrlsTx(input: {
|
|
88
|
+
tx: TransactionBlock;
|
|
89
|
+
typusPackageId: string;
|
|
90
|
+
typusEcosystemVersion: string;
|
|
91
|
+
typusTailsStakingRegistry: string;
|
|
92
|
+
level: string;
|
|
93
|
+
}): TransactionBlock;
|
|
94
|
+
/**
|
|
95
|
+
entry fun upload_webp_bytes(
|
|
96
|
+
version: &Version,
|
|
97
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
98
|
+
number: u64,
|
|
99
|
+
level: u64,
|
|
100
|
+
mut bytes: vector<u8>, // reverse when extend
|
|
101
|
+
ctx: &TxContext,
|
|
102
|
+
) {
|
|
103
|
+
*/
|
|
104
|
+
export declare function getUploadWebpBytesTx(input: {
|
|
105
|
+
tx: TransactionBlock;
|
|
106
|
+
typusPackageId: string;
|
|
107
|
+
typusEcosystemVersion: string;
|
|
108
|
+
typusTailsStakingRegistry: string;
|
|
109
|
+
number: string;
|
|
110
|
+
level: string;
|
|
111
|
+
bytes: string[];
|
|
112
|
+
}): TransactionBlock;
|
|
113
|
+
/**
|
|
114
|
+
entry fun remove_webp_bytes(
|
|
115
|
+
version: &Version,
|
|
116
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
117
|
+
number: u64,
|
|
118
|
+
level: u64,
|
|
119
|
+
ctx: &TxContext,
|
|
120
|
+
) {
|
|
121
|
+
*/
|
|
122
|
+
export declare function getRemoveWebpBytesTx(input: {
|
|
123
|
+
tx: TransactionBlock;
|
|
124
|
+
typusPackageId: string;
|
|
125
|
+
typusEcosystemVersion: string;
|
|
126
|
+
typusTailsStakingRegistry: string;
|
|
127
|
+
number: string;
|
|
128
|
+
level: string;
|
|
129
|
+
}): TransactionBlock;
|
|
130
|
+
/**
|
|
131
|
+
entry fun update_tails_staking_registry_config(
|
|
132
|
+
version: &Version,
|
|
133
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
134
|
+
index: u64,
|
|
135
|
+
value: u64,
|
|
136
|
+
ctx: &TxContext,
|
|
137
|
+
) {
|
|
138
|
+
*/
|
|
139
|
+
export declare function getUpdateTailsStakingRegistryConfigTx(input: {
|
|
140
|
+
tx: TransactionBlock;
|
|
141
|
+
typusPackageId: string;
|
|
142
|
+
typusEcosystemVersion: string;
|
|
143
|
+
typusTailsStakingRegistry: string;
|
|
144
|
+
index: string;
|
|
145
|
+
value: string;
|
|
146
|
+
}): TransactionBlock;
|
|
147
|
+
/**
|
|
148
|
+
entry fun set_profit_sharing<TOKEN>(
|
|
149
|
+
version: &Version,
|
|
150
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
151
|
+
level_profits: vector<u64>,
|
|
152
|
+
mut profit: vector<Coin<TOKEN>>,
|
|
153
|
+
ctx: &TxContext,
|
|
154
|
+
) {
|
|
155
|
+
*/
|
|
156
|
+
export declare function getSetProfitSharingTx(input: {
|
|
157
|
+
tx: TransactionBlock;
|
|
158
|
+
typusPackageId: string;
|
|
159
|
+
typusEcosystemVersion: string;
|
|
160
|
+
typusTailsStakingRegistry: string;
|
|
161
|
+
typeArguments: string[];
|
|
162
|
+
levelProfits: string[];
|
|
163
|
+
coin: TransactionObjectInput;
|
|
164
|
+
amount: string;
|
|
165
|
+
tsMs: string;
|
|
166
|
+
}): TransactionBlock;
|
|
167
|
+
/**
|
|
168
|
+
entry fun remove_profit_sharing<TOKEN>(
|
|
169
|
+
version: &Version,
|
|
170
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
171
|
+
recipient: address,
|
|
172
|
+
ctx: &mut TxContext,
|
|
173
|
+
) {
|
|
174
|
+
*/
|
|
175
|
+
export declare function getRemoveProfitSharingTx(input: {
|
|
176
|
+
tx: TransactionBlock;
|
|
177
|
+
typusPackageId: string;
|
|
178
|
+
typusEcosystemVersion: string;
|
|
179
|
+
typusTailsStakingRegistry: string;
|
|
180
|
+
typeArguments: string[];
|
|
181
|
+
recipient: string;
|
|
182
|
+
}): TransactionBlock;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRemoveProfitSharingTx = exports.getSetProfitSharingTx = exports.getUpdateTailsStakingRegistryConfigTx = exports.getRemoveWebpBytesTx = exports.getUploadWebpBytesTx = exports.getRemoveIpfsUrlsTx = exports.getUploadIpfsUrlsTx = exports.getRemoveLevelsTx = exports.getUploadLevelsTx = exports.getRemoveIdsTx = exports.getUploadIdsTx = void 0;
|
|
4
|
+
/**
|
|
5
|
+
entry fun upload_ids(
|
|
6
|
+
version: &Version,
|
|
7
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
8
|
+
mut ids: vector<address>, // reverse
|
|
9
|
+
ctx: &TxContext,
|
|
10
|
+
) {
|
|
11
|
+
*/
|
|
12
|
+
function getUploadIdsTx(input) {
|
|
13
|
+
var result = input.tx.moveCall({
|
|
14
|
+
target: "".concat(input.typusPackageId, "::tails_staking::upload_ids"),
|
|
15
|
+
typeArguments: [],
|
|
16
|
+
arguments: [
|
|
17
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
18
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
19
|
+
input.tx.pure(input.ids),
|
|
20
|
+
],
|
|
21
|
+
});
|
|
22
|
+
return input.tx;
|
|
23
|
+
}
|
|
24
|
+
exports.getUploadIdsTx = getUploadIdsTx;
|
|
25
|
+
/**
|
|
26
|
+
entry fun remove_ids(
|
|
27
|
+
version: &Version,
|
|
28
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
29
|
+
mut count: u64,
|
|
30
|
+
ctx: &TxContext,
|
|
31
|
+
) {
|
|
32
|
+
*/
|
|
33
|
+
function getRemoveIdsTx(input) {
|
|
34
|
+
var result = input.tx.moveCall({
|
|
35
|
+
target: "".concat(input.typusPackageId, "::tails_staking::remove_ids"),
|
|
36
|
+
typeArguments: [],
|
|
37
|
+
arguments: [
|
|
38
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
39
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
40
|
+
input.tx.pure(input.count),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
return input.tx;
|
|
44
|
+
}
|
|
45
|
+
exports.getRemoveIdsTx = getRemoveIdsTx;
|
|
46
|
+
/**
|
|
47
|
+
entry fun upload_levels(
|
|
48
|
+
version: &Version,
|
|
49
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
50
|
+
mut count: u64,
|
|
51
|
+
ctx: &TxContext,
|
|
52
|
+
) {
|
|
53
|
+
*/
|
|
54
|
+
function getUploadLevelsTx(input) {
|
|
55
|
+
var result = input.tx.moveCall({
|
|
56
|
+
target: "".concat(input.typusPackageId, "::tails_staking::upload_levels"),
|
|
57
|
+
typeArguments: [],
|
|
58
|
+
arguments: [
|
|
59
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
60
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
61
|
+
input.tx.pure(input.count),
|
|
62
|
+
],
|
|
63
|
+
});
|
|
64
|
+
return input.tx;
|
|
65
|
+
}
|
|
66
|
+
exports.getUploadLevelsTx = getUploadLevelsTx;
|
|
67
|
+
/**
|
|
68
|
+
entry fun remove_levels(
|
|
69
|
+
version: &Version,
|
|
70
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
71
|
+
mut count: u64,
|
|
72
|
+
ctx: &TxContext,
|
|
73
|
+
) {
|
|
74
|
+
*/
|
|
75
|
+
function getRemoveLevelsTx(input) {
|
|
76
|
+
var result = input.tx.moveCall({
|
|
77
|
+
target: "".concat(input.typusPackageId, "::tails_staking::remove_levels"),
|
|
78
|
+
typeArguments: [],
|
|
79
|
+
arguments: [
|
|
80
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
81
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
82
|
+
input.tx.pure(input.count),
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
return input.tx;
|
|
86
|
+
}
|
|
87
|
+
exports.getRemoveLevelsTx = getRemoveLevelsTx;
|
|
88
|
+
/**
|
|
89
|
+
entry fun upload_ipfs_urls(
|
|
90
|
+
version: &Version,
|
|
91
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
92
|
+
level: u64,
|
|
93
|
+
mut urls: vector<vector<u8>>, // reverse
|
|
94
|
+
ctx: &TxContext,
|
|
95
|
+
) {
|
|
96
|
+
*/
|
|
97
|
+
function getUploadIpfsUrlsTx(input) {
|
|
98
|
+
var result = input.tx.moveCall({
|
|
99
|
+
target: "".concat(input.typusPackageId, "::tails_staking::upload_ipfs_urls"),
|
|
100
|
+
typeArguments: [],
|
|
101
|
+
arguments: [
|
|
102
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
103
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
104
|
+
input.tx.pure(input.level),
|
|
105
|
+
input.tx.pure(input.urls),
|
|
106
|
+
],
|
|
107
|
+
});
|
|
108
|
+
return input.tx;
|
|
109
|
+
}
|
|
110
|
+
exports.getUploadIpfsUrlsTx = getUploadIpfsUrlsTx;
|
|
111
|
+
/**
|
|
112
|
+
entry fun remove_ipfs_urls(
|
|
113
|
+
version: &Version,
|
|
114
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
115
|
+
level: u64,
|
|
116
|
+
ctx: &mut TxContext,
|
|
117
|
+
) {
|
|
118
|
+
*/
|
|
119
|
+
function getRemoveIpfsUrlsTx(input) {
|
|
120
|
+
var result = input.tx.moveCall({
|
|
121
|
+
target: "".concat(input.typusPackageId, "::tails_staking::remove_ipfs_urls"),
|
|
122
|
+
typeArguments: [],
|
|
123
|
+
arguments: [
|
|
124
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
125
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
126
|
+
input.tx.pure(input.level),
|
|
127
|
+
],
|
|
128
|
+
});
|
|
129
|
+
return input.tx;
|
|
130
|
+
}
|
|
131
|
+
exports.getRemoveIpfsUrlsTx = getRemoveIpfsUrlsTx;
|
|
132
|
+
/**
|
|
133
|
+
entry fun upload_webp_bytes(
|
|
134
|
+
version: &Version,
|
|
135
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
136
|
+
number: u64,
|
|
137
|
+
level: u64,
|
|
138
|
+
mut bytes: vector<u8>, // reverse when extend
|
|
139
|
+
ctx: &TxContext,
|
|
140
|
+
) {
|
|
141
|
+
*/
|
|
142
|
+
function getUploadWebpBytesTx(input) {
|
|
143
|
+
var result = input.tx.moveCall({
|
|
144
|
+
target: "".concat(input.typusPackageId, "::tails_staking::upload_webp_bytes"),
|
|
145
|
+
typeArguments: [],
|
|
146
|
+
arguments: [
|
|
147
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
148
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
149
|
+
input.tx.pure(input.number),
|
|
150
|
+
input.tx.pure(input.level),
|
|
151
|
+
input.tx.pure(input.bytes),
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
return input.tx;
|
|
155
|
+
}
|
|
156
|
+
exports.getUploadWebpBytesTx = getUploadWebpBytesTx;
|
|
157
|
+
/**
|
|
158
|
+
entry fun remove_webp_bytes(
|
|
159
|
+
version: &Version,
|
|
160
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
161
|
+
number: u64,
|
|
162
|
+
level: u64,
|
|
163
|
+
ctx: &TxContext,
|
|
164
|
+
) {
|
|
165
|
+
*/
|
|
166
|
+
function getRemoveWebpBytesTx(input) {
|
|
167
|
+
var result = input.tx.moveCall({
|
|
168
|
+
target: "".concat(input.typusPackageId, "::tails_staking::remove_webp_bytes"),
|
|
169
|
+
typeArguments: [],
|
|
170
|
+
arguments: [
|
|
171
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
172
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
173
|
+
input.tx.pure(input.number),
|
|
174
|
+
input.tx.pure(input.level),
|
|
175
|
+
],
|
|
176
|
+
});
|
|
177
|
+
return input.tx;
|
|
178
|
+
}
|
|
179
|
+
exports.getRemoveWebpBytesTx = getRemoveWebpBytesTx;
|
|
180
|
+
/**
|
|
181
|
+
entry fun update_tails_staking_registry_config(
|
|
182
|
+
version: &Version,
|
|
183
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
184
|
+
index: u64,
|
|
185
|
+
value: u64,
|
|
186
|
+
ctx: &TxContext,
|
|
187
|
+
) {
|
|
188
|
+
*/
|
|
189
|
+
function getUpdateTailsStakingRegistryConfigTx(input) {
|
|
190
|
+
input.tx.moveCall({
|
|
191
|
+
target: "".concat(input.typusPackageId, "::tails_staking::update_tails_staking_registry_config"),
|
|
192
|
+
typeArguments: [],
|
|
193
|
+
arguments: [
|
|
194
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
195
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
196
|
+
input.tx.pure(input.index),
|
|
197
|
+
input.tx.pure(input.value),
|
|
198
|
+
],
|
|
199
|
+
});
|
|
200
|
+
return input.tx;
|
|
201
|
+
}
|
|
202
|
+
exports.getUpdateTailsStakingRegistryConfigTx = getUpdateTailsStakingRegistryConfigTx;
|
|
203
|
+
/**
|
|
204
|
+
entry fun set_profit_sharing<TOKEN>(
|
|
205
|
+
version: &Version,
|
|
206
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
207
|
+
level_profits: vector<u64>,
|
|
208
|
+
mut profit: vector<Coin<TOKEN>>,
|
|
209
|
+
ctx: &TxContext,
|
|
210
|
+
) {
|
|
211
|
+
*/
|
|
212
|
+
function getSetProfitSharingTx(input) {
|
|
213
|
+
var result = input.tx.moveCall({
|
|
214
|
+
target: "".concat(input.typusPackageId, "::tails_staking::set_profit_sharing"),
|
|
215
|
+
typeArguments: input.typeArguments,
|
|
216
|
+
arguments: [
|
|
217
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
218
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
219
|
+
input.tx.pure(input.levelProfits),
|
|
220
|
+
input.tx.object(input.coin),
|
|
221
|
+
input.tx.pure(input.amount),
|
|
222
|
+
input.tx.pure(input.tsMs),
|
|
223
|
+
],
|
|
224
|
+
});
|
|
225
|
+
return input.tx;
|
|
226
|
+
}
|
|
227
|
+
exports.getSetProfitSharingTx = getSetProfitSharingTx;
|
|
228
|
+
/**
|
|
229
|
+
entry fun remove_profit_sharing<TOKEN>(
|
|
230
|
+
version: &Version,
|
|
231
|
+
tails_staking_registry: &mut TailsStakingRegistry,
|
|
232
|
+
recipient: address,
|
|
233
|
+
ctx: &mut TxContext,
|
|
234
|
+
) {
|
|
235
|
+
*/
|
|
236
|
+
function getRemoveProfitSharingTx(input) {
|
|
237
|
+
var result = input.tx.moveCall({
|
|
238
|
+
target: "".concat(input.typusPackageId, "::tails_staking::remove_profit_sharing"),
|
|
239
|
+
typeArguments: input.typeArguments,
|
|
240
|
+
arguments: [
|
|
241
|
+
input.tx.object(input.typusEcosystemVersion),
|
|
242
|
+
input.tx.object(input.typusTailsStakingRegistry),
|
|
243
|
+
input.tx.pure(input.recipient),
|
|
244
|
+
],
|
|
245
|
+
});
|
|
246
|
+
return input.tx;
|
|
247
|
+
}
|
|
248
|
+
exports.getRemoveProfitSharingTx = getRemoveProfitSharingTx;
|