@typus/typus-sdk 1.4.18 → 1.4.19
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/dist/config-mainnet.json +3 -3
- package/dist/src/auto-bid/token-user-entry.d.ts +9 -0
- package/dist/src/auto-bid/token-user-entry.js +126 -0
- package/dist/src/typus/airdrop/authority-entry.d.ts +14 -2
- package/dist/src/typus/airdrop/authority-entry.js +27 -32
- package/dist/src/typus/airdrop/user-entry.d.ts +2 -5
- package/dist/src/typus/airdrop/user-entry.js +8 -8
- package/dist/src/typus/airdrop/view-function.d.ts +2 -5
- package/dist/src/typus/airdrop/view-function.js +5 -5
- package/dist/src/typus/leaderboard/authority-entry.d.ts +10 -2
- package/dist/src/typus/leaderboard/authority-entry.js +12 -13
- package/dist/src/typus/leaderboard/view-function.d.ts +2 -5
- package/dist/src/typus/leaderboard/view-function.js +6 -6
- package/dist/src/typus/tails-staking/authority-entry.d.ts +12 -55
- package/dist/src/typus/tails-staking/authority-entry.js +73 -97
- package/dist/src/typus/tails-staking/user-entry.d.ts +14 -44
- package/dist/src/typus/tails-staking/user-entry.js +123 -123
- package/dist/src/typus/tails-staking/view-function.d.ts +3 -11
- package/dist/src/typus/tails-staking/view-function.js +10 -10
- package/dist/src/typus/user/view-function.d.ts +2 -5
- package/dist/src/typus/user/view-function.js +5 -5
- package/dist/src/typus-dov-single-v2/authority-entry.d.ts +26 -18
- package/dist/src/typus-dov-single-v2/authority-entry.js +23 -114
- package/dist/src/typus-dov-single-v2/function/bidding.js +4 -5
- package/dist/src/typus-dov-single-v2/token-user-entry.d.ts +11 -84
- package/dist/src/typus-dov-single-v2/token-user-entry.js +191 -316
- package/dist/src/typus-dov-single-v2/user-entry.d.ts +11 -69
- package/dist/src/typus-dov-single-v2/user-entry.js +183 -194
- package/dist/src/typus-dov-single-v2/view-function.d.ts +20 -6
- package/dist/src/typus-dov-single-v2/view-function.js +37 -43
- package/dist/src/typus-perp/user/orderWithBidReceipt.js +1 -5
- package/dist/src/typus-safu/index.d.ts +2 -1
- package/dist/src/typus-safu/index.js +2 -1
- package/dist/src/typus-safu/user-history.d.ts +12 -0
- package/dist/src/typus-safu/user-history.js +312 -0
- package/dist/src/utils/typusConfig.d.ts +1 -0
- package/package.json +1 -1
|
@@ -19,17 +19,13 @@ exports.getRemoveProfitSharingTx = getRemoveProfitSharingTx;
|
|
|
19
19
|
ctx: &TxContext,
|
|
20
20
|
) {
|
|
21
21
|
*/
|
|
22
|
-
function getUploadIdsTx(input) {
|
|
23
|
-
var result =
|
|
24
|
-
target: "".concat(
|
|
22
|
+
function getUploadIdsTx(config, tx, input) {
|
|
23
|
+
var result = tx.moveCall({
|
|
24
|
+
target: "".concat(config.package.typus, "::tails_staking::upload_ids"),
|
|
25
25
|
typeArguments: [],
|
|
26
|
-
arguments: [
|
|
27
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
28
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
29
|
-
input.tx.pure(input.ids),
|
|
30
|
-
],
|
|
26
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.ids)],
|
|
31
27
|
});
|
|
32
|
-
return
|
|
28
|
+
return tx;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
31
|
entry fun remove_ids(
|
|
@@ -39,17 +35,13 @@ function getUploadIdsTx(input) {
|
|
|
39
35
|
ctx: &TxContext,
|
|
40
36
|
) {
|
|
41
37
|
*/
|
|
42
|
-
function getRemoveIdsTx(input) {
|
|
43
|
-
var result =
|
|
44
|
-
target: "".concat(
|
|
38
|
+
function getRemoveIdsTx(config, tx, input) {
|
|
39
|
+
var result = tx.moveCall({
|
|
40
|
+
target: "".concat(config.package.typus, "::tails_staking::remove_ids"),
|
|
45
41
|
typeArguments: [],
|
|
46
|
-
arguments: [
|
|
47
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
48
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
49
|
-
input.tx.pure(input.count),
|
|
50
|
-
],
|
|
42
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.count)],
|
|
51
43
|
});
|
|
52
|
-
return
|
|
44
|
+
return tx;
|
|
53
45
|
}
|
|
54
46
|
/**
|
|
55
47
|
entry fun upload_levels(
|
|
@@ -59,17 +51,13 @@ function getRemoveIdsTx(input) {
|
|
|
59
51
|
ctx: &TxContext,
|
|
60
52
|
) {
|
|
61
53
|
*/
|
|
62
|
-
function getUploadLevelsTx(input) {
|
|
63
|
-
|
|
64
|
-
target: "".concat(
|
|
54
|
+
function getUploadLevelsTx(config, tx, input) {
|
|
55
|
+
tx.moveCall({
|
|
56
|
+
target: "".concat(config.package.typus, "::tails_staking::upload_levels"),
|
|
65
57
|
typeArguments: [],
|
|
66
|
-
arguments: [
|
|
67
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
68
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
69
|
-
input.tx.pure(input.count),
|
|
70
|
-
],
|
|
58
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.count)],
|
|
71
59
|
});
|
|
72
|
-
return
|
|
60
|
+
return tx;
|
|
73
61
|
}
|
|
74
62
|
/**
|
|
75
63
|
entry fun remove_levels(
|
|
@@ -79,17 +67,13 @@ function getUploadLevelsTx(input) {
|
|
|
79
67
|
ctx: &TxContext,
|
|
80
68
|
) {
|
|
81
69
|
*/
|
|
82
|
-
function getRemoveLevelsTx(input) {
|
|
83
|
-
|
|
84
|
-
target: "".concat(
|
|
70
|
+
function getRemoveLevelsTx(config, tx, input) {
|
|
71
|
+
tx.moveCall({
|
|
72
|
+
target: "".concat(config.package.typus, "::tails_staking::remove_levels"),
|
|
85
73
|
typeArguments: [],
|
|
86
|
-
arguments: [
|
|
87
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
88
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
89
|
-
input.tx.pure(input.count),
|
|
90
|
-
],
|
|
74
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.count)],
|
|
91
75
|
});
|
|
92
|
-
return
|
|
76
|
+
return tx;
|
|
93
77
|
}
|
|
94
78
|
/**
|
|
95
79
|
entry fun upload_ipfs_urls(
|
|
@@ -100,18 +84,18 @@ function getRemoveLevelsTx(input) {
|
|
|
100
84
|
ctx: &TxContext,
|
|
101
85
|
) {
|
|
102
86
|
*/
|
|
103
|
-
function getUploadIpfsUrlsTx(input) {
|
|
104
|
-
|
|
105
|
-
target: "".concat(
|
|
87
|
+
function getUploadIpfsUrlsTx(config, tx, input) {
|
|
88
|
+
tx.moveCall({
|
|
89
|
+
target: "".concat(config.package.typus, "::tails_staking::upload_ipfs_urls"),
|
|
106
90
|
typeArguments: [],
|
|
107
91
|
arguments: [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
92
|
+
tx.object(config.version.typus),
|
|
93
|
+
tx.object(config.registry.typus.tailsStaking),
|
|
94
|
+
tx.pure(input.level),
|
|
95
|
+
tx.pure(input.urls),
|
|
112
96
|
],
|
|
113
97
|
});
|
|
114
|
-
return
|
|
98
|
+
return tx;
|
|
115
99
|
}
|
|
116
100
|
/**
|
|
117
101
|
entry fun remove_ipfs_urls(
|
|
@@ -121,17 +105,13 @@ function getUploadIpfsUrlsTx(input) {
|
|
|
121
105
|
ctx: &mut TxContext,
|
|
122
106
|
) {
|
|
123
107
|
*/
|
|
124
|
-
function getRemoveIpfsUrlsTx(input) {
|
|
125
|
-
|
|
126
|
-
target: "".concat(
|
|
108
|
+
function getRemoveIpfsUrlsTx(config, tx, input) {
|
|
109
|
+
tx.moveCall({
|
|
110
|
+
target: "".concat(config.package.typus, "::tails_staking::remove_ipfs_urls"),
|
|
127
111
|
typeArguments: [],
|
|
128
|
-
arguments: [
|
|
129
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
130
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
131
|
-
input.tx.pure(input.level),
|
|
132
|
-
],
|
|
112
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.level)],
|
|
133
113
|
});
|
|
134
|
-
return
|
|
114
|
+
return tx;
|
|
135
115
|
}
|
|
136
116
|
/**
|
|
137
117
|
entry fun upload_webp_bytes(
|
|
@@ -143,19 +123,19 @@ function getRemoveIpfsUrlsTx(input) {
|
|
|
143
123
|
ctx: &TxContext,
|
|
144
124
|
) {
|
|
145
125
|
*/
|
|
146
|
-
function getUploadWebpBytesTx(input) {
|
|
147
|
-
|
|
148
|
-
target: "".concat(
|
|
126
|
+
function getUploadWebpBytesTx(config, tx, input) {
|
|
127
|
+
tx.moveCall({
|
|
128
|
+
target: "".concat(config.package.typus, "::tails_staking::upload_webp_bytes"),
|
|
149
129
|
typeArguments: [],
|
|
150
130
|
arguments: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
131
|
+
tx.object(config.version.typus),
|
|
132
|
+
tx.object(config.registry.typus.tailsStaking),
|
|
133
|
+
tx.pure(input.number),
|
|
134
|
+
tx.pure(input.level),
|
|
135
|
+
tx.pure(input.bytes),
|
|
156
136
|
],
|
|
157
137
|
});
|
|
158
|
-
return
|
|
138
|
+
return tx;
|
|
159
139
|
}
|
|
160
140
|
/**
|
|
161
141
|
entry fun remove_webp_bytes(
|
|
@@ -166,18 +146,18 @@ function getUploadWebpBytesTx(input) {
|
|
|
166
146
|
ctx: &TxContext,
|
|
167
147
|
) {
|
|
168
148
|
*/
|
|
169
|
-
function getRemoveWebpBytesTx(input) {
|
|
170
|
-
|
|
171
|
-
target: "".concat(
|
|
149
|
+
function getRemoveWebpBytesTx(config, tx, input) {
|
|
150
|
+
tx.moveCall({
|
|
151
|
+
target: "".concat(config.package.typus, "::tails_staking::remove_webp_bytes"),
|
|
172
152
|
typeArguments: [],
|
|
173
153
|
arguments: [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
154
|
+
tx.object(config.version.typus),
|
|
155
|
+
tx.object(config.registry.typus.tailsStaking),
|
|
156
|
+
tx.pure(input.number),
|
|
157
|
+
tx.pure(input.level),
|
|
178
158
|
],
|
|
179
159
|
});
|
|
180
|
-
return
|
|
160
|
+
return tx;
|
|
181
161
|
}
|
|
182
162
|
/**
|
|
183
163
|
entry fun update_tails_staking_registry_config(
|
|
@@ -188,18 +168,18 @@ function getRemoveWebpBytesTx(input) {
|
|
|
188
168
|
ctx: &TxContext,
|
|
189
169
|
) {
|
|
190
170
|
*/
|
|
191
|
-
function getUpdateTailsStakingRegistryConfigTx(input) {
|
|
192
|
-
|
|
193
|
-
target: "".concat(
|
|
171
|
+
function getUpdateTailsStakingRegistryConfigTx(config, tx, input) {
|
|
172
|
+
tx.moveCall({
|
|
173
|
+
target: "".concat(config.package.typus, "::tails_staking::update_tails_staking_registry_config"),
|
|
194
174
|
typeArguments: [],
|
|
195
175
|
arguments: [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
176
|
+
tx.object(config.version.typus),
|
|
177
|
+
tx.object(config.registry.typus.tailsStaking),
|
|
178
|
+
tx.pure(input.index),
|
|
179
|
+
tx.pure(input.value),
|
|
200
180
|
],
|
|
201
181
|
});
|
|
202
|
-
return
|
|
182
|
+
return tx;
|
|
203
183
|
}
|
|
204
184
|
/**
|
|
205
185
|
entry fun set_profit_sharing<TOKEN>(
|
|
@@ -210,20 +190,20 @@ function getUpdateTailsStakingRegistryConfigTx(input) {
|
|
|
210
190
|
ctx: &TxContext,
|
|
211
191
|
) {
|
|
212
192
|
*/
|
|
213
|
-
function getSetProfitSharingTx(input) {
|
|
214
|
-
|
|
215
|
-
target: "".concat(
|
|
193
|
+
function getSetProfitSharingTx(config, tx, input) {
|
|
194
|
+
tx.moveCall({
|
|
195
|
+
target: "".concat(config.package.typus, "::tails_staking::set_profit_sharing"),
|
|
216
196
|
typeArguments: input.typeArguments,
|
|
217
197
|
arguments: [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
198
|
+
tx.object(config.version.typus),
|
|
199
|
+
tx.object(config.registry.typus.tailsStaking),
|
|
200
|
+
tx.pure(input.levelProfits),
|
|
201
|
+
tx.object(input.coin),
|
|
202
|
+
tx.pure(input.amount),
|
|
203
|
+
tx.pure(input.tsMs),
|
|
224
204
|
],
|
|
225
205
|
});
|
|
226
|
-
return
|
|
206
|
+
return tx;
|
|
227
207
|
}
|
|
228
208
|
/**
|
|
229
209
|
entry fun remove_profit_sharing<TOKEN>(
|
|
@@ -233,15 +213,11 @@ function getSetProfitSharingTx(input) {
|
|
|
233
213
|
ctx: &mut TxContext,
|
|
234
214
|
) {
|
|
235
215
|
*/
|
|
236
|
-
function getRemoveProfitSharingTx(input) {
|
|
237
|
-
|
|
238
|
-
target: "".concat(
|
|
216
|
+
function getRemoveProfitSharingTx(config, tx, input) {
|
|
217
|
+
tx.moveCall({
|
|
218
|
+
target: "".concat(config.package.typus, "::tails_staking::remove_profit_sharing"),
|
|
239
219
|
typeArguments: input.typeArguments,
|
|
240
|
-
arguments: [
|
|
241
|
-
input.tx.object(input.typusEcosystemVersion),
|
|
242
|
-
input.tx.object(input.typusTailsStakingRegistry),
|
|
243
|
-
input.tx.pure(input.recipient),
|
|
244
|
-
],
|
|
220
|
+
arguments: [tx.object(config.version.typus), tx.object(config.registry.typus.tailsStaking), tx.pure(input.recipient)],
|
|
245
221
|
});
|
|
246
|
-
return
|
|
222
|
+
return tx;
|
|
247
223
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
2
2
|
import { KioskClient } from "@mysten/kiosk";
|
|
3
|
+
import { TypusConfig } from "src/utils";
|
|
3
4
|
/**
|
|
4
5
|
public fun stake_tails(
|
|
5
6
|
version: &mut Version,
|
|
@@ -11,11 +12,7 @@ import { KioskClient } from "@mysten/kiosk";
|
|
|
11
12
|
ctx: &mut TxContext,
|
|
12
13
|
) {
|
|
13
14
|
*/
|
|
14
|
-
export declare function getStakeTailsTx(input: {
|
|
15
|
-
tx: TransactionBlock;
|
|
16
|
-
typusPackageId: string;
|
|
17
|
-
typusEcosystemVersion: string;
|
|
18
|
-
typusTailsStakingRegistry: string;
|
|
15
|
+
export declare function getStakeTailsTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
19
16
|
kiosk: string;
|
|
20
17
|
kioskCap: string;
|
|
21
18
|
tails: string;
|
|
@@ -32,11 +29,7 @@ export declare function getStakeTailsTx(input: {
|
|
|
32
29
|
ctx: &TxContext,
|
|
33
30
|
) {
|
|
34
31
|
*/
|
|
35
|
-
export declare function getUnstakeTailsTx(input: {
|
|
36
|
-
tx: TransactionBlock;
|
|
37
|
-
typusPackageId: string;
|
|
38
|
-
typusEcosystemVersion: string;
|
|
39
|
-
typusTailsStakingRegistry: string;
|
|
32
|
+
export declare function getUnstakeTailsTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
40
33
|
kiosk: string;
|
|
41
34
|
kioskCap: string;
|
|
42
35
|
tails: string;
|
|
@@ -54,11 +47,7 @@ export declare function getUnstakeTailsTx(input: {
|
|
|
54
47
|
ctx: &mut TxContext,
|
|
55
48
|
) {
|
|
56
49
|
*/
|
|
57
|
-
export declare function getTransferTailsTx(input: {
|
|
58
|
-
tx: TransactionBlock;
|
|
59
|
-
typusPackageId: string;
|
|
60
|
-
typusEcosystemVersion: string;
|
|
61
|
-
typusTailsStakingRegistry: string;
|
|
50
|
+
export declare function getTransferTailsTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
62
51
|
kiosk: string;
|
|
63
52
|
kioskCap: string;
|
|
64
53
|
tails: string;
|
|
@@ -74,12 +63,7 @@ export declare function getTransferTailsTx(input: {
|
|
|
74
63
|
ctx: &TxContext,
|
|
75
64
|
) {
|
|
76
65
|
*/
|
|
77
|
-
export declare function getDailySignUpTx(
|
|
78
|
-
tx: TransactionBlock;
|
|
79
|
-
typusPackageId: string;
|
|
80
|
-
typusEcosystemVersion: string;
|
|
81
|
-
typusTailsStakingRegistry: string;
|
|
82
|
-
}): Promise<TransactionBlock>;
|
|
66
|
+
export declare function getDailySignUpTx(config: TypusConfig, tx: TransactionBlock): Promise<TransactionBlock>;
|
|
83
67
|
/**
|
|
84
68
|
public fun claim_profit_sharing<TOKEN>(
|
|
85
69
|
version: &mut Version,
|
|
@@ -87,11 +71,7 @@ export declare function getDailySignUpTx(input: {
|
|
|
87
71
|
ctx: &mut TxContext,
|
|
88
72
|
): Balance<TOKEN>
|
|
89
73
|
*/
|
|
90
|
-
export declare function getClaimProfitSharingTx(input: {
|
|
91
|
-
tx: TransactionBlock;
|
|
92
|
-
typusPackageId: string;
|
|
93
|
-
typusEcosystemVersion: string;
|
|
94
|
-
typusTailsStakingRegistry: string;
|
|
74
|
+
export declare function getClaimProfitSharingTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
95
75
|
typeArguments: string[];
|
|
96
76
|
user: string;
|
|
97
77
|
}): Promise<TransactionBlock>;
|
|
@@ -103,11 +83,7 @@ export declare function getClaimProfitSharingTx(input: {
|
|
|
103
83
|
raw: bool,
|
|
104
84
|
) {
|
|
105
85
|
*/
|
|
106
|
-
export declare function getLevelUpTx(input: {
|
|
107
|
-
tx: TransactionBlock;
|
|
108
|
-
typusPackageId: string;
|
|
109
|
-
typusEcosystemVersion: string;
|
|
110
|
-
typusTailsStakingRegistry: string;
|
|
86
|
+
export declare function getLevelUpTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
111
87
|
tails: string;
|
|
112
88
|
raw: boolean;
|
|
113
89
|
}): Promise<TransactionBlock>;
|
|
@@ -121,12 +97,7 @@ export declare function getLevelUpTx(input: {
|
|
|
121
97
|
ctx: &TxContext,
|
|
122
98
|
) {
|
|
123
99
|
*/
|
|
124
|
-
export declare function getExpUpTx(input: {
|
|
125
|
-
tx: TransactionBlock;
|
|
126
|
-
typusPackageId: string;
|
|
127
|
-
typusEcosystemVersion: string;
|
|
128
|
-
typusTailsStakingRegistry: string;
|
|
129
|
-
typusUserRegistry: string;
|
|
100
|
+
export declare function getExpUpTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
130
101
|
tails: string;
|
|
131
102
|
amount: string;
|
|
132
103
|
}): Promise<TransactionBlock>;
|
|
@@ -142,16 +113,15 @@ export declare function getExpUpTx(input: {
|
|
|
142
113
|
ctx: &TxContext,
|
|
143
114
|
) {
|
|
144
115
|
*/
|
|
145
|
-
export declare function getExpUpWithoutStakingTx(input: {
|
|
146
|
-
tx: TransactionBlock;
|
|
147
|
-
typusPackageId: string;
|
|
148
|
-
typusEcosystemVersion: string;
|
|
149
|
-
typusTailsStakingRegistry: string;
|
|
150
|
-
typusUserRegistry: string;
|
|
116
|
+
export declare function getExpUpWithoutStakingTx(config: TypusConfig, tx: TransactionBlock, input: {
|
|
151
117
|
kiosk: string;
|
|
152
118
|
kioskCap: string;
|
|
153
119
|
tails: string;
|
|
154
120
|
amount: string;
|
|
155
121
|
personalKioskPackageId: string | undefined;
|
|
156
122
|
}): Promise<TransactionBlock>;
|
|
157
|
-
export declare function getCreateKioskAndLockNftTx(
|
|
123
|
+
export declare function getCreateKioskAndLockNftTx(config: TypusConfig, tx: TransactionBlock, kioskClient: KioskClient, input: {
|
|
124
|
+
nft_policy: string;
|
|
125
|
+
nft_id: string;
|
|
126
|
+
user: string;
|
|
127
|
+
}): Promise<TransactionBlock>;
|