@affluent-org/sdk 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/Account.compiled.json +1 -0
- package/dist/build/Receipt.compiled.json +1 -0
- package/dist/build/WTONWallet.compiled.json +1 -0
- package/dist/common/cache.d.ts +16 -0
- package/dist/common/cache.js +96 -0
- package/dist/common/service.d.ts +20 -0
- package/dist/common/service.js +69 -0
- package/dist/common/type.d.ts +14 -0
- package/dist/common/type.js +2 -0
- package/dist/common/unknown-contract.d.ts +14 -0
- package/dist/common/unknown-contract.js +18 -0
- package/dist/common/versions.d.ts +14 -0
- package/dist/common/versions.js +22 -0
- package/dist/constants/pool.d.ts +1 -0
- package/dist/constants/pool.js +2 -0
- package/dist/contracts/_mock/simple-oracle.d.ts +34 -0
- package/dist/contracts/_mock/simple-oracle.js +73 -0
- package/dist/contracts/vault/share-vault/type.d.ts +30 -0
- package/dist/contracts/vault/share-vault/type.js +2 -0
- package/dist/contracts/vault/strategy-vault/utils.d.ts +6 -0
- package/dist/contracts/vault/strategy-vault/utils.js +32 -0
- package/dist/factorial.d.ts +14 -0
- package/dist/factorial.js +20 -0
- package/dist/farm.d.ts +92 -0
- package/dist/farm.js +209 -0
- package/dist/monitor.d.ts +57 -0
- package/dist/monitor.js +527 -0
- package/dist/monitorCacheV1.d.ts +52 -0
- package/dist/monitorCacheV1.js +504 -0
- package/dist/oracle/oracle-v2.d.ts +39 -0
- package/dist/oracle/oracle-v2.js +151 -0
- package/dist/oracle/oracle.d.ts +107 -0
- package/dist/oracle/oracle.js +392 -0
- package/dist/periphery.d.ts +259 -0
- package/dist/periphery.js +1087 -0
- package/dist/pool.d.ts +216 -0
- package/dist/pool.js +2298 -0
- package/dist/poolCacheV1.d.ts +139 -0
- package/dist/poolCacheV1.js +1841 -0
- package/dist/rfq-auction.d.ts +75 -0
- package/dist/rfq-auction.js +220 -0
- package/dist/rfq-batch.d.ts +112 -0
- package/dist/rfq-batch.js +284 -0
- package/dist/services/share-vault/computation.d.ts +14 -17
- package/dist/services/share-vault/computation.js +39 -0
- package/dist/services/share-vault/index.js +6 -3
- package/dist/services/share-vault/query.d.ts +38 -8
- package/dist/services/share-vault/query.js +20 -27
- package/dist/services/share-vault/type.d.ts +19 -0
- package/dist/services/share-vault/type.js +2 -0
- package/dist/services/share-vault/user/index.js +3 -1
- package/dist/services/strategy-vault/computation.d.ts +1 -0
- package/dist/services/strategy-vault/computation.js +15 -0
- package/dist/services/strategy-vault/query.d.ts +147 -0
- package/dist/services/strategy-vault/query.js +67 -0
- package/dist/services/strategy-vault/type.d.ts +2 -0
- package/dist/services/strategy-vault/type.js +2 -0
- package/dist/share-vault.d.ts +91 -0
- package/dist/share-vault.js +747 -0
- package/dist/stonfi.d.ts +18 -0
- package/dist/stonfi.js +76 -0
- package/dist/strategy_vault/base.d.ts +399 -0
- package/dist/strategy_vault/base.js +1199 -0
- package/dist/strategy_vault/index.d.ts +3 -0
- package/dist/strategy_vault/index.js +7 -0
- package/dist/strategy_vault/steps.d.ts +49 -0
- package/dist/strategy_vault/steps.js +170 -0
- package/dist/types/action.d.ts +55 -0
- package/dist/types/action.js +2 -0
- package/dist/types/messages.d.ts +7 -0
- package/dist/types/messages.js +2 -0
- package/dist/types/params.d.ts +19 -0
- package/dist/types/params.js +2 -0
- package/dist/types/pool.d.ts +83 -0
- package/dist/types/pool.js +2 -0
- package/dist/types/transaction.d.ts +40 -0
- package/dist/types/transaction.js +2 -0
- package/dist/utils/_parse_temp/JumpIRM.d.ts +37 -0
- package/dist/utils/_parse_temp/JumpIRM.js +71 -0
- package/dist/utils/_parse_temp/Pool.d.ts +559 -0
- package/dist/utils/_parse_temp/Pool.js +1023 -0
- package/dist/utils/_parse_temp/ShareVault.d.ts +264 -0
- package/dist/utils/_parse_temp/ShareVault.js +479 -0
- package/dist/utils/_parse_temp/StrategyVault.d.ts +729 -0
- package/dist/utils/_parse_temp/StrategyVault.js +1865 -0
- package/dist/utils/_parse_temp/parseMsgBody.d.ts +13 -0
- package/dist/utils/_parse_temp/parseMsgBody.js +313 -0
- package/dist/utils/assert.d.ts +1 -0
- package/dist/utils/assert.js +9 -0
- package/dist/utils/client-for-parameter.d.ts +12 -0
- package/dist/utils/client-for-parameter.js +97 -0
- package/dist/utils/oracle/index.d.ts +4 -0
- package/dist/utils/oracle/index.js +19 -0
- package/dist/utils/oracle/redstone/helper.d.ts +22 -0
- package/dist/utils/oracle/redstone/helper.js +186 -0
- package/dist/utils/tracer.d.ts +13 -0
- package/dist/utils/tracer.js +137 -0
- package/dist/utils/tracker/index.d.ts +5 -0
- package/dist/utils/tracker/index.js +118 -0
- package/dist/utils/tracker/query-id-generactor.d.ts +2 -0
- package/dist/utils/tracker/query-id-generactor.js +12 -0
- package/dist/utils/tracker/type.d.ts +34 -0
- package/dist/utils/tracker/type.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import { Address, BitString, Builder, Cell, Contract, ContractProvider, Dictionary, Sender, Slice } from '@ton/core';
|
|
2
|
+
export type PoolConfig = {
|
|
3
|
+
feeConfigurer: Address;
|
|
4
|
+
owner: Address;
|
|
5
|
+
oracle: Address;
|
|
6
|
+
assets: Dictionary<Address, BitString>;
|
|
7
|
+
accountCode: Cell;
|
|
8
|
+
};
|
|
9
|
+
export type AssetConfig = {
|
|
10
|
+
wallet: Address | null;
|
|
11
|
+
irm: Address | null;
|
|
12
|
+
irmData: Cell;
|
|
13
|
+
riskFactor: number;
|
|
14
|
+
lir: number;
|
|
15
|
+
isCollateral: number;
|
|
16
|
+
isBorrowable: number;
|
|
17
|
+
};
|
|
18
|
+
export declare function poolConfigToCell(config: PoolConfig): Cell;
|
|
19
|
+
export declare class Pool implements Contract {
|
|
20
|
+
readonly address: Address;
|
|
21
|
+
readonly init?: {
|
|
22
|
+
code: Cell;
|
|
23
|
+
data: Cell;
|
|
24
|
+
} | undefined;
|
|
25
|
+
constructor(address: Address, init?: {
|
|
26
|
+
code: Cell;
|
|
27
|
+
data: Cell;
|
|
28
|
+
} | undefined);
|
|
29
|
+
static Op: {
|
|
30
|
+
Supply: number;
|
|
31
|
+
Withdraw: number;
|
|
32
|
+
Borrow: number;
|
|
33
|
+
Repay: number;
|
|
34
|
+
InitWalletAddress: number;
|
|
35
|
+
AccrueInterest: number;
|
|
36
|
+
Liquidate: number;
|
|
37
|
+
Initialize: number;
|
|
38
|
+
ExecuteAccountAction: number;
|
|
39
|
+
SetOracle: number;
|
|
40
|
+
SetGasFee: number;
|
|
41
|
+
Excess: number;
|
|
42
|
+
ActionNotification: number;
|
|
43
|
+
TransferNotification: number;
|
|
44
|
+
ProvideAsset: number;
|
|
45
|
+
TakeAsset: number;
|
|
46
|
+
SetProtocolFeeRate: number;
|
|
47
|
+
SetFeeConfigurer: number;
|
|
48
|
+
CollectFee: number;
|
|
49
|
+
SetOracleConfig: number;
|
|
50
|
+
SetOwner: number;
|
|
51
|
+
AddAsset: number;
|
|
52
|
+
SetIsBorrowable: number;
|
|
53
|
+
SetLiquidationIncentiveRate: number;
|
|
54
|
+
SetMaxLoanLeverageRatio: number;
|
|
55
|
+
SetMaxLoanVarRatio: number;
|
|
56
|
+
SetLiquidateLeverageRatio: number;
|
|
57
|
+
SetLiquidateVarRatio: number;
|
|
58
|
+
SetLiquidateCloseRatio: number;
|
|
59
|
+
SetIrmConfig: number;
|
|
60
|
+
UpgradeCode: number;
|
|
61
|
+
ExecuteAction: number;
|
|
62
|
+
UpdateAccountStatus: number;
|
|
63
|
+
ProcessBorrowActionResult: number;
|
|
64
|
+
SetWalletAddress: number;
|
|
65
|
+
SetIsCollateral: number;
|
|
66
|
+
SetNewAccountCode: number;
|
|
67
|
+
SetVersion: number;
|
|
68
|
+
SetRiskFactor: number;
|
|
69
|
+
LiquidateNotification: number;
|
|
70
|
+
};
|
|
71
|
+
static Error: {
|
|
72
|
+
CellUnderflow: number;
|
|
73
|
+
Unauthorized: number;
|
|
74
|
+
InvalidAsset: number;
|
|
75
|
+
InvalidWallet: number;
|
|
76
|
+
InvalidAddress: number;
|
|
77
|
+
AlreadyInitialized: number;
|
|
78
|
+
NotEnoughCash: number;
|
|
79
|
+
NotEnoughShare: number;
|
|
80
|
+
NotEnoughLiquidity: number;
|
|
81
|
+
NotFoundPrice: number;
|
|
82
|
+
NotFoundAccount: number;
|
|
83
|
+
EnoughLiquidity: number;
|
|
84
|
+
AlreadyLocked: number;
|
|
85
|
+
NotBorrowableAsset: number;
|
|
86
|
+
ExpiredAction: number;
|
|
87
|
+
InvalidAction: number;
|
|
88
|
+
AlreadyExistAsset: number;
|
|
89
|
+
LockedAccount: number;
|
|
90
|
+
NotEnoughGas: number;
|
|
91
|
+
ActionTimeout: number;
|
|
92
|
+
SeizeAssetIsRepayAsset: number;
|
|
93
|
+
ExceededMaxLoanVarRatio: number;
|
|
94
|
+
ExceededMaxLoanLeverageRatio: number;
|
|
95
|
+
InvalidLiquidateAmount: number;
|
|
96
|
+
UnknownOp: number;
|
|
97
|
+
};
|
|
98
|
+
static createFromAddress(address: Address): Pool;
|
|
99
|
+
static createFromConfig(config: PoolConfig, code: Cell, workchain?: number): Pool;
|
|
100
|
+
sendDeploy(provider: ContractProvider, via: Sender, value: bigint): Promise<void>;
|
|
101
|
+
sendSetOwner(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
102
|
+
newOwner: Address;
|
|
103
|
+
queryID?: number;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
sendSetFeeConfigurer(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
106
|
+
newFeeConfigurer: Address;
|
|
107
|
+
queryID?: number;
|
|
108
|
+
}): Promise<void>;
|
|
109
|
+
sendSetRiskFactor(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
110
|
+
asset: Address;
|
|
111
|
+
riskFactor: bigint;
|
|
112
|
+
queryID?: number;
|
|
113
|
+
}): Promise<void>;
|
|
114
|
+
static createSupplyMsg({ asset, recipient, deadline, response, forwardPayload }: {
|
|
115
|
+
asset: Address;
|
|
116
|
+
recipient: Address;
|
|
117
|
+
deadline?: number;
|
|
118
|
+
response?: Address;
|
|
119
|
+
forwardPayload?: Slice;
|
|
120
|
+
}): Cell;
|
|
121
|
+
static createRepayMsg({ asset, recipient, deadline, response, forwardPayload }: {
|
|
122
|
+
asset: Address;
|
|
123
|
+
recipient: Address;
|
|
124
|
+
deadline?: number;
|
|
125
|
+
response?: Address;
|
|
126
|
+
forwardPayload?: Slice;
|
|
127
|
+
}): Cell;
|
|
128
|
+
static createLiquidateMsg({ oracleParams, repayAsset, borrower, seizeAsset, response, deadline, forwardPayload }: {
|
|
129
|
+
oracleParams: Cell;
|
|
130
|
+
repayAsset: Address;
|
|
131
|
+
seizeAsset: Address;
|
|
132
|
+
borrower: Address;
|
|
133
|
+
response: Address;
|
|
134
|
+
deadline?: number;
|
|
135
|
+
forwardPayload?: Slice;
|
|
136
|
+
}): Cell;
|
|
137
|
+
static assetConfigToCell(assetConfig: AssetConfig): Cell;
|
|
138
|
+
static createGasFeeConfig(supplyFee: bigint, withdrawFee: bigint, borrowFee: bigint, repayFee: bigint, liquidateFee: bigint, account_status_update: bigint, jetton_transfer: bigint, oracle_calculate: bigint, interest_rate_update: bigint): Cell;
|
|
139
|
+
sendMsgBody(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
140
|
+
body: Cell;
|
|
141
|
+
}): Promise<void>;
|
|
142
|
+
sendWithdraw(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
143
|
+
asset: Address;
|
|
144
|
+
amount: bigint;
|
|
145
|
+
recipient: Address;
|
|
146
|
+
response?: Address;
|
|
147
|
+
isShare: boolean;
|
|
148
|
+
oracleParams?: Cell;
|
|
149
|
+
deadline?: number;
|
|
150
|
+
queryID?: number;
|
|
151
|
+
forwardPayload?: Slice;
|
|
152
|
+
}): Promise<void>;
|
|
153
|
+
sendBorrow(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
154
|
+
asset: Address;
|
|
155
|
+
amount: bigint;
|
|
156
|
+
recipient: Address;
|
|
157
|
+
response?: Address;
|
|
158
|
+
isShare: boolean;
|
|
159
|
+
oracleParams: Cell;
|
|
160
|
+
deadline?: number;
|
|
161
|
+
queryID?: number;
|
|
162
|
+
forwardPayload?: Slice;
|
|
163
|
+
}): Promise<void>;
|
|
164
|
+
sendInitialize(provider: ContractProvider, via: Sender, opts: {
|
|
165
|
+
value: bigint;
|
|
166
|
+
queryID?: number;
|
|
167
|
+
}): Promise<void>;
|
|
168
|
+
sendAccrueInterest(provider: ContractProvider, via: Sender, opts: {
|
|
169
|
+
asset: Address;
|
|
170
|
+
value: bigint;
|
|
171
|
+
queryID?: number;
|
|
172
|
+
}): Promise<void>;
|
|
173
|
+
sendExecuteAction(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
174
|
+
forwardPayload: Builder;
|
|
175
|
+
queryID?: number;
|
|
176
|
+
}): Promise<void>;
|
|
177
|
+
sendSetOracle(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
178
|
+
oracle?: Address;
|
|
179
|
+
queryID?: number;
|
|
180
|
+
}): Promise<void>;
|
|
181
|
+
sendSetOracleConfig(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
182
|
+
oracleConfig: Cell;
|
|
183
|
+
queryID?: number;
|
|
184
|
+
}): Promise<void>;
|
|
185
|
+
sendAddAsset(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
186
|
+
asset: Address;
|
|
187
|
+
queryID?: number;
|
|
188
|
+
assetConfig: Cell;
|
|
189
|
+
}): Promise<void>;
|
|
190
|
+
sendUpgradeCode(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
191
|
+
queryID?: number;
|
|
192
|
+
newCode: Cell;
|
|
193
|
+
}): Promise<void>;
|
|
194
|
+
sendSetGasFee(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
195
|
+
supplyFee: bigint;
|
|
196
|
+
withdrawFee: bigint;
|
|
197
|
+
borrowFee: bigint;
|
|
198
|
+
repayFee: bigint;
|
|
199
|
+
liquidateFee: bigint;
|
|
200
|
+
asuFee: bigint;
|
|
201
|
+
jtFee: bigint;
|
|
202
|
+
ocFee: bigint;
|
|
203
|
+
iruFee: bigint;
|
|
204
|
+
queryID?: number;
|
|
205
|
+
}): Promise<void>;
|
|
206
|
+
sendProvideAsset(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
207
|
+
asset: Address;
|
|
208
|
+
queryID?: number;
|
|
209
|
+
}): Promise<void>;
|
|
210
|
+
sendSetProtocolFeeRate(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
211
|
+
rate: bigint;
|
|
212
|
+
queryID?: number;
|
|
213
|
+
}): Promise<void>;
|
|
214
|
+
sendSetMaxLoanLeverageRatio(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
215
|
+
rate: bigint;
|
|
216
|
+
queryID?: number;
|
|
217
|
+
}): Promise<void>;
|
|
218
|
+
sendSetMaxLoanVarRatio(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
219
|
+
rate: bigint;
|
|
220
|
+
queryID?: number;
|
|
221
|
+
}): Promise<void>;
|
|
222
|
+
sendSetLiquidateLeverageRatio(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
223
|
+
rate: bigint;
|
|
224
|
+
queryID?: number;
|
|
225
|
+
}): Promise<void>;
|
|
226
|
+
sendSetLiquidateVarRatio(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
227
|
+
rate: bigint;
|
|
228
|
+
queryID?: number;
|
|
229
|
+
}): Promise<void>;
|
|
230
|
+
sendSetLiquidateCloseRatio(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
231
|
+
minCloseRatio: bigint;
|
|
232
|
+
maxCloseRatio: bigint;
|
|
233
|
+
queryID?: number;
|
|
234
|
+
}): Promise<void>;
|
|
235
|
+
sendSetWalletAddress(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
236
|
+
asset: Address;
|
|
237
|
+
wallet: Address;
|
|
238
|
+
queryID?: number;
|
|
239
|
+
}): Promise<void>;
|
|
240
|
+
sendCollectFee(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
241
|
+
assetAddress: Address;
|
|
242
|
+
amount: bigint;
|
|
243
|
+
recipientAddress: Address;
|
|
244
|
+
queryID?: number;
|
|
245
|
+
}): Promise<void>;
|
|
246
|
+
sendSetIrmConfig(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
247
|
+
assetAddress: Address;
|
|
248
|
+
irmConfig: Cell;
|
|
249
|
+
recipientAddress: Address;
|
|
250
|
+
queryID?: number;
|
|
251
|
+
}): Promise<void>;
|
|
252
|
+
sendSetLiquidateionIncentiveRate(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
253
|
+
assetAddress: Address;
|
|
254
|
+
lir: bigint;
|
|
255
|
+
queryID?: number;
|
|
256
|
+
}): Promise<void>;
|
|
257
|
+
sendSetIsBorrowable(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
258
|
+
assetAddress: Address;
|
|
259
|
+
isBorrowable: boolean;
|
|
260
|
+
queryID?: number;
|
|
261
|
+
}): Promise<void>;
|
|
262
|
+
sendSetIsCollateral(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
263
|
+
assetAddress: Address;
|
|
264
|
+
isCollateral: boolean;
|
|
265
|
+
queryID?: number;
|
|
266
|
+
}): Promise<void>;
|
|
267
|
+
sendSetNewAccountCode(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
268
|
+
newAccountCode: Cell;
|
|
269
|
+
queryID?: number;
|
|
270
|
+
}): Promise<void>;
|
|
271
|
+
sendSetVersion(provider: ContractProvider, via: Sender, value: bigint, opts: {
|
|
272
|
+
version: number;
|
|
273
|
+
queryID?: number;
|
|
274
|
+
}): Promise<void>;
|
|
275
|
+
getState(provider: ContractProvider): Promise<import("@ton/core").ContractState>;
|
|
276
|
+
getPoolData(provider: ContractProvider): Promise<{
|
|
277
|
+
initialized: boolean;
|
|
278
|
+
id: bigint;
|
|
279
|
+
owner: Address | import("@ton/core").ExternalAddress | null;
|
|
280
|
+
feeConfigurer: Address | import("@ton/core").ExternalAddress | null;
|
|
281
|
+
protocolFeeRate: bigint;
|
|
282
|
+
oracle: Address | import("@ton/core").ExternalAddress | null;
|
|
283
|
+
oracleConfig: Cell;
|
|
284
|
+
maxLoanLeverageRatio: bigint;
|
|
285
|
+
maxLoanVarRatio: bigint;
|
|
286
|
+
liquidateLeverageRatio: bigint;
|
|
287
|
+
liquidateVarRatio: bigint;
|
|
288
|
+
minLiquidateCloseRatio: bigint;
|
|
289
|
+
maxLiquidateCloseRatio: bigint;
|
|
290
|
+
assets: any;
|
|
291
|
+
gasCell: Cell;
|
|
292
|
+
getAsset: (value: Address | Contract) => any;
|
|
293
|
+
}>;
|
|
294
|
+
getPoolDataWithGetMethod(provider: ContractProvider): Promise<{
|
|
295
|
+
initialized: boolean;
|
|
296
|
+
id: bigint;
|
|
297
|
+
owner: Address | null;
|
|
298
|
+
feeConfigurer: Address | null;
|
|
299
|
+
protocolFeeRate: bigint;
|
|
300
|
+
oracle: Address | null;
|
|
301
|
+
oracleConfig: Cell | null;
|
|
302
|
+
maxLoanLeverageRatio: bigint;
|
|
303
|
+
maxLoanVarRatio: bigint;
|
|
304
|
+
liquidateLeverageRatio: bigint;
|
|
305
|
+
liquidateVarRatio: bigint;
|
|
306
|
+
minLiquidateCloseRatio: bigint;
|
|
307
|
+
maxLiquidateCloseRatio: bigint;
|
|
308
|
+
assets: Record<string, any>;
|
|
309
|
+
gasCell: Cell | null;
|
|
310
|
+
getAsset: (value: Address | Contract) => any;
|
|
311
|
+
}>;
|
|
312
|
+
getAccountAddress(provider: ContractProvider, owner: Address): Promise<Address>;
|
|
313
|
+
static createSetOwnerMsgBody(opts: {
|
|
314
|
+
newOwner: Address;
|
|
315
|
+
queryID?: number;
|
|
316
|
+
}): Cell;
|
|
317
|
+
static parseSetOwnerMsgBody(cell: Cell): {
|
|
318
|
+
op: number;
|
|
319
|
+
queryID: number;
|
|
320
|
+
newOwner: Address;
|
|
321
|
+
};
|
|
322
|
+
static createSetFeeConfigurerMsgBody(opts: {
|
|
323
|
+
newFeeConfigurer: Address;
|
|
324
|
+
queryID?: number;
|
|
325
|
+
}): Cell;
|
|
326
|
+
static parseSetFeeConfigurerMsgBody(cell: Cell): {
|
|
327
|
+
op: number;
|
|
328
|
+
queryID: number;
|
|
329
|
+
newFeeConfigurer: Address;
|
|
330
|
+
};
|
|
331
|
+
static createSetRiskFactorMsgBody(opts: {
|
|
332
|
+
asset: Address;
|
|
333
|
+
riskFactor: bigint;
|
|
334
|
+
queryID?: number;
|
|
335
|
+
}): Cell;
|
|
336
|
+
static parseSetRiskFactorMsgBody(cell: Cell): {
|
|
337
|
+
op: number;
|
|
338
|
+
queryID: number;
|
|
339
|
+
asset: Address;
|
|
340
|
+
riskFactor: bigint;
|
|
341
|
+
};
|
|
342
|
+
static createSetOracleMsgBody(opts: {
|
|
343
|
+
oracle?: Address;
|
|
344
|
+
queryID?: number;
|
|
345
|
+
}): Cell;
|
|
346
|
+
static parseSetOracleMsgBody(cell: Cell): {
|
|
347
|
+
op: number;
|
|
348
|
+
queryID: number;
|
|
349
|
+
oracle: Address;
|
|
350
|
+
};
|
|
351
|
+
static createSetOracleConfigMsgBody(opts: {
|
|
352
|
+
oracleConfig: Cell;
|
|
353
|
+
queryID?: number;
|
|
354
|
+
}): Cell;
|
|
355
|
+
static parseSetOracleConfigMsgBody(cell: Cell): {
|
|
356
|
+
op: number;
|
|
357
|
+
queryID: number;
|
|
358
|
+
oracleConfig: Cell;
|
|
359
|
+
};
|
|
360
|
+
static createSetGasFeeMsgBody(opts: {
|
|
361
|
+
supplyFee: bigint;
|
|
362
|
+
withdrawFee: bigint;
|
|
363
|
+
borrowFee: bigint;
|
|
364
|
+
repayFee: bigint;
|
|
365
|
+
liquidateFee: bigint;
|
|
366
|
+
asuFee: bigint;
|
|
367
|
+
jtFee: bigint;
|
|
368
|
+
ocFee: bigint;
|
|
369
|
+
iruFee: bigint;
|
|
370
|
+
queryID?: number;
|
|
371
|
+
}): Cell;
|
|
372
|
+
static parseSetGasFeeMsgBody(cell: Cell): {
|
|
373
|
+
op: number;
|
|
374
|
+
queryID: number;
|
|
375
|
+
supplyFee: bigint;
|
|
376
|
+
withdrawFee: bigint;
|
|
377
|
+
borrowFee: bigint;
|
|
378
|
+
repayFee: bigint;
|
|
379
|
+
liquidateFee: bigint;
|
|
380
|
+
asuFee: bigint;
|
|
381
|
+
jtFee: bigint;
|
|
382
|
+
ocFee: bigint;
|
|
383
|
+
iruFee: bigint;
|
|
384
|
+
};
|
|
385
|
+
static createSetProtocolFeeRateMsgBody(opts: {
|
|
386
|
+
rate: bigint;
|
|
387
|
+
queryID?: number;
|
|
388
|
+
}): Cell;
|
|
389
|
+
static parseSetProtocolFeeRateMsgBody(cell: Cell): {
|
|
390
|
+
op: number;
|
|
391
|
+
queryID: number;
|
|
392
|
+
rate: bigint;
|
|
393
|
+
};
|
|
394
|
+
static createAddAssetMsgBody(opts: {
|
|
395
|
+
asset: Address;
|
|
396
|
+
assetConfig: Cell;
|
|
397
|
+
queryID?: number;
|
|
398
|
+
}): Cell;
|
|
399
|
+
static parseAddAssetMsgBody(cell: Cell): {
|
|
400
|
+
op: number;
|
|
401
|
+
queryID: number;
|
|
402
|
+
asset: Address;
|
|
403
|
+
assetConfig: Cell;
|
|
404
|
+
};
|
|
405
|
+
static createSetIsBorrowableMsgBody(opts: {
|
|
406
|
+
assetAddress: Address;
|
|
407
|
+
isBorrowable: boolean;
|
|
408
|
+
queryID?: number;
|
|
409
|
+
}): Cell;
|
|
410
|
+
static parseSetIsBorrowableMsgBody(cell: Cell): {
|
|
411
|
+
op: number;
|
|
412
|
+
queryID: number;
|
|
413
|
+
assetAddress: Address;
|
|
414
|
+
isBorrowable: boolean;
|
|
415
|
+
};
|
|
416
|
+
static createSetIsCollateralMsgBody(opts: {
|
|
417
|
+
assetAddress: Address;
|
|
418
|
+
isCollateral: boolean;
|
|
419
|
+
queryID?: number;
|
|
420
|
+
}): Cell;
|
|
421
|
+
static parseSetIsCollateralMsgBody(cell: Cell): {
|
|
422
|
+
op: number;
|
|
423
|
+
queryID: number;
|
|
424
|
+
assetAddress: Address;
|
|
425
|
+
isCollateral: boolean;
|
|
426
|
+
};
|
|
427
|
+
static createSetNewAccountCodeMsgBody(opts: {
|
|
428
|
+
newAccountCode: Cell;
|
|
429
|
+
queryID?: number;
|
|
430
|
+
}): Cell;
|
|
431
|
+
static parseSetNewAccountCodeMsgBody(cell: Cell): {
|
|
432
|
+
op: number;
|
|
433
|
+
queryID: number;
|
|
434
|
+
newAccountCode: Cell;
|
|
435
|
+
};
|
|
436
|
+
static createSetVersionMsgBody(opts: {
|
|
437
|
+
version: number;
|
|
438
|
+
queryID?: number;
|
|
439
|
+
}): Cell;
|
|
440
|
+
static parseSetVersionMsgBody(cell: Cell): {
|
|
441
|
+
op: number;
|
|
442
|
+
queryID: number;
|
|
443
|
+
version: number;
|
|
444
|
+
};
|
|
445
|
+
static createSetLiquidationIncentiveRateMsgBody(opts: {
|
|
446
|
+
assetAddress: Address;
|
|
447
|
+
lir: bigint;
|
|
448
|
+
queryID?: number;
|
|
449
|
+
}): Cell;
|
|
450
|
+
static parseSetLiquidationIncentiveRateMsgBody(cell: Cell): {
|
|
451
|
+
op: number;
|
|
452
|
+
queryID: number;
|
|
453
|
+
assetAddress: Address;
|
|
454
|
+
lir: bigint;
|
|
455
|
+
};
|
|
456
|
+
static createSetMaxLoanLeverageRatioMsgBody(opts: {
|
|
457
|
+
rate: bigint;
|
|
458
|
+
queryID?: number;
|
|
459
|
+
}): Cell;
|
|
460
|
+
static parseSetMaxLoanLeverageRatioMsgBody(cell: Cell): {
|
|
461
|
+
op: number;
|
|
462
|
+
queryID: number;
|
|
463
|
+
rate: bigint;
|
|
464
|
+
};
|
|
465
|
+
static createSetMaxLoanVarRatioMsgBody(opts: {
|
|
466
|
+
rate: bigint;
|
|
467
|
+
queryID?: number;
|
|
468
|
+
}): Cell;
|
|
469
|
+
static parseSetMaxLoanVarRatioMsgBody(cell: Cell): {
|
|
470
|
+
op: number;
|
|
471
|
+
queryID: number;
|
|
472
|
+
rate: bigint;
|
|
473
|
+
};
|
|
474
|
+
static createSetLiquidateLeverageRatioMsgBody(opts: {
|
|
475
|
+
rate: bigint;
|
|
476
|
+
queryID?: number;
|
|
477
|
+
}): Cell;
|
|
478
|
+
static parseSetLiquidateLeverageRatioMsgBody(cell: Cell): {
|
|
479
|
+
op: number;
|
|
480
|
+
queryID: number;
|
|
481
|
+
rate: bigint;
|
|
482
|
+
};
|
|
483
|
+
static createSetLiquidateVarRatioMsgBody(opts: {
|
|
484
|
+
rate: bigint;
|
|
485
|
+
queryID?: number;
|
|
486
|
+
}): Cell;
|
|
487
|
+
static parseSetLiquidateVarRatioMsgBody(cell: Cell): {
|
|
488
|
+
op: number;
|
|
489
|
+
queryID: number;
|
|
490
|
+
rate: bigint;
|
|
491
|
+
};
|
|
492
|
+
static createSetLiquidateCloseRatioMsgBody(opts: {
|
|
493
|
+
minCloseRatio: bigint;
|
|
494
|
+
maxCloseRatio: bigint;
|
|
495
|
+
queryID?: number;
|
|
496
|
+
}): Cell;
|
|
497
|
+
static parseSetLiquidateCloseRatioMsgBody(cell: Cell): {
|
|
498
|
+
op: number;
|
|
499
|
+
queryID: number;
|
|
500
|
+
minCloseRatio: bigint;
|
|
501
|
+
maxCloseRatio: bigint;
|
|
502
|
+
};
|
|
503
|
+
static createSetIrmConfigMsgBody(opts: {
|
|
504
|
+
assetAddress: Address;
|
|
505
|
+
irmConfig: Cell;
|
|
506
|
+
queryID?: number;
|
|
507
|
+
}): Cell;
|
|
508
|
+
static parseSetIrmConfigMsgBody(cell: Cell): {
|
|
509
|
+
op: number;
|
|
510
|
+
queryID: number;
|
|
511
|
+
assetAddress: Address;
|
|
512
|
+
irmConfig: Cell;
|
|
513
|
+
};
|
|
514
|
+
static createSetWalletAddressMsgBody(opts: {
|
|
515
|
+
asset: Address;
|
|
516
|
+
wallet: Address;
|
|
517
|
+
queryID?: number;
|
|
518
|
+
}): Cell;
|
|
519
|
+
static parseSetWalletAddressMsgBody(cell: Cell): {
|
|
520
|
+
op: number;
|
|
521
|
+
queryID: number;
|
|
522
|
+
asset: Address;
|
|
523
|
+
wallet: Address;
|
|
524
|
+
};
|
|
525
|
+
static createCollectFeeMsgBody(opts: {
|
|
526
|
+
assetAddress: Address;
|
|
527
|
+
amount: bigint;
|
|
528
|
+
recipientAddress: Address;
|
|
529
|
+
queryID?: number;
|
|
530
|
+
}): Cell;
|
|
531
|
+
static parseCollectFeeMsgBody(cell: Cell): {
|
|
532
|
+
op: number;
|
|
533
|
+
queryID: number;
|
|
534
|
+
assetAddress: Address;
|
|
535
|
+
amount: bigint;
|
|
536
|
+
recipientAddress: Address;
|
|
537
|
+
};
|
|
538
|
+
static createUpgradeCodeMsgBody(opts: {
|
|
539
|
+
newCode: Cell;
|
|
540
|
+
queryID?: number;
|
|
541
|
+
}): Cell;
|
|
542
|
+
static parseUpgradeCodeMsgBody(cell: Cell): {
|
|
543
|
+
op: number;
|
|
544
|
+
queryID: number;
|
|
545
|
+
newCode: Cell;
|
|
546
|
+
};
|
|
547
|
+
static Dictiory: {
|
|
548
|
+
Values: {
|
|
549
|
+
Asset: () => {
|
|
550
|
+
serialize: (src: any, builder: Builder) => void;
|
|
551
|
+
parse: (src: Slice) => any;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
static getOpName(opCode: number): string;
|
|
556
|
+
static getErrorName(errorCode: number): string;
|
|
557
|
+
static getAvailableActions(): string[];
|
|
558
|
+
static getAvailableActionsOriginal(): string[];
|
|
559
|
+
}
|