@suilend/sdk 12.7.0 → 13.0.0-next.g803bba0
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 +76 -76
- package/lib/initialize.js +10 -10
- 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/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,41 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
builder: TransactionObjectInput;
|
|
5
|
-
field: GenericArg;
|
|
6
|
-
value: GenericArg;
|
|
7
|
-
}
|
|
8
|
-
export declare function set(tx: Transaction, typeArgs: [string, string], args: SetArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
9
|
-
export declare function destroy(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
10
|
-
export declare function from(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
11
|
-
export interface SetSpreadFeeBpsArgs {
|
|
12
|
-
builder: TransactionObjectInput;
|
|
13
|
-
spreadFeeBps: bigint | TransactionArgument;
|
|
14
|
-
}
|
|
15
|
-
export declare function setSpreadFeeBps(tx: Transaction, args: SetSpreadFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
16
|
-
export interface SetConfidenceMultiplierBuilderArgs {
|
|
17
|
-
builder: TransactionObjectInput;
|
|
18
|
-
confidenceMultiplierBps: bigint | TransactionArgument;
|
|
19
|
-
}
|
|
20
|
-
export declare function setConfidenceMultiplierBuilder(tx: Transaction, args: SetConfidenceMultiplierBuilderArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
21
|
-
export declare function spreadFee(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
22
|
-
export declare function borrowFee(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
23
|
-
export declare function borrowLimit(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
24
|
-
export declare function borrowLimitUsd(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
25
|
-
export declare function borrowWeight(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
26
|
-
export declare function build(tx: Transaction, builder: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
27
|
-
export interface CalculateAprArgs {
|
|
28
|
-
config: TransactionObjectInput;
|
|
29
|
-
curUtil: TransactionObjectInput;
|
|
30
|
-
}
|
|
31
|
-
export declare function calculateApr(tx: Transaction, args: CalculateAprArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
32
|
-
export interface CalculateSupplyAprArgs {
|
|
33
|
-
config: TransactionObjectInput;
|
|
34
|
-
curUtil: TransactionObjectInput;
|
|
35
|
-
borrowApr: TransactionObjectInput;
|
|
36
|
-
}
|
|
37
|
-
export declare function calculateSupplyApr(tx: Transaction, args: CalculateSupplyAprArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
38
|
-
export declare function closeLtv(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
1
|
+
import { Transaction, TransactionArgument, TransactionObjectInput, TransactionResult } from '@mysten/sui/transactions';
|
|
2
|
+
import type { EnvConfig } from '../../_envs';
|
|
3
|
+
import { GenericArg } from '../../_framework/util';
|
|
39
4
|
export interface CreateReserveConfigArgs {
|
|
40
5
|
openLtvPct: number | TransactionArgument;
|
|
41
6
|
closeLtvPct: number | TransactionArgument;
|
|
@@ -56,101 +21,758 @@ export interface CreateReserveConfigArgs {
|
|
|
56
21
|
openAttributedBorrowLimitUsd: bigint | TransactionArgument;
|
|
57
22
|
closeAttributedBorrowLimitUsd: bigint | TransactionArgument;
|
|
58
23
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new reserve configuration with the specified parameters.
|
|
26
|
+
*
|
|
27
|
+
* Validates the configuration to ensure it meets all required constraints before returning.
|
|
28
|
+
*
|
|
29
|
+
* # Arguments
|
|
30
|
+
*
|
|
31
|
+
* * `open_ltv_pct` - Loan-to-value percentage for opening positions (0-100).
|
|
32
|
+
* * `close_ltv_pct` - Loan-to-value percentage for closing positions (0-100).
|
|
33
|
+
* * `max_close_ltv_pct` - Maximum close LTV percentage (unused, 0-100).
|
|
34
|
+
* * `borrow_weight_bps` - Borrow weight in basis points (minimum 10,000).
|
|
35
|
+
* * `deposit_limit` - Maximum deposit amount in token units.
|
|
36
|
+
* * `borrow_limit` - Maximum borrow amount in token units.
|
|
37
|
+
* * `liquidation_bonus_bps` - Bonus for liquidators in basis points.
|
|
38
|
+
* * `max_liquidation_bonus_bps` - Maximum liquidation bonus in basis points (unused).
|
|
39
|
+
* * `deposit_limit_usd` - Maximum deposit amount in USD.
|
|
40
|
+
* * `borrow_limit_usd` - Maximum borrow amount in USD.
|
|
41
|
+
* * `borrow_fee_bps` - Fee for borrowing in basis points (maximum 10,000).
|
|
42
|
+
* * `spread_fee_bps` - Spread fee in basis points (maximum 10,000).
|
|
43
|
+
* * `protocol_liquidation_fee_bps` - Protocol fee on liquidations in basis points.
|
|
44
|
+
* * `interest_rate_utils` - Vector of utilization rates for interest rate calculation (0-100).
|
|
45
|
+
* * `interest_rate_aprs` - Vector of APRs corresponding to utilization rates.
|
|
46
|
+
* * `isolated` - If true, asset is isolated (can only be borrowed in isolation).
|
|
47
|
+
* * `open_attributed_borrow_limit_usd` - Open attributed borrow limit in USD (unused).
|
|
48
|
+
* * `close_attributed_borrow_limit_usd` - Close attributed borrow limit in USD (unused).
|
|
49
|
+
*
|
|
50
|
+
* # Returns
|
|
51
|
+
*
|
|
52
|
+
* * `ReserveConfig` - A validated reserve configuration.
|
|
53
|
+
*
|
|
54
|
+
* # Panics
|
|
55
|
+
*
|
|
56
|
+
* * If `open_ltv_pct`, `close_ltv_pct`, or `max_close_ltv_pct` exceeds 100 (`EInvalidReserveConfig`).
|
|
57
|
+
* * If `open_ltv_pct` is greater than `close_ltv_pct` (`EInvalidReserveConfig`).
|
|
58
|
+
* * If `close_ltv_pct` is greater than `max_close_ltv_pct` (`EInvalidReserveConfig`).
|
|
59
|
+
* * If `borrow_weight_bps` is less than 10,000 (`EInvalidReserveConfig`).
|
|
60
|
+
* * If `liquidation_bonus_bps` exceeds `max_liquidation_bonus_bps` (`EInvalidReserveConfig`).
|
|
61
|
+
* * If `liquidation_bonus_bps + protocol_liquidation_fee_bps` exceeds 2,000 (`EInvalidReserveConfig`).
|
|
62
|
+
* * If `isolated` is true and `open_ltv_pct` or `close_ltv_pct` is non-zero (`EInvalidReserveConfig`).
|
|
63
|
+
* * If `borrow_fee_bps` or `spread_fee_bps` exceeds 10,000 (`EInvalidReserveConfig`).
|
|
64
|
+
* * If `open_attributed_borrow_limit_usd` exceeds `close_attributed_borrow_limit_usd` (`EInvalidReserveConfig`).
|
|
65
|
+
* * If `interest_rate_utils` has fewer than 2 elements, does not start with 0, or end with 100 (`EInvalidReserveConfig`).
|
|
66
|
+
* * If `interest_rate_utils` and `interest_rate_aprs` have different lengths (`EInvalidReserveConfig`).
|
|
67
|
+
* * If `interest_rate_utils` is not strictly increasing or `interest_rate_aprs` is not monotonically increasing (`EInvalidReserveConfig`).
|
|
68
|
+
*/
|
|
69
|
+
export declare function createReserveConfig(tx: Transaction, args: CreateReserveConfigArgs, options?: {
|
|
70
|
+
env?: EnvConfig;
|
|
71
|
+
}): TransactionResult;
|
|
72
|
+
/**
|
|
73
|
+
* The raw basis-points value backing `confidence_multiplier`. Kept separate so `from()`
|
|
74
|
+
* can reseed a builder from the stored bps integer directly, rather than reconstructing
|
|
75
|
+
* it from the `Decimal` `confidence_multiplier` returns -- `decimal.move` has no reverse
|
|
76
|
+
* conversion back to bps.
|
|
77
|
+
*/
|
|
78
|
+
export declare function confidenceMultiplierBps(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
79
|
+
env?: EnvConfig;
|
|
80
|
+
}): TransactionResult;
|
|
81
|
+
/**
|
|
82
|
+
* A confidence-margin multiplier `k`, stored in basis points (10_000 = 1x) and
|
|
83
|
+
* returned already scaled to a `Decimal`. It is intended to scale Pyth's raw
|
|
84
|
+
* confidence interval `conf` (same decimal exponent as the price):
|
|
85
|
+
* `price_lower_bound = min(spot, ema) - k * conf`,
|
|
86
|
+
* `price_upper_bound = max(spot, ema) + k * conf`.
|
|
87
|
+
* Zero (the default, and every reserve's value until explicitly set) means every
|
|
88
|
+
* valuation is bit-for-bit identical to before this field existed.
|
|
89
|
+
*/
|
|
90
|
+
export declare function confidenceMultiplier(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
91
|
+
env?: EnvConfig;
|
|
92
|
+
}): TransactionResult;
|
|
93
|
+
export interface SetConfidenceMultiplierArgs {
|
|
94
|
+
config: TransactionObjectInput;
|
|
95
|
+
confidenceMultiplierBps: bigint | TransactionArgument;
|
|
69
96
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Sets a reserve's confidence multiplier `k` (in basis points) on a config under
|
|
99
|
+
* construction, overwriting any existing value -- including removing the entry
|
|
100
|
+
* entirely when `confidence_multiplier_bps == 0`, so `confidence_multiplier` afterwards
|
|
101
|
+
* always reads back `decimal::from_bps(confidence_multiplier_bps)`.
|
|
102
|
+
*/
|
|
103
|
+
export declare function setConfidenceMultiplier(tx: Transaction, args: SetConfidenceMultiplierArgs, options?: {
|
|
104
|
+
env?: EnvConfig;
|
|
105
|
+
}): TransactionResult;
|
|
106
|
+
/**
|
|
107
|
+
* Shared by `set_confidence_multiplier`'s zero branch and `destroy()`, the two places
|
|
108
|
+
* a confidence-multiplier entry is ever dropped from a `Bag`.
|
|
109
|
+
*/
|
|
110
|
+
export declare function removeConfidenceMultiplierIfPresent(tx: Transaction, bag: TransactionObjectInput, options?: {
|
|
111
|
+
env?: EnvConfig;
|
|
112
|
+
}): TransactionResult;
|
|
113
|
+
/**
|
|
114
|
+
* Validates the reserve configuration to ensure it meets all constraints.
|
|
115
|
+
*
|
|
116
|
+
* Checks various parameters for correctness, including LTVs, borrow weight, liquidation bonuses,
|
|
117
|
+
* fees, and interest rate vectors.
|
|
118
|
+
*
|
|
119
|
+
* # Arguments
|
|
120
|
+
*
|
|
121
|
+
* * `config` - A reference to the `ReserveConfig` to validate.
|
|
122
|
+
*
|
|
123
|
+
* # Panics
|
|
124
|
+
*
|
|
125
|
+
* * If `open_ltv_pct`, `close_ltv_pct`, or `max_close_ltv_pct` exceeds 100 (`EInvalidReserveConfig`).
|
|
126
|
+
* * If `open_ltv_pct` is greater than `close_ltv_pct` (`EInvalidReserveConfig`).
|
|
127
|
+
* * If `close_ltv_pct` is greater than `max_close_ltv_pct` (`EInvalidReserveConfig`).
|
|
128
|
+
* * If `borrow_weight_bps` is less than 10,000 (`EInvalidReserveConfig`).
|
|
129
|
+
* * If `liquidation_bonus_bps` exceeds `max_liquidation_bonus_bps` (`EInvalidReserveConfig`).
|
|
130
|
+
* * If `liquidation_bonus_bps + protocol_liquidation_fee_bps` exceeds 2,000 (`EInvalidReserveConfig`).
|
|
131
|
+
* * If `isolated` is true and `open_ltv_pct` or `close_ltv_pct` is non-zero (`EInvalidReserveConfig`).
|
|
132
|
+
* * If `borrow_fee_bps` or `spread_fee_bps` exceeds 10,000 (`EInvalidReserveConfig`).
|
|
133
|
+
* * If `open_attributed_borrow_limit_usd` exceeds `close_attributed_borrow_limit_usd` (`EInvalidReserveConfig`).
|
|
134
|
+
* * If `interest_rate_utils` has fewer than 2 elements, does not start with 0, or end with 100 (`EInvalidReserveConfig`).
|
|
135
|
+
* * If `interest_rate_utils` and `interest_rate_aprs` have different lengths (`EInvalidReserveConfig`).
|
|
136
|
+
* * If `interest_rate_utils` is not strictly increasing or `interest_rate_aprs` is not monotonically increasing (`EInvalidReserveConfig`).
|
|
137
|
+
*/
|
|
138
|
+
export declare function validateReserveConfig(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
139
|
+
env?: EnvConfig;
|
|
140
|
+
}): TransactionResult;
|
|
141
|
+
export interface ValidateUtilsAndAprsArgs {
|
|
142
|
+
utils: Array<number | TransactionArgument> | TransactionArgument;
|
|
143
|
+
aprs: Array<bigint | TransactionArgument> | TransactionArgument;
|
|
74
144
|
}
|
|
75
|
-
|
|
76
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Validates the interest rate utilization and APR vectors.
|
|
147
|
+
*
|
|
148
|
+
* Ensures the utilization rates are strictly increasing, start at 0, end at 100, and
|
|
149
|
+
* match the length of the APR vector, which must be monotonically increasing.
|
|
150
|
+
*
|
|
151
|
+
* # Arguments
|
|
152
|
+
*
|
|
153
|
+
* * `utils` - A reference to the vector of utilization rates (0-100).
|
|
154
|
+
* * `aprs` - A reference to the vector of APRs in basis points.
|
|
155
|
+
*
|
|
156
|
+
* # Panics
|
|
157
|
+
*
|
|
158
|
+
* * If `utils` has fewer than 2 elements (`EInvalidReserveConfig`).
|
|
159
|
+
* * If `utils` and `aprs` have different lengths (`EInvalidReserveConfig`).
|
|
160
|
+
* * If `utils` does not start with 0 or end with 100 (`EInvalidReserveConfig`).
|
|
161
|
+
* * If `utils` is not strictly increasing (`EInvalidReserveConfig`).
|
|
162
|
+
* * If `aprs` is not monotonically increasing (`EInvalidReserveConfig`).
|
|
163
|
+
*/
|
|
164
|
+
export declare function validateUtilsAndAprs(tx: Transaction, args: ValidateUtilsAndAprsArgs, options?: {
|
|
165
|
+
env?: EnvConfig;
|
|
166
|
+
}): TransactionResult;
|
|
167
|
+
/**
|
|
168
|
+
* Gets the open loan-to-value (LTV) ratio as a decimal.
|
|
169
|
+
*
|
|
170
|
+
* # Arguments
|
|
171
|
+
*
|
|
172
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
173
|
+
*
|
|
174
|
+
* # Returns
|
|
175
|
+
*
|
|
176
|
+
* * `Decimal` - The open LTV ratio as a decimal (e.g., 50% = 0.5).
|
|
177
|
+
*/
|
|
178
|
+
export declare function openLtv(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
179
|
+
env?: EnvConfig;
|
|
180
|
+
}): TransactionResult;
|
|
181
|
+
/**
|
|
182
|
+
* Gets the close loan-to-value (LTV) ratio as a decimal.
|
|
183
|
+
*
|
|
184
|
+
* # Arguments
|
|
185
|
+
*
|
|
186
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
187
|
+
*
|
|
188
|
+
* # Returns
|
|
189
|
+
*
|
|
190
|
+
* * `Decimal` - The close LTV ratio as a decimal (e.g., 50% = 0.5).
|
|
191
|
+
*/
|
|
192
|
+
export declare function closeLtv(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
193
|
+
env?: EnvConfig;
|
|
194
|
+
}): TransactionResult;
|
|
195
|
+
export declare function openLtvPct(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
196
|
+
env?: EnvConfig;
|
|
197
|
+
}): TransactionResult;
|
|
198
|
+
export declare function closeLtvPct(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
199
|
+
env?: EnvConfig;
|
|
200
|
+
}): TransactionResult;
|
|
201
|
+
/**
|
|
202
|
+
* Gets the borrow weight as a decimal.
|
|
203
|
+
*
|
|
204
|
+
* # Arguments
|
|
205
|
+
*
|
|
206
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
207
|
+
*
|
|
208
|
+
* # Returns
|
|
209
|
+
*
|
|
210
|
+
* * `Decimal` - The borrow weight as a decimal (e.g., 10,000 bps = 1.0).
|
|
211
|
+
*/
|
|
212
|
+
export declare function borrowWeight(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
213
|
+
env?: EnvConfig;
|
|
214
|
+
}): TransactionResult;
|
|
215
|
+
/**
|
|
216
|
+
* Gets the deposit limit in token units.
|
|
217
|
+
*
|
|
218
|
+
* # Arguments
|
|
219
|
+
*
|
|
220
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
221
|
+
*
|
|
222
|
+
* # Returns
|
|
223
|
+
*
|
|
224
|
+
* * `u64` - The maximum deposit amount in token units.
|
|
225
|
+
*/
|
|
226
|
+
export declare function depositLimit(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
227
|
+
env?: EnvConfig;
|
|
228
|
+
}): TransactionResult;
|
|
229
|
+
/**
|
|
230
|
+
* Gets the borrow limit in token units.
|
|
231
|
+
*
|
|
232
|
+
* # Arguments
|
|
233
|
+
*
|
|
234
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
235
|
+
*
|
|
236
|
+
* # Returns
|
|
237
|
+
*
|
|
238
|
+
* * `u64` - The maximum borrow amount in token units.
|
|
239
|
+
*/
|
|
240
|
+
export declare function borrowLimit(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
241
|
+
env?: EnvConfig;
|
|
242
|
+
}): TransactionResult;
|
|
243
|
+
/**
|
|
244
|
+
* Gets the liquidation bonus as a decimal.
|
|
245
|
+
*
|
|
246
|
+
* # Arguments
|
|
247
|
+
*
|
|
248
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
249
|
+
*
|
|
250
|
+
* # Returns
|
|
251
|
+
*
|
|
252
|
+
* * `Decimal` - The liquidation bonus as a decimal (e.g., 500 bps = 0.05).
|
|
253
|
+
*/
|
|
254
|
+
export declare function liquidationBonus(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
255
|
+
env?: EnvConfig;
|
|
256
|
+
}): TransactionResult;
|
|
257
|
+
/**
|
|
258
|
+
* Gets the deposit limit in USD.
|
|
259
|
+
*
|
|
260
|
+
* # Arguments
|
|
261
|
+
*
|
|
262
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
263
|
+
*
|
|
264
|
+
* # Returns
|
|
265
|
+
*
|
|
266
|
+
* * `u64` - The maximum deposit amount in USD.
|
|
267
|
+
*/
|
|
268
|
+
export declare function depositLimitUsd(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
269
|
+
env?: EnvConfig;
|
|
270
|
+
}): TransactionResult;
|
|
271
|
+
/**
|
|
272
|
+
* Gets the borrow limit in USD.
|
|
273
|
+
*
|
|
274
|
+
* # Arguments
|
|
275
|
+
*
|
|
276
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
277
|
+
*
|
|
278
|
+
* # Returns
|
|
279
|
+
*
|
|
280
|
+
* * `u64` - The maximum borrow amount in USD.
|
|
281
|
+
*/
|
|
282
|
+
export declare function borrowLimitUsd(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
283
|
+
env?: EnvConfig;
|
|
284
|
+
}): TransactionResult;
|
|
285
|
+
/**
|
|
286
|
+
* Gets the borrow fee as a decimal.
|
|
287
|
+
*
|
|
288
|
+
* # Arguments
|
|
289
|
+
*
|
|
290
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
291
|
+
*
|
|
292
|
+
* # Returns
|
|
293
|
+
*
|
|
294
|
+
* * `Decimal` - The borrow fee as a decimal (e.g., 10 bps = 0.001).
|
|
295
|
+
*/
|
|
296
|
+
export declare function borrowFee(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
297
|
+
env?: EnvConfig;
|
|
298
|
+
}): TransactionResult;
|
|
299
|
+
/**
|
|
300
|
+
* Gets the protocol liquidation fee as a decimal.
|
|
301
|
+
*
|
|
302
|
+
* # Arguments
|
|
303
|
+
*
|
|
304
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
305
|
+
*
|
|
306
|
+
* # Returns
|
|
307
|
+
*
|
|
308
|
+
* * `Decimal` - The protocol liquidation fee as a decimal (e.g., 300 bps = 0.03).
|
|
309
|
+
*/
|
|
310
|
+
export declare function protocolLiquidationFee(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
311
|
+
env?: EnvConfig;
|
|
312
|
+
}): TransactionResult;
|
|
313
|
+
/**
|
|
314
|
+
* Gets the isolation status of the reserve.
|
|
315
|
+
*
|
|
316
|
+
* # Arguments
|
|
317
|
+
*
|
|
318
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
319
|
+
*
|
|
320
|
+
* # Returns
|
|
321
|
+
*
|
|
322
|
+
* * `bool` - True if the asset is isolated, false otherwise.
|
|
323
|
+
*/
|
|
324
|
+
export declare function isolated(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
325
|
+
env?: EnvConfig;
|
|
326
|
+
}): TransactionResult;
|
|
327
|
+
/**
|
|
328
|
+
* Whether this reserve has been fully retired: no borrowing power, no liquidation value,
|
|
329
|
+
* and closed to new positions on both sides.
|
|
330
|
+
*
|
|
331
|
+
* This is deliberately STRICTER than `open_ltv == 0`. Zeroing open ltv alone is how a
|
|
332
|
+
* reserve is wound down while existing positions survive — the close ltv has to stay put,
|
|
333
|
+
* because zeroing it insta-liquidates every depositor. Such a reserve is still ordinary
|
|
334
|
+
* collateral, priced by a live feed, and worth real money. On MAIN as of 2026-08-18 the two
|
|
335
|
+
* groups are nothing alike: five wound-down reserves (wUSDC, wUSDT, AUSD, WETH, yapSUI) hold
|
|
336
|
+
* $133,635 backing $48,818 of live debt at close ltvs of 75-80%, while every fully retired
|
|
337
|
+
* reserve sits at close ltv 0.
|
|
338
|
+
*
|
|
339
|
+
* Retirement is therefore the honest test for "this deposit is not worth chasing": an
|
|
340
|
+
* operator only reaches this state once the asset backs nothing anyone can realize. Guards
|
|
341
|
+
* that ask what an obligation's collateral is WORTH use this; guards that only ask whether a
|
|
342
|
+
* deposit grants borrowing power use `open_ltv` directly.
|
|
343
|
+
*
|
|
344
|
+
* The off-chain twin is `mayUseOnChainPrice` in `common/utils/reservePriceFallback.ts`,
|
|
345
|
+
* which tests the same four fields and must keep agreeing with this.
|
|
346
|
+
*/
|
|
347
|
+
export declare function isRetired(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
348
|
+
env?: EnvConfig;
|
|
349
|
+
}): TransactionResult;
|
|
350
|
+
/**
|
|
351
|
+
* Gets the spread fee as a decimal.
|
|
352
|
+
*
|
|
353
|
+
* # Arguments
|
|
354
|
+
*
|
|
355
|
+
* * `config` - A reference to the `ReserveConfig` to query.
|
|
356
|
+
*
|
|
357
|
+
* # Returns
|
|
358
|
+
*
|
|
359
|
+
* * `Decimal` - The spread fee as a decimal (e.g., 2000 bps = 0.2).
|
|
360
|
+
*/
|
|
361
|
+
export declare function spreadFee(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
362
|
+
env?: EnvConfig;
|
|
363
|
+
}): TransactionResult;
|
|
364
|
+
export interface CalculateAprArgs {
|
|
365
|
+
config: TransactionObjectInput;
|
|
366
|
+
curUtil: TransactionObjectInput;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Calculates the annual percentage rate (APR) based on the current utilization.
|
|
370
|
+
*
|
|
371
|
+
* Interpolates the APR based on the utilization rate using the provided `interest_rate_utils`
|
|
372
|
+
* and `interest_rate_aprs` vectors.
|
|
373
|
+
*
|
|
374
|
+
* # Arguments
|
|
375
|
+
*
|
|
376
|
+
* * `config` - A reference to the `ReserveConfig` containing the interest rate data.
|
|
377
|
+
* * `cur_util` - The current utilization rate as a decimal (0 to 1).
|
|
378
|
+
*
|
|
379
|
+
* # Returns
|
|
380
|
+
*
|
|
381
|
+
* * `Decimal` - The calculated APR as a decimal.
|
|
382
|
+
*
|
|
383
|
+
* # Panics
|
|
384
|
+
*
|
|
385
|
+
* * If `cur_util` is greater than 1 (`EInvalidUtil`).
|
|
386
|
+
* * If the interpolation logic fails due to invalid configuration (`EInvalidReserveConfig`).
|
|
387
|
+
*/
|
|
388
|
+
export declare function calculateApr(tx: Transaction, args: CalculateAprArgs, options?: {
|
|
389
|
+
env?: EnvConfig;
|
|
390
|
+
}): TransactionResult;
|
|
391
|
+
export interface CalculateSupplyAprArgs {
|
|
392
|
+
config: TransactionObjectInput;
|
|
393
|
+
curUtil: TransactionObjectInput;
|
|
394
|
+
borrowApr: TransactionObjectInput;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Calculates the supply APR based on the current utilization and borrow APR.
|
|
398
|
+
*
|
|
399
|
+
* Applies the spread fee to the borrow APR and scales it by the utilization rate.
|
|
400
|
+
*
|
|
401
|
+
* # Arguments
|
|
402
|
+
*
|
|
403
|
+
* * `config` - A reference to the `ReserveConfig` containing the spread fee.
|
|
404
|
+
* * `cur_util` - The current utilization rate as a decimal (0 to 1).
|
|
405
|
+
* * `borrow_apr` - The borrow APR as a decimal.
|
|
406
|
+
*
|
|
407
|
+
* # Returns
|
|
408
|
+
*
|
|
409
|
+
* * `Decimal` - The calculated supply APR as a decimal.
|
|
410
|
+
*/
|
|
411
|
+
export declare function calculateSupplyApr(tx: Transaction, args: CalculateSupplyAprArgs, options?: {
|
|
412
|
+
env?: EnvConfig;
|
|
413
|
+
}): TransactionResult;
|
|
414
|
+
/**
|
|
415
|
+
* Destroys a reserve configuration, ensuring the additional fields bag is empty.
|
|
416
|
+
*
|
|
417
|
+
* # Arguments
|
|
418
|
+
*
|
|
419
|
+
* * `config` - The `ReserveConfig` to destroy.
|
|
420
|
+
*
|
|
421
|
+
* Drains the confidence multiplier from `additional_fields` before requiring it
|
|
422
|
+
* empty -- callers never need to remove it themselves first.
|
|
423
|
+
*
|
|
424
|
+
* # Panics
|
|
425
|
+
*
|
|
426
|
+
* * If `additional_fields` holds anything other than the confidence multiplier.
|
|
427
|
+
*/
|
|
428
|
+
export declare function destroy(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
429
|
+
env?: EnvConfig;
|
|
430
|
+
}): TransactionResult;
|
|
431
|
+
/**
|
|
432
|
+
* Creates a new reserve configuration builder from an existing configuration.
|
|
433
|
+
*
|
|
434
|
+
* Initializes a `ReserveConfigBuilder` with the fields from the provided `ReserveConfig`.
|
|
435
|
+
*
|
|
436
|
+
* # Arguments
|
|
437
|
+
*
|
|
438
|
+
* * `config` - A reference to the `ReserveConfig` to initialize the builder from.
|
|
439
|
+
*
|
|
440
|
+
* # Returns
|
|
441
|
+
*
|
|
442
|
+
* * `ReserveConfigBuilder` - A new builder initialized with the config's fields.
|
|
443
|
+
*/
|
|
444
|
+
export declare function from(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
445
|
+
env?: EnvConfig;
|
|
446
|
+
}): TransactionResult;
|
|
447
|
+
export interface SetConfidenceMultiplierBuilderArgs {
|
|
77
448
|
builder: TransactionObjectInput;
|
|
78
|
-
|
|
449
|
+
confidenceMultiplierBps: bigint | TransactionArgument;
|
|
79
450
|
}
|
|
80
|
-
|
|
81
|
-
|
|
451
|
+
/**
|
|
452
|
+
* Sets the confidence multiplier `k` (in basis points) in the builder. Seeded
|
|
453
|
+
* automatically by `from` from the source config's current value, so
|
|
454
|
+
* `from(...) -> tweak -> build(...)` carries `k` forward the same way every other
|
|
455
|
+
* field already does.
|
|
456
|
+
*/
|
|
457
|
+
export declare function setConfidenceMultiplierBuilder(tx: Transaction, args: SetConfidenceMultiplierBuilderArgs, options?: {
|
|
458
|
+
env?: EnvConfig;
|
|
459
|
+
}): TransactionResult;
|
|
460
|
+
export interface SetArgs {
|
|
82
461
|
builder: TransactionObjectInput;
|
|
83
|
-
|
|
462
|
+
field: GenericArg;
|
|
463
|
+
value: GenericArg;
|
|
84
464
|
}
|
|
85
|
-
|
|
86
|
-
|
|
465
|
+
/**
|
|
466
|
+
* Sets a field in the reserve configuration builder.
|
|
467
|
+
*
|
|
468
|
+
* Updates an existing field or adds a new one to the builder's fields bag.
|
|
469
|
+
*
|
|
470
|
+
* # Arguments
|
|
471
|
+
*
|
|
472
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
473
|
+
* * `field` - The key for the field to set.
|
|
474
|
+
* * `value` - The value to set for the field.
|
|
475
|
+
*/
|
|
476
|
+
export declare function set(tx: Transaction, typeArgs: [string, string], args: SetArgs, options?: {
|
|
477
|
+
env?: EnvConfig;
|
|
478
|
+
}): TransactionResult;
|
|
479
|
+
export interface UpsertArgs {
|
|
480
|
+
bag: TransactionObjectInput;
|
|
481
|
+
key: GenericArg;
|
|
482
|
+
value: GenericArg;
|
|
483
|
+
}
|
|
484
|
+
export declare function upsert(tx: Transaction, typeArgs: [string, string], args: UpsertArgs, options?: {
|
|
485
|
+
env?: EnvConfig;
|
|
486
|
+
}): TransactionResult;
|
|
487
|
+
export interface SetOpenLtvPctArgs {
|
|
87
488
|
builder: TransactionObjectInput;
|
|
88
|
-
|
|
489
|
+
openLtvPct: number | TransactionArgument;
|
|
89
490
|
}
|
|
90
|
-
|
|
491
|
+
/**
|
|
492
|
+
* Sets the open LTV percentage in the builder.
|
|
493
|
+
*
|
|
494
|
+
* # Arguments
|
|
495
|
+
*
|
|
496
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
497
|
+
* * `open_ltv_pct` - The open LTV percentage to set.
|
|
498
|
+
*/
|
|
499
|
+
export declare function setOpenLtvPct(tx: Transaction, args: SetOpenLtvPctArgs, options?: {
|
|
500
|
+
env?: EnvConfig;
|
|
501
|
+
}): TransactionResult;
|
|
91
502
|
export interface SetCloseLtvPctArgs {
|
|
92
503
|
builder: TransactionObjectInput;
|
|
93
504
|
closeLtvPct: number | TransactionArgument;
|
|
94
505
|
}
|
|
95
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Sets the close LTV percentage in the builder.
|
|
508
|
+
*
|
|
509
|
+
* # Arguments
|
|
510
|
+
*
|
|
511
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
512
|
+
* * `close_ltv_pct` - The close LTV percentage to set.
|
|
513
|
+
*/
|
|
514
|
+
export declare function setCloseLtvPct(tx: Transaction, args: SetCloseLtvPctArgs, options?: {
|
|
515
|
+
env?: EnvConfig;
|
|
516
|
+
}): TransactionResult;
|
|
517
|
+
export interface SetMaxCloseLtvPctArgs {
|
|
518
|
+
builder: TransactionObjectInput;
|
|
519
|
+
maxCloseLtvPct: number | TransactionArgument;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Sets the maximum close LTV percentage in the builder.
|
|
523
|
+
*
|
|
524
|
+
* # Arguments
|
|
525
|
+
*
|
|
526
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
527
|
+
* * `max_close_ltv_pct` - The maximum close LTV percentage to set.
|
|
528
|
+
*/
|
|
529
|
+
export declare function setMaxCloseLtvPct(tx: Transaction, args: SetMaxCloseLtvPctArgs, options?: {
|
|
530
|
+
env?: EnvConfig;
|
|
531
|
+
}): TransactionResult;
|
|
532
|
+
export interface SetBorrowWeightBpsArgs {
|
|
533
|
+
builder: TransactionObjectInput;
|
|
534
|
+
borrowWeightBps: bigint | TransactionArgument;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Sets the borrow weight in basis points in the builder.
|
|
538
|
+
*
|
|
539
|
+
* # Arguments
|
|
540
|
+
*
|
|
541
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
542
|
+
* * `borrow_weight_bps` - The borrow weight in basis points to set.
|
|
543
|
+
*/
|
|
544
|
+
export declare function setBorrowWeightBps(tx: Transaction, args: SetBorrowWeightBpsArgs, options?: {
|
|
545
|
+
env?: EnvConfig;
|
|
546
|
+
}): TransactionResult;
|
|
96
547
|
export interface SetDepositLimitArgs {
|
|
97
548
|
builder: TransactionObjectInput;
|
|
98
549
|
depositLimit: bigint | TransactionArgument;
|
|
99
550
|
}
|
|
100
|
-
|
|
551
|
+
/**
|
|
552
|
+
* Sets the deposit limit in token units in the builder.
|
|
553
|
+
*
|
|
554
|
+
* # Arguments
|
|
555
|
+
*
|
|
556
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
557
|
+
* * `deposit_limit` - The deposit limit in token units to set.
|
|
558
|
+
*/
|
|
559
|
+
export declare function setDepositLimit(tx: Transaction, args: SetDepositLimitArgs, options?: {
|
|
560
|
+
env?: EnvConfig;
|
|
561
|
+
}): TransactionResult;
|
|
562
|
+
export interface SetBorrowLimitArgs {
|
|
563
|
+
builder: TransactionObjectInput;
|
|
564
|
+
borrowLimit: bigint | TransactionArgument;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Sets the borrow limit in token units in the builder.
|
|
568
|
+
*
|
|
569
|
+
* # Arguments
|
|
570
|
+
*
|
|
571
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
572
|
+
* * `borrow_limit` - The borrow limit in token units to set.
|
|
573
|
+
*/
|
|
574
|
+
export declare function setBorrowLimit(tx: Transaction, args: SetBorrowLimitArgs, options?: {
|
|
575
|
+
env?: EnvConfig;
|
|
576
|
+
}): TransactionResult;
|
|
577
|
+
export interface SetLiquidationBonusBpsArgs {
|
|
578
|
+
builder: TransactionObjectInput;
|
|
579
|
+
liquidationBonusBps: bigint | TransactionArgument;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Sets the liquidation bonus in basis points in the builder.
|
|
583
|
+
*
|
|
584
|
+
* # Arguments
|
|
585
|
+
*
|
|
586
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
587
|
+
* * `liquidation_bonus_bps` - The liquidation bonus in basis points to set.
|
|
588
|
+
*/
|
|
589
|
+
export declare function setLiquidationBonusBps(tx: Transaction, args: SetLiquidationBonusBpsArgs, options?: {
|
|
590
|
+
env?: EnvConfig;
|
|
591
|
+
}): TransactionResult;
|
|
592
|
+
export interface SetMaxLiquidationBonusBpsArgs {
|
|
593
|
+
builder: TransactionObjectInput;
|
|
594
|
+
maxLiquidationBonusBps: bigint | TransactionArgument;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Sets the maximum liquidation bonus in basis points in the builder.
|
|
598
|
+
*
|
|
599
|
+
* # Arguments
|
|
600
|
+
*
|
|
601
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
602
|
+
* * `max_liquidation_bonus_bps` - The maximum liquidation bonus in basis points to set.
|
|
603
|
+
*/
|
|
604
|
+
export declare function setMaxLiquidationBonusBps(tx: Transaction, args: SetMaxLiquidationBonusBpsArgs, options?: {
|
|
605
|
+
env?: EnvConfig;
|
|
606
|
+
}): TransactionResult;
|
|
101
607
|
export interface SetDepositLimitUsdArgs {
|
|
102
608
|
builder: TransactionObjectInput;
|
|
103
609
|
depositLimitUsd: bigint | TransactionArgument;
|
|
104
610
|
}
|
|
105
|
-
|
|
106
|
-
|
|
611
|
+
/**
|
|
612
|
+
* Sets the deposit limit in USD in the builder.
|
|
613
|
+
*
|
|
614
|
+
* # Arguments
|
|
615
|
+
*
|
|
616
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
617
|
+
* * `deposit_limit_usd` - The deposit limit in USD to set.
|
|
618
|
+
*/
|
|
619
|
+
export declare function setDepositLimitUsd(tx: Transaction, args: SetDepositLimitUsdArgs, options?: {
|
|
620
|
+
env?: EnvConfig;
|
|
621
|
+
}): TransactionResult;
|
|
622
|
+
export interface SetBorrowLimitUsdArgs {
|
|
107
623
|
builder: TransactionObjectInput;
|
|
108
|
-
|
|
624
|
+
borrowLimitUsd: bigint | TransactionArgument;
|
|
109
625
|
}
|
|
110
|
-
|
|
626
|
+
/**
|
|
627
|
+
* Sets the borrow limit in USD in the builder.
|
|
628
|
+
*
|
|
629
|
+
* # Arguments
|
|
630
|
+
*
|
|
631
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
632
|
+
* * `borrow_limit_usd` - The borrow limit in USD to set.
|
|
633
|
+
*/
|
|
634
|
+
export declare function setBorrowLimitUsd(tx: Transaction, args: SetBorrowLimitUsdArgs, options?: {
|
|
635
|
+
env?: EnvConfig;
|
|
636
|
+
}): TransactionResult;
|
|
111
637
|
export interface SetInterestRateUtilsArgs {
|
|
112
638
|
builder: TransactionObjectInput;
|
|
113
639
|
interestRateUtils: Array<number | TransactionArgument> | TransactionArgument;
|
|
114
640
|
}
|
|
115
|
-
|
|
116
|
-
|
|
641
|
+
/**
|
|
642
|
+
* Sets the interest rate utilization vector in the builder.
|
|
643
|
+
*
|
|
644
|
+
* # Arguments
|
|
645
|
+
*
|
|
646
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
647
|
+
* * `interest_rate_utils` - The vector of utilization rates to set.
|
|
648
|
+
*/
|
|
649
|
+
export declare function setInterestRateUtils(tx: Transaction, args: SetInterestRateUtilsArgs, options?: {
|
|
650
|
+
env?: EnvConfig;
|
|
651
|
+
}): TransactionResult;
|
|
652
|
+
export interface SetInterestRateAprsArgs {
|
|
117
653
|
builder: TransactionObjectInput;
|
|
118
|
-
|
|
654
|
+
interestRateAprs: Array<bigint | TransactionArgument> | TransactionArgument;
|
|
119
655
|
}
|
|
120
|
-
|
|
121
|
-
|
|
656
|
+
/**
|
|
657
|
+
* Sets the interest rate APR vector in the builder.
|
|
658
|
+
*
|
|
659
|
+
* # Arguments
|
|
660
|
+
*
|
|
661
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
662
|
+
* * `interest_rate_aprs` - The vector of APRs to set.
|
|
663
|
+
*/
|
|
664
|
+
export declare function setInterestRateAprs(tx: Transaction, args: SetInterestRateAprsArgs, options?: {
|
|
665
|
+
env?: EnvConfig;
|
|
666
|
+
}): TransactionResult;
|
|
667
|
+
export interface SetBorrowFeeBpsArgs {
|
|
122
668
|
builder: TransactionObjectInput;
|
|
123
|
-
|
|
669
|
+
borrowFeeBps: bigint | TransactionArgument;
|
|
124
670
|
}
|
|
125
|
-
|
|
126
|
-
|
|
671
|
+
/**
|
|
672
|
+
* Sets the borrow fee in basis points in the builder.
|
|
673
|
+
*
|
|
674
|
+
* # Arguments
|
|
675
|
+
*
|
|
676
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
677
|
+
* * `borrow_fee_bps` - The borrow fee in basis points to set.
|
|
678
|
+
*/
|
|
679
|
+
export declare function setBorrowFeeBps(tx: Transaction, args: SetBorrowFeeBpsArgs, options?: {
|
|
680
|
+
env?: EnvConfig;
|
|
681
|
+
}): TransactionResult;
|
|
682
|
+
export interface SetSpreadFeeBpsArgs {
|
|
127
683
|
builder: TransactionObjectInput;
|
|
128
|
-
|
|
684
|
+
spreadFeeBps: bigint | TransactionArgument;
|
|
129
685
|
}
|
|
130
|
-
|
|
131
|
-
|
|
686
|
+
/**
|
|
687
|
+
* Sets the spread fee in basis points in the builder.
|
|
688
|
+
*
|
|
689
|
+
* # Arguments
|
|
690
|
+
*
|
|
691
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
692
|
+
* * `spread_fee_bps` - The spread fee in basis points to set.
|
|
693
|
+
*/
|
|
694
|
+
export declare function setSpreadFeeBps(tx: Transaction, args: SetSpreadFeeBpsArgs, options?: {
|
|
695
|
+
env?: EnvConfig;
|
|
696
|
+
}): TransactionResult;
|
|
697
|
+
export interface SetProtocolLiquidationFeeBpsArgs {
|
|
132
698
|
builder: TransactionObjectInput;
|
|
133
|
-
|
|
699
|
+
protocolLiquidationFeeBps: bigint | TransactionArgument;
|
|
134
700
|
}
|
|
135
|
-
|
|
136
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Sets the protocol liquidation fee in basis points in the builder.
|
|
703
|
+
*
|
|
704
|
+
* # Arguments
|
|
705
|
+
*
|
|
706
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
707
|
+
* * `protocol_liquidation_fee_bps` - The protocol liquidation fee in basis points to set.
|
|
708
|
+
*/
|
|
709
|
+
export declare function setProtocolLiquidationFeeBps(tx: Transaction, args: SetProtocolLiquidationFeeBpsArgs, options?: {
|
|
710
|
+
env?: EnvConfig;
|
|
711
|
+
}): TransactionResult;
|
|
712
|
+
export interface SetIsolatedArgs {
|
|
137
713
|
builder: TransactionObjectInput;
|
|
138
|
-
|
|
714
|
+
isolated: boolean | TransactionArgument;
|
|
139
715
|
}
|
|
140
|
-
|
|
141
|
-
|
|
716
|
+
/**
|
|
717
|
+
* Sets the isolation status in the builder.
|
|
718
|
+
*
|
|
719
|
+
* # Arguments
|
|
720
|
+
*
|
|
721
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
722
|
+
* * `isolated` - The isolation status to set.
|
|
723
|
+
*/
|
|
724
|
+
export declare function setIsolated(tx: Transaction, args: SetIsolatedArgs, options?: {
|
|
725
|
+
env?: EnvConfig;
|
|
726
|
+
}): TransactionResult;
|
|
727
|
+
export interface SetOpenAttributedBorrowLimitUsdArgs {
|
|
142
728
|
builder: TransactionObjectInput;
|
|
143
|
-
|
|
729
|
+
openAttributedBorrowLimitUsd: bigint | TransactionArgument;
|
|
144
730
|
}
|
|
145
|
-
|
|
146
|
-
|
|
731
|
+
/**
|
|
732
|
+
* Sets the open attributed borrow limit in USD in the builder.
|
|
733
|
+
*
|
|
734
|
+
* # Arguments
|
|
735
|
+
*
|
|
736
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
737
|
+
* * `open_attributed_borrow_limit_usd` - The open attributed borrow limit in USD to set.
|
|
738
|
+
*/
|
|
739
|
+
export declare function setOpenAttributedBorrowLimitUsd(tx: Transaction, args: SetOpenAttributedBorrowLimitUsdArgs, options?: {
|
|
740
|
+
env?: EnvConfig;
|
|
741
|
+
}): TransactionResult;
|
|
742
|
+
export interface SetCloseAttributedBorrowLimitUsdArgs {
|
|
147
743
|
builder: TransactionObjectInput;
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
export declare function setProtocolLiquidationFeeBps(tx: Transaction, args: SetProtocolLiquidationFeeBpsArgs): import("@mysten/sui/transactions").TransactionResult;
|
|
151
|
-
export declare function validateReserveConfig(tx: Transaction, config: TransactionObjectInput): import("@mysten/sui/transactions").TransactionResult;
|
|
152
|
-
export interface ValidateUtilsAndAprsArgs {
|
|
153
|
-
utils: Array<number | TransactionArgument> | TransactionArgument;
|
|
154
|
-
aprs: Array<bigint | TransactionArgument> | TransactionArgument;
|
|
744
|
+
closeAttributedBorrowLimitUsd: bigint | TransactionArgument;
|
|
155
745
|
}
|
|
156
|
-
|
|
746
|
+
/**
|
|
747
|
+
* Sets the close attributed borrow limit in USD in the builder.
|
|
748
|
+
*
|
|
749
|
+
* # Arguments
|
|
750
|
+
*
|
|
751
|
+
* * `builder` - A mutable reference to the `ReserveConfigBuilder`.
|
|
752
|
+
* * `close_attributed_borrow_limit_usd` - The close attributed borrow limit in USD to set.
|
|
753
|
+
*/
|
|
754
|
+
export declare function setCloseAttributedBorrowLimitUsd(tx: Transaction, args: SetCloseAttributedBorrowLimitUsdArgs, options?: {
|
|
755
|
+
env?: EnvConfig;
|
|
756
|
+
}): TransactionResult;
|
|
757
|
+
/**
|
|
758
|
+
* Builds a reserve configuration from the builder.
|
|
759
|
+
*
|
|
760
|
+
* Constructs a `ReserveConfig` by extracting all fields from the builder's bag and
|
|
761
|
+
* validating the resulting configuration.
|
|
762
|
+
*
|
|
763
|
+
* # Arguments
|
|
764
|
+
*
|
|
765
|
+
* * `builder` - The `ReserveConfigBuilder` to build from.
|
|
766
|
+
*
|
|
767
|
+
* # Returns
|
|
768
|
+
*
|
|
769
|
+
* * `ReserveConfig` - The constructed and validated reserve configuration.
|
|
770
|
+
*
|
|
771
|
+
* # Panics
|
|
772
|
+
*
|
|
773
|
+
* * If any required field is missing from the builder's bag.
|
|
774
|
+
* * If the constructed configuration fails validation (see `validate_reserve_config` for details).
|
|
775
|
+
*/
|
|
776
|
+
export declare function build(tx: Transaction, builder: TransactionObjectInput, options?: {
|
|
777
|
+
env?: EnvConfig;
|
|
778
|
+
}): TransactionResult;
|