@suilend/sdk 2.0.4 → 3.0.1
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/_generated/_dependencies/source/0x1/ascii/structs.d.ts +7 -11
- package/_generated/_dependencies/source/0x1/ascii/structs.js +6 -63
- package/_generated/_dependencies/source/0x1/option/structs.d.ts +3 -9
- package/_generated/_dependencies/source/0x1/option/structs.js +4 -42
- package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +5 -7
- package/_generated/_dependencies/source/0x1/type-name/structs.js +3 -32
- package/_generated/_dependencies/source/0x2/bag/structs.d.ts +7 -9
- package/_generated/_dependencies/source/0x2/bag/structs.js +3 -31
- package/_generated/_dependencies/source/0x2/balance/structs.d.ts +7 -11
- package/_generated/_dependencies/source/0x2/balance/structs.js +7 -82
- package/_generated/_dependencies/source/0x2/object/structs.d.ts +8 -12
- package/_generated/_dependencies/source/0x2/object/structs.js +7 -61
- package/_generated/_dependencies/source/0x2/object-table/structs.d.ts +7 -9
- package/_generated/_dependencies/source/0x2/object-table/structs.js +4 -44
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.d.ts +5 -7
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.js +3 -31
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.d.ts +11 -13
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.js +3 -32
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.d.ts +23 -25
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.js +3 -32
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +4 -6
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js +3 -33
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.d.ts +55 -59
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.js +6 -64
- package/_generated/_framework/reified.d.ts +2 -4
- package/_generated/_framework/vector.d.ts +2 -12
- package/_generated/suilend/cell/structs.d.ts +4 -10
- package/_generated/suilend/cell/structs.js +4 -42
- package/_generated/suilend/decimal/structs.d.ts +4 -6
- package/_generated/suilend/decimal/structs.js +3 -32
- package/_generated/suilend/lending-market/structs.d.ts +152 -392
- package/_generated/suilend/lending-market/structs.js +50 -548
- package/_generated/suilend/liquidity-mining/structs.d.ts +50 -158
- package/_generated/suilend/liquidity-mining/structs.js +16 -169
- package/_generated/suilend/obligation/structs.d.ts +108 -148
- package/_generated/suilend/obligation/structs.js +23 -232
- package/_generated/suilend/rate-limiter/structs.d.ts +15 -19
- package/_generated/suilend/rate-limiter/structs.js +6 -64
- package/_generated/suilend/reserve/structs.d.ts +138 -362
- package/_generated/suilend/reserve/structs.js +29 -327
- package/_generated/suilend/reserve-config/structs.d.ts +33 -37
- package/_generated/suilend/reserve-config/structs.js +6 -65
- package/client.d.ts +8 -8
- package/client.js +55 -88
- package/lib/initialize.d.ts +29 -28
- package/lib/initialize.js +16 -12
- package/lib/liquidityMining.d.ts +3 -3
- package/lib/pythAdapter.d.ts +9 -0
- package/lib/pythAdapter.js +121 -0
- package/lib/strategyOwnerCap.d.ts +12 -7
- package/lib/strategyOwnerCap.js +159 -156
- package/margin/margin/admin_cap.d.ts +2 -2
- package/margin/margin/deps/std/type_name.d.ts +1 -1
- package/margin/margin/deps/sui/vec_set.d.ts +3 -5
- package/margin/margin/deps/suilend/lending_market.d.ts +2 -2
- package/margin/margin/market.d.ts +21 -38
- package/margin/margin/position.d.ts +47 -47
- package/margin/margin/router.d.ts +5 -5
- package/margin/margin/version.d.ts +1 -1
- package/package.json +1 -1
- package/parsers/lendingMarket.d.ts +6 -6
- package/parsers/obligation.d.ts +8 -8
- package/parsers/reserve.d.ts +8 -8
- package/strategies.d.ts +38 -21
- package/strategies.js +239 -79
- package/swap/quote.d.ts +1 -9
- package/swap/quote.js +1 -52
- package/swap/transaction.d.ts +2 -4
- package/swap/transaction.js +9 -25
- package/utils/events.d.ts +6 -5
- package/utils/events.js +11 -8
- package/utils/obligation.d.ts +6 -5
- package/utils/obligation.js +118 -117
|
@@ -7,7 +7,7 @@ import { Vector } from "../../_framework/vector";
|
|
|
7
7
|
import { Decimal } from "../decimal/structs";
|
|
8
8
|
import { PKG_V1, PKG_V11 } from "../index";
|
|
9
9
|
import { UserRewardManager } from "../liquidity-mining/structs";
|
|
10
|
-
import {
|
|
10
|
+
import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
11
11
|
export declare function isBorrow(type: string): boolean;
|
|
12
12
|
export interface BorrowFields {
|
|
13
13
|
coinType: ToField<TypeName>;
|
|
@@ -38,25 +38,25 @@ export declare class Borrow implements StructClass {
|
|
|
38
38
|
static get r(): reified.StructClassReified<Borrow, BorrowFields>;
|
|
39
39
|
static phantom(): PhantomReified<ToTypeStr<Borrow>>;
|
|
40
40
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::Borrow" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::Borrow">;
|
|
41
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
42
|
-
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
43
|
-
name: import("@mysten/bcs").BcsStruct<{
|
|
44
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
41
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
42
|
+
coin_type: import("@mysten/sui/bcs").BcsStruct<{
|
|
43
|
+
name: import("@mysten/sui/bcs").BcsStruct<{
|
|
44
|
+
bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
45
45
|
length: number;
|
|
46
46
|
}, string>;
|
|
47
47
|
}, string>;
|
|
48
48
|
}, string>;
|
|
49
|
-
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
50
|
-
borrowed_amount: import("@mysten/bcs").BcsStruct<{
|
|
51
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
49
|
+
reserve_array_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
50
|
+
borrowed_amount: import("@mysten/sui/bcs").BcsStruct<{
|
|
51
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
52
52
|
}, string>;
|
|
53
|
-
cumulative_borrow_rate: import("@mysten/bcs").BcsStruct<{
|
|
54
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
53
|
+
cumulative_borrow_rate: import("@mysten/sui/bcs").BcsStruct<{
|
|
54
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
55
55
|
}, string>;
|
|
56
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
57
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
56
|
+
market_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
57
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
58
58
|
}, string>;
|
|
59
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
59
|
+
user_reward_manager_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
60
60
|
}, string>;
|
|
61
61
|
static fromFields(fields: Record<string, any>): Borrow;
|
|
62
62
|
static fromFieldsWithTypes(item: FieldsWithTypes): Borrow;
|
|
@@ -97,9 +97,7 @@ export declare class Borrow implements StructClass {
|
|
|
97
97
|
};
|
|
98
98
|
static fromJSONField(field: any): Borrow;
|
|
99
99
|
static fromJSON(json: Record<string, any>): Borrow;
|
|
100
|
-
static
|
|
101
|
-
static fromSuiObjectData(data: SuiObjectData): Borrow;
|
|
102
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<Borrow>;
|
|
100
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<Borrow>;
|
|
103
101
|
}
|
|
104
102
|
export declare function isBorrowRecord(type: string): boolean;
|
|
105
103
|
export interface BorrowRecordFields {
|
|
@@ -131,25 +129,25 @@ export declare class BorrowRecord implements StructClass {
|
|
|
131
129
|
static get r(): reified.StructClassReified<BorrowRecord, BorrowRecordFields>;
|
|
132
130
|
static phantom(): PhantomReified<ToTypeStr<BorrowRecord>>;
|
|
133
131
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::BorrowRecord" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::BorrowRecord">;
|
|
134
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
135
|
-
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
136
|
-
name: import("@mysten/bcs").BcsStruct<{
|
|
137
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
132
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
133
|
+
coin_type: import("@mysten/sui/bcs").BcsStruct<{
|
|
134
|
+
name: import("@mysten/sui/bcs").BcsStruct<{
|
|
135
|
+
bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
138
136
|
length: number;
|
|
139
137
|
}, string>;
|
|
140
138
|
}, string>;
|
|
141
139
|
}, string>;
|
|
142
|
-
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
143
|
-
borrowed_amount: import("@mysten/bcs").BcsStruct<{
|
|
144
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
140
|
+
reserve_array_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
141
|
+
borrowed_amount: import("@mysten/sui/bcs").BcsStruct<{
|
|
142
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
145
143
|
}, string>;
|
|
146
|
-
cumulative_borrow_rate: import("@mysten/bcs").BcsStruct<{
|
|
147
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
144
|
+
cumulative_borrow_rate: import("@mysten/sui/bcs").BcsStruct<{
|
|
145
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
148
146
|
}, string>;
|
|
149
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
150
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
147
|
+
market_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
148
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
151
149
|
}, string>;
|
|
152
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
150
|
+
user_reward_manager_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
153
151
|
}, string>;
|
|
154
152
|
static fromFields(fields: Record<string, any>): BorrowRecord;
|
|
155
153
|
static fromFieldsWithTypes(item: FieldsWithTypes): BorrowRecord;
|
|
@@ -190,9 +188,7 @@ export declare class BorrowRecord implements StructClass {
|
|
|
190
188
|
};
|
|
191
189
|
static fromJSONField(field: any): BorrowRecord;
|
|
192
190
|
static fromJSON(json: Record<string, any>): BorrowRecord;
|
|
193
|
-
static
|
|
194
|
-
static fromSuiObjectData(data: SuiObjectData): BorrowRecord;
|
|
195
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<BorrowRecord>;
|
|
191
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<BorrowRecord>;
|
|
196
192
|
}
|
|
197
193
|
export declare function isDeposit(type: string): boolean;
|
|
198
194
|
export interface DepositFields {
|
|
@@ -224,22 +220,22 @@ export declare class Deposit implements StructClass {
|
|
|
224
220
|
static get r(): reified.StructClassReified<Deposit, DepositFields>;
|
|
225
221
|
static phantom(): PhantomReified<ToTypeStr<Deposit>>;
|
|
226
222
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::Deposit" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::Deposit">;
|
|
227
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
228
|
-
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
229
|
-
name: import("@mysten/bcs").BcsStruct<{
|
|
230
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
223
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
224
|
+
coin_type: import("@mysten/sui/bcs").BcsStruct<{
|
|
225
|
+
name: import("@mysten/sui/bcs").BcsStruct<{
|
|
226
|
+
bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
231
227
|
length: number;
|
|
232
228
|
}, string>;
|
|
233
229
|
}, string>;
|
|
234
230
|
}, string>;
|
|
235
|
-
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
236
|
-
deposited_ctoken_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
237
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
238
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
231
|
+
reserve_array_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
232
|
+
deposited_ctoken_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
233
|
+
market_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
234
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
239
235
|
}, string>;
|
|
240
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
241
|
-
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
242
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
236
|
+
user_reward_manager_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
237
|
+
attributed_borrow_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
238
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
243
239
|
}, string>;
|
|
244
240
|
}, string>;
|
|
245
241
|
static fromFields(fields: Record<string, any>): Deposit;
|
|
@@ -277,9 +273,7 @@ export declare class Deposit implements StructClass {
|
|
|
277
273
|
};
|
|
278
274
|
static fromJSONField(field: any): Deposit;
|
|
279
275
|
static fromJSON(json: Record<string, any>): Deposit;
|
|
280
|
-
static
|
|
281
|
-
static fromSuiObjectData(data: SuiObjectData): Deposit;
|
|
282
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<Deposit>;
|
|
276
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<Deposit>;
|
|
283
277
|
}
|
|
284
278
|
export declare function isDepositRecord(type: string): boolean;
|
|
285
279
|
export interface DepositRecordFields {
|
|
@@ -311,22 +305,22 @@ export declare class DepositRecord implements StructClass {
|
|
|
311
305
|
static get r(): reified.StructClassReified<DepositRecord, DepositRecordFields>;
|
|
312
306
|
static phantom(): PhantomReified<ToTypeStr<DepositRecord>>;
|
|
313
307
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::DepositRecord" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::DepositRecord">;
|
|
314
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
315
|
-
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
316
|
-
name: import("@mysten/bcs").BcsStruct<{
|
|
317
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
308
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
309
|
+
coin_type: import("@mysten/sui/bcs").BcsStruct<{
|
|
310
|
+
name: import("@mysten/sui/bcs").BcsStruct<{
|
|
311
|
+
bytes: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
318
312
|
length: number;
|
|
319
313
|
}, string>;
|
|
320
314
|
}, string>;
|
|
321
315
|
}, string>;
|
|
322
|
-
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
323
|
-
deposited_ctoken_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
324
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
325
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
316
|
+
reserve_array_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
317
|
+
deposited_ctoken_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
318
|
+
market_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
319
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
326
320
|
}, string>;
|
|
327
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
328
|
-
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
329
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
321
|
+
user_reward_manager_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
322
|
+
attributed_borrow_value: import("@mysten/sui/bcs").BcsStruct<{
|
|
323
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
330
324
|
}, string>;
|
|
331
325
|
}, string>;
|
|
332
326
|
static fromFields(fields: Record<string, any>): DepositRecord;
|
|
@@ -364,9 +358,7 @@ export declare class DepositRecord implements StructClass {
|
|
|
364
358
|
};
|
|
365
359
|
static fromJSONField(field: any): DepositRecord;
|
|
366
360
|
static fromJSON(json: Record<string, any>): DepositRecord;
|
|
367
|
-
static
|
|
368
|
-
static fromSuiObjectData(data: SuiObjectData): DepositRecord;
|
|
369
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<DepositRecord>;
|
|
361
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<DepositRecord>;
|
|
370
362
|
}
|
|
371
363
|
export declare function isExistStaleOracles(type: string): boolean;
|
|
372
364
|
export interface ExistStaleOraclesFields {
|
|
@@ -388,8 +380,8 @@ export declare class ExistStaleOracles implements StructClass {
|
|
|
388
380
|
static get r(): reified.StructClassReified<ExistStaleOracles, ExistStaleOraclesFields>;
|
|
389
381
|
static phantom(): PhantomReified<ToTypeStr<ExistStaleOracles>>;
|
|
390
382
|
static get p(): reified.PhantomReified<"0xe5ed361add4433f4d23e56fc0e3bacab39b93592d5e65d508e33fd19ff696669::obligation::ExistStaleOracles" | "0xd2a67633ccb8de063163e25bcfca242929caf5cf1a26c2929dab519ee0b8f331::obligation::ExistStaleOracles">;
|
|
391
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
392
|
-
dummy_field: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
383
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
384
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
393
385
|
}, string>;
|
|
394
386
|
static fromFields(fields: Record<string, any>): ExistStaleOracles;
|
|
395
387
|
static fromFieldsWithTypes(item: FieldsWithTypes): ExistStaleOracles;
|
|
@@ -404,9 +396,7 @@ export declare class ExistStaleOracles implements StructClass {
|
|
|
404
396
|
};
|
|
405
397
|
static fromJSONField(field: any): ExistStaleOracles;
|
|
406
398
|
static fromJSON(json: Record<string, any>): ExistStaleOracles;
|
|
407
|
-
static
|
|
408
|
-
static fromSuiObjectData(data: SuiObjectData): ExistStaleOracles;
|
|
409
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<ExistStaleOracles>;
|
|
399
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<ExistStaleOracles>;
|
|
410
400
|
}
|
|
411
401
|
export declare function isObligation(type: string): boolean;
|
|
412
402
|
export interface ObligationFields<P extends PhantomTypeArgument> {
|
|
@@ -456,16 +446,16 @@ export declare class Obligation<P extends PhantomTypeArgument> implements Struct
|
|
|
456
446
|
static get r(): typeof Obligation.reified;
|
|
457
447
|
static phantom<P extends PhantomReified<PhantomTypeArgument>>(P: P): PhantomReified<ToTypeStr<Obligation<ToPhantomTypeArgument<P>>>>;
|
|
458
448
|
static get p(): typeof Obligation.phantom;
|
|
459
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
460
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
461
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
462
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
449
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
450
|
+
id: import("@mysten/sui/bcs").BcsStruct<{
|
|
451
|
+
id: import("@mysten/sui/bcs").BcsStruct<{
|
|
452
|
+
bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
|
|
463
453
|
}, string>;
|
|
464
454
|
}, string>;
|
|
465
|
-
lending_market_id: import("@mysten/bcs").BcsStruct<{
|
|
466
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
455
|
+
lending_market_id: import("@mysten/sui/bcs").BcsStruct<{
|
|
456
|
+
bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
|
|
467
457
|
}, string>;
|
|
468
|
-
deposits: import("@mysten/bcs").BcsType<{
|
|
458
|
+
deposits: import("@mysten/sui/bcs").BcsType<{
|
|
469
459
|
coin_type: {
|
|
470
460
|
name: {
|
|
471
461
|
bytes: number[];
|
|
@@ -500,7 +490,7 @@ export declare class Obligation<P extends PhantomTypeArgument> implements Struct
|
|
|
500
490
|
}> & {
|
|
501
491
|
length: number;
|
|
502
492
|
}, string>;
|
|
503
|
-
borrows: import("@mysten/bcs").BcsType<{
|
|
493
|
+
borrows: import("@mysten/sui/bcs").BcsType<{
|
|
504
494
|
coin_type: {
|
|
505
495
|
name: {
|
|
506
496
|
bytes: number[];
|
|
@@ -539,77 +529,51 @@ export declare class Obligation<P extends PhantomTypeArgument> implements Struct
|
|
|
539
529
|
}> & {
|
|
540
530
|
length: number;
|
|
541
531
|
}, string>;
|
|
542
|
-
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
543
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
532
|
+
deposited_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
533
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
544
534
|
}, string>;
|
|
545
|
-
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
546
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
535
|
+
allowed_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
536
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
547
537
|
}, string>;
|
|
548
|
-
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
549
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
538
|
+
unhealthy_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
539
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
550
540
|
}, string>;
|
|
551
|
-
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
552
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
541
|
+
super_unhealthy_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
542
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
553
543
|
}, string>;
|
|
554
|
-
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
555
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
544
|
+
unweighted_borrowed_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
545
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
556
546
|
}, string>;
|
|
557
|
-
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
558
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
547
|
+
weighted_borrowed_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
548
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
559
549
|
}, string>;
|
|
560
|
-
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
561
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
550
|
+
weighted_borrowed_value_upper_bound_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
551
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
562
552
|
}, string>;
|
|
563
|
-
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
564
|
-
user_reward_managers: import("@mysten/bcs").BcsType<{
|
|
553
|
+
borrowing_isolated_asset: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
554
|
+
user_reward_managers: import("@mysten/sui/bcs").BcsType<{
|
|
565
555
|
pool_reward_manager_id: {
|
|
566
556
|
bytes: string;
|
|
567
557
|
};
|
|
568
558
|
share: string;
|
|
569
|
-
rewards:
|
|
570
|
-
vec: {
|
|
571
|
-
pool_reward_id: {
|
|
572
|
-
bytes: string;
|
|
573
|
-
};
|
|
574
|
-
earned_rewards: {
|
|
575
|
-
value: string;
|
|
576
|
-
};
|
|
577
|
-
cumulative_rewards_per_share: {
|
|
578
|
-
value: string;
|
|
579
|
-
};
|
|
580
|
-
}[];
|
|
581
|
-
}[];
|
|
559
|
+
rewards: any[];
|
|
582
560
|
last_update_time_ms: string;
|
|
583
561
|
}[], Iterable<{
|
|
584
562
|
pool_reward_manager_id: {
|
|
585
563
|
bytes: string;
|
|
586
564
|
};
|
|
587
565
|
share: string | number | bigint;
|
|
588
|
-
rewards: Iterable<{
|
|
589
|
-
vec: Iterable<{
|
|
590
|
-
pool_reward_id: {
|
|
591
|
-
bytes: string;
|
|
592
|
-
};
|
|
593
|
-
earned_rewards: {
|
|
594
|
-
value: string | number | bigint;
|
|
595
|
-
};
|
|
596
|
-
cumulative_rewards_per_share: {
|
|
597
|
-
value: string | number | bigint;
|
|
598
|
-
};
|
|
599
|
-
}> & {
|
|
600
|
-
length: number;
|
|
601
|
-
};
|
|
602
|
-
}> & {
|
|
566
|
+
rewards: Iterable<any> & {
|
|
603
567
|
length: number;
|
|
604
568
|
};
|
|
605
569
|
last_update_time_ms: string | number | bigint;
|
|
606
570
|
}> & {
|
|
607
571
|
length: number;
|
|
608
572
|
}, string>;
|
|
609
|
-
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
610
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
573
|
+
bad_debt_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
574
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
611
575
|
}, string>;
|
|
612
|
-
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
576
|
+
closable: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
613
577
|
}, string>;
|
|
614
578
|
static fromFields<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, fields: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
615
579
|
static fromFieldsWithTypes<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, item: FieldsWithTypes): Obligation<ToPhantomTypeArgument<P>>;
|
|
@@ -766,9 +730,7 @@ export declare class Obligation<P extends PhantomTypeArgument> implements Struct
|
|
|
766
730
|
};
|
|
767
731
|
static fromJSONField<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, field: any): Obligation<ToPhantomTypeArgument<P>>;
|
|
768
732
|
static fromJSON<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, json: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
769
|
-
static
|
|
770
|
-
static fromSuiObjectData<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, data: SuiObjectData): Obligation<ToPhantomTypeArgument<P>>;
|
|
771
|
-
static fetch<P extends PhantomReified<PhantomTypeArgument>>(client: SuiJsonRpcClient, typeArg: P, id: string): Promise<Obligation<ToPhantomTypeArgument<P>>>;
|
|
733
|
+
static fetch<P extends PhantomReified<PhantomTypeArgument>>(client: SuiGrpcClient, typeArg: P, id: string): Promise<Obligation<ToPhantomTypeArgument<P>>>;
|
|
772
734
|
}
|
|
773
735
|
export declare function isObligationDataEvent(type: string): boolean;
|
|
774
736
|
export interface ObligationDataEventFields {
|
|
@@ -816,10 +778,10 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
816
778
|
static get r(): reified.StructClassReified<ObligationDataEvent, ObligationDataEventFields>;
|
|
817
779
|
static phantom(): PhantomReified<ToTypeStr<ObligationDataEvent>>;
|
|
818
780
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::obligation::ObligationDataEvent" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::obligation::ObligationDataEvent">;
|
|
819
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
820
|
-
lending_market_id: import("@mysten/bcs").BcsType<string, string, string>;
|
|
821
|
-
obligation_id: import("@mysten/bcs").BcsType<string, string, string>;
|
|
822
|
-
deposits: import("@mysten/bcs").BcsType<{
|
|
781
|
+
static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
|
|
782
|
+
lending_market_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
|
|
783
|
+
obligation_id: import("@mysten/sui/bcs").BcsType<string, string, string>;
|
|
784
|
+
deposits: import("@mysten/sui/bcs").BcsType<{
|
|
823
785
|
coin_type: {
|
|
824
786
|
name: {
|
|
825
787
|
bytes: number[];
|
|
@@ -854,7 +816,7 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
854
816
|
}> & {
|
|
855
817
|
length: number;
|
|
856
818
|
}, string>;
|
|
857
|
-
borrows: import("@mysten/bcs").BcsType<{
|
|
819
|
+
borrows: import("@mysten/sui/bcs").BcsType<{
|
|
858
820
|
coin_type: {
|
|
859
821
|
name: {
|
|
860
822
|
bytes: number[];
|
|
@@ -893,32 +855,32 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
893
855
|
}> & {
|
|
894
856
|
length: number;
|
|
895
857
|
}, string>;
|
|
896
|
-
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
897
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
858
|
+
deposited_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
859
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
898
860
|
}, string>;
|
|
899
|
-
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
900
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
861
|
+
allowed_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
862
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
901
863
|
}, string>;
|
|
902
|
-
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
903
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
864
|
+
unhealthy_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
865
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
904
866
|
}, string>;
|
|
905
|
-
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
906
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
867
|
+
super_unhealthy_borrow_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
868
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
907
869
|
}, string>;
|
|
908
|
-
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
909
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
870
|
+
unweighted_borrowed_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
871
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
910
872
|
}, string>;
|
|
911
|
-
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
912
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
873
|
+
weighted_borrowed_value_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
874
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
913
875
|
}, string>;
|
|
914
|
-
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
915
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
876
|
+
weighted_borrowed_value_upper_bound_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
877
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
916
878
|
}, string>;
|
|
917
|
-
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
918
|
-
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
919
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
879
|
+
borrowing_isolated_asset: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
880
|
+
bad_debt_usd: import("@mysten/sui/bcs").BcsStruct<{
|
|
881
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
920
882
|
}, string>;
|
|
921
|
-
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
883
|
+
closable: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
922
884
|
}, string>;
|
|
923
885
|
static fromFields(fields: Record<string, any>): ObligationDataEvent;
|
|
924
886
|
static fromFieldsWithTypes(item: FieldsWithTypes): ObligationDataEvent;
|
|
@@ -1047,7 +1009,5 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
1047
1009
|
};
|
|
1048
1010
|
static fromJSONField(field: any): ObligationDataEvent;
|
|
1049
1011
|
static fromJSON(json: Record<string, any>): ObligationDataEvent;
|
|
1050
|
-
static
|
|
1051
|
-
static fromSuiObjectData(data: SuiObjectData): ObligationDataEvent;
|
|
1052
|
-
static fetch(client: SuiJsonRpcClient, id: string): Promise<ObligationDataEvent>;
|
|
1012
|
+
static fetch(client: SuiGrpcClient, id: string): Promise<ObligationDataEvent>;
|
|
1053
1013
|
}
|