@t2000/sdk 0.8.7 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -24
- package/dist/adapters/index.cjs +0 -18
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.js +0 -18
- package/dist/adapters/index.js.map +1 -1
- package/dist/{index-DNjooNFy.d.cts → index-C7W686z2.d.cts} +1 -4
- package/dist/{index-DNjooNFy.d.ts → index-C7W686z2.d.ts} +1 -4
- package/dist/index.cjs +208 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -41
- package/dist/index.d.ts +10 -41
- package/dist/index.js +209 -95
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
3
3
|
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
4
|
-
import { T as T2000Options, S as SendResult, B as BalanceResponse, a as TransactionRecord, D as DepositInfo, L as LendingAdapter, b as SwapAdapter, c as SaveResult, W as WithdrawResult, M as MaxWithdrawResult, d as BorrowResult, R as RepayResult, e as MaxBorrowResult, H as HealthFactorResult,
|
|
5
|
-
export { A as AdapterCapability,
|
|
4
|
+
import { T as T2000Options, S as SendResult, B as BalanceResponse, a as TransactionRecord, D as DepositInfo, L as LendingAdapter, b as SwapAdapter, c as SaveResult, W as WithdrawResult, M as MaxWithdrawResult, d as BorrowResult, R as RepayResult, e as MaxBorrowResult, H as HealthFactorResult, P as PositionsResult, f as RatesResult, g as LendingRates, h as RebalanceResult, E as EarningsResult, F as FundStatusResult, i as SentinelAgent, j as SentinelAttackResult, G as GasMethod } from './index-C7W686z2.cjs';
|
|
5
|
+
export { A as AdapterCapability, k as AdapterPositions, l as AdapterTxResult, m as AssetRates, C as CetusAdapter, n as GasReserve, o as HealthInfo, N as NaviAdapter, p as PositionEntry, q as ProtocolDescriptor, r as ProtocolRegistry, s as RebalanceStep, t as SentinelVerdict, u as SuilendAdapter, v as SwapQuote, w as SwapResult, x as allDescriptors, y as cetusDescriptor, z as getSentinelInfo, I as listSentinels, J as naviDescriptor, K as requestAttack, O as sentinelAttack, Q as sentinelDescriptor, U as settleAttack, V as submitPrompt, X as suilendDescriptor } from './index-C7W686z2.cjs';
|
|
6
6
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
7
7
|
|
|
8
|
-
type T2000ErrorCode = 'INSUFFICIENT_BALANCE' | 'INSUFFICIENT_GAS' | 'INVALID_ADDRESS' | 'INVALID_AMOUNT' | 'WALLET_NOT_FOUND' | 'WALLET_LOCKED' | 'WALLET_EXISTS' | 'SPONSOR_FAILED' | 'SPONSOR_RATE_LIMITED' | 'GAS_STATION_UNAVAILABLE' | 'GAS_FEE_EXCEEDED' | 'SIMULATION_FAILED' | 'TRANSACTION_FAILED' | 'ASSET_NOT_SUPPORTED' | 'SLIPPAGE_EXCEEDED' | 'HEALTH_FACTOR_TOO_LOW' | 'WITHDRAW_WOULD_LIQUIDATE' | 'NO_COLLATERAL' | 'PROTOCOL_PAUSED' | 'PROTOCOL_UNAVAILABLE' | 'RPC_ERROR' | 'RPC_UNREACHABLE' | 'SPONSOR_UNAVAILABLE' | 'AUTO_TOPUP_FAILED' | 'PRICE_EXCEEDS_LIMIT' | 'UNSUPPORTED_NETWORK' | 'PAYMENT_EXPIRED' | 'DUPLICATE_PAYMENT' | 'FACILITATOR_REJECTION' | 'FACILITATOR_TIMEOUT' | 'SENTINEL_API_ERROR' | 'SENTINEL_NOT_FOUND' | 'SENTINEL_TX_FAILED' | 'SENTINEL_TEE_ERROR' | 'UNKNOWN';
|
|
8
|
+
type T2000ErrorCode = 'INSUFFICIENT_BALANCE' | 'INSUFFICIENT_GAS' | 'INVALID_ADDRESS' | 'INVALID_AMOUNT' | 'WALLET_NOT_FOUND' | 'WALLET_LOCKED' | 'WALLET_EXISTS' | 'SPONSOR_FAILED' | 'SPONSOR_RATE_LIMITED' | 'GAS_STATION_UNAVAILABLE' | 'GAS_FEE_EXCEEDED' | 'SIMULATION_FAILED' | 'TRANSACTION_FAILED' | 'ASSET_NOT_SUPPORTED' | 'SWAP_FAILED' | 'SLIPPAGE_EXCEEDED' | 'HEALTH_FACTOR_TOO_LOW' | 'WITHDRAW_WOULD_LIQUIDATE' | 'NO_COLLATERAL' | 'PROTOCOL_PAUSED' | 'PROTOCOL_UNAVAILABLE' | 'RPC_ERROR' | 'RPC_UNREACHABLE' | 'SPONSOR_UNAVAILABLE' | 'AUTO_TOPUP_FAILED' | 'PRICE_EXCEEDS_LIMIT' | 'UNSUPPORTED_NETWORK' | 'PAYMENT_EXPIRED' | 'DUPLICATE_PAYMENT' | 'FACILITATOR_REJECTION' | 'FACILITATOR_TIMEOUT' | 'SENTINEL_API_ERROR' | 'SENTINEL_NOT_FOUND' | 'SENTINEL_TX_FAILED' | 'SENTINEL_TEE_ERROR' | 'UNKNOWN';
|
|
9
9
|
interface T2000ErrorData {
|
|
10
10
|
reason?: string;
|
|
11
11
|
[key: string]: unknown;
|
|
@@ -102,48 +102,30 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
102
102
|
registerAdapter(adapter: LendingAdapter | SwapAdapter): Promise<void>;
|
|
103
103
|
save(params: {
|
|
104
104
|
amount: number | 'all';
|
|
105
|
-
asset?: string;
|
|
106
105
|
protocol?: string;
|
|
107
106
|
}): Promise<SaveResult>;
|
|
108
107
|
withdraw(params: {
|
|
109
108
|
amount: number | 'all';
|
|
110
|
-
asset?: string;
|
|
111
109
|
protocol?: string;
|
|
112
110
|
}): Promise<WithdrawResult>;
|
|
113
111
|
private withdrawAllProtocols;
|
|
112
|
+
private _swapToUsdc;
|
|
113
|
+
private _swapFromUsdc;
|
|
114
|
+
private _convertWalletStablesToUsdc;
|
|
114
115
|
maxWithdraw(): Promise<MaxWithdrawResult>;
|
|
115
116
|
borrow(params: {
|
|
116
117
|
amount: number;
|
|
117
|
-
asset?: string;
|
|
118
118
|
protocol?: string;
|
|
119
119
|
}): Promise<BorrowResult>;
|
|
120
120
|
repay(params: {
|
|
121
121
|
amount: number | 'all';
|
|
122
|
-
asset?: string;
|
|
123
122
|
protocol?: string;
|
|
124
123
|
}): Promise<RepayResult>;
|
|
124
|
+
private _repayAllBorrows;
|
|
125
125
|
maxBorrow(): Promise<MaxBorrowResult>;
|
|
126
126
|
healthFactor(): Promise<HealthFactorResult>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
to: string;
|
|
130
|
-
amount: number;
|
|
131
|
-
maxSlippage?: number;
|
|
132
|
-
protocol?: string;
|
|
133
|
-
}): Promise<SwapResult>;
|
|
134
|
-
swapQuote(params: {
|
|
135
|
-
from: string;
|
|
136
|
-
to: string;
|
|
137
|
-
amount: number;
|
|
138
|
-
}): Promise<{
|
|
139
|
-
expectedOutput: number;
|
|
140
|
-
priceImpact: number;
|
|
141
|
-
poolPrice: number;
|
|
142
|
-
fee: {
|
|
143
|
-
amount: number;
|
|
144
|
-
rate: number;
|
|
145
|
-
};
|
|
146
|
-
}>;
|
|
127
|
+
private _swap;
|
|
128
|
+
private _swapQuote;
|
|
147
129
|
positions(): Promise<PositionsResult>;
|
|
148
130
|
rates(): Promise<RatesResult>;
|
|
149
131
|
allRates(asset?: string): Promise<{
|
|
@@ -209,8 +191,6 @@ declare const SUPPORTED_ASSETS: {
|
|
|
209
191
|
};
|
|
210
192
|
};
|
|
211
193
|
type SupportedAsset = keyof typeof SUPPORTED_ASSETS;
|
|
212
|
-
type StableAsset = Exclude<SupportedAsset, 'SUI'>;
|
|
213
|
-
declare const STABLE_ASSETS: readonly StableAsset[];
|
|
214
194
|
declare const DEFAULT_NETWORK: "mainnet";
|
|
215
195
|
declare const SENTINEL: {
|
|
216
196
|
readonly PACKAGE: "0x88b83f36dafcd5f6dcdcf1d2cb5889b03f61264ab3cee9cae35db7aa940a21b7";
|
|
@@ -236,12 +216,6 @@ declare function rawToStable(raw: bigint, decimals: number): number;
|
|
|
236
216
|
declare function getDecimals(asset: SupportedAsset): number;
|
|
237
217
|
declare function formatUsd(amount: number): string;
|
|
238
218
|
declare function formatSui(amount: number): string;
|
|
239
|
-
/**
|
|
240
|
-
* Case-insensitive lookup against SUPPORTED_ASSETS keys AND display names.
|
|
241
|
-
* 'usde' → 'USDe', 'suiusde' → 'USDe', 'suiusdt' → 'USDT', 'usdsui' → 'USDsui'.
|
|
242
|
-
* Returns the original input if not found so downstream validation can reject it.
|
|
243
|
-
*/
|
|
244
|
-
declare function normalizeAsset(input: string): string;
|
|
245
219
|
|
|
246
220
|
declare function generateKeypair(): Ed25519Keypair;
|
|
247
221
|
declare function keypairFromPrivateKey(privateKey: string): Ed25519Keypair;
|
|
@@ -282,11 +256,6 @@ declare function simulateTransaction(client: SuiJsonRpcClient, tx: Transaction,
|
|
|
282
256
|
declare function throwIfSimulationFailed(sim: SimulationResult): void;
|
|
283
257
|
|
|
284
258
|
declare function getPoolPrice(client: SuiJsonRpcClient): Promise<number>;
|
|
285
|
-
declare function getSwapQuote(client: SuiJsonRpcClient, fromAsset: string, toAsset: string, amount: number): Promise<{
|
|
286
|
-
expectedOutput: number;
|
|
287
|
-
priceImpact: number;
|
|
288
|
-
poolPrice: number;
|
|
289
|
-
}>;
|
|
290
259
|
|
|
291
260
|
declare function getRates(client: SuiJsonRpcClient): Promise<RatesResult>;
|
|
292
261
|
|
|
@@ -329,4 +298,4 @@ interface GasStatusResponse {
|
|
|
329
298
|
}
|
|
330
299
|
declare function getGasStatus(address?: string): Promise<GasStatusResponse>;
|
|
331
300
|
|
|
332
|
-
export { type AutoTopUpResult, BPS_DENOMINATOR, BalanceResponse, BorrowResult, CLOCK_ID, DEFAULT_NETWORK, DepositInfo, EarningsResult, type FeeOperation, FundStatusResult, type GasExecutionResult, GasMethod, type GasRequestType, type GasSponsorResponse, type GasStatusResponse, HealthFactorResult, LendingAdapter, LendingRates, MIST_PER_SUI, MaxBorrowResult, MaxWithdrawResult, PositionsResult, type ProtocolFeeInfo, RatesResult, RebalanceResult, RepayResult, SENTINEL,
|
|
301
|
+
export { type AutoTopUpResult, BPS_DENOMINATOR, BalanceResponse, BorrowResult, CLOCK_ID, DEFAULT_NETWORK, DepositInfo, EarningsResult, type FeeOperation, FundStatusResult, type GasExecutionResult, GasMethod, type GasRequestType, type GasSponsorResponse, type GasStatusResponse, HealthFactorResult, LendingAdapter, LendingRates, MIST_PER_SUI, MaxBorrowResult, MaxWithdrawResult, PositionsResult, type ProtocolFeeInfo, RatesResult, RebalanceResult, RepayResult, SENTINEL, SUI_DECIMALS, SUPPORTED_ASSETS, SaveResult, SendResult, SentinelAgent, SentinelAttackResult, type SimulationResult, type SupportedAsset, SwapAdapter, T2000, T2000Error, type T2000ErrorCode, type T2000ErrorData, T2000Options, TransactionRecord, USDC_DECIMALS, WithdrawResult, addCollectFeeToTx, calculateFee, executeAutoTopUp, executeWithGas, exportPrivateKey, formatSui, formatUsd, generateKeypair, getAddress, getDecimals, getGasStatus, getPoolPrice, getRates, keypairFromPrivateKey, loadKey, mapMoveAbortCode, mapWalletError, mistToSui, rawToStable, rawToUsdc, saveKey, shouldAutoTopUp, simulateTransaction, solveHashcash, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, walletExists };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
3
3
|
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
4
|
-
import { T as T2000Options, S as SendResult, B as BalanceResponse, a as TransactionRecord, D as DepositInfo, L as LendingAdapter, b as SwapAdapter, c as SaveResult, W as WithdrawResult, M as MaxWithdrawResult, d as BorrowResult, R as RepayResult, e as MaxBorrowResult, H as HealthFactorResult,
|
|
5
|
-
export { A as AdapterCapability,
|
|
4
|
+
import { T as T2000Options, S as SendResult, B as BalanceResponse, a as TransactionRecord, D as DepositInfo, L as LendingAdapter, b as SwapAdapter, c as SaveResult, W as WithdrawResult, M as MaxWithdrawResult, d as BorrowResult, R as RepayResult, e as MaxBorrowResult, H as HealthFactorResult, P as PositionsResult, f as RatesResult, g as LendingRates, h as RebalanceResult, E as EarningsResult, F as FundStatusResult, i as SentinelAgent, j as SentinelAttackResult, G as GasMethod } from './index-C7W686z2.js';
|
|
5
|
+
export { A as AdapterCapability, k as AdapterPositions, l as AdapterTxResult, m as AssetRates, C as CetusAdapter, n as GasReserve, o as HealthInfo, N as NaviAdapter, p as PositionEntry, q as ProtocolDescriptor, r as ProtocolRegistry, s as RebalanceStep, t as SentinelVerdict, u as SuilendAdapter, v as SwapQuote, w as SwapResult, x as allDescriptors, y as cetusDescriptor, z as getSentinelInfo, I as listSentinels, J as naviDescriptor, K as requestAttack, O as sentinelAttack, Q as sentinelDescriptor, U as settleAttack, V as submitPrompt, X as suilendDescriptor } from './index-C7W686z2.js';
|
|
6
6
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
7
7
|
|
|
8
|
-
type T2000ErrorCode = 'INSUFFICIENT_BALANCE' | 'INSUFFICIENT_GAS' | 'INVALID_ADDRESS' | 'INVALID_AMOUNT' | 'WALLET_NOT_FOUND' | 'WALLET_LOCKED' | 'WALLET_EXISTS' | 'SPONSOR_FAILED' | 'SPONSOR_RATE_LIMITED' | 'GAS_STATION_UNAVAILABLE' | 'GAS_FEE_EXCEEDED' | 'SIMULATION_FAILED' | 'TRANSACTION_FAILED' | 'ASSET_NOT_SUPPORTED' | 'SLIPPAGE_EXCEEDED' | 'HEALTH_FACTOR_TOO_LOW' | 'WITHDRAW_WOULD_LIQUIDATE' | 'NO_COLLATERAL' | 'PROTOCOL_PAUSED' | 'PROTOCOL_UNAVAILABLE' | 'RPC_ERROR' | 'RPC_UNREACHABLE' | 'SPONSOR_UNAVAILABLE' | 'AUTO_TOPUP_FAILED' | 'PRICE_EXCEEDS_LIMIT' | 'UNSUPPORTED_NETWORK' | 'PAYMENT_EXPIRED' | 'DUPLICATE_PAYMENT' | 'FACILITATOR_REJECTION' | 'FACILITATOR_TIMEOUT' | 'SENTINEL_API_ERROR' | 'SENTINEL_NOT_FOUND' | 'SENTINEL_TX_FAILED' | 'SENTINEL_TEE_ERROR' | 'UNKNOWN';
|
|
8
|
+
type T2000ErrorCode = 'INSUFFICIENT_BALANCE' | 'INSUFFICIENT_GAS' | 'INVALID_ADDRESS' | 'INVALID_AMOUNT' | 'WALLET_NOT_FOUND' | 'WALLET_LOCKED' | 'WALLET_EXISTS' | 'SPONSOR_FAILED' | 'SPONSOR_RATE_LIMITED' | 'GAS_STATION_UNAVAILABLE' | 'GAS_FEE_EXCEEDED' | 'SIMULATION_FAILED' | 'TRANSACTION_FAILED' | 'ASSET_NOT_SUPPORTED' | 'SWAP_FAILED' | 'SLIPPAGE_EXCEEDED' | 'HEALTH_FACTOR_TOO_LOW' | 'WITHDRAW_WOULD_LIQUIDATE' | 'NO_COLLATERAL' | 'PROTOCOL_PAUSED' | 'PROTOCOL_UNAVAILABLE' | 'RPC_ERROR' | 'RPC_UNREACHABLE' | 'SPONSOR_UNAVAILABLE' | 'AUTO_TOPUP_FAILED' | 'PRICE_EXCEEDS_LIMIT' | 'UNSUPPORTED_NETWORK' | 'PAYMENT_EXPIRED' | 'DUPLICATE_PAYMENT' | 'FACILITATOR_REJECTION' | 'FACILITATOR_TIMEOUT' | 'SENTINEL_API_ERROR' | 'SENTINEL_NOT_FOUND' | 'SENTINEL_TX_FAILED' | 'SENTINEL_TEE_ERROR' | 'UNKNOWN';
|
|
9
9
|
interface T2000ErrorData {
|
|
10
10
|
reason?: string;
|
|
11
11
|
[key: string]: unknown;
|
|
@@ -102,48 +102,30 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
102
102
|
registerAdapter(adapter: LendingAdapter | SwapAdapter): Promise<void>;
|
|
103
103
|
save(params: {
|
|
104
104
|
amount: number | 'all';
|
|
105
|
-
asset?: string;
|
|
106
105
|
protocol?: string;
|
|
107
106
|
}): Promise<SaveResult>;
|
|
108
107
|
withdraw(params: {
|
|
109
108
|
amount: number | 'all';
|
|
110
|
-
asset?: string;
|
|
111
109
|
protocol?: string;
|
|
112
110
|
}): Promise<WithdrawResult>;
|
|
113
111
|
private withdrawAllProtocols;
|
|
112
|
+
private _swapToUsdc;
|
|
113
|
+
private _swapFromUsdc;
|
|
114
|
+
private _convertWalletStablesToUsdc;
|
|
114
115
|
maxWithdraw(): Promise<MaxWithdrawResult>;
|
|
115
116
|
borrow(params: {
|
|
116
117
|
amount: number;
|
|
117
|
-
asset?: string;
|
|
118
118
|
protocol?: string;
|
|
119
119
|
}): Promise<BorrowResult>;
|
|
120
120
|
repay(params: {
|
|
121
121
|
amount: number | 'all';
|
|
122
|
-
asset?: string;
|
|
123
122
|
protocol?: string;
|
|
124
123
|
}): Promise<RepayResult>;
|
|
124
|
+
private _repayAllBorrows;
|
|
125
125
|
maxBorrow(): Promise<MaxBorrowResult>;
|
|
126
126
|
healthFactor(): Promise<HealthFactorResult>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
to: string;
|
|
130
|
-
amount: number;
|
|
131
|
-
maxSlippage?: number;
|
|
132
|
-
protocol?: string;
|
|
133
|
-
}): Promise<SwapResult>;
|
|
134
|
-
swapQuote(params: {
|
|
135
|
-
from: string;
|
|
136
|
-
to: string;
|
|
137
|
-
amount: number;
|
|
138
|
-
}): Promise<{
|
|
139
|
-
expectedOutput: number;
|
|
140
|
-
priceImpact: number;
|
|
141
|
-
poolPrice: number;
|
|
142
|
-
fee: {
|
|
143
|
-
amount: number;
|
|
144
|
-
rate: number;
|
|
145
|
-
};
|
|
146
|
-
}>;
|
|
127
|
+
private _swap;
|
|
128
|
+
private _swapQuote;
|
|
147
129
|
positions(): Promise<PositionsResult>;
|
|
148
130
|
rates(): Promise<RatesResult>;
|
|
149
131
|
allRates(asset?: string): Promise<{
|
|
@@ -209,8 +191,6 @@ declare const SUPPORTED_ASSETS: {
|
|
|
209
191
|
};
|
|
210
192
|
};
|
|
211
193
|
type SupportedAsset = keyof typeof SUPPORTED_ASSETS;
|
|
212
|
-
type StableAsset = Exclude<SupportedAsset, 'SUI'>;
|
|
213
|
-
declare const STABLE_ASSETS: readonly StableAsset[];
|
|
214
194
|
declare const DEFAULT_NETWORK: "mainnet";
|
|
215
195
|
declare const SENTINEL: {
|
|
216
196
|
readonly PACKAGE: "0x88b83f36dafcd5f6dcdcf1d2cb5889b03f61264ab3cee9cae35db7aa940a21b7";
|
|
@@ -236,12 +216,6 @@ declare function rawToStable(raw: bigint, decimals: number): number;
|
|
|
236
216
|
declare function getDecimals(asset: SupportedAsset): number;
|
|
237
217
|
declare function formatUsd(amount: number): string;
|
|
238
218
|
declare function formatSui(amount: number): string;
|
|
239
|
-
/**
|
|
240
|
-
* Case-insensitive lookup against SUPPORTED_ASSETS keys AND display names.
|
|
241
|
-
* 'usde' → 'USDe', 'suiusde' → 'USDe', 'suiusdt' → 'USDT', 'usdsui' → 'USDsui'.
|
|
242
|
-
* Returns the original input if not found so downstream validation can reject it.
|
|
243
|
-
*/
|
|
244
|
-
declare function normalizeAsset(input: string): string;
|
|
245
219
|
|
|
246
220
|
declare function generateKeypair(): Ed25519Keypair;
|
|
247
221
|
declare function keypairFromPrivateKey(privateKey: string): Ed25519Keypair;
|
|
@@ -282,11 +256,6 @@ declare function simulateTransaction(client: SuiJsonRpcClient, tx: Transaction,
|
|
|
282
256
|
declare function throwIfSimulationFailed(sim: SimulationResult): void;
|
|
283
257
|
|
|
284
258
|
declare function getPoolPrice(client: SuiJsonRpcClient): Promise<number>;
|
|
285
|
-
declare function getSwapQuote(client: SuiJsonRpcClient, fromAsset: string, toAsset: string, amount: number): Promise<{
|
|
286
|
-
expectedOutput: number;
|
|
287
|
-
priceImpact: number;
|
|
288
|
-
poolPrice: number;
|
|
289
|
-
}>;
|
|
290
259
|
|
|
291
260
|
declare function getRates(client: SuiJsonRpcClient): Promise<RatesResult>;
|
|
292
261
|
|
|
@@ -329,4 +298,4 @@ interface GasStatusResponse {
|
|
|
329
298
|
}
|
|
330
299
|
declare function getGasStatus(address?: string): Promise<GasStatusResponse>;
|
|
331
300
|
|
|
332
|
-
export { type AutoTopUpResult, BPS_DENOMINATOR, BalanceResponse, BorrowResult, CLOCK_ID, DEFAULT_NETWORK, DepositInfo, EarningsResult, type FeeOperation, FundStatusResult, type GasExecutionResult, GasMethod, type GasRequestType, type GasSponsorResponse, type GasStatusResponse, HealthFactorResult, LendingAdapter, LendingRates, MIST_PER_SUI, MaxBorrowResult, MaxWithdrawResult, PositionsResult, type ProtocolFeeInfo, RatesResult, RebalanceResult, RepayResult, SENTINEL,
|
|
301
|
+
export { type AutoTopUpResult, BPS_DENOMINATOR, BalanceResponse, BorrowResult, CLOCK_ID, DEFAULT_NETWORK, DepositInfo, EarningsResult, type FeeOperation, FundStatusResult, type GasExecutionResult, GasMethod, type GasRequestType, type GasSponsorResponse, type GasStatusResponse, HealthFactorResult, LendingAdapter, LendingRates, MIST_PER_SUI, MaxBorrowResult, MaxWithdrawResult, PositionsResult, type ProtocolFeeInfo, RatesResult, RebalanceResult, RepayResult, SENTINEL, SUI_DECIMALS, SUPPORTED_ASSETS, SaveResult, SendResult, SentinelAgent, SentinelAttackResult, type SimulationResult, type SupportedAsset, SwapAdapter, T2000, T2000Error, type T2000ErrorCode, type T2000ErrorData, T2000Options, TransactionRecord, USDC_DECIMALS, WithdrawResult, addCollectFeeToTx, calculateFee, executeAutoTopUp, executeWithGas, exportPrivateKey, formatSui, formatUsd, generateKeypair, getAddress, getDecimals, getGasStatus, getPoolPrice, getRates, keypairFromPrivateKey, loadKey, mapMoveAbortCode, mapWalletError, mistToSui, rawToStable, rawToUsdc, saveKey, shouldAutoTopUp, simulateTransaction, solveHashcash, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, walletExists };
|