@t2000/sdk 0.21.15 → 0.21.16
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/adapters/index.d.cts +89 -4
- package/dist/adapters/index.d.ts +89 -4
- package/dist/browser.cjs +769 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +11 -0
- package/dist/browser.d.ts +11 -0
- package/dist/index.d.cts +7 -339
- package/dist/index.d.ts +7 -339
- package/dist/token-registry-CVba8FI2.d.ts +341 -0
- package/dist/token-registry-DIl3H4Jh.d.cts +341 -0
- package/dist/{index-BwknZes_.d.ts → types-XWEUAS-X.d.cts} +1 -87
- package/dist/{index-HeR6WZTF.d.cts → types-XWEUAS-X.d.ts} +1 -87
- package/package.json +1 -1
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { L as LendingAdapter, a as LendingRates, b as AdapterPositions, A as AdapterCapability, H as HealthInfo, c as AdapterTxResult, e as PendingReward$1 } from './descriptors-Be4FAgN5.js';
|
|
2
|
-
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
3
|
-
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
4
|
-
|
|
5
1
|
interface T2000Options {
|
|
6
2
|
keyPath?: string;
|
|
7
3
|
/** PIN to decrypt the key file. Accepts any string (4+ chars). */
|
|
@@ -208,86 +204,4 @@ interface PayResult {
|
|
|
208
204
|
};
|
|
209
205
|
}
|
|
210
206
|
|
|
211
|
-
|
|
212
|
-
private lending;
|
|
213
|
-
registerLending(adapter: LendingAdapter): void;
|
|
214
|
-
bestSaveRate(asset: string): Promise<{
|
|
215
|
-
adapter: LendingAdapter;
|
|
216
|
-
rate: LendingRates;
|
|
217
|
-
}>;
|
|
218
|
-
bestBorrowRate(asset: string, opts?: {
|
|
219
|
-
requireSameAssetBorrow?: boolean;
|
|
220
|
-
}): Promise<{
|
|
221
|
-
adapter: LendingAdapter;
|
|
222
|
-
rate: LendingRates;
|
|
223
|
-
}>;
|
|
224
|
-
bestSaveRateAcrossAssets(): Promise<{
|
|
225
|
-
adapter: LendingAdapter;
|
|
226
|
-
rate: LendingRates;
|
|
227
|
-
asset: string;
|
|
228
|
-
}>;
|
|
229
|
-
allRatesAcrossAssets(): Promise<Array<{
|
|
230
|
-
protocol: string;
|
|
231
|
-
protocolId: string;
|
|
232
|
-
asset: string;
|
|
233
|
-
rates: LendingRates;
|
|
234
|
-
}>>;
|
|
235
|
-
allRates(asset: string): Promise<Array<{
|
|
236
|
-
protocol: string;
|
|
237
|
-
protocolId: string;
|
|
238
|
-
rates: LendingRates;
|
|
239
|
-
}>>;
|
|
240
|
-
allPositions(address: string): Promise<Array<{
|
|
241
|
-
protocol: string;
|
|
242
|
-
protocolId: string;
|
|
243
|
-
positions: AdapterPositions;
|
|
244
|
-
}>>;
|
|
245
|
-
getLending(id: string): LendingAdapter | undefined;
|
|
246
|
-
listLending(): LendingAdapter[];
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
declare class NaviAdapter implements LendingAdapter {
|
|
250
|
-
readonly id = "navi";
|
|
251
|
-
readonly name = "NAVI Protocol";
|
|
252
|
-
readonly version = "1.0.0";
|
|
253
|
-
readonly capabilities: readonly AdapterCapability[];
|
|
254
|
-
readonly supportedAssets: readonly string[];
|
|
255
|
-
readonly supportsSameAssetBorrow = true;
|
|
256
|
-
private client;
|
|
257
|
-
init(client: SuiJsonRpcClient): Promise<void>;
|
|
258
|
-
initSync(client: SuiJsonRpcClient): void;
|
|
259
|
-
getRates(asset: string): Promise<LendingRates>;
|
|
260
|
-
getPositions(address: string): Promise<AdapterPositions>;
|
|
261
|
-
getHealth(address: string): Promise<HealthInfo>;
|
|
262
|
-
buildSaveTx(address: string, amount: number, asset: string, options?: {
|
|
263
|
-
collectFee?: boolean;
|
|
264
|
-
sponsored?: boolean;
|
|
265
|
-
}): Promise<AdapterTxResult>;
|
|
266
|
-
buildWithdrawTx(address: string, amount: number, asset: string, options?: {
|
|
267
|
-
sponsored?: boolean;
|
|
268
|
-
}): Promise<AdapterTxResult & {
|
|
269
|
-
effectiveAmount: number;
|
|
270
|
-
}>;
|
|
271
|
-
buildBorrowTx(address: string, amount: number, asset: string, options?: {
|
|
272
|
-
collectFee?: boolean;
|
|
273
|
-
sponsored?: boolean;
|
|
274
|
-
}): Promise<AdapterTxResult>;
|
|
275
|
-
buildRepayTx(address: string, amount: number, asset: string, options?: {
|
|
276
|
-
sponsored?: boolean;
|
|
277
|
-
skipOracle?: boolean;
|
|
278
|
-
}): Promise<AdapterTxResult>;
|
|
279
|
-
maxWithdraw(address: string, _asset: string): Promise<MaxWithdrawResult>;
|
|
280
|
-
maxBorrow(address: string, _asset: string): Promise<MaxBorrowResult>;
|
|
281
|
-
addWithdrawToTx(tx: Transaction, address: string, amount: number, asset: string): Promise<{
|
|
282
|
-
coin: TransactionObjectArgument;
|
|
283
|
-
effectiveAmount: number;
|
|
284
|
-
}>;
|
|
285
|
-
addSaveToTx(tx: Transaction, address: string, coin: TransactionObjectArgument, asset: string, options?: {
|
|
286
|
-
collectFee?: boolean;
|
|
287
|
-
}): Promise<void>;
|
|
288
|
-
addRepayToTx(tx: Transaction, address: string, coin: TransactionObjectArgument, asset: string): Promise<void>;
|
|
289
|
-
getPendingRewards(address: string): Promise<PendingReward$1[]>;
|
|
290
|
-
addClaimRewardsToTx(tx: Transaction, address: string): Promise<PendingReward$1[]>;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export { type AssetRates as A, type BalanceResponse as B, type ClaimRewardsResult as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type MaxWithdrawResult as M, NaviAdapter as N, type PayOptions as P, type RepayResult as R, type StakeVSuiResult as S, type T2000Options as T, type UnstakeVSuiResult as U, type WithdrawResult as W, type PayResult as a, type SwapResult as b, type SwapQuoteResult as c, type SendResult as d, type TransactionRecord as e, type SaveResult as f, type BorrowResult as g, type MaxBorrowResult as h, type PendingReward as i, type PositionsResult as j, type RatesResult as k, type GasReserve as l, type PositionEntry as m, ProtocolRegistry as n };
|
|
207
|
+
export type { AssetRates as A, BalanceResponse as B, ClaimRewardsResult as C, DepositInfo as D, EarningsResult as E, FundStatusResult as F, GasMethod as G, HealthFactorResult as H, MaxBorrowResult as M, PayOptions as P, RatesResult as R, SaveResult as S, TransactionRecord as T, UnstakeVSuiResult as U, WithdrawResult as W, BorrowResult as a, GasReserve as b, MaxWithdrawResult as c, PayResult as d, PendingReward as e, PositionEntry as f, PositionsResult as g, RepayResult as h, SendResult as i, T2000Options as j, StakeVSuiResult as k, SwapResult as l, SwapQuoteResult as m };
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { L as LendingAdapter, a as LendingRates, b as AdapterPositions, A as AdapterCapability, H as HealthInfo, c as AdapterTxResult, e as PendingReward$1 } from './descriptors-Be4FAgN5.cjs';
|
|
2
|
-
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
3
|
-
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
4
|
-
|
|
5
1
|
interface T2000Options {
|
|
6
2
|
keyPath?: string;
|
|
7
3
|
/** PIN to decrypt the key file. Accepts any string (4+ chars). */
|
|
@@ -208,86 +204,4 @@ interface PayResult {
|
|
|
208
204
|
};
|
|
209
205
|
}
|
|
210
206
|
|
|
211
|
-
|
|
212
|
-
private lending;
|
|
213
|
-
registerLending(adapter: LendingAdapter): void;
|
|
214
|
-
bestSaveRate(asset: string): Promise<{
|
|
215
|
-
adapter: LendingAdapter;
|
|
216
|
-
rate: LendingRates;
|
|
217
|
-
}>;
|
|
218
|
-
bestBorrowRate(asset: string, opts?: {
|
|
219
|
-
requireSameAssetBorrow?: boolean;
|
|
220
|
-
}): Promise<{
|
|
221
|
-
adapter: LendingAdapter;
|
|
222
|
-
rate: LendingRates;
|
|
223
|
-
}>;
|
|
224
|
-
bestSaveRateAcrossAssets(): Promise<{
|
|
225
|
-
adapter: LendingAdapter;
|
|
226
|
-
rate: LendingRates;
|
|
227
|
-
asset: string;
|
|
228
|
-
}>;
|
|
229
|
-
allRatesAcrossAssets(): Promise<Array<{
|
|
230
|
-
protocol: string;
|
|
231
|
-
protocolId: string;
|
|
232
|
-
asset: string;
|
|
233
|
-
rates: LendingRates;
|
|
234
|
-
}>>;
|
|
235
|
-
allRates(asset: string): Promise<Array<{
|
|
236
|
-
protocol: string;
|
|
237
|
-
protocolId: string;
|
|
238
|
-
rates: LendingRates;
|
|
239
|
-
}>>;
|
|
240
|
-
allPositions(address: string): Promise<Array<{
|
|
241
|
-
protocol: string;
|
|
242
|
-
protocolId: string;
|
|
243
|
-
positions: AdapterPositions;
|
|
244
|
-
}>>;
|
|
245
|
-
getLending(id: string): LendingAdapter | undefined;
|
|
246
|
-
listLending(): LendingAdapter[];
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
declare class NaviAdapter implements LendingAdapter {
|
|
250
|
-
readonly id = "navi";
|
|
251
|
-
readonly name = "NAVI Protocol";
|
|
252
|
-
readonly version = "1.0.0";
|
|
253
|
-
readonly capabilities: readonly AdapterCapability[];
|
|
254
|
-
readonly supportedAssets: readonly string[];
|
|
255
|
-
readonly supportsSameAssetBorrow = true;
|
|
256
|
-
private client;
|
|
257
|
-
init(client: SuiJsonRpcClient): Promise<void>;
|
|
258
|
-
initSync(client: SuiJsonRpcClient): void;
|
|
259
|
-
getRates(asset: string): Promise<LendingRates>;
|
|
260
|
-
getPositions(address: string): Promise<AdapterPositions>;
|
|
261
|
-
getHealth(address: string): Promise<HealthInfo>;
|
|
262
|
-
buildSaveTx(address: string, amount: number, asset: string, options?: {
|
|
263
|
-
collectFee?: boolean;
|
|
264
|
-
sponsored?: boolean;
|
|
265
|
-
}): Promise<AdapterTxResult>;
|
|
266
|
-
buildWithdrawTx(address: string, amount: number, asset: string, options?: {
|
|
267
|
-
sponsored?: boolean;
|
|
268
|
-
}): Promise<AdapterTxResult & {
|
|
269
|
-
effectiveAmount: number;
|
|
270
|
-
}>;
|
|
271
|
-
buildBorrowTx(address: string, amount: number, asset: string, options?: {
|
|
272
|
-
collectFee?: boolean;
|
|
273
|
-
sponsored?: boolean;
|
|
274
|
-
}): Promise<AdapterTxResult>;
|
|
275
|
-
buildRepayTx(address: string, amount: number, asset: string, options?: {
|
|
276
|
-
sponsored?: boolean;
|
|
277
|
-
skipOracle?: boolean;
|
|
278
|
-
}): Promise<AdapterTxResult>;
|
|
279
|
-
maxWithdraw(address: string, _asset: string): Promise<MaxWithdrawResult>;
|
|
280
|
-
maxBorrow(address: string, _asset: string): Promise<MaxBorrowResult>;
|
|
281
|
-
addWithdrawToTx(tx: Transaction, address: string, amount: number, asset: string): Promise<{
|
|
282
|
-
coin: TransactionObjectArgument;
|
|
283
|
-
effectiveAmount: number;
|
|
284
|
-
}>;
|
|
285
|
-
addSaveToTx(tx: Transaction, address: string, coin: TransactionObjectArgument, asset: string, options?: {
|
|
286
|
-
collectFee?: boolean;
|
|
287
|
-
}): Promise<void>;
|
|
288
|
-
addRepayToTx(tx: Transaction, address: string, coin: TransactionObjectArgument, asset: string): Promise<void>;
|
|
289
|
-
getPendingRewards(address: string): Promise<PendingReward$1[]>;
|
|
290
|
-
addClaimRewardsToTx(tx: Transaction, address: string): Promise<PendingReward$1[]>;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export { type AssetRates as A, type BalanceResponse as B, type ClaimRewardsResult as C, type DepositInfo as D, type EarningsResult as E, type FundStatusResult as F, type GasMethod as G, type HealthFactorResult as H, type MaxWithdrawResult as M, NaviAdapter as N, type PayOptions as P, type RepayResult as R, type StakeVSuiResult as S, type T2000Options as T, type UnstakeVSuiResult as U, type WithdrawResult as W, type PayResult as a, type SwapResult as b, type SwapQuoteResult as c, type SendResult as d, type TransactionRecord as e, type SaveResult as f, type BorrowResult as g, type MaxBorrowResult as h, type PendingReward as i, type PositionsResult as j, type RatesResult as k, type GasReserve as l, type PositionEntry as m, ProtocolRegistry as n };
|
|
207
|
+
export type { AssetRates as A, BalanceResponse as B, ClaimRewardsResult as C, DepositInfo as D, EarningsResult as E, FundStatusResult as F, GasMethod as G, HealthFactorResult as H, MaxBorrowResult as M, PayOptions as P, RatesResult as R, SaveResult as S, TransactionRecord as T, UnstakeVSuiResult as U, WithdrawResult as W, BorrowResult as a, GasReserve as b, MaxWithdrawResult as c, PayResult as d, PendingReward as e, PositionEntry as f, PositionsResult as g, RepayResult as h, SendResult as i, T2000Options as j, StakeVSuiResult as k, SwapResult as l, SwapQuoteResult as m };
|