@typus/typus-perp-sdk 1.0.30 → 1.0.31
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/src/fetch.d.ts +3 -0
- package/dist/src/fetch.js +3 -1
- package/dist/src/typus_perp/admin/functions.d.ts +25 -25
- package/dist/src/typus_perp/admin/functions.js +66 -53
- package/dist/src/typus_perp/admin/structs.d.ts +222 -222
- package/dist/src/typus_perp/admin/structs.js +256 -256
- package/dist/src/typus_perp/error/functions.d.ts +67 -67
- package/dist/src/typus_perp/error/functions.js +201 -134
- package/dist/src/typus_perp/escrow/functions.d.ts +3 -3
- package/dist/src/typus_perp/escrow/functions.js +9 -6
- package/dist/src/typus_perp/lending/functions.d.ts +15 -0
- package/dist/src/typus_perp/lending/functions.js +22 -0
- package/dist/src/typus_perp/lp-pool/functions.d.ts +102 -63
- package/dist/src/typus_perp/lp-pool/functions.js +243 -123
- package/dist/src/typus_perp/lp-pool/structs.d.ts +616 -348
- package/dist/src/typus_perp/lp-pool/structs.js +1202 -768
- package/dist/src/typus_perp/math/functions.d.ts +16 -5
- package/dist/src/typus_perp/math/functions.js +33 -12
- package/dist/src/typus_perp/position/functions.d.ts +86 -86
- package/dist/src/typus_perp/position/functions.js +223 -157
- package/dist/src/typus_perp/symbol/functions.d.ts +4 -4
- package/dist/src/typus_perp/symbol/functions.js +14 -10
- package/dist/src/typus_perp/tlp/functions.d.ts +5 -5
- package/dist/src/typus_perp/tlp/functions.js +17 -12
- package/dist/src/typus_perp/token-interface/functions.d.ts +2 -2
- package/dist/src/typus_perp/token-interface/functions.js +6 -4
- package/dist/src/typus_perp/trading/functions.d.ts +75 -75
- package/dist/src/typus_perp/trading/functions.js +189 -138
- package/dist/src/typus_perp/trading/structs.d.ts +6 -0
- package/dist/src/typus_perp/trading/structs.js +6 -0
- package/dist/src/typus_perp/treasury-caps/functions.d.ts +4 -4
- package/dist/src/typus_perp/treasury-caps/functions.js +14 -10
- package/package.json +2 -2
|
@@ -7,338 +7,6 @@ import { Vector } from "../../_framework/vector";
|
|
|
7
7
|
import { UnsettledBidReceipt } from "../escrow/structs";
|
|
8
8
|
import { PKG_V1 } from "../index";
|
|
9
9
|
import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
|
|
10
|
-
export declare function isConfig(type: string): boolean;
|
|
11
|
-
export interface ConfigFields {
|
|
12
|
-
oracleId: ToField<"address">;
|
|
13
|
-
liquidityTokenDecimal: ToField<"u64">;
|
|
14
|
-
spotConfig: ToField<SpotConfig>;
|
|
15
|
-
marginConfig: ToField<MarginConfig>;
|
|
16
|
-
u64Padding: ToField<Vector<"u64">>;
|
|
17
|
-
}
|
|
18
|
-
export type ConfigReified = Reified<Config, ConfigFields>;
|
|
19
|
-
export declare class Config implements StructClass {
|
|
20
|
-
__StructClass: true;
|
|
21
|
-
static readonly $typeName: string;
|
|
22
|
-
static readonly $numTypeParams = 0;
|
|
23
|
-
static readonly $isPhantom: readonly [];
|
|
24
|
-
readonly $typeName: string;
|
|
25
|
-
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::Config`;
|
|
26
|
-
readonly $typeArgs: [];
|
|
27
|
-
readonly $isPhantom: readonly [];
|
|
28
|
-
readonly oracleId: ToField<"address">;
|
|
29
|
-
readonly liquidityTokenDecimal: ToField<"u64">;
|
|
30
|
-
readonly spotConfig: ToField<SpotConfig>;
|
|
31
|
-
readonly marginConfig: ToField<MarginConfig>;
|
|
32
|
-
readonly u64Padding: ToField<Vector<"u64">>;
|
|
33
|
-
private constructor();
|
|
34
|
-
static reified(): ConfigReified;
|
|
35
|
-
static get r(): reified.StructClassReified<Config, ConfigFields>;
|
|
36
|
-
static phantom(): PhantomReified<ToTypeStr<Config>>;
|
|
37
|
-
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::Config" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::Config">;
|
|
38
|
-
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
39
|
-
oracle_id: string;
|
|
40
|
-
liquidity_token_decimal: string;
|
|
41
|
-
spot_config: {
|
|
42
|
-
min_deposit: string;
|
|
43
|
-
max_capacity: string;
|
|
44
|
-
target_weight_bp: string;
|
|
45
|
-
basic_mint_fee_bp: string;
|
|
46
|
-
additional_mint_fee_bp: string;
|
|
47
|
-
basic_burn_fee_bp: string;
|
|
48
|
-
additional_burn_fee_bp: string;
|
|
49
|
-
swap_fee_bp: string;
|
|
50
|
-
swap_fee_protocol_share_bp: string;
|
|
51
|
-
lending_protocol_share_bp: string;
|
|
52
|
-
u64_padding: string[];
|
|
53
|
-
};
|
|
54
|
-
margin_config: {
|
|
55
|
-
basic_borrow_rate_0: string;
|
|
56
|
-
basic_borrow_rate_1: string;
|
|
57
|
-
basic_borrow_rate_2: string;
|
|
58
|
-
utilization_threshold_bp_0: string;
|
|
59
|
-
utilization_threshold_bp_1: string;
|
|
60
|
-
borrow_interval_ts_ms: string;
|
|
61
|
-
max_order_reserve_ratio_bp: string;
|
|
62
|
-
u64_padding: string[];
|
|
63
|
-
};
|
|
64
|
-
u64_padding: string[];
|
|
65
|
-
}, {
|
|
66
|
-
oracle_id: string;
|
|
67
|
-
liquidity_token_decimal: string | number | bigint;
|
|
68
|
-
spot_config: {
|
|
69
|
-
min_deposit: string | number | bigint;
|
|
70
|
-
max_capacity: string | number | bigint;
|
|
71
|
-
target_weight_bp: string | number | bigint;
|
|
72
|
-
basic_mint_fee_bp: string | number | bigint;
|
|
73
|
-
additional_mint_fee_bp: string | number | bigint;
|
|
74
|
-
basic_burn_fee_bp: string | number | bigint;
|
|
75
|
-
additional_burn_fee_bp: string | number | bigint;
|
|
76
|
-
swap_fee_bp: string | number | bigint;
|
|
77
|
-
swap_fee_protocol_share_bp: string | number | bigint;
|
|
78
|
-
lending_protocol_share_bp: string | number | bigint;
|
|
79
|
-
u64_padding: Iterable<string | number | bigint> & {
|
|
80
|
-
length: number;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
margin_config: {
|
|
84
|
-
basic_borrow_rate_0: string | number | bigint;
|
|
85
|
-
basic_borrow_rate_1: string | number | bigint;
|
|
86
|
-
basic_borrow_rate_2: string | number | bigint;
|
|
87
|
-
utilization_threshold_bp_0: string | number | bigint;
|
|
88
|
-
utilization_threshold_bp_1: string | number | bigint;
|
|
89
|
-
borrow_interval_ts_ms: string | number | bigint;
|
|
90
|
-
max_order_reserve_ratio_bp: string | number | bigint;
|
|
91
|
-
u64_padding: Iterable<string | number | bigint> & {
|
|
92
|
-
length: number;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
u64_padding: Iterable<string | number | bigint> & {
|
|
96
|
-
length: number;
|
|
97
|
-
};
|
|
98
|
-
}>;
|
|
99
|
-
static fromFields(fields: Record<string, any>): Config;
|
|
100
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): Config;
|
|
101
|
-
static fromBcs(data: Uint8Array): Config;
|
|
102
|
-
toJSONField(): {
|
|
103
|
-
oracleId: string;
|
|
104
|
-
liquidityTokenDecimal: string;
|
|
105
|
-
spotConfig: {
|
|
106
|
-
minDeposit: string;
|
|
107
|
-
maxCapacity: string;
|
|
108
|
-
targetWeightBp: string;
|
|
109
|
-
basicMintFeeBp: string;
|
|
110
|
-
additionalMintFeeBp: string;
|
|
111
|
-
basicBurnFeeBp: string;
|
|
112
|
-
additionalBurnFeeBp: string;
|
|
113
|
-
swapFeeBp: string;
|
|
114
|
-
swapFeeProtocolShareBp: string;
|
|
115
|
-
lendingProtocolShareBp: string;
|
|
116
|
-
u64Padding: string[];
|
|
117
|
-
};
|
|
118
|
-
marginConfig: {
|
|
119
|
-
basicBorrowRate0: string;
|
|
120
|
-
basicBorrowRate1: string;
|
|
121
|
-
basicBorrowRate2: string;
|
|
122
|
-
utilizationThresholdBp0: string;
|
|
123
|
-
utilizationThresholdBp1: string;
|
|
124
|
-
borrowIntervalTsMs: string;
|
|
125
|
-
maxOrderReserveRatioBp: string;
|
|
126
|
-
u64Padding: string[];
|
|
127
|
-
};
|
|
128
|
-
u64Padding: string[];
|
|
129
|
-
};
|
|
130
|
-
toJSON(): {
|
|
131
|
-
oracleId: string;
|
|
132
|
-
liquidityTokenDecimal: string;
|
|
133
|
-
spotConfig: {
|
|
134
|
-
minDeposit: string;
|
|
135
|
-
maxCapacity: string;
|
|
136
|
-
targetWeightBp: string;
|
|
137
|
-
basicMintFeeBp: string;
|
|
138
|
-
additionalMintFeeBp: string;
|
|
139
|
-
basicBurnFeeBp: string;
|
|
140
|
-
additionalBurnFeeBp: string;
|
|
141
|
-
swapFeeBp: string;
|
|
142
|
-
swapFeeProtocolShareBp: string;
|
|
143
|
-
lendingProtocolShareBp: string;
|
|
144
|
-
u64Padding: string[];
|
|
145
|
-
};
|
|
146
|
-
marginConfig: {
|
|
147
|
-
basicBorrowRate0: string;
|
|
148
|
-
basicBorrowRate1: string;
|
|
149
|
-
basicBorrowRate2: string;
|
|
150
|
-
utilizationThresholdBp0: string;
|
|
151
|
-
utilizationThresholdBp1: string;
|
|
152
|
-
borrowIntervalTsMs: string;
|
|
153
|
-
maxOrderReserveRatioBp: string;
|
|
154
|
-
u64Padding: string[];
|
|
155
|
-
};
|
|
156
|
-
u64Padding: string[];
|
|
157
|
-
$typeName: string;
|
|
158
|
-
$typeArgs: [];
|
|
159
|
-
};
|
|
160
|
-
static fromJSONField(field: any): Config;
|
|
161
|
-
static fromJSON(json: Record<string, any>): Config;
|
|
162
|
-
static fromSuiParsedData(content: SuiParsedData): Config;
|
|
163
|
-
static fromSuiObjectData(data: SuiObjectData): Config;
|
|
164
|
-
static fetch(client: SuiClient, id: string): Promise<Config>;
|
|
165
|
-
}
|
|
166
|
-
export declare function isState(type: string): boolean;
|
|
167
|
-
export interface StateFields {
|
|
168
|
-
liquidityAmount: ToField<"u64">;
|
|
169
|
-
valueInUsd: ToField<"u64">;
|
|
170
|
-
reservedAmount: ToField<"u64">;
|
|
171
|
-
updateTsMs: ToField<"u64">;
|
|
172
|
-
isActive: ToField<"bool">;
|
|
173
|
-
lastBorrowRateTsMs: ToField<"u64">;
|
|
174
|
-
cumulativeBorrowRate: ToField<"u64">;
|
|
175
|
-
previousLastBorrowRateTsMs: ToField<"u64">;
|
|
176
|
-
previousCumulativeBorrowRate: ToField<"u64">;
|
|
177
|
-
currentLendingAmount: ToField<Vector<"u64">>;
|
|
178
|
-
u64Padding: ToField<Vector<"u64">>;
|
|
179
|
-
}
|
|
180
|
-
export type StateReified = Reified<State, StateFields>;
|
|
181
|
-
export declare class State implements StructClass {
|
|
182
|
-
__StructClass: true;
|
|
183
|
-
static readonly $typeName: string;
|
|
184
|
-
static readonly $numTypeParams = 0;
|
|
185
|
-
static readonly $isPhantom: readonly [];
|
|
186
|
-
readonly $typeName: string;
|
|
187
|
-
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::State`;
|
|
188
|
-
readonly $typeArgs: [];
|
|
189
|
-
readonly $isPhantom: readonly [];
|
|
190
|
-
readonly liquidityAmount: ToField<"u64">;
|
|
191
|
-
readonly valueInUsd: ToField<"u64">;
|
|
192
|
-
readonly reservedAmount: ToField<"u64">;
|
|
193
|
-
readonly updateTsMs: ToField<"u64">;
|
|
194
|
-
readonly isActive: ToField<"bool">;
|
|
195
|
-
readonly lastBorrowRateTsMs: ToField<"u64">;
|
|
196
|
-
readonly cumulativeBorrowRate: ToField<"u64">;
|
|
197
|
-
readonly previousLastBorrowRateTsMs: ToField<"u64">;
|
|
198
|
-
readonly previousCumulativeBorrowRate: ToField<"u64">;
|
|
199
|
-
readonly currentLendingAmount: ToField<Vector<"u64">>;
|
|
200
|
-
readonly u64Padding: ToField<Vector<"u64">>;
|
|
201
|
-
private constructor();
|
|
202
|
-
static reified(): StateReified;
|
|
203
|
-
static get r(): reified.StructClassReified<State, StateFields>;
|
|
204
|
-
static phantom(): PhantomReified<ToTypeStr<State>>;
|
|
205
|
-
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::State" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::State">;
|
|
206
|
-
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
207
|
-
liquidity_amount: string;
|
|
208
|
-
value_in_usd: string;
|
|
209
|
-
reserved_amount: string;
|
|
210
|
-
update_ts_ms: string;
|
|
211
|
-
is_active: boolean;
|
|
212
|
-
last_borrow_rate_ts_ms: string;
|
|
213
|
-
cumulative_borrow_rate: string;
|
|
214
|
-
previous_last_borrow_rate_ts_ms: string;
|
|
215
|
-
previous_cumulative_borrow_rate: string;
|
|
216
|
-
current_lending_amount: string[];
|
|
217
|
-
u64_padding: string[];
|
|
218
|
-
}, {
|
|
219
|
-
liquidity_amount: string | number | bigint;
|
|
220
|
-
value_in_usd: string | number | bigint;
|
|
221
|
-
reserved_amount: string | number | bigint;
|
|
222
|
-
update_ts_ms: string | number | bigint;
|
|
223
|
-
is_active: boolean;
|
|
224
|
-
last_borrow_rate_ts_ms: string | number | bigint;
|
|
225
|
-
cumulative_borrow_rate: string | number | bigint;
|
|
226
|
-
previous_last_borrow_rate_ts_ms: string | number | bigint;
|
|
227
|
-
previous_cumulative_borrow_rate: string | number | bigint;
|
|
228
|
-
current_lending_amount: Iterable<string | number | bigint> & {
|
|
229
|
-
length: number;
|
|
230
|
-
};
|
|
231
|
-
u64_padding: Iterable<string | number | bigint> & {
|
|
232
|
-
length: number;
|
|
233
|
-
};
|
|
234
|
-
}>;
|
|
235
|
-
static fromFields(fields: Record<string, any>): State;
|
|
236
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): State;
|
|
237
|
-
static fromBcs(data: Uint8Array): State;
|
|
238
|
-
toJSONField(): {
|
|
239
|
-
liquidityAmount: string;
|
|
240
|
-
valueInUsd: string;
|
|
241
|
-
reservedAmount: string;
|
|
242
|
-
updateTsMs: string;
|
|
243
|
-
isActive: boolean;
|
|
244
|
-
lastBorrowRateTsMs: string;
|
|
245
|
-
cumulativeBorrowRate: string;
|
|
246
|
-
previousLastBorrowRateTsMs: string;
|
|
247
|
-
previousCumulativeBorrowRate: string;
|
|
248
|
-
currentLendingAmount: string[];
|
|
249
|
-
u64Padding: string[];
|
|
250
|
-
};
|
|
251
|
-
toJSON(): {
|
|
252
|
-
liquidityAmount: string;
|
|
253
|
-
valueInUsd: string;
|
|
254
|
-
reservedAmount: string;
|
|
255
|
-
updateTsMs: string;
|
|
256
|
-
isActive: boolean;
|
|
257
|
-
lastBorrowRateTsMs: string;
|
|
258
|
-
cumulativeBorrowRate: string;
|
|
259
|
-
previousLastBorrowRateTsMs: string;
|
|
260
|
-
previousCumulativeBorrowRate: string;
|
|
261
|
-
currentLendingAmount: string[];
|
|
262
|
-
u64Padding: string[];
|
|
263
|
-
$typeName: string;
|
|
264
|
-
$typeArgs: [];
|
|
265
|
-
};
|
|
266
|
-
static fromJSONField(field: any): State;
|
|
267
|
-
static fromJSON(json: Record<string, any>): State;
|
|
268
|
-
static fromSuiParsedData(content: SuiParsedData): State;
|
|
269
|
-
static fromSuiObjectData(data: SuiObjectData): State;
|
|
270
|
-
static fetch(client: SuiClient, id: string): Promise<State>;
|
|
271
|
-
}
|
|
272
|
-
export declare function isRegistry(type: string): boolean;
|
|
273
|
-
export interface RegistryFields {
|
|
274
|
-
id: ToField<UID>;
|
|
275
|
-
numPool: ToField<"u64">;
|
|
276
|
-
liquidityPoolRegistry: ToField<UID>;
|
|
277
|
-
}
|
|
278
|
-
export type RegistryReified = Reified<Registry, RegistryFields>;
|
|
279
|
-
export declare class Registry implements StructClass {
|
|
280
|
-
__StructClass: true;
|
|
281
|
-
static readonly $typeName: string;
|
|
282
|
-
static readonly $numTypeParams = 0;
|
|
283
|
-
static readonly $isPhantom: readonly [];
|
|
284
|
-
readonly $typeName: string;
|
|
285
|
-
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::Registry`;
|
|
286
|
-
readonly $typeArgs: [];
|
|
287
|
-
readonly $isPhantom: readonly [];
|
|
288
|
-
readonly id: ToField<UID>;
|
|
289
|
-
readonly numPool: ToField<"u64">;
|
|
290
|
-
readonly liquidityPoolRegistry: ToField<UID>;
|
|
291
|
-
private constructor();
|
|
292
|
-
static reified(): RegistryReified;
|
|
293
|
-
static get r(): reified.StructClassReified<Registry, RegistryFields>;
|
|
294
|
-
static phantom(): PhantomReified<ToTypeStr<Registry>>;
|
|
295
|
-
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::Registry" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::Registry">;
|
|
296
|
-
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
297
|
-
id: {
|
|
298
|
-
id: {
|
|
299
|
-
bytes: string;
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
num_pool: string;
|
|
303
|
-
liquidity_pool_registry: {
|
|
304
|
-
id: {
|
|
305
|
-
bytes: string;
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
}, {
|
|
309
|
-
id: {
|
|
310
|
-
id: {
|
|
311
|
-
bytes: string;
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
num_pool: string | number | bigint;
|
|
315
|
-
liquidity_pool_registry: {
|
|
316
|
-
id: {
|
|
317
|
-
bytes: string;
|
|
318
|
-
};
|
|
319
|
-
};
|
|
320
|
-
}>;
|
|
321
|
-
static fromFields(fields: Record<string, any>): Registry;
|
|
322
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): Registry;
|
|
323
|
-
static fromBcs(data: Uint8Array): Registry;
|
|
324
|
-
toJSONField(): {
|
|
325
|
-
id: string;
|
|
326
|
-
numPool: string;
|
|
327
|
-
liquidityPoolRegistry: string;
|
|
328
|
-
};
|
|
329
|
-
toJSON(): {
|
|
330
|
-
id: string;
|
|
331
|
-
numPool: string;
|
|
332
|
-
liquidityPoolRegistry: string;
|
|
333
|
-
$typeName: string;
|
|
334
|
-
$typeArgs: [];
|
|
335
|
-
};
|
|
336
|
-
static fromJSONField(field: any): Registry;
|
|
337
|
-
static fromJSON(json: Record<string, any>): Registry;
|
|
338
|
-
static fromSuiParsedData(content: SuiParsedData): Registry;
|
|
339
|
-
static fromSuiObjectData(data: SuiObjectData): Registry;
|
|
340
|
-
static fetch(client: SuiClient, id: string): Promise<Registry>;
|
|
341
|
-
}
|
|
342
10
|
export declare function isAddLiquidityTokenEvent(type: string): boolean;
|
|
343
11
|
export interface AddLiquidityTokenEventFields {
|
|
344
12
|
sender: ToField<"address">;
|
|
@@ -760,40 +428,308 @@ export declare class CompleteRemoveLiquidityTokenProcessEvent implements StructC
|
|
|
760
428
|
};
|
|
761
429
|
};
|
|
762
430
|
};
|
|
763
|
-
removed_usd: string | number | bigint;
|
|
764
|
-
repaid_usd: string | number | bigint;
|
|
431
|
+
removed_usd: string | number | bigint;
|
|
432
|
+
repaid_usd: string | number | bigint;
|
|
433
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
434
|
+
length: number;
|
|
435
|
+
};
|
|
436
|
+
}>;
|
|
437
|
+
static fromFields(fields: Record<string, any>): CompleteRemoveLiquidityTokenProcessEvent;
|
|
438
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): CompleteRemoveLiquidityTokenProcessEvent;
|
|
439
|
+
static fromBcs(data: Uint8Array): CompleteRemoveLiquidityTokenProcessEvent;
|
|
440
|
+
toJSONField(): {
|
|
441
|
+
index: string;
|
|
442
|
+
liquidityToken: {
|
|
443
|
+
name: string;
|
|
444
|
+
};
|
|
445
|
+
removedUsd: string;
|
|
446
|
+
repaidUsd: string;
|
|
447
|
+
u64Padding: string[];
|
|
448
|
+
};
|
|
449
|
+
toJSON(): {
|
|
450
|
+
index: string;
|
|
451
|
+
liquidityToken: {
|
|
452
|
+
name: string;
|
|
453
|
+
};
|
|
454
|
+
removedUsd: string;
|
|
455
|
+
repaidUsd: string;
|
|
456
|
+
u64Padding: string[];
|
|
457
|
+
$typeName: string;
|
|
458
|
+
$typeArgs: [];
|
|
459
|
+
};
|
|
460
|
+
static fromJSONField(field: any): CompleteRemoveLiquidityTokenProcessEvent;
|
|
461
|
+
static fromJSON(json: Record<string, any>): CompleteRemoveLiquidityTokenProcessEvent;
|
|
462
|
+
static fromSuiParsedData(content: SuiParsedData): CompleteRemoveLiquidityTokenProcessEvent;
|
|
463
|
+
static fromSuiObjectData(data: SuiObjectData): CompleteRemoveLiquidityTokenProcessEvent;
|
|
464
|
+
static fetch(client: SuiClient, id: string): Promise<CompleteRemoveLiquidityTokenProcessEvent>;
|
|
465
|
+
}
|
|
466
|
+
export declare function isConfig(type: string): boolean;
|
|
467
|
+
export interface ConfigFields {
|
|
468
|
+
oracleId: ToField<"address">;
|
|
469
|
+
liquidityTokenDecimal: ToField<"u64">;
|
|
470
|
+
spotConfig: ToField<SpotConfig>;
|
|
471
|
+
marginConfig: ToField<MarginConfig>;
|
|
472
|
+
u64Padding: ToField<Vector<"u64">>;
|
|
473
|
+
}
|
|
474
|
+
export type ConfigReified = Reified<Config, ConfigFields>;
|
|
475
|
+
export declare class Config implements StructClass {
|
|
476
|
+
__StructClass: true;
|
|
477
|
+
static readonly $typeName: string;
|
|
478
|
+
static readonly $numTypeParams = 0;
|
|
479
|
+
static readonly $isPhantom: readonly [];
|
|
480
|
+
readonly $typeName: string;
|
|
481
|
+
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::Config`;
|
|
482
|
+
readonly $typeArgs: [];
|
|
483
|
+
readonly $isPhantom: readonly [];
|
|
484
|
+
readonly oracleId: ToField<"address">;
|
|
485
|
+
readonly liquidityTokenDecimal: ToField<"u64">;
|
|
486
|
+
readonly spotConfig: ToField<SpotConfig>;
|
|
487
|
+
readonly marginConfig: ToField<MarginConfig>;
|
|
488
|
+
readonly u64Padding: ToField<Vector<"u64">>;
|
|
489
|
+
private constructor();
|
|
490
|
+
static reified(): ConfigReified;
|
|
491
|
+
static get r(): reified.StructClassReified<Config, ConfigFields>;
|
|
492
|
+
static phantom(): PhantomReified<ToTypeStr<Config>>;
|
|
493
|
+
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::Config" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::Config">;
|
|
494
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
495
|
+
oracle_id: string;
|
|
496
|
+
liquidity_token_decimal: string;
|
|
497
|
+
spot_config: {
|
|
498
|
+
min_deposit: string;
|
|
499
|
+
max_capacity: string;
|
|
500
|
+
target_weight_bp: string;
|
|
501
|
+
basic_mint_fee_bp: string;
|
|
502
|
+
additional_mint_fee_bp: string;
|
|
503
|
+
basic_burn_fee_bp: string;
|
|
504
|
+
additional_burn_fee_bp: string;
|
|
505
|
+
swap_fee_bp: string;
|
|
506
|
+
swap_fee_protocol_share_bp: string;
|
|
507
|
+
lending_protocol_share_bp: string;
|
|
508
|
+
u64_padding: string[];
|
|
509
|
+
};
|
|
510
|
+
margin_config: {
|
|
511
|
+
basic_borrow_rate_0: string;
|
|
512
|
+
basic_borrow_rate_1: string;
|
|
513
|
+
basic_borrow_rate_2: string;
|
|
514
|
+
utilization_threshold_bp_0: string;
|
|
515
|
+
utilization_threshold_bp_1: string;
|
|
516
|
+
borrow_interval_ts_ms: string;
|
|
517
|
+
max_order_reserve_ratio_bp: string;
|
|
518
|
+
u64_padding: string[];
|
|
519
|
+
};
|
|
520
|
+
u64_padding: string[];
|
|
521
|
+
}, {
|
|
522
|
+
oracle_id: string;
|
|
523
|
+
liquidity_token_decimal: string | number | bigint;
|
|
524
|
+
spot_config: {
|
|
525
|
+
min_deposit: string | number | bigint;
|
|
526
|
+
max_capacity: string | number | bigint;
|
|
527
|
+
target_weight_bp: string | number | bigint;
|
|
528
|
+
basic_mint_fee_bp: string | number | bigint;
|
|
529
|
+
additional_mint_fee_bp: string | number | bigint;
|
|
530
|
+
basic_burn_fee_bp: string | number | bigint;
|
|
531
|
+
additional_burn_fee_bp: string | number | bigint;
|
|
532
|
+
swap_fee_bp: string | number | bigint;
|
|
533
|
+
swap_fee_protocol_share_bp: string | number | bigint;
|
|
534
|
+
lending_protocol_share_bp: string | number | bigint;
|
|
535
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
536
|
+
length: number;
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
margin_config: {
|
|
540
|
+
basic_borrow_rate_0: string | number | bigint;
|
|
541
|
+
basic_borrow_rate_1: string | number | bigint;
|
|
542
|
+
basic_borrow_rate_2: string | number | bigint;
|
|
543
|
+
utilization_threshold_bp_0: string | number | bigint;
|
|
544
|
+
utilization_threshold_bp_1: string | number | bigint;
|
|
545
|
+
borrow_interval_ts_ms: string | number | bigint;
|
|
546
|
+
max_order_reserve_ratio_bp: string | number | bigint;
|
|
547
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
548
|
+
length: number;
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
552
|
+
length: number;
|
|
553
|
+
};
|
|
554
|
+
}>;
|
|
555
|
+
static fromFields(fields: Record<string, any>): Config;
|
|
556
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): Config;
|
|
557
|
+
static fromBcs(data: Uint8Array): Config;
|
|
558
|
+
toJSONField(): {
|
|
559
|
+
oracleId: string;
|
|
560
|
+
liquidityTokenDecimal: string;
|
|
561
|
+
spotConfig: {
|
|
562
|
+
minDeposit: string;
|
|
563
|
+
maxCapacity: string;
|
|
564
|
+
targetWeightBp: string;
|
|
565
|
+
basicMintFeeBp: string;
|
|
566
|
+
additionalMintFeeBp: string;
|
|
567
|
+
basicBurnFeeBp: string;
|
|
568
|
+
additionalBurnFeeBp: string;
|
|
569
|
+
swapFeeBp: string;
|
|
570
|
+
swapFeeProtocolShareBp: string;
|
|
571
|
+
lendingProtocolShareBp: string;
|
|
572
|
+
u64Padding: string[];
|
|
573
|
+
};
|
|
574
|
+
marginConfig: {
|
|
575
|
+
basicBorrowRate0: string;
|
|
576
|
+
basicBorrowRate1: string;
|
|
577
|
+
basicBorrowRate2: string;
|
|
578
|
+
utilizationThresholdBp0: string;
|
|
579
|
+
utilizationThresholdBp1: string;
|
|
580
|
+
borrowIntervalTsMs: string;
|
|
581
|
+
maxOrderReserveRatioBp: string;
|
|
582
|
+
u64Padding: string[];
|
|
583
|
+
};
|
|
584
|
+
u64Padding: string[];
|
|
585
|
+
};
|
|
586
|
+
toJSON(): {
|
|
587
|
+
oracleId: string;
|
|
588
|
+
liquidityTokenDecimal: string;
|
|
589
|
+
spotConfig: {
|
|
590
|
+
minDeposit: string;
|
|
591
|
+
maxCapacity: string;
|
|
592
|
+
targetWeightBp: string;
|
|
593
|
+
basicMintFeeBp: string;
|
|
594
|
+
additionalMintFeeBp: string;
|
|
595
|
+
basicBurnFeeBp: string;
|
|
596
|
+
additionalBurnFeeBp: string;
|
|
597
|
+
swapFeeBp: string;
|
|
598
|
+
swapFeeProtocolShareBp: string;
|
|
599
|
+
lendingProtocolShareBp: string;
|
|
600
|
+
u64Padding: string[];
|
|
601
|
+
};
|
|
602
|
+
marginConfig: {
|
|
603
|
+
basicBorrowRate0: string;
|
|
604
|
+
basicBorrowRate1: string;
|
|
605
|
+
basicBorrowRate2: string;
|
|
606
|
+
utilizationThresholdBp0: string;
|
|
607
|
+
utilizationThresholdBp1: string;
|
|
608
|
+
borrowIntervalTsMs: string;
|
|
609
|
+
maxOrderReserveRatioBp: string;
|
|
610
|
+
u64Padding: string[];
|
|
611
|
+
};
|
|
612
|
+
u64Padding: string[];
|
|
613
|
+
$typeName: string;
|
|
614
|
+
$typeArgs: [];
|
|
615
|
+
};
|
|
616
|
+
static fromJSONField(field: any): Config;
|
|
617
|
+
static fromJSON(json: Record<string, any>): Config;
|
|
618
|
+
static fromSuiParsedData(content: SuiParsedData): Config;
|
|
619
|
+
static fromSuiObjectData(data: SuiObjectData): Config;
|
|
620
|
+
static fetch(client: SuiClient, id: string): Promise<Config>;
|
|
621
|
+
}
|
|
622
|
+
export declare function isDepositLendingEvent(type: string): boolean;
|
|
623
|
+
export interface DepositLendingEventFields {
|
|
624
|
+
index: ToField<"u64">;
|
|
625
|
+
lendingIndex: ToField<"u64">;
|
|
626
|
+
cTokenType: ToField<TypeName>;
|
|
627
|
+
depositAmount: ToField<"u64">;
|
|
628
|
+
mintedMarketCoinAmount: ToField<"u64">;
|
|
629
|
+
latestLendingAmount: ToField<"u64">;
|
|
630
|
+
latestMarketCoinAmount: ToField<"u64">;
|
|
631
|
+
latestReservedAmount: ToField<"u64">;
|
|
632
|
+
latestLiquidityAmount: ToField<"u64">;
|
|
633
|
+
u64Padding: ToField<Vector<"u64">>;
|
|
634
|
+
}
|
|
635
|
+
export type DepositLendingEventReified = Reified<DepositLendingEvent, DepositLendingEventFields>;
|
|
636
|
+
export declare class DepositLendingEvent implements StructClass {
|
|
637
|
+
__StructClass: true;
|
|
638
|
+
static readonly $typeName: string;
|
|
639
|
+
static readonly $numTypeParams = 0;
|
|
640
|
+
static readonly $isPhantom: readonly [];
|
|
641
|
+
readonly $typeName: string;
|
|
642
|
+
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::DepositLendingEvent`;
|
|
643
|
+
readonly $typeArgs: [];
|
|
644
|
+
readonly $isPhantom: readonly [];
|
|
645
|
+
readonly index: ToField<"u64">;
|
|
646
|
+
readonly lendingIndex: ToField<"u64">;
|
|
647
|
+
readonly cTokenType: ToField<TypeName>;
|
|
648
|
+
readonly depositAmount: ToField<"u64">;
|
|
649
|
+
readonly mintedMarketCoinAmount: ToField<"u64">;
|
|
650
|
+
readonly latestLendingAmount: ToField<"u64">;
|
|
651
|
+
readonly latestMarketCoinAmount: ToField<"u64">;
|
|
652
|
+
readonly latestReservedAmount: ToField<"u64">;
|
|
653
|
+
readonly latestLiquidityAmount: ToField<"u64">;
|
|
654
|
+
readonly u64Padding: ToField<Vector<"u64">>;
|
|
655
|
+
private constructor();
|
|
656
|
+
static reified(): DepositLendingEventReified;
|
|
657
|
+
static get r(): reified.StructClassReified<DepositLendingEvent, DepositLendingEventFields>;
|
|
658
|
+
static phantom(): PhantomReified<ToTypeStr<DepositLendingEvent>>;
|
|
659
|
+
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::DepositLendingEvent" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::DepositLendingEvent">;
|
|
660
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
661
|
+
index: string;
|
|
662
|
+
lending_index: string;
|
|
663
|
+
c_token_type: {
|
|
664
|
+
name: {
|
|
665
|
+
bytes: number[];
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
deposit_amount: string;
|
|
669
|
+
minted_market_coin_amount: string;
|
|
670
|
+
latest_lending_amount: string;
|
|
671
|
+
latest_market_coin_amount: string;
|
|
672
|
+
latest_reserved_amount: string;
|
|
673
|
+
latest_liquidity_amount: string;
|
|
674
|
+
u64_padding: string[];
|
|
675
|
+
}, {
|
|
676
|
+
index: string | number | bigint;
|
|
677
|
+
lending_index: string | number | bigint;
|
|
678
|
+
c_token_type: {
|
|
679
|
+
name: {
|
|
680
|
+
bytes: Iterable<number> & {
|
|
681
|
+
length: number;
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
deposit_amount: string | number | bigint;
|
|
686
|
+
minted_market_coin_amount: string | number | bigint;
|
|
687
|
+
latest_lending_amount: string | number | bigint;
|
|
688
|
+
latest_market_coin_amount: string | number | bigint;
|
|
689
|
+
latest_reserved_amount: string | number | bigint;
|
|
690
|
+
latest_liquidity_amount: string | number | bigint;
|
|
765
691
|
u64_padding: Iterable<string | number | bigint> & {
|
|
766
692
|
length: number;
|
|
767
693
|
};
|
|
768
694
|
}>;
|
|
769
|
-
static fromFields(fields: Record<string, any>):
|
|
770
|
-
static fromFieldsWithTypes(item: FieldsWithTypes):
|
|
771
|
-
static fromBcs(data: Uint8Array):
|
|
695
|
+
static fromFields(fields: Record<string, any>): DepositLendingEvent;
|
|
696
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): DepositLendingEvent;
|
|
697
|
+
static fromBcs(data: Uint8Array): DepositLendingEvent;
|
|
772
698
|
toJSONField(): {
|
|
773
699
|
index: string;
|
|
774
|
-
|
|
700
|
+
lendingIndex: string;
|
|
701
|
+
cTokenType: {
|
|
775
702
|
name: string;
|
|
776
703
|
};
|
|
777
|
-
|
|
778
|
-
|
|
704
|
+
depositAmount: string;
|
|
705
|
+
mintedMarketCoinAmount: string;
|
|
706
|
+
latestLendingAmount: string;
|
|
707
|
+
latestMarketCoinAmount: string;
|
|
708
|
+
latestReservedAmount: string;
|
|
709
|
+
latestLiquidityAmount: string;
|
|
779
710
|
u64Padding: string[];
|
|
780
711
|
};
|
|
781
712
|
toJSON(): {
|
|
782
713
|
index: string;
|
|
783
|
-
|
|
714
|
+
lendingIndex: string;
|
|
715
|
+
cTokenType: {
|
|
784
716
|
name: string;
|
|
785
717
|
};
|
|
786
|
-
|
|
787
|
-
|
|
718
|
+
depositAmount: string;
|
|
719
|
+
mintedMarketCoinAmount: string;
|
|
720
|
+
latestLendingAmount: string;
|
|
721
|
+
latestMarketCoinAmount: string;
|
|
722
|
+
latestReservedAmount: string;
|
|
723
|
+
latestLiquidityAmount: string;
|
|
788
724
|
u64Padding: string[];
|
|
789
725
|
$typeName: string;
|
|
790
726
|
$typeArgs: [];
|
|
791
727
|
};
|
|
792
|
-
static fromJSONField(field: any):
|
|
793
|
-
static fromJSON(json: Record<string, any>):
|
|
794
|
-
static fromSuiParsedData(content: SuiParsedData):
|
|
795
|
-
static fromSuiObjectData(data: SuiObjectData):
|
|
796
|
-
static fetch(client: SuiClient, id: string): Promise<
|
|
728
|
+
static fromJSONField(field: any): DepositLendingEvent;
|
|
729
|
+
static fromJSON(json: Record<string, any>): DepositLendingEvent;
|
|
730
|
+
static fromSuiParsedData(content: SuiParsedData): DepositLendingEvent;
|
|
731
|
+
static fromSuiObjectData(data: SuiObjectData): DepositLendingEvent;
|
|
732
|
+
static fetch(client: SuiClient, id: string): Promise<DepositLendingEvent>;
|
|
797
733
|
}
|
|
798
734
|
export declare function isLiquidityPool(type: string): boolean;
|
|
799
735
|
export interface LiquidityPoolFields {
|
|
@@ -1793,6 +1729,76 @@ export declare class NewLiquidityPoolEvent implements StructClass {
|
|
|
1793
1729
|
static fromSuiObjectData(data: SuiObjectData): NewLiquidityPoolEvent;
|
|
1794
1730
|
static fetch(client: SuiClient, id: string): Promise<NewLiquidityPoolEvent>;
|
|
1795
1731
|
}
|
|
1732
|
+
export declare function isRegistry(type: string): boolean;
|
|
1733
|
+
export interface RegistryFields {
|
|
1734
|
+
id: ToField<UID>;
|
|
1735
|
+
numPool: ToField<"u64">;
|
|
1736
|
+
liquidityPoolRegistry: ToField<UID>;
|
|
1737
|
+
}
|
|
1738
|
+
export type RegistryReified = Reified<Registry, RegistryFields>;
|
|
1739
|
+
export declare class Registry implements StructClass {
|
|
1740
|
+
__StructClass: true;
|
|
1741
|
+
static readonly $typeName: string;
|
|
1742
|
+
static readonly $numTypeParams = 0;
|
|
1743
|
+
static readonly $isPhantom: readonly [];
|
|
1744
|
+
readonly $typeName: string;
|
|
1745
|
+
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::Registry`;
|
|
1746
|
+
readonly $typeArgs: [];
|
|
1747
|
+
readonly $isPhantom: readonly [];
|
|
1748
|
+
readonly id: ToField<UID>;
|
|
1749
|
+
readonly numPool: ToField<"u64">;
|
|
1750
|
+
readonly liquidityPoolRegistry: ToField<UID>;
|
|
1751
|
+
private constructor();
|
|
1752
|
+
static reified(): RegistryReified;
|
|
1753
|
+
static get r(): reified.StructClassReified<Registry, RegistryFields>;
|
|
1754
|
+
static phantom(): PhantomReified<ToTypeStr<Registry>>;
|
|
1755
|
+
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::Registry" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::Registry">;
|
|
1756
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
1757
|
+
id: {
|
|
1758
|
+
id: {
|
|
1759
|
+
bytes: string;
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
num_pool: string;
|
|
1763
|
+
liquidity_pool_registry: {
|
|
1764
|
+
id: {
|
|
1765
|
+
bytes: string;
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
}, {
|
|
1769
|
+
id: {
|
|
1770
|
+
id: {
|
|
1771
|
+
bytes: string;
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
num_pool: string | number | bigint;
|
|
1775
|
+
liquidity_pool_registry: {
|
|
1776
|
+
id: {
|
|
1777
|
+
bytes: string;
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
}>;
|
|
1781
|
+
static fromFields(fields: Record<string, any>): Registry;
|
|
1782
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): Registry;
|
|
1783
|
+
static fromBcs(data: Uint8Array): Registry;
|
|
1784
|
+
toJSONField(): {
|
|
1785
|
+
id: string;
|
|
1786
|
+
numPool: string;
|
|
1787
|
+
liquidityPoolRegistry: string;
|
|
1788
|
+
};
|
|
1789
|
+
toJSON(): {
|
|
1790
|
+
id: string;
|
|
1791
|
+
numPool: string;
|
|
1792
|
+
liquidityPoolRegistry: string;
|
|
1793
|
+
$typeName: string;
|
|
1794
|
+
$typeArgs: [];
|
|
1795
|
+
};
|
|
1796
|
+
static fromJSONField(field: any): Registry;
|
|
1797
|
+
static fromJSON(json: Record<string, any>): Registry;
|
|
1798
|
+
static fromSuiParsedData(content: SuiParsedData): Registry;
|
|
1799
|
+
static fromSuiObjectData(data: SuiObjectData): Registry;
|
|
1800
|
+
static fetch(client: SuiClient, id: string): Promise<Registry>;
|
|
1801
|
+
}
|
|
1796
1802
|
export declare function isRemoveLiquidityTokenProcess(type: string): boolean;
|
|
1797
1803
|
export interface RemoveLiquidityTokenProcessFields {
|
|
1798
1804
|
liquidityToken: ToField<TypeName>;
|
|
@@ -2223,6 +2229,112 @@ export declare class StartRemoveLiquidityTokenProcessEvent implements StructClas
|
|
|
2223
2229
|
static fromSuiObjectData(data: SuiObjectData): StartRemoveLiquidityTokenProcessEvent;
|
|
2224
2230
|
static fetch(client: SuiClient, id: string): Promise<StartRemoveLiquidityTokenProcessEvent>;
|
|
2225
2231
|
}
|
|
2232
|
+
export declare function isState(type: string): boolean;
|
|
2233
|
+
export interface StateFields {
|
|
2234
|
+
liquidityAmount: ToField<"u64">;
|
|
2235
|
+
valueInUsd: ToField<"u64">;
|
|
2236
|
+
reservedAmount: ToField<"u64">;
|
|
2237
|
+
updateTsMs: ToField<"u64">;
|
|
2238
|
+
isActive: ToField<"bool">;
|
|
2239
|
+
lastBorrowRateTsMs: ToField<"u64">;
|
|
2240
|
+
cumulativeBorrowRate: ToField<"u64">;
|
|
2241
|
+
previousLastBorrowRateTsMs: ToField<"u64">;
|
|
2242
|
+
previousCumulativeBorrowRate: ToField<"u64">;
|
|
2243
|
+
currentLendingAmount: ToField<Vector<"u64">>;
|
|
2244
|
+
u64Padding: ToField<Vector<"u64">>;
|
|
2245
|
+
}
|
|
2246
|
+
export type StateReified = Reified<State, StateFields>;
|
|
2247
|
+
export declare class State implements StructClass {
|
|
2248
|
+
__StructClass: true;
|
|
2249
|
+
static readonly $typeName: string;
|
|
2250
|
+
static readonly $numTypeParams = 0;
|
|
2251
|
+
static readonly $isPhantom: readonly [];
|
|
2252
|
+
readonly $typeName: string;
|
|
2253
|
+
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::State`;
|
|
2254
|
+
readonly $typeArgs: [];
|
|
2255
|
+
readonly $isPhantom: readonly [];
|
|
2256
|
+
readonly liquidityAmount: ToField<"u64">;
|
|
2257
|
+
readonly valueInUsd: ToField<"u64">;
|
|
2258
|
+
readonly reservedAmount: ToField<"u64">;
|
|
2259
|
+
readonly updateTsMs: ToField<"u64">;
|
|
2260
|
+
readonly isActive: ToField<"bool">;
|
|
2261
|
+
readonly lastBorrowRateTsMs: ToField<"u64">;
|
|
2262
|
+
readonly cumulativeBorrowRate: ToField<"u64">;
|
|
2263
|
+
readonly previousLastBorrowRateTsMs: ToField<"u64">;
|
|
2264
|
+
readonly previousCumulativeBorrowRate: ToField<"u64">;
|
|
2265
|
+
readonly currentLendingAmount: ToField<Vector<"u64">>;
|
|
2266
|
+
readonly u64Padding: ToField<Vector<"u64">>;
|
|
2267
|
+
private constructor();
|
|
2268
|
+
static reified(): StateReified;
|
|
2269
|
+
static get r(): reified.StructClassReified<State, StateFields>;
|
|
2270
|
+
static phantom(): PhantomReified<ToTypeStr<State>>;
|
|
2271
|
+
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::State" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::State">;
|
|
2272
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
2273
|
+
liquidity_amount: string;
|
|
2274
|
+
value_in_usd: string;
|
|
2275
|
+
reserved_amount: string;
|
|
2276
|
+
update_ts_ms: string;
|
|
2277
|
+
is_active: boolean;
|
|
2278
|
+
last_borrow_rate_ts_ms: string;
|
|
2279
|
+
cumulative_borrow_rate: string;
|
|
2280
|
+
previous_last_borrow_rate_ts_ms: string;
|
|
2281
|
+
previous_cumulative_borrow_rate: string;
|
|
2282
|
+
current_lending_amount: string[];
|
|
2283
|
+
u64_padding: string[];
|
|
2284
|
+
}, {
|
|
2285
|
+
liquidity_amount: string | number | bigint;
|
|
2286
|
+
value_in_usd: string | number | bigint;
|
|
2287
|
+
reserved_amount: string | number | bigint;
|
|
2288
|
+
update_ts_ms: string | number | bigint;
|
|
2289
|
+
is_active: boolean;
|
|
2290
|
+
last_borrow_rate_ts_ms: string | number | bigint;
|
|
2291
|
+
cumulative_borrow_rate: string | number | bigint;
|
|
2292
|
+
previous_last_borrow_rate_ts_ms: string | number | bigint;
|
|
2293
|
+
previous_cumulative_borrow_rate: string | number | bigint;
|
|
2294
|
+
current_lending_amount: Iterable<string | number | bigint> & {
|
|
2295
|
+
length: number;
|
|
2296
|
+
};
|
|
2297
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
2298
|
+
length: number;
|
|
2299
|
+
};
|
|
2300
|
+
}>;
|
|
2301
|
+
static fromFields(fields: Record<string, any>): State;
|
|
2302
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): State;
|
|
2303
|
+
static fromBcs(data: Uint8Array): State;
|
|
2304
|
+
toJSONField(): {
|
|
2305
|
+
liquidityAmount: string;
|
|
2306
|
+
valueInUsd: string;
|
|
2307
|
+
reservedAmount: string;
|
|
2308
|
+
updateTsMs: string;
|
|
2309
|
+
isActive: boolean;
|
|
2310
|
+
lastBorrowRateTsMs: string;
|
|
2311
|
+
cumulativeBorrowRate: string;
|
|
2312
|
+
previousLastBorrowRateTsMs: string;
|
|
2313
|
+
previousCumulativeBorrowRate: string;
|
|
2314
|
+
currentLendingAmount: string[];
|
|
2315
|
+
u64Padding: string[];
|
|
2316
|
+
};
|
|
2317
|
+
toJSON(): {
|
|
2318
|
+
liquidityAmount: string;
|
|
2319
|
+
valueInUsd: string;
|
|
2320
|
+
reservedAmount: string;
|
|
2321
|
+
updateTsMs: string;
|
|
2322
|
+
isActive: boolean;
|
|
2323
|
+
lastBorrowRateTsMs: string;
|
|
2324
|
+
cumulativeBorrowRate: string;
|
|
2325
|
+
previousLastBorrowRateTsMs: string;
|
|
2326
|
+
previousCumulativeBorrowRate: string;
|
|
2327
|
+
currentLendingAmount: string[];
|
|
2328
|
+
u64Padding: string[];
|
|
2329
|
+
$typeName: string;
|
|
2330
|
+
$typeArgs: [];
|
|
2331
|
+
};
|
|
2332
|
+
static fromJSONField(field: any): State;
|
|
2333
|
+
static fromJSON(json: Record<string, any>): State;
|
|
2334
|
+
static fromSuiParsedData(content: SuiParsedData): State;
|
|
2335
|
+
static fromSuiObjectData(data: SuiObjectData): State;
|
|
2336
|
+
static fetch(client: SuiClient, id: string): Promise<State>;
|
|
2337
|
+
}
|
|
2226
2338
|
export declare function isSuspendPoolEvent(type: string): boolean;
|
|
2227
2339
|
export interface SuspendPoolEventFields {
|
|
2228
2340
|
sender: ToField<"address">;
|
|
@@ -3273,3 +3385,159 @@ export declare class UpdateSpotConfigEvent implements StructClass {
|
|
|
3273
3385
|
static fromSuiObjectData(data: SuiObjectData): UpdateSpotConfigEvent;
|
|
3274
3386
|
static fetch(client: SuiClient, id: string): Promise<UpdateSpotConfigEvent>;
|
|
3275
3387
|
}
|
|
3388
|
+
export declare function isWithdrawLendingEvent(type: string): boolean;
|
|
3389
|
+
export interface WithdrawLendingEventFields {
|
|
3390
|
+
index: ToField<"u64">;
|
|
3391
|
+
lendingIndex: ToField<"u64">;
|
|
3392
|
+
cTokenType: ToField<TypeName>;
|
|
3393
|
+
rTokenType: ToField<TypeName>;
|
|
3394
|
+
withdrawAmount: ToField<"u64">;
|
|
3395
|
+
withdrawnCollateralAmount: ToField<"u64">;
|
|
3396
|
+
latestLendingAmount: ToField<"u64">;
|
|
3397
|
+
latestMarketCoinAmount: ToField<"u64">;
|
|
3398
|
+
latestReservedAmount: ToField<"u64">;
|
|
3399
|
+
latestLiquidityAmount: ToField<"u64">;
|
|
3400
|
+
lendingInterest: ToField<"u64">;
|
|
3401
|
+
protocolShare: ToField<"u64">;
|
|
3402
|
+
lendingReward: ToField<"u64">;
|
|
3403
|
+
rewardProtocolShare: ToField<"u64">;
|
|
3404
|
+
u64Padding: ToField<Vector<"u64">>;
|
|
3405
|
+
}
|
|
3406
|
+
export type WithdrawLendingEventReified = Reified<WithdrawLendingEvent, WithdrawLendingEventFields>;
|
|
3407
|
+
export declare class WithdrawLendingEvent implements StructClass {
|
|
3408
|
+
__StructClass: true;
|
|
3409
|
+
static readonly $typeName: string;
|
|
3410
|
+
static readonly $numTypeParams = 0;
|
|
3411
|
+
static readonly $isPhantom: readonly [];
|
|
3412
|
+
readonly $typeName: string;
|
|
3413
|
+
readonly $fullTypeName: `${typeof PKG_V1}::lp_pool::WithdrawLendingEvent`;
|
|
3414
|
+
readonly $typeArgs: [];
|
|
3415
|
+
readonly $isPhantom: readonly [];
|
|
3416
|
+
readonly index: ToField<"u64">;
|
|
3417
|
+
readonly lendingIndex: ToField<"u64">;
|
|
3418
|
+
readonly cTokenType: ToField<TypeName>;
|
|
3419
|
+
readonly rTokenType: ToField<TypeName>;
|
|
3420
|
+
readonly withdrawAmount: ToField<"u64">;
|
|
3421
|
+
readonly withdrawnCollateralAmount: ToField<"u64">;
|
|
3422
|
+
readonly latestLendingAmount: ToField<"u64">;
|
|
3423
|
+
readonly latestMarketCoinAmount: ToField<"u64">;
|
|
3424
|
+
readonly latestReservedAmount: ToField<"u64">;
|
|
3425
|
+
readonly latestLiquidityAmount: ToField<"u64">;
|
|
3426
|
+
readonly lendingInterest: ToField<"u64">;
|
|
3427
|
+
readonly protocolShare: ToField<"u64">;
|
|
3428
|
+
readonly lendingReward: ToField<"u64">;
|
|
3429
|
+
readonly rewardProtocolShare: ToField<"u64">;
|
|
3430
|
+
readonly u64Padding: ToField<Vector<"u64">>;
|
|
3431
|
+
private constructor();
|
|
3432
|
+
static reified(): WithdrawLendingEventReified;
|
|
3433
|
+
static get r(): reified.StructClassReified<WithdrawLendingEvent, WithdrawLendingEventFields>;
|
|
3434
|
+
static phantom(): PhantomReified<ToTypeStr<WithdrawLendingEvent>>;
|
|
3435
|
+
static get p(): reified.PhantomReified<"0x7ea60df3452d1cec0064d3380cb6f2a9309dcf7ac1b51529de71ef427688b1c3::lp_pool::WithdrawLendingEvent" | "0x21a3b745eaeee0ec0cbc3207230185013d1d8939f7a920aa61f5fea7d09db600::lp_pool::WithdrawLendingEvent">;
|
|
3436
|
+
static get bcs(): import("@mysten/sui/bcs").BcsType<{
|
|
3437
|
+
index: string;
|
|
3438
|
+
lending_index: string;
|
|
3439
|
+
c_token_type: {
|
|
3440
|
+
name: {
|
|
3441
|
+
bytes: number[];
|
|
3442
|
+
};
|
|
3443
|
+
};
|
|
3444
|
+
r_token_type: {
|
|
3445
|
+
name: {
|
|
3446
|
+
bytes: number[];
|
|
3447
|
+
};
|
|
3448
|
+
};
|
|
3449
|
+
withdraw_amount: string;
|
|
3450
|
+
withdrawn_collateral_amount: string;
|
|
3451
|
+
latest_lending_amount: string;
|
|
3452
|
+
latest_market_coin_amount: string;
|
|
3453
|
+
latest_reserved_amount: string;
|
|
3454
|
+
latest_liquidity_amount: string;
|
|
3455
|
+
lending_interest: string;
|
|
3456
|
+
protocol_share: string;
|
|
3457
|
+
lending_reward: string;
|
|
3458
|
+
reward_protocol_share: string;
|
|
3459
|
+
u64_padding: string[];
|
|
3460
|
+
}, {
|
|
3461
|
+
index: string | number | bigint;
|
|
3462
|
+
lending_index: string | number | bigint;
|
|
3463
|
+
c_token_type: {
|
|
3464
|
+
name: {
|
|
3465
|
+
bytes: Iterable<number> & {
|
|
3466
|
+
length: number;
|
|
3467
|
+
};
|
|
3468
|
+
};
|
|
3469
|
+
};
|
|
3470
|
+
r_token_type: {
|
|
3471
|
+
name: {
|
|
3472
|
+
bytes: Iterable<number> & {
|
|
3473
|
+
length: number;
|
|
3474
|
+
};
|
|
3475
|
+
};
|
|
3476
|
+
};
|
|
3477
|
+
withdraw_amount: string | number | bigint;
|
|
3478
|
+
withdrawn_collateral_amount: string | number | bigint;
|
|
3479
|
+
latest_lending_amount: string | number | bigint;
|
|
3480
|
+
latest_market_coin_amount: string | number | bigint;
|
|
3481
|
+
latest_reserved_amount: string | number | bigint;
|
|
3482
|
+
latest_liquidity_amount: string | number | bigint;
|
|
3483
|
+
lending_interest: string | number | bigint;
|
|
3484
|
+
protocol_share: string | number | bigint;
|
|
3485
|
+
lending_reward: string | number | bigint;
|
|
3486
|
+
reward_protocol_share: string | number | bigint;
|
|
3487
|
+
u64_padding: Iterable<string | number | bigint> & {
|
|
3488
|
+
length: number;
|
|
3489
|
+
};
|
|
3490
|
+
}>;
|
|
3491
|
+
static fromFields(fields: Record<string, any>): WithdrawLendingEvent;
|
|
3492
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): WithdrawLendingEvent;
|
|
3493
|
+
static fromBcs(data: Uint8Array): WithdrawLendingEvent;
|
|
3494
|
+
toJSONField(): {
|
|
3495
|
+
index: string;
|
|
3496
|
+
lendingIndex: string;
|
|
3497
|
+
cTokenType: {
|
|
3498
|
+
name: string;
|
|
3499
|
+
};
|
|
3500
|
+
rTokenType: {
|
|
3501
|
+
name: string;
|
|
3502
|
+
};
|
|
3503
|
+
withdrawAmount: string;
|
|
3504
|
+
withdrawnCollateralAmount: string;
|
|
3505
|
+
latestLendingAmount: string;
|
|
3506
|
+
latestMarketCoinAmount: string;
|
|
3507
|
+
latestReservedAmount: string;
|
|
3508
|
+
latestLiquidityAmount: string;
|
|
3509
|
+
lendingInterest: string;
|
|
3510
|
+
protocolShare: string;
|
|
3511
|
+
lendingReward: string;
|
|
3512
|
+
rewardProtocolShare: string;
|
|
3513
|
+
u64Padding: string[];
|
|
3514
|
+
};
|
|
3515
|
+
toJSON(): {
|
|
3516
|
+
index: string;
|
|
3517
|
+
lendingIndex: string;
|
|
3518
|
+
cTokenType: {
|
|
3519
|
+
name: string;
|
|
3520
|
+
};
|
|
3521
|
+
rTokenType: {
|
|
3522
|
+
name: string;
|
|
3523
|
+
};
|
|
3524
|
+
withdrawAmount: string;
|
|
3525
|
+
withdrawnCollateralAmount: string;
|
|
3526
|
+
latestLendingAmount: string;
|
|
3527
|
+
latestMarketCoinAmount: string;
|
|
3528
|
+
latestReservedAmount: string;
|
|
3529
|
+
latestLiquidityAmount: string;
|
|
3530
|
+
lendingInterest: string;
|
|
3531
|
+
protocolShare: string;
|
|
3532
|
+
lendingReward: string;
|
|
3533
|
+
rewardProtocolShare: string;
|
|
3534
|
+
u64Padding: string[];
|
|
3535
|
+
$typeName: string;
|
|
3536
|
+
$typeArgs: [];
|
|
3537
|
+
};
|
|
3538
|
+
static fromJSONField(field: any): WithdrawLendingEvent;
|
|
3539
|
+
static fromJSON(json: Record<string, any>): WithdrawLendingEvent;
|
|
3540
|
+
static fromSuiParsedData(content: SuiParsedData): WithdrawLendingEvent;
|
|
3541
|
+
static fromSuiObjectData(data: SuiObjectData): WithdrawLendingEvent;
|
|
3542
|
+
static fetch(client: SuiClient, id: string): Promise<WithdrawLendingEvent>;
|
|
3543
|
+
}
|