stable-layer-sdk 1.0.3 → 1.0.4
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/index.cjs +39 -33
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +39 -33
- package/dist/index.mjs.map +2 -2
- package/dist/types/client.test.d.ts +1 -0
- package/dist/types/generated/stable_layer/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/types/generated/stable_layer/deps/bucket_v2_framework/sheet.d.ts +57 -0
- package/dist/types/generated/stable_layer/deps/std/type_name.d.ts +17 -0
- package/dist/types/generated/stable_layer/deps/sui/balance.d.ts +12 -0
- package/dist/types/generated/stable_layer/deps/sui/coin.d.ts +16 -0
- package/dist/types/generated/stable_layer/deps/sui/object.d.ts +8 -0
- package/dist/types/generated/stable_layer/deps/sui/vec_map.d.ts +36 -0
- package/dist/types/generated/stable_layer/deps/sui/vec_set.d.ts +20 -0
- package/dist/types/generated/stable_layer/stable_layer.d.ts +427 -0
- package/dist/types/generated/stable_vault_farm/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/types/generated/stable_vault_farm/deps/bucket_v2_framework/sheet.d.ts +57 -0
- package/dist/types/generated/stable_vault_farm/deps/std/type_name.d.ts +17 -0
- package/dist/types/generated/stable_vault_farm/deps/sui/balance.d.ts +12 -0
- package/dist/types/generated/stable_vault_farm/deps/sui/object.d.ts +8 -0
- package/dist/types/generated/stable_vault_farm/deps/sui/table.d.ts +31 -0
- package/dist/types/generated/stable_vault_farm/deps/sui/vec_map.d.ts +36 -0
- package/dist/types/generated/stable_vault_farm/deps/sui/vec_set.d.ts +20 -0
- package/dist/types/generated/stable_vault_farm/stable_vault_farm.d.ts +242 -0
- package/dist/types/generated/utils/index.d.ts +11 -0
- package/dist/types/generated/yield_usdb/buffer.d.ts +137 -0
- package/dist/types/generated/yield_usdb/deps/bucket_v2_framework/account.d.ts +11 -0
- package/dist/types/generated/yield_usdb/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/types/generated/yield_usdb/deps/sui/balance.d.ts +15 -0
- package/dist/types/generated/yield_usdb/deps/sui/coin.d.ts +16 -0
- package/dist/types/generated/yield_usdb/deps/sui/object.d.ts +8 -0
- package/dist/types/generated/yield_usdb/deps/sui/vec_set.d.ts +20 -0
- package/dist/types/generated/yield_usdb/yield_usdb.d.ts +475 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/interface.d.ts +32 -0
- package/dist/types/libs/constants.d.ts +15 -0
- package/package.json +4 -4
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.js';
|
|
5
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const Created: MoveStruct<{
|
|
7
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
max_lp_supply: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
9
|
+
abstract_address: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::Created">;
|
|
11
|
+
export declare const MaxSupplyUpdated: MoveStruct<{
|
|
12
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
previous_max_lp_supply: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
+
current_max_lp_supply: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
15
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::MaxSupplyUpdated">;
|
|
16
|
+
export declare const Minted: MoveStruct<{
|
|
17
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
18
|
+
usdb_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
19
|
+
lp_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
20
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::Minted">;
|
|
21
|
+
export declare const Burned: MoveStruct<{
|
|
22
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
23
|
+
lp_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
24
|
+
usdb_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
25
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::Burned">;
|
|
26
|
+
export declare const Claimed: MoveStruct<{
|
|
27
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
28
|
+
reward_type: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
29
|
+
reward_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::Claimed">;
|
|
31
|
+
export declare const Collected: MoveStruct<{
|
|
32
|
+
vault_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
33
|
+
usdb_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
34
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::Collected">;
|
|
35
|
+
export declare const YieldVault: MoveStruct<{
|
|
36
|
+
id: MoveStruct<{
|
|
37
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
38
|
+
}, "0x2::object::UID">;
|
|
39
|
+
max_lp_supply: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
40
|
+
lp_treasury_cap: MoveStruct<{
|
|
41
|
+
id: MoveStruct<{
|
|
42
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
43
|
+
}, "0x2::object::UID">;
|
|
44
|
+
total_supply: MoveStruct<{
|
|
45
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
46
|
+
}, "0x2::balance::Supply">;
|
|
47
|
+
}, "0x2::coin::TreasuryCap">;
|
|
48
|
+
abstract_account: MoveStruct<{
|
|
49
|
+
id: MoveStruct<{
|
|
50
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
51
|
+
}, "0x2::object::UID">;
|
|
52
|
+
alias: import("@mysten/sui/bcs").BcsType<string | null, string | null | undefined, "Option<string>">;
|
|
53
|
+
}, "bucket_v2_framework::account::Account">;
|
|
54
|
+
buffer: MoveStruct<{
|
|
55
|
+
balance: MoveStruct<{
|
|
56
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
57
|
+
}, "0x2::balance::Balance">;
|
|
58
|
+
flow_rate: MoveStruct<{
|
|
59
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
60
|
+
}, "bucket_v2_framework::double::Double">;
|
|
61
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
62
|
+
}, "@local-pkg/yield_usdb.move::buffer::Buffer">;
|
|
63
|
+
managers: MoveStruct<{
|
|
64
|
+
contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
|
|
65
|
+
length: number;
|
|
66
|
+
}, string>;
|
|
67
|
+
}, "0x2::vec_set::VecSet<bytes[32]>">;
|
|
68
|
+
versions: MoveStruct<{
|
|
69
|
+
contents: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
70
|
+
length: number;
|
|
71
|
+
}, string>;
|
|
72
|
+
}, "0x2::vec_set::VecSet<u16>">;
|
|
73
|
+
}, "@local-pkg/yield_usdb.move::yield_usdb::YieldVault">;
|
|
74
|
+
export interface PackageVersionOptions {
|
|
75
|
+
package?: string;
|
|
76
|
+
arguments?: [
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
export declare function packageVersion(options?: PackageVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
80
|
+
export interface NewArguments {
|
|
81
|
+
AdminCap: RawTransactionArgument<string>;
|
|
82
|
+
savingPool: RawTransactionArgument<string>;
|
|
83
|
+
lpTreasuryCap: RawTransactionArgument<string>;
|
|
84
|
+
accountObj: RawTransactionArgument<string>;
|
|
85
|
+
maxLpSupply: RawTransactionArgument<number | bigint>;
|
|
86
|
+
}
|
|
87
|
+
export interface NewOptions {
|
|
88
|
+
package?: string;
|
|
89
|
+
arguments: NewArguments | [
|
|
90
|
+
AdminCap: RawTransactionArgument<string>,
|
|
91
|
+
savingPool: RawTransactionArgument<string>,
|
|
92
|
+
lpTreasuryCap: RawTransactionArgument<string>,
|
|
93
|
+
accountObj: RawTransactionArgument<string>,
|
|
94
|
+
maxLpSupply: RawTransactionArgument<number | bigint>
|
|
95
|
+
];
|
|
96
|
+
typeArguments: [
|
|
97
|
+
string,
|
|
98
|
+
string
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
/** Admin Funs */
|
|
102
|
+
export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
103
|
+
export interface DefaultArguments {
|
|
104
|
+
adminCap: RawTransactionArgument<string>;
|
|
105
|
+
savingPool: RawTransactionArgument<string>;
|
|
106
|
+
lpTreasuryCap: RawTransactionArgument<string>;
|
|
107
|
+
accountObj: RawTransactionArgument<string>;
|
|
108
|
+
maxLpSupply: RawTransactionArgument<number | bigint>;
|
|
109
|
+
}
|
|
110
|
+
export interface DefaultOptions {
|
|
111
|
+
package?: string;
|
|
112
|
+
arguments: DefaultArguments | [
|
|
113
|
+
adminCap: RawTransactionArgument<string>,
|
|
114
|
+
savingPool: RawTransactionArgument<string>,
|
|
115
|
+
lpTreasuryCap: RawTransactionArgument<string>,
|
|
116
|
+
accountObj: RawTransactionArgument<string>,
|
|
117
|
+
maxLpSupply: RawTransactionArgument<number | bigint>
|
|
118
|
+
];
|
|
119
|
+
typeArguments: [
|
|
120
|
+
string,
|
|
121
|
+
string
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
export declare function _default(options: DefaultOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
|
+
export interface DestroyArguments {
|
|
126
|
+
vault: RawTransactionArgument<string>;
|
|
127
|
+
AdminCap: RawTransactionArgument<string>;
|
|
128
|
+
}
|
|
129
|
+
export interface DestroyOptions {
|
|
130
|
+
package?: string;
|
|
131
|
+
arguments: DestroyArguments | [
|
|
132
|
+
vault: RawTransactionArgument<string>,
|
|
133
|
+
AdminCap: RawTransactionArgument<string>
|
|
134
|
+
];
|
|
135
|
+
typeArguments: [
|
|
136
|
+
string,
|
|
137
|
+
string
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
export declare function destroy(options: DestroyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
141
|
+
export interface AddManagerArguments {
|
|
142
|
+
vault: RawTransactionArgument<string>;
|
|
143
|
+
AdminCap: RawTransactionArgument<string>;
|
|
144
|
+
manager: RawTransactionArgument<string>;
|
|
145
|
+
}
|
|
146
|
+
export interface AddManagerOptions {
|
|
147
|
+
package?: string;
|
|
148
|
+
arguments: AddManagerArguments | [
|
|
149
|
+
vault: RawTransactionArgument<string>,
|
|
150
|
+
AdminCap: RawTransactionArgument<string>,
|
|
151
|
+
manager: RawTransactionArgument<string>
|
|
152
|
+
];
|
|
153
|
+
typeArguments: [
|
|
154
|
+
string,
|
|
155
|
+
string
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
export declare function addManager(options: AddManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
159
|
+
export interface RemoveManagerArguments {
|
|
160
|
+
vault: RawTransactionArgument<string>;
|
|
161
|
+
AdminCap: RawTransactionArgument<string>;
|
|
162
|
+
manager: RawTransactionArgument<string>;
|
|
163
|
+
}
|
|
164
|
+
export interface RemoveManagerOptions {
|
|
165
|
+
package?: string;
|
|
166
|
+
arguments: RemoveManagerArguments | [
|
|
167
|
+
vault: RawTransactionArgument<string>,
|
|
168
|
+
AdminCap: RawTransactionArgument<string>,
|
|
169
|
+
manager: RawTransactionArgument<string>
|
|
170
|
+
];
|
|
171
|
+
typeArguments: [
|
|
172
|
+
string,
|
|
173
|
+
string
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
export declare function removeManager(options: RemoveManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
177
|
+
export interface AddVersionArguments {
|
|
178
|
+
vault: RawTransactionArgument<string>;
|
|
179
|
+
AdminCap: RawTransactionArgument<string>;
|
|
180
|
+
version: RawTransactionArgument<number>;
|
|
181
|
+
}
|
|
182
|
+
export interface AddVersionOptions {
|
|
183
|
+
package?: string;
|
|
184
|
+
arguments: AddVersionArguments | [
|
|
185
|
+
vault: RawTransactionArgument<string>,
|
|
186
|
+
AdminCap: RawTransactionArgument<string>,
|
|
187
|
+
version: RawTransactionArgument<number>
|
|
188
|
+
];
|
|
189
|
+
typeArguments: [
|
|
190
|
+
string,
|
|
191
|
+
string
|
|
192
|
+
];
|
|
193
|
+
}
|
|
194
|
+
export declare function addVersion(options: AddVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
195
|
+
export interface RemoveVersionArguments {
|
|
196
|
+
vault: RawTransactionArgument<string>;
|
|
197
|
+
AdminCap: RawTransactionArgument<string>;
|
|
198
|
+
version: RawTransactionArgument<number>;
|
|
199
|
+
}
|
|
200
|
+
export interface RemoveVersionOptions {
|
|
201
|
+
package?: string;
|
|
202
|
+
arguments: RemoveVersionArguments | [
|
|
203
|
+
vault: RawTransactionArgument<string>,
|
|
204
|
+
AdminCap: RawTransactionArgument<string>,
|
|
205
|
+
version: RawTransactionArgument<number>
|
|
206
|
+
];
|
|
207
|
+
typeArguments: [
|
|
208
|
+
string,
|
|
209
|
+
string
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
export declare function removeVersion(options: RemoveVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
213
|
+
export interface UpdateMaxLpSupplyArguments {
|
|
214
|
+
vault: RawTransactionArgument<string>;
|
|
215
|
+
AdminCap: RawTransactionArgument<string>;
|
|
216
|
+
maxLpSupply: RawTransactionArgument<number | bigint>;
|
|
217
|
+
}
|
|
218
|
+
export interface UpdateMaxLpSupplyOptions {
|
|
219
|
+
package?: string;
|
|
220
|
+
arguments: UpdateMaxLpSupplyArguments | [
|
|
221
|
+
vault: RawTransactionArgument<string>,
|
|
222
|
+
AdminCap: RawTransactionArgument<string>,
|
|
223
|
+
maxLpSupply: RawTransactionArgument<number | bigint>
|
|
224
|
+
];
|
|
225
|
+
typeArguments: [
|
|
226
|
+
string,
|
|
227
|
+
string
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
export declare function updateMaxLpSupply(options: UpdateMaxLpSupplyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
231
|
+
export interface MintArguments {
|
|
232
|
+
vault: RawTransactionArgument<string>;
|
|
233
|
+
treasury: RawTransactionArgument<string>;
|
|
234
|
+
savingPool: RawTransactionArgument<string>;
|
|
235
|
+
usdbCoin: RawTransactionArgument<string>;
|
|
236
|
+
}
|
|
237
|
+
export interface MintOptions {
|
|
238
|
+
package?: string;
|
|
239
|
+
arguments: MintArguments | [
|
|
240
|
+
vault: RawTransactionArgument<string>,
|
|
241
|
+
treasury: RawTransactionArgument<string>,
|
|
242
|
+
savingPool: RawTransactionArgument<string>,
|
|
243
|
+
usdbCoin: RawTransactionArgument<string>
|
|
244
|
+
];
|
|
245
|
+
typeArguments: [
|
|
246
|
+
string,
|
|
247
|
+
string
|
|
248
|
+
];
|
|
249
|
+
}
|
|
250
|
+
/** Public Fun */
|
|
251
|
+
export declare function mint(options: MintOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
252
|
+
export interface ReleaseArguments {
|
|
253
|
+
vault: RawTransactionArgument<string>;
|
|
254
|
+
treasury: RawTransactionArgument<string>;
|
|
255
|
+
savingPool: RawTransactionArgument<string>;
|
|
256
|
+
}
|
|
257
|
+
export interface ReleaseOptions {
|
|
258
|
+
package?: string;
|
|
259
|
+
arguments: ReleaseArguments | [
|
|
260
|
+
vault: RawTransactionArgument<string>,
|
|
261
|
+
treasury: RawTransactionArgument<string>,
|
|
262
|
+
savingPool: RawTransactionArgument<string>
|
|
263
|
+
];
|
|
264
|
+
typeArguments: [
|
|
265
|
+
string,
|
|
266
|
+
string
|
|
267
|
+
];
|
|
268
|
+
}
|
|
269
|
+
export declare function release(options: ReleaseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
270
|
+
export interface BurnArguments {
|
|
271
|
+
vault: RawTransactionArgument<string>;
|
|
272
|
+
treasury: RawTransactionArgument<string>;
|
|
273
|
+
savingPool: RawTransactionArgument<string>;
|
|
274
|
+
lpCoin: RawTransactionArgument<string>;
|
|
275
|
+
}
|
|
276
|
+
export interface BurnOptions {
|
|
277
|
+
package?: string;
|
|
278
|
+
arguments: BurnArguments | [
|
|
279
|
+
vault: RawTransactionArgument<string>,
|
|
280
|
+
treasury: RawTransactionArgument<string>,
|
|
281
|
+
savingPool: RawTransactionArgument<string>,
|
|
282
|
+
lpCoin: RawTransactionArgument<string>
|
|
283
|
+
];
|
|
284
|
+
typeArguments: [
|
|
285
|
+
string,
|
|
286
|
+
string
|
|
287
|
+
];
|
|
288
|
+
}
|
|
289
|
+
export declare function burn(options: BurnOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
290
|
+
export interface ClaimArguments {
|
|
291
|
+
vault: RawTransactionArgument<string>;
|
|
292
|
+
rewardManager: RawTransactionArgument<string>;
|
|
293
|
+
config: RawTransactionArgument<string>;
|
|
294
|
+
savingPool: RawTransactionArgument<string>;
|
|
295
|
+
accountReq: RawTransactionArgument<string>;
|
|
296
|
+
}
|
|
297
|
+
export interface ClaimOptions {
|
|
298
|
+
package?: string;
|
|
299
|
+
arguments: ClaimArguments | [
|
|
300
|
+
vault: RawTransactionArgument<string>,
|
|
301
|
+
rewardManager: RawTransactionArgument<string>,
|
|
302
|
+
config: RawTransactionArgument<string>,
|
|
303
|
+
savingPool: RawTransactionArgument<string>,
|
|
304
|
+
accountReq: RawTransactionArgument<string>
|
|
305
|
+
];
|
|
306
|
+
typeArguments: [
|
|
307
|
+
string,
|
|
308
|
+
string,
|
|
309
|
+
string
|
|
310
|
+
];
|
|
311
|
+
}
|
|
312
|
+
/** Manager Funs */
|
|
313
|
+
export declare function claim(options: ClaimOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
314
|
+
export interface CollectArguments {
|
|
315
|
+
vault: RawTransactionArgument<string>;
|
|
316
|
+
treasury: RawTransactionArgument<string>;
|
|
317
|
+
savingPool: RawTransactionArgument<string>;
|
|
318
|
+
usdbCoin: RawTransactionArgument<string>;
|
|
319
|
+
accountReq: RawTransactionArgument<string>;
|
|
320
|
+
bufferTime: RawTransactionArgument<number | bigint>;
|
|
321
|
+
}
|
|
322
|
+
export interface CollectOptions {
|
|
323
|
+
package?: string;
|
|
324
|
+
arguments: CollectArguments | [
|
|
325
|
+
vault: RawTransactionArgument<string>,
|
|
326
|
+
treasury: RawTransactionArgument<string>,
|
|
327
|
+
savingPool: RawTransactionArgument<string>,
|
|
328
|
+
usdbCoin: RawTransactionArgument<string>,
|
|
329
|
+
accountReq: RawTransactionArgument<string>,
|
|
330
|
+
bufferTime: RawTransactionArgument<number | bigint>
|
|
331
|
+
];
|
|
332
|
+
typeArguments: [
|
|
333
|
+
string,
|
|
334
|
+
string
|
|
335
|
+
];
|
|
336
|
+
}
|
|
337
|
+
export declare function collect(options: CollectOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
338
|
+
export interface IdArguments {
|
|
339
|
+
vault: RawTransactionArgument<string>;
|
|
340
|
+
}
|
|
341
|
+
export interface IdOptions {
|
|
342
|
+
package?: string;
|
|
343
|
+
arguments: IdArguments | [
|
|
344
|
+
vault: RawTransactionArgument<string>
|
|
345
|
+
];
|
|
346
|
+
typeArguments: [
|
|
347
|
+
string,
|
|
348
|
+
string
|
|
349
|
+
];
|
|
350
|
+
}
|
|
351
|
+
/** Getter Funs */
|
|
352
|
+
export declare function id(options: IdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
353
|
+
export interface MaxLpSupplyArguments {
|
|
354
|
+
vault: RawTransactionArgument<string>;
|
|
355
|
+
}
|
|
356
|
+
export interface MaxLpSupplyOptions {
|
|
357
|
+
package?: string;
|
|
358
|
+
arguments: MaxLpSupplyArguments | [
|
|
359
|
+
vault: RawTransactionArgument<string>
|
|
360
|
+
];
|
|
361
|
+
typeArguments: [
|
|
362
|
+
string,
|
|
363
|
+
string
|
|
364
|
+
];
|
|
365
|
+
}
|
|
366
|
+
export declare function maxLpSupply(options: MaxLpSupplyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
367
|
+
export interface UsdbReserveArguments {
|
|
368
|
+
vault: RawTransactionArgument<string>;
|
|
369
|
+
savingPool: RawTransactionArgument<string>;
|
|
370
|
+
}
|
|
371
|
+
export interface UsdbReserveOptions {
|
|
372
|
+
package?: string;
|
|
373
|
+
arguments: UsdbReserveArguments | [
|
|
374
|
+
vault: RawTransactionArgument<string>,
|
|
375
|
+
savingPool: RawTransactionArgument<string>
|
|
376
|
+
];
|
|
377
|
+
typeArguments: [
|
|
378
|
+
string,
|
|
379
|
+
string
|
|
380
|
+
];
|
|
381
|
+
}
|
|
382
|
+
export declare function usdbReserve(options: UsdbReserveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
383
|
+
export interface LpSupplyArguments {
|
|
384
|
+
vault: RawTransactionArgument<string>;
|
|
385
|
+
}
|
|
386
|
+
export interface LpSupplyOptions {
|
|
387
|
+
package?: string;
|
|
388
|
+
arguments: LpSupplyArguments | [
|
|
389
|
+
vault: RawTransactionArgument<string>
|
|
390
|
+
];
|
|
391
|
+
typeArguments: [
|
|
392
|
+
string,
|
|
393
|
+
string
|
|
394
|
+
];
|
|
395
|
+
}
|
|
396
|
+
export declare function lpSupply(options: LpSupplyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
397
|
+
export interface MintRatioArguments {
|
|
398
|
+
vault: RawTransactionArgument<string>;
|
|
399
|
+
savingPool: RawTransactionArgument<string>;
|
|
400
|
+
}
|
|
401
|
+
export interface MintRatioOptions {
|
|
402
|
+
package?: string;
|
|
403
|
+
arguments: MintRatioArguments | [
|
|
404
|
+
vault: RawTransactionArgument<string>,
|
|
405
|
+
savingPool: RawTransactionArgument<string>
|
|
406
|
+
];
|
|
407
|
+
typeArguments: [
|
|
408
|
+
string,
|
|
409
|
+
string
|
|
410
|
+
];
|
|
411
|
+
}
|
|
412
|
+
export declare function mintRatio(options: MintRatioOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
413
|
+
export interface BurnRatioArguments {
|
|
414
|
+
vault: RawTransactionArgument<string>;
|
|
415
|
+
savingPool: RawTransactionArgument<string>;
|
|
416
|
+
}
|
|
417
|
+
export interface BurnRatioOptions {
|
|
418
|
+
package?: string;
|
|
419
|
+
arguments: BurnRatioArguments | [
|
|
420
|
+
vault: RawTransactionArgument<string>,
|
|
421
|
+
savingPool: RawTransactionArgument<string>
|
|
422
|
+
];
|
|
423
|
+
typeArguments: [
|
|
424
|
+
string,
|
|
425
|
+
string
|
|
426
|
+
];
|
|
427
|
+
}
|
|
428
|
+
export declare function burnRatio(options: BurnRatioOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
429
|
+
export interface ClaimableRewardAmountArguments {
|
|
430
|
+
vault: RawTransactionArgument<string>;
|
|
431
|
+
rewardManager: RawTransactionArgument<string>;
|
|
432
|
+
savingPool: RawTransactionArgument<string>;
|
|
433
|
+
}
|
|
434
|
+
export interface ClaimableRewardAmountOptions {
|
|
435
|
+
package?: string;
|
|
436
|
+
arguments: ClaimableRewardAmountArguments | [
|
|
437
|
+
vault: RawTransactionArgument<string>,
|
|
438
|
+
rewardManager: RawTransactionArgument<string>,
|
|
439
|
+
savingPool: RawTransactionArgument<string>
|
|
440
|
+
];
|
|
441
|
+
typeArguments: [
|
|
442
|
+
string,
|
|
443
|
+
string,
|
|
444
|
+
string
|
|
445
|
+
];
|
|
446
|
+
}
|
|
447
|
+
export declare function claimableRewardAmount(options: ClaimableRewardAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
448
|
+
export interface AbstractAddressArguments {
|
|
449
|
+
vault: RawTransactionArgument<string>;
|
|
450
|
+
}
|
|
451
|
+
export interface AbstractAddressOptions {
|
|
452
|
+
package?: string;
|
|
453
|
+
arguments: AbstractAddressArguments | [
|
|
454
|
+
vault: RawTransactionArgument<string>
|
|
455
|
+
];
|
|
456
|
+
typeArguments: [
|
|
457
|
+
string,
|
|
458
|
+
string
|
|
459
|
+
];
|
|
460
|
+
}
|
|
461
|
+
export declare function abstractAddress(options: AbstractAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
462
|
+
export interface BufferArguments {
|
|
463
|
+
vault: RawTransactionArgument<string>;
|
|
464
|
+
}
|
|
465
|
+
export interface BufferOptions {
|
|
466
|
+
package?: string;
|
|
467
|
+
arguments: BufferArguments | [
|
|
468
|
+
vault: RawTransactionArgument<string>
|
|
469
|
+
];
|
|
470
|
+
typeArguments: [
|
|
471
|
+
string,
|
|
472
|
+
string
|
|
473
|
+
];
|
|
474
|
+
}
|
|
475
|
+
export declare function buffer(options: BufferOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StableLayerConfig, MintTransactionParams, BurnTransactionParams, ClaimTransactionParams, StableCoinType, CoinResult } from "./interface.js";
|
|
2
|
+
export declare class StableLayerClient {
|
|
3
|
+
private bucketClient;
|
|
4
|
+
private suiClient;
|
|
5
|
+
private sender;
|
|
6
|
+
constructor(config: StableLayerConfig);
|
|
7
|
+
buildMintTx({ tx, lpToken, usdcCoin, sender, autoTransfer, }: MintTransactionParams): Promise<CoinResult | undefined>;
|
|
8
|
+
buildBurnTx({ tx, lpToken, amount, all, sender, autoTransfer, }: BurnTransactionParams): Promise<CoinResult | undefined>;
|
|
9
|
+
buildClaimTx({ tx, lpToken, sender, autoTransfer, }: ClaimTransactionParams): Promise<CoinResult | undefined>;
|
|
10
|
+
getTotalSupply(): Promise<string | undefined>;
|
|
11
|
+
getTotalSupplyByCoinName(coinName: StableCoinType): Promise<string | undefined>;
|
|
12
|
+
private getBucketSavingPool;
|
|
13
|
+
private getBucketPSMPool;
|
|
14
|
+
private checkResponse;
|
|
15
|
+
private releaseRewards;
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Transaction, TransactionResult } from "@mysten/sui/transactions";
|
|
2
|
+
export interface StableLayerConfig {
|
|
3
|
+
network: "mainnet" | "testnet";
|
|
4
|
+
sender: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MintTransactionParams {
|
|
7
|
+
tx: Transaction;
|
|
8
|
+
lpToken: StableCoinType;
|
|
9
|
+
usdcCoin: TransactionResult;
|
|
10
|
+
amount: bigint;
|
|
11
|
+
sender?: string;
|
|
12
|
+
autoTransfer?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface BurnTransactionParams {
|
|
15
|
+
tx: Transaction;
|
|
16
|
+
lpToken: StableCoinType;
|
|
17
|
+
amount?: bigint;
|
|
18
|
+
all?: boolean;
|
|
19
|
+
sender?: string;
|
|
20
|
+
autoTransfer?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ClaimTransactionParams {
|
|
23
|
+
tx: Transaction;
|
|
24
|
+
lpToken: StableCoinType;
|
|
25
|
+
sender?: string;
|
|
26
|
+
autoTransfer?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type StableCoinType = "btcUSDC";
|
|
29
|
+
export type CoinResult = TransactionResult | {
|
|
30
|
+
$kind: "NestedResult";
|
|
31
|
+
NestedResult: [number, number];
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StableCoinType } from "../interface.js";
|
|
2
|
+
export declare const STABLE_VAULT = "0x65f38160110cd6859d05f338ff54b4f462883bb6f87c667a65c0fb0e537410a7";
|
|
3
|
+
export declare const USDC_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
|
|
4
|
+
export declare const STABLE_LP_TYPE = "0xb75744fadcbfc174627567ca29645d0af8f6e6fd01b6f57c75a08cd3fb97c567::lake_usdc::LakeUSDC";
|
|
5
|
+
export declare const YUSDB_TYPE = "0xac718b4b672d7f461fe7e86847166ff9c23cadba217397f0848a95bdea1f1051::yesusdb::YesUSDB";
|
|
6
|
+
export declare const STABLE_LAYER_PACKAGE_ID = "0x41e25d09e20cf3bc43fe321e51ef178fac419ae47b783a7161982158fc9f17d6";
|
|
7
|
+
export declare const STABLE_VAULT_FARM_PACKAGE_ID = "0xd5b9fb5a964fa9c274e07a788d7b6d36d8df1c73e2e6f795f8db852621470b70";
|
|
8
|
+
export declare const SAVING_TYPE = "0x38f61c75fa8407140294c84167dd57684580b55c3066883b48dedc344b1cde1e::susdb::SUSDB";
|
|
9
|
+
export declare const YIELD_VAULT = "0x0a7f6325253157cd437812fea0ceee9a6b96f2ec5eac410da6df39558ff3a4d1";
|
|
10
|
+
export declare const STABLE_REGISTRY = "0x213f4d584c0770f455bb98c94a4ee5ea9ddbc3d4ebb98a0ad6d093eb6da41642";
|
|
11
|
+
export declare const STABLE_VAULT_FARM_ENTITY_TYPE = "0xc1025fe014b03d33b207b5afb0ba04293be87fab438c1418a26a75c2fe05c223::stable_vault_farm::StableVaultFarmEntity<0xb75744fadcbfc174627567ca29645d0af8f6e6fd01b6f57c75a08cd3fb97c567::lake_usdc::LakeUSDC, 0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC>";
|
|
12
|
+
export declare const STABLE_VAULT_FARM = "0xe958b7d102b33bf3c09addb0e2cdff102ff2c93afe407ec5c2a541e8959a650c";
|
|
13
|
+
export declare const YIELD_USDB_PACKAGE_ID = "0x203eebc39442014a1b8180f3b8ed70143dac2c5d28ba5703fe34c21052728705";
|
|
14
|
+
export declare const BTC_USD_TYPE = "0x6d9fc33611f4881a3f5c0cd4899d95a862236ce52b3a38fef039077b0c5b5834::btc_usdc::BtcUSDC";
|
|
15
|
+
export declare const STABLE_COIN_TYPES: Record<StableCoinType, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stable-layer-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A TypeScript SDK for Stable Layer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "./dist/index.cjs",
|
|
11
11
|
"module": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
15
|
+
"types": "./dist/types/index.d.ts",
|
|
16
16
|
"require": "./dist/index.cjs",
|
|
17
17
|
"import": "./dist/index.mjs",
|
|
18
18
|
"default": "./dist/index.mjs"
|
|
19
19
|
},
|
|
20
20
|
"./*": {
|
|
21
|
-
"types": "./dist/*.d.ts",
|
|
21
|
+
"types": "./dist/types/*.d.ts",
|
|
22
22
|
"require": "./dist/*.cjs",
|
|
23
23
|
"import": "./dist/*.mjs",
|
|
24
24
|
"default": "./dist/*.mjs"
|