@suilend/sdk 12.7.0 → 13.0.0-next.g122801a
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/pyth-2/price-identifier/structs.d.ts +46 -0
- package/_generated/_dependencies/{source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e → pyth-2}/price-identifier/structs.js +45 -25
- package/_generated/_dependencies/std/ascii/structs.d.ts +100 -0
- package/_generated/_dependencies/{source/0x1 → std}/ascii/structs.js +153 -103
- package/_generated/_dependencies/{source/0x1 → std}/option/structs.d.ts +29 -21
- package/_generated/_dependencies/std/option/structs.js +155 -0
- package/_generated/_dependencies/std/type-name/structs.d.ts +65 -0
- package/_generated/_dependencies/{source/0x1 → std}/type-name/structs.js +49 -22
- package/_generated/_dependencies/sui/bag/structs.d.ts +75 -0
- package/_generated/_dependencies/sui/bag/structs.js +154 -0
- package/_generated/_dependencies/{source/0x2 → sui}/balance/structs.d.ts +80 -60
- package/_generated/_dependencies/sui/balance/structs.js +306 -0
- package/_generated/_dependencies/sui/object/structs.d.ts +104 -0
- package/_generated/_dependencies/{source/0x2 → sui}/object/structs.js +98 -46
- package/_generated/_dependencies/{source/0x2 → sui}/object-table/structs.d.ts +37 -30
- package/_generated/_dependencies/sui/object-table/structs.js +164 -0
- package/_generated/_envs/index.d.ts +3 -0
- package/_generated/_envs/index.js +18 -0
- package/_generated/_envs/mainnet.d.ts +2 -0
- package/_generated/_envs/mainnet.js +490 -0
- package/_generated/_framework/env.d.ts +137 -0
- package/_generated/_framework/env.js +261 -0
- package/_generated/_framework/reified.d.ts +68 -36
- package/_generated/_framework/reified.js +110 -98
- package/_generated/_framework/util.d.ts +4 -4
- package/_generated/_framework/util.js +82 -79
- package/_generated/_framework/vector.d.ts +11 -9
- package/_generated/_framework/vector.js +10 -10
- package/_generated/suilend/cell/structs.d.ts +24 -22
- package/_generated/suilend/cell/structs.js +68 -24
- package/_generated/suilend/decimal/structs.d.ts +28 -24
- package/_generated/suilend/decimal/structs.js +45 -24
- package/_generated/suilend/index.d.ts +5 -6
- package/_generated/suilend/index.js +10 -19
- package/_generated/suilend/lending-market/functions.d.ts +1123 -149
- package/_generated/suilend/lending-market/functions.js +1121 -207
- package/_generated/suilend/lending-market/structs.d.ts +985 -1290
- package/_generated/suilend/lending-market/structs.js +2482 -1282
- package/_generated/suilend/lending-market-registry/functions.d.ts +32 -3
- package/_generated/suilend/lending-market-registry/functions.js +30 -6
- package/_generated/suilend/liquidity-mining/structs.d.ts +200 -333
- package/_generated/suilend/liquidity-mining/structs.js +449 -319
- package/_generated/suilend/obligation/structs.d.ts +406 -918
- package/_generated/suilend/obligation/structs.js +786 -596
- package/_generated/suilend/rate-limiter/functions.d.ts +134 -15
- package/_generated/suilend/rate-limiter/functions.js +139 -21
- package/_generated/suilend/rate-limiter/structs.d.ts +72 -80
- package/_generated/suilend/rate-limiter/structs.js +98 -48
- package/_generated/suilend/reserve/structs.d.ts +611 -904
- package/_generated/suilend/reserve/structs.js +1528 -736
- package/_generated/suilend/reserve-config/functions.d.ts +718 -96
- package/_generated/suilend/reserve-config/functions.js +751 -157
- package/_generated/suilend/reserve-config/structs.d.ts +148 -163
- package/_generated/suilend/reserve-config/structs.js +260 -94
- package/client.d.ts +2 -2
- package/client.js +22 -39
- package/lib/initialize.d.ts +617 -83
- package/lib/initialize.js +151 -48
- package/lib/proCompatible.js +5 -5
- package/package.json +1 -1
- package/parsers/lendingMarket.d.ts +9 -9
- package/parsers/obligation.d.ts +14 -14
- package/parsers/obligation.js +4 -4
- package/parsers/rateLimiter.d.ts +1 -1
- package/parsers/reserve.d.ts +12 -12
- package/parsers/reserve.js +2 -2
- package/strategies.d.ts +14 -14
- package/utils/obligation.d.ts +3 -0
- package/utils/obligation.js +10 -0
- package/utils/simulate.d.ts +1 -1
- package/utils/simulate.js +5 -5
- package/_generated/_dependencies/source/0x1/ascii/structs.d.ts +0 -84
- package/_generated/_dependencies/source/0x1/index.d.ts +0 -3
- package/_generated/_dependencies/source/0x1/index.js +0 -3
- package/_generated/_dependencies/source/0x1/option/structs.js +0 -110
- package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +0 -47
- package/_generated/_dependencies/source/0x2/bag/structs.d.ts +0 -52
- package/_generated/_dependencies/source/0x2/bag/structs.js +0 -113
- package/_generated/_dependencies/source/0x2/balance/structs.js +0 -210
- package/_generated/_dependencies/source/0x2/index.d.ts +0 -3
- package/_generated/_dependencies/source/0x2/index.js +0 -3
- package/_generated/_dependencies/source/0x2/object/structs.d.ts +0 -82
- package/_generated/_dependencies/source/0x2/object-table/structs.js +0 -115
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.d.ts +0 -4
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js +0 -4
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +0 -46
|
@@ -1,741 +1,311 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TypeName } from
|
|
3
|
-
import { ID, UID } from
|
|
4
|
-
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToPhantomTypeArgument, ToTypeStr } from
|
|
5
|
-
import { FieldsWithTypes } from
|
|
6
|
-
import { Vector } from
|
|
7
|
-
import { Decimal } from
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cumulative_borrow_rate: import("@mysten/bcs").BcsStruct<{
|
|
54
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
55
|
-
}, string>;
|
|
56
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
57
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
58
|
-
}, string>;
|
|
59
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
60
|
-
}, string>;
|
|
61
|
-
static fromFields(fields: Record<string, any>): Borrow;
|
|
62
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): Borrow;
|
|
63
|
-
static fromBcs(data: Uint8Array): Borrow;
|
|
64
|
-
toJSONField(): {
|
|
65
|
-
coinType: {
|
|
66
|
-
name: string;
|
|
67
|
-
};
|
|
68
|
-
reserveArrayIndex: string;
|
|
69
|
-
borrowedAmount: {
|
|
70
|
-
value: string;
|
|
71
|
-
};
|
|
72
|
-
cumulativeBorrowRate: {
|
|
73
|
-
value: string;
|
|
74
|
-
};
|
|
75
|
-
marketValue: {
|
|
76
|
-
value: string;
|
|
77
|
-
};
|
|
78
|
-
userRewardManagerIndex: string;
|
|
79
|
-
};
|
|
80
|
-
toJSON(): {
|
|
81
|
-
coinType: {
|
|
82
|
-
name: string;
|
|
83
|
-
};
|
|
84
|
-
reserveArrayIndex: string;
|
|
85
|
-
borrowedAmount: {
|
|
86
|
-
value: string;
|
|
87
|
-
};
|
|
88
|
-
cumulativeBorrowRate: {
|
|
89
|
-
value: string;
|
|
90
|
-
};
|
|
91
|
-
marketValue: {
|
|
92
|
-
value: string;
|
|
93
|
-
};
|
|
94
|
-
userRewardManagerIndex: string;
|
|
95
|
-
$typeName: string;
|
|
96
|
-
$typeArgs: [];
|
|
97
|
-
};
|
|
98
|
-
static fromJSONField(field: any): Borrow;
|
|
99
|
-
static fromJSON(json: Record<string, any>): Borrow;
|
|
100
|
-
static fetch(client: SuiGrpcClient, id: string): Promise<Borrow>;
|
|
101
|
-
}
|
|
102
|
-
export declare function isBorrowRecord(type: string): boolean;
|
|
103
|
-
export interface BorrowRecordFields {
|
|
104
|
-
coinType: ToField<TypeName>;
|
|
105
|
-
reserveArrayIndex: ToField<"u64">;
|
|
106
|
-
borrowedAmount: ToField<Decimal>;
|
|
107
|
-
cumulativeBorrowRate: ToField<Decimal>;
|
|
108
|
-
marketValue: ToField<Decimal>;
|
|
109
|
-
userRewardManagerIndex: ToField<"u64">;
|
|
1
|
+
import type { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';
|
|
2
|
+
import { TypeName } from '../../_dependencies/std/type-name/structs';
|
|
3
|
+
import { ID, UID } from '../../_dependencies/sui/object/structs';
|
|
4
|
+
import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToJSON, ToPhantomTypeArgument, ToTypeStr } from '../../_framework/reified';
|
|
5
|
+
import { FieldsWithTypes } from '../../_framework/util';
|
|
6
|
+
import { Vector } from '../../_framework/vector';
|
|
7
|
+
import { Decimal } from '../decimal/structs';
|
|
8
|
+
import { UserRewardManager } from '../liquidity-mining/structs';
|
|
9
|
+
export declare function isObligation(type: string): boolean;
|
|
10
|
+
export interface ObligationFields<P extends PhantomTypeArgument> {
|
|
11
|
+
id: ToField<UID>;
|
|
12
|
+
lendingMarketId: ToField<ID>;
|
|
13
|
+
/**
|
|
14
|
+
* all deposits in the obligation. there is at most one deposit per coin type
|
|
15
|
+
* There should never be a deposit object with a zeroed amount
|
|
16
|
+
*/
|
|
17
|
+
deposits: ToField<Vector<Deposit>>;
|
|
18
|
+
/**
|
|
19
|
+
* all borrows in the obligation. there is at most one deposit per coin type
|
|
20
|
+
* There should never be a borrow object with a zeroed amount
|
|
21
|
+
*/
|
|
22
|
+
borrows: ToField<Vector<Borrow>>;
|
|
23
|
+
/** value of all deposits in USD */
|
|
24
|
+
depositedValueUsd: ToField<Decimal>;
|
|
25
|
+
/**
|
|
26
|
+
* sum(deposit value * open ltv) for all deposits.
|
|
27
|
+
* if weighted_borrowed_value_usd > allowed_borrow_value_usd,
|
|
28
|
+
* the obligation is not healthy
|
|
29
|
+
*/
|
|
30
|
+
allowedBorrowValueUsd: ToField<Decimal>;
|
|
31
|
+
/**
|
|
32
|
+
* sum(deposit value * close ltv) for all deposits
|
|
33
|
+
* if weighted_borrowed_value_usd > unhealthy_borrow_value_usd,
|
|
34
|
+
* the obligation is unhealthy and can be liquidated
|
|
35
|
+
*/
|
|
36
|
+
unhealthyBorrowValueUsd: ToField<Decimal>;
|
|
37
|
+
superUnhealthyBorrowValueUsd: ToField<Decimal>;
|
|
38
|
+
/** value of all borrows in USD */
|
|
39
|
+
unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
40
|
+
/** weighted value of all borrows in USD. used when checking if an obligation is liquidatable */
|
|
41
|
+
weightedBorrowedValueUsd: ToField<Decimal>;
|
|
42
|
+
/**
|
|
43
|
+
* weighted value of all borrows in USD, but using the upper bound of the market value
|
|
44
|
+
* used to limit borrows and withdraws
|
|
45
|
+
*/
|
|
46
|
+
weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
47
|
+
borrowingIsolatedAsset: ToField<'bool'>;
|
|
48
|
+
userRewardManagers: ToField<Vector<UserRewardManager>>;
|
|
49
|
+
/** unused */
|
|
50
|
+
badDebtUsd: ToField<Decimal>;
|
|
51
|
+
/** unused */
|
|
52
|
+
closable: ToField<'bool'>;
|
|
110
53
|
}
|
|
111
|
-
export type
|
|
112
|
-
export
|
|
54
|
+
export type ObligationReified<P extends PhantomTypeArgument> = Reified<Obligation<P>, ObligationFields<P>>;
|
|
55
|
+
export type ObligationJSONField<P extends PhantomTypeArgument> = {
|
|
56
|
+
id: string;
|
|
57
|
+
lendingMarketId: string;
|
|
58
|
+
deposits: ToJSON<Deposit>[];
|
|
59
|
+
borrows: ToJSON<Borrow>[];
|
|
60
|
+
depositedValueUsd: ToJSON<Decimal>;
|
|
61
|
+
allowedBorrowValueUsd: ToJSON<Decimal>;
|
|
62
|
+
unhealthyBorrowValueUsd: ToJSON<Decimal>;
|
|
63
|
+
superUnhealthyBorrowValueUsd: ToJSON<Decimal>;
|
|
64
|
+
unweightedBorrowedValueUsd: ToJSON<Decimal>;
|
|
65
|
+
weightedBorrowedValueUsd: ToJSON<Decimal>;
|
|
66
|
+
weightedBorrowedValueUpperBoundUsd: ToJSON<Decimal>;
|
|
67
|
+
borrowingIsolatedAsset: boolean;
|
|
68
|
+
userRewardManagers: ToJSON<UserRewardManager>[];
|
|
69
|
+
badDebtUsd: ToJSON<Decimal>;
|
|
70
|
+
closable: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type ObligationJSON<P extends PhantomTypeArgument> = {
|
|
73
|
+
$typeName: typeof Obligation.$typeName;
|
|
74
|
+
$typeArgs: [PhantomToTypeStr<P>];
|
|
75
|
+
} & ObligationJSONField<P>;
|
|
76
|
+
export declare class Obligation<P extends PhantomTypeArgument> implements StructClass {
|
|
113
77
|
__StructClass: true;
|
|
114
|
-
static
|
|
115
|
-
static readonly $numTypeParams =
|
|
116
|
-
static readonly $isPhantom: readonly [];
|
|
117
|
-
readonly $typeName:
|
|
118
|
-
readonly $fullTypeName: `${
|
|
119
|
-
readonly $typeArgs: [];
|
|
120
|
-
readonly $isPhantom:
|
|
121
|
-
readonly
|
|
122
|
-
readonly
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
78
|
+
static get $typeName(): `${string}::obligation::Obligation`;
|
|
79
|
+
static readonly $numTypeParams = 1;
|
|
80
|
+
static readonly $isPhantom: readonly [true];
|
|
81
|
+
readonly $typeName: typeof Obligation.$typeName;
|
|
82
|
+
readonly $fullTypeName: `${string}::obligation::Obligation<${PhantomToTypeStr<P>}>`;
|
|
83
|
+
readonly $typeArgs: [PhantomToTypeStr<P>];
|
|
84
|
+
readonly $isPhantom: typeof Obligation.$isPhantom;
|
|
85
|
+
readonly id: ToField<UID>;
|
|
86
|
+
readonly lendingMarketId: ToField<ID>;
|
|
87
|
+
/**
|
|
88
|
+
* all deposits in the obligation. there is at most one deposit per coin type
|
|
89
|
+
* There should never be a deposit object with a zeroed amount
|
|
90
|
+
*/
|
|
91
|
+
readonly deposits: ToField<Vector<Deposit>>;
|
|
92
|
+
/**
|
|
93
|
+
* all borrows in the obligation. there is at most one deposit per coin type
|
|
94
|
+
* There should never be a borrow object with a zeroed amount
|
|
95
|
+
*/
|
|
96
|
+
readonly borrows: ToField<Vector<Borrow>>;
|
|
97
|
+
/** value of all deposits in USD */
|
|
98
|
+
readonly depositedValueUsd: ToField<Decimal>;
|
|
99
|
+
/**
|
|
100
|
+
* sum(deposit value * open ltv) for all deposits.
|
|
101
|
+
* if weighted_borrowed_value_usd > allowed_borrow_value_usd,
|
|
102
|
+
* the obligation is not healthy
|
|
103
|
+
*/
|
|
104
|
+
readonly allowedBorrowValueUsd: ToField<Decimal>;
|
|
105
|
+
/**
|
|
106
|
+
* sum(deposit value * close ltv) for all deposits
|
|
107
|
+
* if weighted_borrowed_value_usd > unhealthy_borrow_value_usd,
|
|
108
|
+
* the obligation is unhealthy and can be liquidated
|
|
109
|
+
*/
|
|
110
|
+
readonly unhealthyBorrowValueUsd: ToField<Decimal>;
|
|
111
|
+
readonly superUnhealthyBorrowValueUsd: ToField<Decimal>;
|
|
112
|
+
/** value of all borrows in USD */
|
|
113
|
+
readonly unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
114
|
+
/** weighted value of all borrows in USD. used when checking if an obligation is liquidatable */
|
|
115
|
+
readonly weightedBorrowedValueUsd: ToField<Decimal>;
|
|
116
|
+
/**
|
|
117
|
+
* weighted value of all borrows in USD, but using the upper bound of the market value
|
|
118
|
+
* used to limit borrows and withdraws
|
|
119
|
+
*/
|
|
120
|
+
readonly weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
121
|
+
readonly borrowingIsolatedAsset: ToField<'bool'>;
|
|
122
|
+
readonly userRewardManagers: ToField<Vector<UserRewardManager>>;
|
|
123
|
+
/** unused */
|
|
124
|
+
readonly badDebtUsd: ToField<Decimal>;
|
|
125
|
+
/** unused */
|
|
126
|
+
readonly closable: ToField<'bool'>;
|
|
127
127
|
private constructor();
|
|
128
|
-
static reified():
|
|
129
|
-
static get r(): reified
|
|
130
|
-
static phantom(): PhantomReified<ToTypeStr<
|
|
131
|
-
static get p():
|
|
132
|
-
static
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, string>;
|
|
147
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
148
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
149
|
-
}, string>;
|
|
150
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
151
|
-
}, string>;
|
|
152
|
-
static fromFields(fields: Record<string, any>): BorrowRecord;
|
|
153
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): BorrowRecord;
|
|
154
|
-
static fromBcs(data: Uint8Array): BorrowRecord;
|
|
155
|
-
toJSONField(): {
|
|
156
|
-
coinType: {
|
|
157
|
-
name: string;
|
|
158
|
-
};
|
|
159
|
-
reserveArrayIndex: string;
|
|
160
|
-
borrowedAmount: {
|
|
161
|
-
value: string;
|
|
162
|
-
};
|
|
163
|
-
cumulativeBorrowRate: {
|
|
164
|
-
value: string;
|
|
165
|
-
};
|
|
166
|
-
marketValue: {
|
|
167
|
-
value: string;
|
|
168
|
-
};
|
|
169
|
-
userRewardManagerIndex: string;
|
|
170
|
-
};
|
|
171
|
-
toJSON(): {
|
|
172
|
-
coinType: {
|
|
173
|
-
name: string;
|
|
174
|
-
};
|
|
175
|
-
reserveArrayIndex: string;
|
|
176
|
-
borrowedAmount: {
|
|
177
|
-
value: string;
|
|
178
|
-
};
|
|
179
|
-
cumulativeBorrowRate: {
|
|
180
|
-
value: string;
|
|
181
|
-
};
|
|
182
|
-
marketValue: {
|
|
183
|
-
value: string;
|
|
184
|
-
};
|
|
185
|
-
userRewardManagerIndex: string;
|
|
186
|
-
$typeName: string;
|
|
187
|
-
$typeArgs: [];
|
|
188
|
-
};
|
|
189
|
-
static fromJSONField(field: any): BorrowRecord;
|
|
190
|
-
static fromJSON(json: Record<string, any>): BorrowRecord;
|
|
191
|
-
static fetch(client: SuiGrpcClient, id: string): Promise<BorrowRecord>;
|
|
128
|
+
static reified<P extends PhantomReified<PhantomTypeArgument>>(P: P): ObligationReified<ToPhantomTypeArgument<P>>;
|
|
129
|
+
static get r(): typeof Obligation.reified;
|
|
130
|
+
static phantom<P extends PhantomReified<PhantomTypeArgument>>(P: P): PhantomReified<ToTypeStr<Obligation<ToPhantomTypeArgument<P>>>>;
|
|
131
|
+
static get p(): typeof Obligation.phantom;
|
|
132
|
+
private static instantiateBcs;
|
|
133
|
+
private static cachedBcs;
|
|
134
|
+
static get bcs(): ReturnType<typeof Obligation.instantiateBcs>;
|
|
135
|
+
static fromFields<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, fields: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
136
|
+
static fromFieldsWithTypes<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, item: FieldsWithTypes): Obligation<ToPhantomTypeArgument<P>>;
|
|
137
|
+
static fromBcs<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, data: Uint8Array): Obligation<ToPhantomTypeArgument<P>>;
|
|
138
|
+
toJSONField(): ObligationJSONField<P>;
|
|
139
|
+
toJSON(): ObligationJSON<P>;
|
|
140
|
+
static fromJSONField<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, field: any): Obligation<ToPhantomTypeArgument<P>>;
|
|
141
|
+
static fromJSON<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, json: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
142
|
+
static fromCoreObject<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, obj: SuiClientTypes.Object<{
|
|
143
|
+
content: true;
|
|
144
|
+
}>): Obligation<ToPhantomTypeArgument<P>>;
|
|
145
|
+
static fetch<P extends PhantomReified<PhantomTypeArgument>>(client: ClientWithCoreApi, typeArg: P, id: string): Promise<Obligation<ToPhantomTypeArgument<P>>>;
|
|
192
146
|
}
|
|
193
147
|
export declare function isDeposit(type: string): boolean;
|
|
194
148
|
export interface DepositFields {
|
|
195
149
|
coinType: ToField<TypeName>;
|
|
196
|
-
reserveArrayIndex: ToField<
|
|
197
|
-
depositedCtokenAmount: ToField<
|
|
150
|
+
reserveArrayIndex: ToField<'u64'>;
|
|
151
|
+
depositedCtokenAmount: ToField<'u64'>;
|
|
198
152
|
marketValue: ToField<Decimal>;
|
|
199
|
-
userRewardManagerIndex: ToField<
|
|
153
|
+
userRewardManagerIndex: ToField<'u64'>;
|
|
154
|
+
/** unused */
|
|
200
155
|
attributedBorrowValue: ToField<Decimal>;
|
|
201
156
|
}
|
|
202
157
|
export type DepositReified = Reified<Deposit, DepositFields>;
|
|
158
|
+
export type DepositJSONField = {
|
|
159
|
+
coinType: string;
|
|
160
|
+
reserveArrayIndex: string;
|
|
161
|
+
depositedCtokenAmount: string;
|
|
162
|
+
marketValue: ToJSON<Decimal>;
|
|
163
|
+
userRewardManagerIndex: string;
|
|
164
|
+
attributedBorrowValue: ToJSON<Decimal>;
|
|
165
|
+
};
|
|
166
|
+
export type DepositJSON = {
|
|
167
|
+
$typeName: typeof Deposit.$typeName;
|
|
168
|
+
$typeArgs: [];
|
|
169
|
+
} & DepositJSONField;
|
|
203
170
|
export declare class Deposit implements StructClass {
|
|
204
171
|
__StructClass: true;
|
|
205
|
-
static
|
|
172
|
+
static get $typeName(): `${string}::obligation::Deposit`;
|
|
206
173
|
static readonly $numTypeParams = 0;
|
|
207
174
|
static readonly $isPhantom: readonly [];
|
|
208
|
-
readonly $typeName:
|
|
209
|
-
readonly $fullTypeName: `${
|
|
175
|
+
readonly $typeName: typeof Deposit.$typeName;
|
|
176
|
+
readonly $fullTypeName: `${string}::obligation::Deposit`;
|
|
210
177
|
readonly $typeArgs: [];
|
|
211
|
-
readonly $isPhantom:
|
|
178
|
+
readonly $isPhantom: typeof Deposit.$isPhantom;
|
|
212
179
|
readonly coinType: ToField<TypeName>;
|
|
213
|
-
readonly reserveArrayIndex: ToField<
|
|
214
|
-
readonly depositedCtokenAmount: ToField<
|
|
180
|
+
readonly reserveArrayIndex: ToField<'u64'>;
|
|
181
|
+
readonly depositedCtokenAmount: ToField<'u64'>;
|
|
215
182
|
readonly marketValue: ToField<Decimal>;
|
|
216
|
-
readonly userRewardManagerIndex: ToField<
|
|
183
|
+
readonly userRewardManagerIndex: ToField<'u64'>;
|
|
184
|
+
/** unused */
|
|
217
185
|
readonly attributedBorrowValue: ToField<Decimal>;
|
|
218
186
|
private constructor();
|
|
219
187
|
static reified(): DepositReified;
|
|
220
|
-
static get r():
|
|
188
|
+
static get r(): DepositReified;
|
|
221
189
|
static phantom(): PhantomReified<ToTypeStr<Deposit>>;
|
|
222
|
-
static get p():
|
|
223
|
-
static
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
227
|
-
length: number;
|
|
228
|
-
}, string>;
|
|
229
|
-
}, string>;
|
|
230
|
-
}, string>;
|
|
231
|
-
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
232
|
-
deposited_ctoken_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
233
|
-
market_value: import("@mysten/bcs").BcsStruct<{
|
|
234
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
235
|
-
}, string>;
|
|
236
|
-
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
237
|
-
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
238
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
239
|
-
}, string>;
|
|
240
|
-
}, string>;
|
|
190
|
+
static get p(): PhantomReified<ToTypeStr<Deposit>>;
|
|
191
|
+
private static instantiateBcs;
|
|
192
|
+
private static cachedBcs;
|
|
193
|
+
static get bcs(): ReturnType<typeof Deposit.instantiateBcs>;
|
|
241
194
|
static fromFields(fields: Record<string, any>): Deposit;
|
|
242
195
|
static fromFieldsWithTypes(item: FieldsWithTypes): Deposit;
|
|
243
196
|
static fromBcs(data: Uint8Array): Deposit;
|
|
244
|
-
toJSONField():
|
|
245
|
-
|
|
246
|
-
name: string;
|
|
247
|
-
};
|
|
248
|
-
reserveArrayIndex: string;
|
|
249
|
-
depositedCtokenAmount: string;
|
|
250
|
-
marketValue: {
|
|
251
|
-
value: string;
|
|
252
|
-
};
|
|
253
|
-
userRewardManagerIndex: string;
|
|
254
|
-
attributedBorrowValue: {
|
|
255
|
-
value: string;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
toJSON(): {
|
|
259
|
-
coinType: {
|
|
260
|
-
name: string;
|
|
261
|
-
};
|
|
262
|
-
reserveArrayIndex: string;
|
|
263
|
-
depositedCtokenAmount: string;
|
|
264
|
-
marketValue: {
|
|
265
|
-
value: string;
|
|
266
|
-
};
|
|
267
|
-
userRewardManagerIndex: string;
|
|
268
|
-
attributedBorrowValue: {
|
|
269
|
-
value: string;
|
|
270
|
-
};
|
|
271
|
-
$typeName: string;
|
|
272
|
-
$typeArgs: [];
|
|
273
|
-
};
|
|
197
|
+
toJSONField(): DepositJSONField;
|
|
198
|
+
toJSON(): DepositJSON;
|
|
274
199
|
static fromJSONField(field: any): Deposit;
|
|
275
200
|
static fromJSON(json: Record<string, any>): Deposit;
|
|
276
|
-
static
|
|
201
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
202
|
+
content: true;
|
|
203
|
+
}>): Deposit;
|
|
204
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<Deposit>;
|
|
277
205
|
}
|
|
278
|
-
export declare function
|
|
279
|
-
export interface
|
|
206
|
+
export declare function isBorrow(type: string): boolean;
|
|
207
|
+
export interface BorrowFields {
|
|
280
208
|
coinType: ToField<TypeName>;
|
|
281
|
-
reserveArrayIndex: ToField<
|
|
282
|
-
|
|
209
|
+
reserveArrayIndex: ToField<'u64'>;
|
|
210
|
+
borrowedAmount: ToField<Decimal>;
|
|
211
|
+
cumulativeBorrowRate: ToField<Decimal>;
|
|
283
212
|
marketValue: ToField<Decimal>;
|
|
284
|
-
userRewardManagerIndex: ToField<
|
|
285
|
-
attributedBorrowValue: ToField<Decimal>;
|
|
213
|
+
userRewardManagerIndex: ToField<'u64'>;
|
|
286
214
|
}
|
|
287
|
-
export type
|
|
288
|
-
export
|
|
215
|
+
export type BorrowReified = Reified<Borrow, BorrowFields>;
|
|
216
|
+
export type BorrowJSONField = {
|
|
217
|
+
coinType: string;
|
|
218
|
+
reserveArrayIndex: string;
|
|
219
|
+
borrowedAmount: ToJSON<Decimal>;
|
|
220
|
+
cumulativeBorrowRate: ToJSON<Decimal>;
|
|
221
|
+
marketValue: ToJSON<Decimal>;
|
|
222
|
+
userRewardManagerIndex: string;
|
|
223
|
+
};
|
|
224
|
+
export type BorrowJSON = {
|
|
225
|
+
$typeName: typeof Borrow.$typeName;
|
|
226
|
+
$typeArgs: [];
|
|
227
|
+
} & BorrowJSONField;
|
|
228
|
+
export declare class Borrow implements StructClass {
|
|
289
229
|
__StructClass: true;
|
|
290
|
-
static
|
|
230
|
+
static get $typeName(): `${string}::obligation::Borrow`;
|
|
291
231
|
static readonly $numTypeParams = 0;
|
|
292
232
|
static readonly $isPhantom: readonly [];
|
|
293
|
-
readonly $typeName:
|
|
294
|
-
readonly $fullTypeName: `${
|
|
233
|
+
readonly $typeName: typeof Borrow.$typeName;
|
|
234
|
+
readonly $fullTypeName: `${string}::obligation::Borrow`;
|
|
295
235
|
readonly $typeArgs: [];
|
|
296
|
-
readonly $isPhantom:
|
|
236
|
+
readonly $isPhantom: typeof Borrow.$isPhantom;
|
|
297
237
|
readonly coinType: ToField<TypeName>;
|
|
298
|
-
readonly reserveArrayIndex: ToField<
|
|
299
|
-
readonly
|
|
238
|
+
readonly reserveArrayIndex: ToField<'u64'>;
|
|
239
|
+
readonly borrowedAmount: ToField<Decimal>;
|
|
240
|
+
readonly cumulativeBorrowRate: ToField<Decimal>;
|
|
300
241
|
readonly marketValue: ToField<Decimal>;
|
|
301
|
-
readonly userRewardManagerIndex: ToField<
|
|
302
|
-
readonly attributedBorrowValue: ToField<Decimal>;
|
|
242
|
+
readonly userRewardManagerIndex: ToField<'u64'>;
|
|
303
243
|
private constructor();
|
|
304
|
-
static reified():
|
|
305
|
-
static get r():
|
|
306
|
-
static phantom(): PhantomReified<ToTypeStr<
|
|
307
|
-
static get p():
|
|
308
|
-
static
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
323
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
324
|
-
}, string>;
|
|
325
|
-
}, string>;
|
|
326
|
-
static fromFields(fields: Record<string, any>): DepositRecord;
|
|
327
|
-
static fromFieldsWithTypes(item: FieldsWithTypes): DepositRecord;
|
|
328
|
-
static fromBcs(data: Uint8Array): DepositRecord;
|
|
329
|
-
toJSONField(): {
|
|
330
|
-
coinType: {
|
|
331
|
-
name: string;
|
|
332
|
-
};
|
|
333
|
-
reserveArrayIndex: string;
|
|
334
|
-
depositedCtokenAmount: string;
|
|
335
|
-
marketValue: {
|
|
336
|
-
value: string;
|
|
337
|
-
};
|
|
338
|
-
userRewardManagerIndex: string;
|
|
339
|
-
attributedBorrowValue: {
|
|
340
|
-
value: string;
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
toJSON(): {
|
|
344
|
-
coinType: {
|
|
345
|
-
name: string;
|
|
346
|
-
};
|
|
347
|
-
reserveArrayIndex: string;
|
|
348
|
-
depositedCtokenAmount: string;
|
|
349
|
-
marketValue: {
|
|
350
|
-
value: string;
|
|
351
|
-
};
|
|
352
|
-
userRewardManagerIndex: string;
|
|
353
|
-
attributedBorrowValue: {
|
|
354
|
-
value: string;
|
|
355
|
-
};
|
|
356
|
-
$typeName: string;
|
|
357
|
-
$typeArgs: [];
|
|
358
|
-
};
|
|
359
|
-
static fromJSONField(field: any): DepositRecord;
|
|
360
|
-
static fromJSON(json: Record<string, any>): DepositRecord;
|
|
361
|
-
static fetch(client: SuiGrpcClient, id: string): Promise<DepositRecord>;
|
|
244
|
+
static reified(): BorrowReified;
|
|
245
|
+
static get r(): BorrowReified;
|
|
246
|
+
static phantom(): PhantomReified<ToTypeStr<Borrow>>;
|
|
247
|
+
static get p(): PhantomReified<ToTypeStr<Borrow>>;
|
|
248
|
+
private static instantiateBcs;
|
|
249
|
+
private static cachedBcs;
|
|
250
|
+
static get bcs(): ReturnType<typeof Borrow.instantiateBcs>;
|
|
251
|
+
static fromFields(fields: Record<string, any>): Borrow;
|
|
252
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): Borrow;
|
|
253
|
+
static fromBcs(data: Uint8Array): Borrow;
|
|
254
|
+
toJSONField(): BorrowJSONField;
|
|
255
|
+
toJSON(): BorrowJSON;
|
|
256
|
+
static fromJSONField(field: any): Borrow;
|
|
257
|
+
static fromJSON(json: Record<string, any>): Borrow;
|
|
258
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
259
|
+
content: true;
|
|
260
|
+
}>): Borrow;
|
|
261
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<Borrow>;
|
|
362
262
|
}
|
|
363
263
|
export declare function isExistStaleOracles(type: string): boolean;
|
|
364
264
|
export interface ExistStaleOraclesFields {
|
|
365
|
-
dummyField: ToField<
|
|
265
|
+
dummyField: ToField<'bool'>;
|
|
366
266
|
}
|
|
367
267
|
export type ExistStaleOraclesReified = Reified<ExistStaleOracles, ExistStaleOraclesFields>;
|
|
268
|
+
export type ExistStaleOraclesJSONField = {
|
|
269
|
+
dummyField: boolean;
|
|
270
|
+
};
|
|
271
|
+
export type ExistStaleOraclesJSON = {
|
|
272
|
+
$typeName: typeof ExistStaleOracles.$typeName;
|
|
273
|
+
$typeArgs: [];
|
|
274
|
+
} & ExistStaleOraclesJSONField;
|
|
368
275
|
export declare class ExistStaleOracles implements StructClass {
|
|
369
276
|
__StructClass: true;
|
|
370
|
-
static
|
|
277
|
+
static get $typeName(): `${string}::obligation::ExistStaleOracles`;
|
|
371
278
|
static readonly $numTypeParams = 0;
|
|
372
279
|
static readonly $isPhantom: readonly [];
|
|
373
|
-
readonly $typeName:
|
|
374
|
-
readonly $fullTypeName: `${
|
|
280
|
+
readonly $typeName: typeof ExistStaleOracles.$typeName;
|
|
281
|
+
readonly $fullTypeName: `${string}::obligation::ExistStaleOracles`;
|
|
375
282
|
readonly $typeArgs: [];
|
|
376
|
-
readonly $isPhantom:
|
|
377
|
-
readonly dummyField: ToField<
|
|
283
|
+
readonly $isPhantom: typeof ExistStaleOracles.$isPhantom;
|
|
284
|
+
readonly dummyField: ToField<'bool'>;
|
|
378
285
|
private constructor();
|
|
379
286
|
static reified(): ExistStaleOraclesReified;
|
|
380
|
-
static get r():
|
|
287
|
+
static get r(): ExistStaleOraclesReified;
|
|
381
288
|
static phantom(): PhantomReified<ToTypeStr<ExistStaleOracles>>;
|
|
382
|
-
static get p():
|
|
383
|
-
static
|
|
384
|
-
|
|
385
|
-
|
|
289
|
+
static get p(): PhantomReified<ToTypeStr<ExistStaleOracles>>;
|
|
290
|
+
private static instantiateBcs;
|
|
291
|
+
private static cachedBcs;
|
|
292
|
+
static get bcs(): ReturnType<typeof ExistStaleOracles.instantiateBcs>;
|
|
386
293
|
static fromFields(fields: Record<string, any>): ExistStaleOracles;
|
|
387
294
|
static fromFieldsWithTypes(item: FieldsWithTypes): ExistStaleOracles;
|
|
388
295
|
static fromBcs(data: Uint8Array): ExistStaleOracles;
|
|
389
|
-
toJSONField():
|
|
390
|
-
|
|
391
|
-
};
|
|
392
|
-
toJSON(): {
|
|
393
|
-
dummyField: boolean;
|
|
394
|
-
$typeName: string;
|
|
395
|
-
$typeArgs: [];
|
|
396
|
-
};
|
|
296
|
+
toJSONField(): ExistStaleOraclesJSONField;
|
|
297
|
+
toJSON(): ExistStaleOraclesJSON;
|
|
397
298
|
static fromJSONField(field: any): ExistStaleOracles;
|
|
398
299
|
static fromJSON(json: Record<string, any>): ExistStaleOracles;
|
|
399
|
-
static
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
id: ToField<UID>;
|
|
404
|
-
lendingMarketId: ToField<ID>;
|
|
405
|
-
deposits: ToField<Vector<Deposit>>;
|
|
406
|
-
borrows: ToField<Vector<Borrow>>;
|
|
407
|
-
depositedValueUsd: ToField<Decimal>;
|
|
408
|
-
allowedBorrowValueUsd: ToField<Decimal>;
|
|
409
|
-
unhealthyBorrowValueUsd: ToField<Decimal>;
|
|
410
|
-
superUnhealthyBorrowValueUsd: ToField<Decimal>;
|
|
411
|
-
unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
412
|
-
weightedBorrowedValueUsd: ToField<Decimal>;
|
|
413
|
-
weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
414
|
-
borrowingIsolatedAsset: ToField<"bool">;
|
|
415
|
-
userRewardManagers: ToField<Vector<UserRewardManager>>;
|
|
416
|
-
badDebtUsd: ToField<Decimal>;
|
|
417
|
-
closable: ToField<"bool">;
|
|
418
|
-
}
|
|
419
|
-
export type ObligationReified<P extends PhantomTypeArgument> = Reified<Obligation<P>, ObligationFields<P>>;
|
|
420
|
-
export declare class Obligation<P extends PhantomTypeArgument> implements StructClass {
|
|
421
|
-
__StructClass: true;
|
|
422
|
-
static readonly $typeName: string;
|
|
423
|
-
static readonly $numTypeParams = 1;
|
|
424
|
-
static readonly $isPhantom: readonly [true];
|
|
425
|
-
readonly $typeName: string;
|
|
426
|
-
readonly $fullTypeName: `${typeof PKG_V1}::obligation::Obligation<${PhantomToTypeStr<P>}>`;
|
|
427
|
-
readonly $typeArgs: [PhantomToTypeStr<P>];
|
|
428
|
-
readonly $isPhantom: readonly [true];
|
|
429
|
-
readonly id: ToField<UID>;
|
|
430
|
-
readonly lendingMarketId: ToField<ID>;
|
|
431
|
-
readonly deposits: ToField<Vector<Deposit>>;
|
|
432
|
-
readonly borrows: ToField<Vector<Borrow>>;
|
|
433
|
-
readonly depositedValueUsd: ToField<Decimal>;
|
|
434
|
-
readonly allowedBorrowValueUsd: ToField<Decimal>;
|
|
435
|
-
readonly unhealthyBorrowValueUsd: ToField<Decimal>;
|
|
436
|
-
readonly superUnhealthyBorrowValueUsd: ToField<Decimal>;
|
|
437
|
-
readonly unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
438
|
-
readonly weightedBorrowedValueUsd: ToField<Decimal>;
|
|
439
|
-
readonly weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
440
|
-
readonly borrowingIsolatedAsset: ToField<"bool">;
|
|
441
|
-
readonly userRewardManagers: ToField<Vector<UserRewardManager>>;
|
|
442
|
-
readonly badDebtUsd: ToField<Decimal>;
|
|
443
|
-
readonly closable: ToField<"bool">;
|
|
444
|
-
private constructor();
|
|
445
|
-
static reified<P extends PhantomReified<PhantomTypeArgument>>(P: P): ObligationReified<ToPhantomTypeArgument<P>>;
|
|
446
|
-
static get r(): typeof Obligation.reified;
|
|
447
|
-
static phantom<P extends PhantomReified<PhantomTypeArgument>>(P: P): PhantomReified<ToTypeStr<Obligation<ToPhantomTypeArgument<P>>>>;
|
|
448
|
-
static get p(): typeof Obligation.phantom;
|
|
449
|
-
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
450
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
451
|
-
id: import("@mysten/bcs").BcsStruct<{
|
|
452
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
453
|
-
}, string>;
|
|
454
|
-
}, string>;
|
|
455
|
-
lending_market_id: import("@mysten/bcs").BcsStruct<{
|
|
456
|
-
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
457
|
-
}, string>;
|
|
458
|
-
deposits: import("@mysten/bcs").BcsType<{
|
|
459
|
-
coin_type: {
|
|
460
|
-
name: {
|
|
461
|
-
bytes: number[];
|
|
462
|
-
};
|
|
463
|
-
};
|
|
464
|
-
reserve_array_index: string;
|
|
465
|
-
deposited_ctoken_amount: string;
|
|
466
|
-
market_value: {
|
|
467
|
-
value: string;
|
|
468
|
-
};
|
|
469
|
-
user_reward_manager_index: string;
|
|
470
|
-
attributed_borrow_value: {
|
|
471
|
-
value: string;
|
|
472
|
-
};
|
|
473
|
-
}[], Iterable<{
|
|
474
|
-
coin_type: {
|
|
475
|
-
name: {
|
|
476
|
-
bytes: Iterable<number> & {
|
|
477
|
-
length: number;
|
|
478
|
-
};
|
|
479
|
-
};
|
|
480
|
-
};
|
|
481
|
-
reserve_array_index: string | number | bigint;
|
|
482
|
-
deposited_ctoken_amount: string | number | bigint;
|
|
483
|
-
market_value: {
|
|
484
|
-
value: string | number | bigint;
|
|
485
|
-
};
|
|
486
|
-
user_reward_manager_index: string | number | bigint;
|
|
487
|
-
attributed_borrow_value: {
|
|
488
|
-
value: string | number | bigint;
|
|
489
|
-
};
|
|
490
|
-
}> & {
|
|
491
|
-
length: number;
|
|
492
|
-
}, string>;
|
|
493
|
-
borrows: import("@mysten/bcs").BcsType<{
|
|
494
|
-
coin_type: {
|
|
495
|
-
name: {
|
|
496
|
-
bytes: number[];
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
reserve_array_index: string;
|
|
500
|
-
borrowed_amount: {
|
|
501
|
-
value: string;
|
|
502
|
-
};
|
|
503
|
-
cumulative_borrow_rate: {
|
|
504
|
-
value: string;
|
|
505
|
-
};
|
|
506
|
-
market_value: {
|
|
507
|
-
value: string;
|
|
508
|
-
};
|
|
509
|
-
user_reward_manager_index: string;
|
|
510
|
-
}[], Iterable<{
|
|
511
|
-
coin_type: {
|
|
512
|
-
name: {
|
|
513
|
-
bytes: Iterable<number> & {
|
|
514
|
-
length: number;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
reserve_array_index: string | number | bigint;
|
|
519
|
-
borrowed_amount: {
|
|
520
|
-
value: string | number | bigint;
|
|
521
|
-
};
|
|
522
|
-
cumulative_borrow_rate: {
|
|
523
|
-
value: string | number | bigint;
|
|
524
|
-
};
|
|
525
|
-
market_value: {
|
|
526
|
-
value: string | number | bigint;
|
|
527
|
-
};
|
|
528
|
-
user_reward_manager_index: string | number | bigint;
|
|
529
|
-
}> & {
|
|
530
|
-
length: number;
|
|
531
|
-
}, string>;
|
|
532
|
-
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
533
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
534
|
-
}, string>;
|
|
535
|
-
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
536
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
537
|
-
}, string>;
|
|
538
|
-
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
539
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
540
|
-
}, string>;
|
|
541
|
-
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
542
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
543
|
-
}, string>;
|
|
544
|
-
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
545
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
546
|
-
}, string>;
|
|
547
|
-
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
548
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
549
|
-
}, string>;
|
|
550
|
-
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
551
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
552
|
-
}, string>;
|
|
553
|
-
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
554
|
-
user_reward_managers: import("@mysten/bcs").BcsType<{
|
|
555
|
-
pool_reward_manager_id: {
|
|
556
|
-
bytes: string;
|
|
557
|
-
};
|
|
558
|
-
share: string;
|
|
559
|
-
rewards: any[];
|
|
560
|
-
last_update_time_ms: string;
|
|
561
|
-
}[], Iterable<{
|
|
562
|
-
pool_reward_manager_id: {
|
|
563
|
-
bytes: string;
|
|
564
|
-
};
|
|
565
|
-
share: string | number | bigint;
|
|
566
|
-
rewards: Iterable<any> & {
|
|
567
|
-
length: number;
|
|
568
|
-
};
|
|
569
|
-
last_update_time_ms: string | number | bigint;
|
|
570
|
-
}> & {
|
|
571
|
-
length: number;
|
|
572
|
-
}, string>;
|
|
573
|
-
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
574
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
575
|
-
}, string>;
|
|
576
|
-
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
577
|
-
}, string>;
|
|
578
|
-
static fromFields<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, fields: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
579
|
-
static fromFieldsWithTypes<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, item: FieldsWithTypes): Obligation<ToPhantomTypeArgument<P>>;
|
|
580
|
-
static fromBcs<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, data: Uint8Array): Obligation<ToPhantomTypeArgument<P>>;
|
|
581
|
-
toJSONField(): {
|
|
582
|
-
id: string;
|
|
583
|
-
lendingMarketId: string;
|
|
584
|
-
deposits: {
|
|
585
|
-
coinType: {
|
|
586
|
-
name: string;
|
|
587
|
-
};
|
|
588
|
-
reserveArrayIndex: string;
|
|
589
|
-
depositedCtokenAmount: string;
|
|
590
|
-
marketValue: {
|
|
591
|
-
value: string;
|
|
592
|
-
};
|
|
593
|
-
userRewardManagerIndex: string;
|
|
594
|
-
attributedBorrowValue: {
|
|
595
|
-
value: string;
|
|
596
|
-
};
|
|
597
|
-
}[];
|
|
598
|
-
borrows: {
|
|
599
|
-
coinType: {
|
|
600
|
-
name: string;
|
|
601
|
-
};
|
|
602
|
-
reserveArrayIndex: string;
|
|
603
|
-
borrowedAmount: {
|
|
604
|
-
value: string;
|
|
605
|
-
};
|
|
606
|
-
cumulativeBorrowRate: {
|
|
607
|
-
value: string;
|
|
608
|
-
};
|
|
609
|
-
marketValue: {
|
|
610
|
-
value: string;
|
|
611
|
-
};
|
|
612
|
-
userRewardManagerIndex: string;
|
|
613
|
-
}[];
|
|
614
|
-
depositedValueUsd: {
|
|
615
|
-
value: string;
|
|
616
|
-
};
|
|
617
|
-
allowedBorrowValueUsd: {
|
|
618
|
-
value: string;
|
|
619
|
-
};
|
|
620
|
-
unhealthyBorrowValueUsd: {
|
|
621
|
-
value: string;
|
|
622
|
-
};
|
|
623
|
-
superUnhealthyBorrowValueUsd: {
|
|
624
|
-
value: string;
|
|
625
|
-
};
|
|
626
|
-
unweightedBorrowedValueUsd: {
|
|
627
|
-
value: string;
|
|
628
|
-
};
|
|
629
|
-
weightedBorrowedValueUsd: {
|
|
630
|
-
value: string;
|
|
631
|
-
};
|
|
632
|
-
weightedBorrowedValueUpperBoundUsd: {
|
|
633
|
-
value: string;
|
|
634
|
-
};
|
|
635
|
-
borrowingIsolatedAsset: boolean;
|
|
636
|
-
userRewardManagers: {
|
|
637
|
-
poolRewardManagerId: string;
|
|
638
|
-
share: string;
|
|
639
|
-
rewards: ({
|
|
640
|
-
poolRewardId: string;
|
|
641
|
-
earnedRewards: {
|
|
642
|
-
value: string;
|
|
643
|
-
};
|
|
644
|
-
cumulativeRewardsPerShare: {
|
|
645
|
-
value: string;
|
|
646
|
-
};
|
|
647
|
-
} | null)[];
|
|
648
|
-
lastUpdateTimeMs: string;
|
|
649
|
-
}[];
|
|
650
|
-
badDebtUsd: {
|
|
651
|
-
value: string;
|
|
652
|
-
};
|
|
653
|
-
closable: boolean;
|
|
654
|
-
};
|
|
655
|
-
toJSON(): {
|
|
656
|
-
id: string;
|
|
657
|
-
lendingMarketId: string;
|
|
658
|
-
deposits: {
|
|
659
|
-
coinType: {
|
|
660
|
-
name: string;
|
|
661
|
-
};
|
|
662
|
-
reserveArrayIndex: string;
|
|
663
|
-
depositedCtokenAmount: string;
|
|
664
|
-
marketValue: {
|
|
665
|
-
value: string;
|
|
666
|
-
};
|
|
667
|
-
userRewardManagerIndex: string;
|
|
668
|
-
attributedBorrowValue: {
|
|
669
|
-
value: string;
|
|
670
|
-
};
|
|
671
|
-
}[];
|
|
672
|
-
borrows: {
|
|
673
|
-
coinType: {
|
|
674
|
-
name: string;
|
|
675
|
-
};
|
|
676
|
-
reserveArrayIndex: string;
|
|
677
|
-
borrowedAmount: {
|
|
678
|
-
value: string;
|
|
679
|
-
};
|
|
680
|
-
cumulativeBorrowRate: {
|
|
681
|
-
value: string;
|
|
682
|
-
};
|
|
683
|
-
marketValue: {
|
|
684
|
-
value: string;
|
|
685
|
-
};
|
|
686
|
-
userRewardManagerIndex: string;
|
|
687
|
-
}[];
|
|
688
|
-
depositedValueUsd: {
|
|
689
|
-
value: string;
|
|
690
|
-
};
|
|
691
|
-
allowedBorrowValueUsd: {
|
|
692
|
-
value: string;
|
|
693
|
-
};
|
|
694
|
-
unhealthyBorrowValueUsd: {
|
|
695
|
-
value: string;
|
|
696
|
-
};
|
|
697
|
-
superUnhealthyBorrowValueUsd: {
|
|
698
|
-
value: string;
|
|
699
|
-
};
|
|
700
|
-
unweightedBorrowedValueUsd: {
|
|
701
|
-
value: string;
|
|
702
|
-
};
|
|
703
|
-
weightedBorrowedValueUsd: {
|
|
704
|
-
value: string;
|
|
705
|
-
};
|
|
706
|
-
weightedBorrowedValueUpperBoundUsd: {
|
|
707
|
-
value: string;
|
|
708
|
-
};
|
|
709
|
-
borrowingIsolatedAsset: boolean;
|
|
710
|
-
userRewardManagers: {
|
|
711
|
-
poolRewardManagerId: string;
|
|
712
|
-
share: string;
|
|
713
|
-
rewards: ({
|
|
714
|
-
poolRewardId: string;
|
|
715
|
-
earnedRewards: {
|
|
716
|
-
value: string;
|
|
717
|
-
};
|
|
718
|
-
cumulativeRewardsPerShare: {
|
|
719
|
-
value: string;
|
|
720
|
-
};
|
|
721
|
-
} | null)[];
|
|
722
|
-
lastUpdateTimeMs: string;
|
|
723
|
-
}[];
|
|
724
|
-
badDebtUsd: {
|
|
725
|
-
value: string;
|
|
726
|
-
};
|
|
727
|
-
closable: boolean;
|
|
728
|
-
$typeName: string;
|
|
729
|
-
$typeArgs: [reified.PhantomToTypeStr<P>];
|
|
730
|
-
};
|
|
731
|
-
static fromJSONField<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, field: any): Obligation<ToPhantomTypeArgument<P>>;
|
|
732
|
-
static fromJSON<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, json: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
733
|
-
static fetch<P extends PhantomReified<PhantomTypeArgument>>(client: SuiGrpcClient, typeArg: P, id: string): Promise<Obligation<ToPhantomTypeArgument<P>>>;
|
|
300
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
301
|
+
content: true;
|
|
302
|
+
}>): ExistStaleOracles;
|
|
303
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<ExistStaleOracles>;
|
|
734
304
|
}
|
|
735
305
|
export declare function isObligationDataEvent(type: string): boolean;
|
|
736
306
|
export interface ObligationDataEventFields {
|
|
737
|
-
lendingMarketId: ToField<
|
|
738
|
-
obligationId: ToField<
|
|
307
|
+
lendingMarketId: ToField<'address'>;
|
|
308
|
+
obligationId: ToField<'address'>;
|
|
739
309
|
deposits: ToField<Vector<DepositRecord>>;
|
|
740
310
|
borrows: ToField<Vector<BorrowRecord>>;
|
|
741
311
|
depositedValueUsd: ToField<Decimal>;
|
|
@@ -745,22 +315,42 @@ export interface ObligationDataEventFields {
|
|
|
745
315
|
unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
746
316
|
weightedBorrowedValueUsd: ToField<Decimal>;
|
|
747
317
|
weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
748
|
-
borrowingIsolatedAsset: ToField<
|
|
318
|
+
borrowingIsolatedAsset: ToField<'bool'>;
|
|
749
319
|
badDebtUsd: ToField<Decimal>;
|
|
750
|
-
closable: ToField<
|
|
320
|
+
closable: ToField<'bool'>;
|
|
751
321
|
}
|
|
752
322
|
export type ObligationDataEventReified = Reified<ObligationDataEvent, ObligationDataEventFields>;
|
|
323
|
+
export type ObligationDataEventJSONField = {
|
|
324
|
+
lendingMarketId: string;
|
|
325
|
+
obligationId: string;
|
|
326
|
+
deposits: ToJSON<DepositRecord>[];
|
|
327
|
+
borrows: ToJSON<BorrowRecord>[];
|
|
328
|
+
depositedValueUsd: ToJSON<Decimal>;
|
|
329
|
+
allowedBorrowValueUsd: ToJSON<Decimal>;
|
|
330
|
+
unhealthyBorrowValueUsd: ToJSON<Decimal>;
|
|
331
|
+
superUnhealthyBorrowValueUsd: ToJSON<Decimal>;
|
|
332
|
+
unweightedBorrowedValueUsd: ToJSON<Decimal>;
|
|
333
|
+
weightedBorrowedValueUsd: ToJSON<Decimal>;
|
|
334
|
+
weightedBorrowedValueUpperBoundUsd: ToJSON<Decimal>;
|
|
335
|
+
borrowingIsolatedAsset: boolean;
|
|
336
|
+
badDebtUsd: ToJSON<Decimal>;
|
|
337
|
+
closable: boolean;
|
|
338
|
+
};
|
|
339
|
+
export type ObligationDataEventJSON = {
|
|
340
|
+
$typeName: typeof ObligationDataEvent.$typeName;
|
|
341
|
+
$typeArgs: [];
|
|
342
|
+
} & ObligationDataEventJSONField;
|
|
753
343
|
export declare class ObligationDataEvent implements StructClass {
|
|
754
344
|
__StructClass: true;
|
|
755
|
-
static
|
|
345
|
+
static get $typeName(): `${string}::obligation::ObligationDataEvent`;
|
|
756
346
|
static readonly $numTypeParams = 0;
|
|
757
347
|
static readonly $isPhantom: readonly [];
|
|
758
|
-
readonly $typeName:
|
|
759
|
-
readonly $fullTypeName: `${
|
|
348
|
+
readonly $typeName: typeof ObligationDataEvent.$typeName;
|
|
349
|
+
readonly $fullTypeName: `${string}::obligation::ObligationDataEvent`;
|
|
760
350
|
readonly $typeArgs: [];
|
|
761
|
-
readonly $isPhantom:
|
|
762
|
-
readonly lendingMarketId: ToField<
|
|
763
|
-
readonly obligationId: ToField<
|
|
351
|
+
readonly $isPhantom: typeof ObligationDataEvent.$isPhantom;
|
|
352
|
+
readonly lendingMarketId: ToField<'address'>;
|
|
353
|
+
readonly obligationId: ToField<'address'>;
|
|
764
354
|
readonly deposits: ToField<Vector<DepositRecord>>;
|
|
765
355
|
readonly borrows: ToField<Vector<BorrowRecord>>;
|
|
766
356
|
readonly depositedValueUsd: ToField<Decimal>;
|
|
@@ -770,244 +360,142 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
770
360
|
readonly unweightedBorrowedValueUsd: ToField<Decimal>;
|
|
771
361
|
readonly weightedBorrowedValueUsd: ToField<Decimal>;
|
|
772
362
|
readonly weightedBorrowedValueUpperBoundUsd: ToField<Decimal>;
|
|
773
|
-
readonly borrowingIsolatedAsset: ToField<
|
|
363
|
+
readonly borrowingIsolatedAsset: ToField<'bool'>;
|
|
774
364
|
readonly badDebtUsd: ToField<Decimal>;
|
|
775
|
-
readonly closable: ToField<
|
|
365
|
+
readonly closable: ToField<'bool'>;
|
|
776
366
|
private constructor();
|
|
777
367
|
static reified(): ObligationDataEventReified;
|
|
778
|
-
static get r():
|
|
368
|
+
static get r(): ObligationDataEventReified;
|
|
779
369
|
static phantom(): PhantomReified<ToTypeStr<ObligationDataEvent>>;
|
|
780
|
-
static get p():
|
|
781
|
-
static
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
deposits: import("@mysten/bcs").BcsType<{
|
|
785
|
-
coin_type: {
|
|
786
|
-
name: {
|
|
787
|
-
bytes: number[];
|
|
788
|
-
};
|
|
789
|
-
};
|
|
790
|
-
reserve_array_index: string;
|
|
791
|
-
deposited_ctoken_amount: string;
|
|
792
|
-
market_value: {
|
|
793
|
-
value: string;
|
|
794
|
-
};
|
|
795
|
-
user_reward_manager_index: string;
|
|
796
|
-
attributed_borrow_value: {
|
|
797
|
-
value: string;
|
|
798
|
-
};
|
|
799
|
-
}[], Iterable<{
|
|
800
|
-
coin_type: {
|
|
801
|
-
name: {
|
|
802
|
-
bytes: Iterable<number> & {
|
|
803
|
-
length: number;
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
|
-
};
|
|
807
|
-
reserve_array_index: string | number | bigint;
|
|
808
|
-
deposited_ctoken_amount: string | number | bigint;
|
|
809
|
-
market_value: {
|
|
810
|
-
value: string | number | bigint;
|
|
811
|
-
};
|
|
812
|
-
user_reward_manager_index: string | number | bigint;
|
|
813
|
-
attributed_borrow_value: {
|
|
814
|
-
value: string | number | bigint;
|
|
815
|
-
};
|
|
816
|
-
}> & {
|
|
817
|
-
length: number;
|
|
818
|
-
}, string>;
|
|
819
|
-
borrows: import("@mysten/bcs").BcsType<{
|
|
820
|
-
coin_type: {
|
|
821
|
-
name: {
|
|
822
|
-
bytes: number[];
|
|
823
|
-
};
|
|
824
|
-
};
|
|
825
|
-
reserve_array_index: string;
|
|
826
|
-
borrowed_amount: {
|
|
827
|
-
value: string;
|
|
828
|
-
};
|
|
829
|
-
cumulative_borrow_rate: {
|
|
830
|
-
value: string;
|
|
831
|
-
};
|
|
832
|
-
market_value: {
|
|
833
|
-
value: string;
|
|
834
|
-
};
|
|
835
|
-
user_reward_manager_index: string;
|
|
836
|
-
}[], Iterable<{
|
|
837
|
-
coin_type: {
|
|
838
|
-
name: {
|
|
839
|
-
bytes: Iterable<number> & {
|
|
840
|
-
length: number;
|
|
841
|
-
};
|
|
842
|
-
};
|
|
843
|
-
};
|
|
844
|
-
reserve_array_index: string | number | bigint;
|
|
845
|
-
borrowed_amount: {
|
|
846
|
-
value: string | number | bigint;
|
|
847
|
-
};
|
|
848
|
-
cumulative_borrow_rate: {
|
|
849
|
-
value: string | number | bigint;
|
|
850
|
-
};
|
|
851
|
-
market_value: {
|
|
852
|
-
value: string | number | bigint;
|
|
853
|
-
};
|
|
854
|
-
user_reward_manager_index: string | number | bigint;
|
|
855
|
-
}> & {
|
|
856
|
-
length: number;
|
|
857
|
-
}, string>;
|
|
858
|
-
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
859
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
860
|
-
}, string>;
|
|
861
|
-
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
862
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
863
|
-
}, string>;
|
|
864
|
-
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
865
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
866
|
-
}, string>;
|
|
867
|
-
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
868
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
869
|
-
}, string>;
|
|
870
|
-
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
871
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
872
|
-
}, string>;
|
|
873
|
-
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
874
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
875
|
-
}, string>;
|
|
876
|
-
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
877
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
878
|
-
}, string>;
|
|
879
|
-
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
880
|
-
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
881
|
-
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
882
|
-
}, string>;
|
|
883
|
-
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
884
|
-
}, string>;
|
|
370
|
+
static get p(): PhantomReified<ToTypeStr<ObligationDataEvent>>;
|
|
371
|
+
private static instantiateBcs;
|
|
372
|
+
private static cachedBcs;
|
|
373
|
+
static get bcs(): ReturnType<typeof ObligationDataEvent.instantiateBcs>;
|
|
885
374
|
static fromFields(fields: Record<string, any>): ObligationDataEvent;
|
|
886
375
|
static fromFieldsWithTypes(item: FieldsWithTypes): ObligationDataEvent;
|
|
887
376
|
static fromBcs(data: Uint8Array): ObligationDataEvent;
|
|
888
|
-
toJSONField():
|
|
889
|
-
|
|
890
|
-
obligationId: string;
|
|
891
|
-
deposits: {
|
|
892
|
-
coinType: {
|
|
893
|
-
name: string;
|
|
894
|
-
};
|
|
895
|
-
reserveArrayIndex: string;
|
|
896
|
-
depositedCtokenAmount: string;
|
|
897
|
-
marketValue: {
|
|
898
|
-
value: string;
|
|
899
|
-
};
|
|
900
|
-
userRewardManagerIndex: string;
|
|
901
|
-
attributedBorrowValue: {
|
|
902
|
-
value: string;
|
|
903
|
-
};
|
|
904
|
-
}[];
|
|
905
|
-
borrows: {
|
|
906
|
-
coinType: {
|
|
907
|
-
name: string;
|
|
908
|
-
};
|
|
909
|
-
reserveArrayIndex: string;
|
|
910
|
-
borrowedAmount: {
|
|
911
|
-
value: string;
|
|
912
|
-
};
|
|
913
|
-
cumulativeBorrowRate: {
|
|
914
|
-
value: string;
|
|
915
|
-
};
|
|
916
|
-
marketValue: {
|
|
917
|
-
value: string;
|
|
918
|
-
};
|
|
919
|
-
userRewardManagerIndex: string;
|
|
920
|
-
}[];
|
|
921
|
-
depositedValueUsd: {
|
|
922
|
-
value: string;
|
|
923
|
-
};
|
|
924
|
-
allowedBorrowValueUsd: {
|
|
925
|
-
value: string;
|
|
926
|
-
};
|
|
927
|
-
unhealthyBorrowValueUsd: {
|
|
928
|
-
value: string;
|
|
929
|
-
};
|
|
930
|
-
superUnhealthyBorrowValueUsd: {
|
|
931
|
-
value: string;
|
|
932
|
-
};
|
|
933
|
-
unweightedBorrowedValueUsd: {
|
|
934
|
-
value: string;
|
|
935
|
-
};
|
|
936
|
-
weightedBorrowedValueUsd: {
|
|
937
|
-
value: string;
|
|
938
|
-
};
|
|
939
|
-
weightedBorrowedValueUpperBoundUsd: {
|
|
940
|
-
value: string;
|
|
941
|
-
};
|
|
942
|
-
borrowingIsolatedAsset: boolean;
|
|
943
|
-
badDebtUsd: {
|
|
944
|
-
value: string;
|
|
945
|
-
};
|
|
946
|
-
closable: boolean;
|
|
947
|
-
};
|
|
948
|
-
toJSON(): {
|
|
949
|
-
lendingMarketId: string;
|
|
950
|
-
obligationId: string;
|
|
951
|
-
deposits: {
|
|
952
|
-
coinType: {
|
|
953
|
-
name: string;
|
|
954
|
-
};
|
|
955
|
-
reserveArrayIndex: string;
|
|
956
|
-
depositedCtokenAmount: string;
|
|
957
|
-
marketValue: {
|
|
958
|
-
value: string;
|
|
959
|
-
};
|
|
960
|
-
userRewardManagerIndex: string;
|
|
961
|
-
attributedBorrowValue: {
|
|
962
|
-
value: string;
|
|
963
|
-
};
|
|
964
|
-
}[];
|
|
965
|
-
borrows: {
|
|
966
|
-
coinType: {
|
|
967
|
-
name: string;
|
|
968
|
-
};
|
|
969
|
-
reserveArrayIndex: string;
|
|
970
|
-
borrowedAmount: {
|
|
971
|
-
value: string;
|
|
972
|
-
};
|
|
973
|
-
cumulativeBorrowRate: {
|
|
974
|
-
value: string;
|
|
975
|
-
};
|
|
976
|
-
marketValue: {
|
|
977
|
-
value: string;
|
|
978
|
-
};
|
|
979
|
-
userRewardManagerIndex: string;
|
|
980
|
-
}[];
|
|
981
|
-
depositedValueUsd: {
|
|
982
|
-
value: string;
|
|
983
|
-
};
|
|
984
|
-
allowedBorrowValueUsd: {
|
|
985
|
-
value: string;
|
|
986
|
-
};
|
|
987
|
-
unhealthyBorrowValueUsd: {
|
|
988
|
-
value: string;
|
|
989
|
-
};
|
|
990
|
-
superUnhealthyBorrowValueUsd: {
|
|
991
|
-
value: string;
|
|
992
|
-
};
|
|
993
|
-
unweightedBorrowedValueUsd: {
|
|
994
|
-
value: string;
|
|
995
|
-
};
|
|
996
|
-
weightedBorrowedValueUsd: {
|
|
997
|
-
value: string;
|
|
998
|
-
};
|
|
999
|
-
weightedBorrowedValueUpperBoundUsd: {
|
|
1000
|
-
value: string;
|
|
1001
|
-
};
|
|
1002
|
-
borrowingIsolatedAsset: boolean;
|
|
1003
|
-
badDebtUsd: {
|
|
1004
|
-
value: string;
|
|
1005
|
-
};
|
|
1006
|
-
closable: boolean;
|
|
1007
|
-
$typeName: string;
|
|
1008
|
-
$typeArgs: [];
|
|
1009
|
-
};
|
|
377
|
+
toJSONField(): ObligationDataEventJSONField;
|
|
378
|
+
toJSON(): ObligationDataEventJSON;
|
|
1010
379
|
static fromJSONField(field: any): ObligationDataEvent;
|
|
1011
380
|
static fromJSON(json: Record<string, any>): ObligationDataEvent;
|
|
1012
|
-
static
|
|
381
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
382
|
+
content: true;
|
|
383
|
+
}>): ObligationDataEvent;
|
|
384
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<ObligationDataEvent>;
|
|
385
|
+
}
|
|
386
|
+
export declare function isDepositRecord(type: string): boolean;
|
|
387
|
+
export interface DepositRecordFields {
|
|
388
|
+
coinType: ToField<TypeName>;
|
|
389
|
+
reserveArrayIndex: ToField<'u64'>;
|
|
390
|
+
depositedCtokenAmount: ToField<'u64'>;
|
|
391
|
+
marketValue: ToField<Decimal>;
|
|
392
|
+
userRewardManagerIndex: ToField<'u64'>;
|
|
393
|
+
/** unused */
|
|
394
|
+
attributedBorrowValue: ToField<Decimal>;
|
|
395
|
+
}
|
|
396
|
+
export type DepositRecordReified = Reified<DepositRecord, DepositRecordFields>;
|
|
397
|
+
export type DepositRecordJSONField = {
|
|
398
|
+
coinType: string;
|
|
399
|
+
reserveArrayIndex: string;
|
|
400
|
+
depositedCtokenAmount: string;
|
|
401
|
+
marketValue: ToJSON<Decimal>;
|
|
402
|
+
userRewardManagerIndex: string;
|
|
403
|
+
attributedBorrowValue: ToJSON<Decimal>;
|
|
404
|
+
};
|
|
405
|
+
export type DepositRecordJSON = {
|
|
406
|
+
$typeName: typeof DepositRecord.$typeName;
|
|
407
|
+
$typeArgs: [];
|
|
408
|
+
} & DepositRecordJSONField;
|
|
409
|
+
export declare class DepositRecord implements StructClass {
|
|
410
|
+
__StructClass: true;
|
|
411
|
+
static get $typeName(): `${string}::obligation::DepositRecord`;
|
|
412
|
+
static readonly $numTypeParams = 0;
|
|
413
|
+
static readonly $isPhantom: readonly [];
|
|
414
|
+
readonly $typeName: typeof DepositRecord.$typeName;
|
|
415
|
+
readonly $fullTypeName: `${string}::obligation::DepositRecord`;
|
|
416
|
+
readonly $typeArgs: [];
|
|
417
|
+
readonly $isPhantom: typeof DepositRecord.$isPhantom;
|
|
418
|
+
readonly coinType: ToField<TypeName>;
|
|
419
|
+
readonly reserveArrayIndex: ToField<'u64'>;
|
|
420
|
+
readonly depositedCtokenAmount: ToField<'u64'>;
|
|
421
|
+
readonly marketValue: ToField<Decimal>;
|
|
422
|
+
readonly userRewardManagerIndex: ToField<'u64'>;
|
|
423
|
+
/** unused */
|
|
424
|
+
readonly attributedBorrowValue: ToField<Decimal>;
|
|
425
|
+
private constructor();
|
|
426
|
+
static reified(): DepositRecordReified;
|
|
427
|
+
static get r(): DepositRecordReified;
|
|
428
|
+
static phantom(): PhantomReified<ToTypeStr<DepositRecord>>;
|
|
429
|
+
static get p(): PhantomReified<ToTypeStr<DepositRecord>>;
|
|
430
|
+
private static instantiateBcs;
|
|
431
|
+
private static cachedBcs;
|
|
432
|
+
static get bcs(): ReturnType<typeof DepositRecord.instantiateBcs>;
|
|
433
|
+
static fromFields(fields: Record<string, any>): DepositRecord;
|
|
434
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): DepositRecord;
|
|
435
|
+
static fromBcs(data: Uint8Array): DepositRecord;
|
|
436
|
+
toJSONField(): DepositRecordJSONField;
|
|
437
|
+
toJSON(): DepositRecordJSON;
|
|
438
|
+
static fromJSONField(field: any): DepositRecord;
|
|
439
|
+
static fromJSON(json: Record<string, any>): DepositRecord;
|
|
440
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
441
|
+
content: true;
|
|
442
|
+
}>): DepositRecord;
|
|
443
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<DepositRecord>;
|
|
444
|
+
}
|
|
445
|
+
export declare function isBorrowRecord(type: string): boolean;
|
|
446
|
+
export interface BorrowRecordFields {
|
|
447
|
+
coinType: ToField<TypeName>;
|
|
448
|
+
reserveArrayIndex: ToField<'u64'>;
|
|
449
|
+
borrowedAmount: ToField<Decimal>;
|
|
450
|
+
cumulativeBorrowRate: ToField<Decimal>;
|
|
451
|
+
marketValue: ToField<Decimal>;
|
|
452
|
+
userRewardManagerIndex: ToField<'u64'>;
|
|
453
|
+
}
|
|
454
|
+
export type BorrowRecordReified = Reified<BorrowRecord, BorrowRecordFields>;
|
|
455
|
+
export type BorrowRecordJSONField = {
|
|
456
|
+
coinType: string;
|
|
457
|
+
reserveArrayIndex: string;
|
|
458
|
+
borrowedAmount: ToJSON<Decimal>;
|
|
459
|
+
cumulativeBorrowRate: ToJSON<Decimal>;
|
|
460
|
+
marketValue: ToJSON<Decimal>;
|
|
461
|
+
userRewardManagerIndex: string;
|
|
462
|
+
};
|
|
463
|
+
export type BorrowRecordJSON = {
|
|
464
|
+
$typeName: typeof BorrowRecord.$typeName;
|
|
465
|
+
$typeArgs: [];
|
|
466
|
+
} & BorrowRecordJSONField;
|
|
467
|
+
export declare class BorrowRecord implements StructClass {
|
|
468
|
+
__StructClass: true;
|
|
469
|
+
static get $typeName(): `${string}::obligation::BorrowRecord`;
|
|
470
|
+
static readonly $numTypeParams = 0;
|
|
471
|
+
static readonly $isPhantom: readonly [];
|
|
472
|
+
readonly $typeName: typeof BorrowRecord.$typeName;
|
|
473
|
+
readonly $fullTypeName: `${string}::obligation::BorrowRecord`;
|
|
474
|
+
readonly $typeArgs: [];
|
|
475
|
+
readonly $isPhantom: typeof BorrowRecord.$isPhantom;
|
|
476
|
+
readonly coinType: ToField<TypeName>;
|
|
477
|
+
readonly reserveArrayIndex: ToField<'u64'>;
|
|
478
|
+
readonly borrowedAmount: ToField<Decimal>;
|
|
479
|
+
readonly cumulativeBorrowRate: ToField<Decimal>;
|
|
480
|
+
readonly marketValue: ToField<Decimal>;
|
|
481
|
+
readonly userRewardManagerIndex: ToField<'u64'>;
|
|
482
|
+
private constructor();
|
|
483
|
+
static reified(): BorrowRecordReified;
|
|
484
|
+
static get r(): BorrowRecordReified;
|
|
485
|
+
static phantom(): PhantomReified<ToTypeStr<BorrowRecord>>;
|
|
486
|
+
static get p(): PhantomReified<ToTypeStr<BorrowRecord>>;
|
|
487
|
+
private static instantiateBcs;
|
|
488
|
+
private static cachedBcs;
|
|
489
|
+
static get bcs(): ReturnType<typeof BorrowRecord.instantiateBcs>;
|
|
490
|
+
static fromFields(fields: Record<string, any>): BorrowRecord;
|
|
491
|
+
static fromFieldsWithTypes(item: FieldsWithTypes): BorrowRecord;
|
|
492
|
+
static fromBcs(data: Uint8Array): BorrowRecord;
|
|
493
|
+
toJSONField(): BorrowRecordJSONField;
|
|
494
|
+
toJSON(): BorrowRecordJSON;
|
|
495
|
+
static fromJSONField(field: any): BorrowRecord;
|
|
496
|
+
static fromJSON(json: Record<string, any>): BorrowRecord;
|
|
497
|
+
static fromCoreObject(obj: SuiClientTypes.Object<{
|
|
498
|
+
content: true;
|
|
499
|
+
}>): BorrowRecord;
|
|
500
|
+
static fetch(client: ClientWithCoreApi, id: string): Promise<BorrowRecord>;
|
|
1013
501
|
}
|