@t2000/sdk 1.0.1 → 1.1.2
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 +15 -15
- package/dist/adapters/descriptors.d.cts +1 -1
- package/dist/adapters/descriptors.d.ts +1 -1
- package/dist/adapters/index.cjs +28 -42
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +7 -9
- package/dist/adapters/index.d.ts +7 -9
- package/dist/adapters/index.js +28 -42
- package/dist/adapters/index.js.map +1 -1
- package/dist/browser.cjs +192 -77
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +2 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.js +184 -74
- package/dist/browser.js.map +1 -1
- package/dist/{descriptors-CDVXo3BM.d.cts → descriptors-BnbL3xN8.d.cts} +11 -7
- package/dist/{descriptors-CDVXo3BM.d.ts → descriptors-BnbL3xN8.d.ts} +11 -7
- package/dist/index.cjs +94 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -52
- package/dist/index.d.ts +8 -52
- package/dist/index.js +91 -94
- package/dist/index.js.map +1 -1
- package/dist/{token-registry-CoTPqCbS.d.ts → types-BhiUiiNs.d.ts} +162 -45
- package/dist/{token-registry-DAHghHh2.d.cts → types-CMVkJNFp.d.cts} +162 -45
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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 {
|
|
5
|
-
export { A as ALL_NAVI_ASSETS,
|
|
6
|
-
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-
|
|
7
|
-
export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, d as ProtocolDescriptor, e as allDescriptors, n as naviDescriptor } from './descriptors-
|
|
4
|
+
import { V as TxMetadata, q as SafeguardConfig, T as T2000Error, R as TransactionSigner, a1 as ZkLoginProof, x as SupportedAsset } from './types-CMVkJNFp.cjs';
|
|
5
|
+
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, aB as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as ClassifyBalanceChange, d as ClassifyResult, e as CoinMeta, D as DEFAULT_NETWORK, f as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, g as ExtractedTransfer, F as FeeOperation, G as GAS_RESERVE_MIN, I as IKA_TYPE, K as KNOWN_TARGETS, h as KeypairSigner, L as LABEL_PATTERNS, i as LOFI_TYPE, M as MANIFEST_TYPE, j as MIST_PER_SUI, N as NAVX_TYPE, aC as OPERATION_ASSETS, O as OUTBOUND_OPS, k as OVERLAY_FEE_RATE, aD as Operation, l as OverlayFeeConfig, P as ProtocolFeeInfo, S as SAVE_FEE_BPS, m as STABLE_ASSETS, n as SUI_DECIMALS, o as SUI_TYPE, p as SUPPORTED_ASSETS, r as SafeguardError, s as SafeguardErrorDetails, t as SafeguardRule, u as SimulationResult, v as StableAsset, w as SuiRpcTxBlock, y as SwapRouteResult, z as T2000ErrorCode, H as T2000ErrorData, J as T2000_OVERLAY_FEE_WALLET, Q as TOKEN_MAP, U as TxDirection, W as USDC_DECIMALS, X as USDC_TYPE, Y as USDE_TYPE, Z as USDSUI_TYPE, _ as USDT_TYPE, $ as WAL_TYPE, a0 as WBTC_TYPE, a2 as ZkLoginSigner, a3 as addFeeTransfer, aE as assertAllowedAsset, a4 as buildSwapTx, a5 as calculateFee, a6 as classifyAction, a7 as classifyLabel, a8 as classifyTransaction, a9 as extractTransferDetails, aa as extractTxCommands, ab as extractTxSender, ac as fallbackLabel, ad as findSwapRoute, ae as formatAssetAmount, af as formatSui, ag as formatUsd, aF as getCoinMeta, ah as getDecimals, ai as getDecimalsForCoinType, aj as getTier, aG as isAllowedAsset, aH as isInRegistry, ak as isSupported, al as isTier1, am as isTier2, an as mapMoveAbortCode, ao as mapWalletError, ap as mistToSui, aI as normalizeCoinType, aq as parseSuiRpcTx, aJ as queryHistory, aK as queryTransaction, ar as rawToStable, as as rawToUsdc, at as refineLendingLabel, au as resolveSymbol, av as resolveTokenType, aL as simulateTransaction, aw as stableToRaw, ax as suiToMist, aM as throwIfSimulationFailed, ay as truncateAddress, az as usdcToRaw, aA as validateAddress } from './types-CMVkJNFp.cjs';
|
|
6
|
+
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-BnbL3xN8.cjs';
|
|
7
|
+
export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, d as ProtocolDescriptor, e as allDescriptors, n as naviDescriptor } from './descriptors-BnbL3xN8.cjs';
|
|
8
8
|
import { i as T2000Options, P as PayOptions, c as PayResult, j as StakeVSuiResult, U as UnstakeVSuiResult, k as SwapResult, l as SwapQuoteResult, h as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, m as PaymentRequest, S as SaveResult, W as WithdrawResult, b as MaxWithdrawResult, a as BorrowResult, g as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, d as PendingReward, C as ClaimRewardsResult, n as CompoundRewardsResult, f as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, o as FinancialSummary } from './types-jAD-e7Pq.cjs';
|
|
9
9
|
export { A as AssetRates, G as GasReserve, p as HFAlertLevel, e as PositionEntry } from './types-jAD-e7Pq.cjs';
|
|
10
|
-
import {
|
|
11
|
-
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
10
|
+
import { Transaction } from '@mysten/sui/transactions';
|
|
12
11
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.cjs';
|
|
12
|
+
import '@cetusprotocol/aggregator-sdk';
|
|
13
13
|
|
|
14
14
|
declare class SafeguardEnforcer {
|
|
15
15
|
private config;
|
|
@@ -235,8 +235,7 @@ declare function getAddress(keypair: Ed25519Keypair): string;
|
|
|
235
235
|
|
|
236
236
|
declare const HF_WARN_THRESHOLD = 1.8;
|
|
237
237
|
declare const HF_CRITICAL_THRESHOLD = 1.3;
|
|
238
|
-
|
|
239
|
-
}
|
|
238
|
+
type FinancialSummaryOptions = Record<string, never>;
|
|
240
239
|
/**
|
|
241
240
|
* Fetch a complete financial snapshot for one wallet in parallel.
|
|
242
241
|
* Designed for the indexer HF hook + chain-memory cron.
|
|
@@ -258,49 +257,6 @@ declare function getSwapQuote(params: {
|
|
|
258
257
|
byAmountIn?: boolean;
|
|
259
258
|
}): Promise<SwapQuoteResult>;
|
|
260
259
|
|
|
261
|
-
/**
|
|
262
|
-
* Cetus Aggregator V3 SDK wrapper — the ONLY file that imports @cetusprotocol/aggregator-sdk.
|
|
263
|
-
* Documented CLAUDE.md exception: multi-DEX routing cannot be feasibly replaced by thin tx builders.
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
interface SwapRouteResult {
|
|
267
|
-
routerData: RouterDataV3;
|
|
268
|
-
amountIn: string;
|
|
269
|
-
amountOut: string;
|
|
270
|
-
byAmountIn: boolean;
|
|
271
|
-
priceImpact: number;
|
|
272
|
-
insufficientLiquidity: boolean;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* [v1.4 Item 5] T2000 swap overlay fee — 0.1% taken on top of Cetus's
|
|
276
|
-
* own fee. Exported so consumers (web app, spec-consistency assertions)
|
|
277
|
-
* can compare against a single source of truth instead of hard-coding
|
|
278
|
-
* the value. Changing this rate requires a coordinated SDK + audric
|
|
279
|
-
* release.
|
|
280
|
-
*/
|
|
281
|
-
declare const OVERLAY_FEE_RATE = 0.001;
|
|
282
|
-
/**
|
|
283
|
-
* Find the optimal swap route via Cetus Aggregator REST API.
|
|
284
|
-
*/
|
|
285
|
-
declare function findSwapRoute(params: {
|
|
286
|
-
walletAddress: string;
|
|
287
|
-
from: string;
|
|
288
|
-
to: string;
|
|
289
|
-
amount: bigint;
|
|
290
|
-
byAmountIn: boolean;
|
|
291
|
-
}): Promise<SwapRouteResult | null>;
|
|
292
|
-
/**
|
|
293
|
-
* Build a swap PTB from a route result. The caller must provide an input coin
|
|
294
|
-
* obtained by splitting/merging wallet coins.
|
|
295
|
-
*/
|
|
296
|
-
declare function buildSwapTx(params: {
|
|
297
|
-
walletAddress: string;
|
|
298
|
-
route: SwapRouteResult;
|
|
299
|
-
tx: Transaction;
|
|
300
|
-
inputCoin: TransactionObjectArgument;
|
|
301
|
-
slippage: number;
|
|
302
|
-
}): Promise<TransactionObjectArgument>;
|
|
303
|
-
|
|
304
260
|
/**
|
|
305
261
|
* VOLO vSUI liquid staking — thin transaction builders.
|
|
306
262
|
* No SDK dependency. Two Move calls, immutable contract addresses.
|
|
@@ -328,4 +284,4 @@ declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, am
|
|
|
328
284
|
*/
|
|
329
285
|
declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
|
|
330
286
|
|
|
331
|
-
export { BalanceResponse, BorrowResult, ClaimRewardsResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult,
|
|
287
|
+
export { BalanceResponse, BorrowResult, ClaimRewardsResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardConfig, SafeguardEnforcer, SaveResult, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, TxMetadata, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, buildStakeVSuiTx, buildUnstakeVSuiTx, exportPrivateKey, generateKeypair, getAddress, getFinancialSummary, getPendingRewards, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, walletExists };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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 {
|
|
5
|
-
export { A as ALL_NAVI_ASSETS,
|
|
6
|
-
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-
|
|
7
|
-
export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, d as ProtocolDescriptor, e as allDescriptors, n as naviDescriptor } from './descriptors-
|
|
4
|
+
import { V as TxMetadata, q as SafeguardConfig, T as T2000Error, R as TransactionSigner, a1 as ZkLoginProof, x as SupportedAsset } from './types-BhiUiiNs.js';
|
|
5
|
+
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, aB as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as ClassifyBalanceChange, d as ClassifyResult, e as CoinMeta, D as DEFAULT_NETWORK, f as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, g as ExtractedTransfer, F as FeeOperation, G as GAS_RESERVE_MIN, I as IKA_TYPE, K as KNOWN_TARGETS, h as KeypairSigner, L as LABEL_PATTERNS, i as LOFI_TYPE, M as MANIFEST_TYPE, j as MIST_PER_SUI, N as NAVX_TYPE, aC as OPERATION_ASSETS, O as OUTBOUND_OPS, k as OVERLAY_FEE_RATE, aD as Operation, l as OverlayFeeConfig, P as ProtocolFeeInfo, S as SAVE_FEE_BPS, m as STABLE_ASSETS, n as SUI_DECIMALS, o as SUI_TYPE, p as SUPPORTED_ASSETS, r as SafeguardError, s as SafeguardErrorDetails, t as SafeguardRule, u as SimulationResult, v as StableAsset, w as SuiRpcTxBlock, y as SwapRouteResult, z as T2000ErrorCode, H as T2000ErrorData, J as T2000_OVERLAY_FEE_WALLET, Q as TOKEN_MAP, U as TxDirection, W as USDC_DECIMALS, X as USDC_TYPE, Y as USDE_TYPE, Z as USDSUI_TYPE, _ as USDT_TYPE, $ as WAL_TYPE, a0 as WBTC_TYPE, a2 as ZkLoginSigner, a3 as addFeeTransfer, aE as assertAllowedAsset, a4 as buildSwapTx, a5 as calculateFee, a6 as classifyAction, a7 as classifyLabel, a8 as classifyTransaction, a9 as extractTransferDetails, aa as extractTxCommands, ab as extractTxSender, ac as fallbackLabel, ad as findSwapRoute, ae as formatAssetAmount, af as formatSui, ag as formatUsd, aF as getCoinMeta, ah as getDecimals, ai as getDecimalsForCoinType, aj as getTier, aG as isAllowedAsset, aH as isInRegistry, ak as isSupported, al as isTier1, am as isTier2, an as mapMoveAbortCode, ao as mapWalletError, ap as mistToSui, aI as normalizeCoinType, aq as parseSuiRpcTx, aJ as queryHistory, aK as queryTransaction, ar as rawToStable, as as rawToUsdc, at as refineLendingLabel, au as resolveSymbol, av as resolveTokenType, aL as simulateTransaction, aw as stableToRaw, ax as suiToMist, aM as throwIfSimulationFailed, ay as truncateAddress, az as usdcToRaw, aA as validateAddress } from './types-BhiUiiNs.js';
|
|
6
|
+
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-BnbL3xN8.js';
|
|
7
|
+
export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, d as ProtocolDescriptor, e as allDescriptors, n as naviDescriptor } from './descriptors-BnbL3xN8.js';
|
|
8
8
|
import { i as T2000Options, P as PayOptions, c as PayResult, j as StakeVSuiResult, U as UnstakeVSuiResult, k as SwapResult, l as SwapQuoteResult, h as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, m as PaymentRequest, S as SaveResult, W as WithdrawResult, b as MaxWithdrawResult, a as BorrowResult, g as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, d as PendingReward, C as ClaimRewardsResult, n as CompoundRewardsResult, f as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, o as FinancialSummary } from './types-jAD-e7Pq.js';
|
|
9
9
|
export { A as AssetRates, G as GasReserve, p as HFAlertLevel, e as PositionEntry } from './types-jAD-e7Pq.js';
|
|
10
|
-
import {
|
|
11
|
-
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
10
|
+
import { Transaction } from '@mysten/sui/transactions';
|
|
12
11
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.js';
|
|
12
|
+
import '@cetusprotocol/aggregator-sdk';
|
|
13
13
|
|
|
14
14
|
declare class SafeguardEnforcer {
|
|
15
15
|
private config;
|
|
@@ -235,8 +235,7 @@ declare function getAddress(keypair: Ed25519Keypair): string;
|
|
|
235
235
|
|
|
236
236
|
declare const HF_WARN_THRESHOLD = 1.8;
|
|
237
237
|
declare const HF_CRITICAL_THRESHOLD = 1.3;
|
|
238
|
-
|
|
239
|
-
}
|
|
238
|
+
type FinancialSummaryOptions = Record<string, never>;
|
|
240
239
|
/**
|
|
241
240
|
* Fetch a complete financial snapshot for one wallet in parallel.
|
|
242
241
|
* Designed for the indexer HF hook + chain-memory cron.
|
|
@@ -258,49 +257,6 @@ declare function getSwapQuote(params: {
|
|
|
258
257
|
byAmountIn?: boolean;
|
|
259
258
|
}): Promise<SwapQuoteResult>;
|
|
260
259
|
|
|
261
|
-
/**
|
|
262
|
-
* Cetus Aggregator V3 SDK wrapper — the ONLY file that imports @cetusprotocol/aggregator-sdk.
|
|
263
|
-
* Documented CLAUDE.md exception: multi-DEX routing cannot be feasibly replaced by thin tx builders.
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
interface SwapRouteResult {
|
|
267
|
-
routerData: RouterDataV3;
|
|
268
|
-
amountIn: string;
|
|
269
|
-
amountOut: string;
|
|
270
|
-
byAmountIn: boolean;
|
|
271
|
-
priceImpact: number;
|
|
272
|
-
insufficientLiquidity: boolean;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* [v1.4 Item 5] T2000 swap overlay fee — 0.1% taken on top of Cetus's
|
|
276
|
-
* own fee. Exported so consumers (web app, spec-consistency assertions)
|
|
277
|
-
* can compare against a single source of truth instead of hard-coding
|
|
278
|
-
* the value. Changing this rate requires a coordinated SDK + audric
|
|
279
|
-
* release.
|
|
280
|
-
*/
|
|
281
|
-
declare const OVERLAY_FEE_RATE = 0.001;
|
|
282
|
-
/**
|
|
283
|
-
* Find the optimal swap route via Cetus Aggregator REST API.
|
|
284
|
-
*/
|
|
285
|
-
declare function findSwapRoute(params: {
|
|
286
|
-
walletAddress: string;
|
|
287
|
-
from: string;
|
|
288
|
-
to: string;
|
|
289
|
-
amount: bigint;
|
|
290
|
-
byAmountIn: boolean;
|
|
291
|
-
}): Promise<SwapRouteResult | null>;
|
|
292
|
-
/**
|
|
293
|
-
* Build a swap PTB from a route result. The caller must provide an input coin
|
|
294
|
-
* obtained by splitting/merging wallet coins.
|
|
295
|
-
*/
|
|
296
|
-
declare function buildSwapTx(params: {
|
|
297
|
-
walletAddress: string;
|
|
298
|
-
route: SwapRouteResult;
|
|
299
|
-
tx: Transaction;
|
|
300
|
-
inputCoin: TransactionObjectArgument;
|
|
301
|
-
slippage: number;
|
|
302
|
-
}): Promise<TransactionObjectArgument>;
|
|
303
|
-
|
|
304
260
|
/**
|
|
305
261
|
* VOLO vSUI liquid staking — thin transaction builders.
|
|
306
262
|
* No SDK dependency. Two Move calls, immutable contract addresses.
|
|
@@ -328,4 +284,4 @@ declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, am
|
|
|
328
284
|
*/
|
|
329
285
|
declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
|
|
330
286
|
|
|
331
|
-
export { BalanceResponse, BorrowResult, ClaimRewardsResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult,
|
|
287
|
+
export { BalanceResponse, BorrowResult, ClaimRewardsResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardConfig, SafeguardEnforcer, SaveResult, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, TxMetadata, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, buildStakeVSuiTx, buildUnstakeVSuiTx, exportPrivateKey, generateKeypair, getAddress, getFinancialSummary, getPendingRewards, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, walletExists };
|
package/dist/index.js
CHANGED
|
@@ -143,6 +143,12 @@ var init_errors = __esm({
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
// src/token-registry.ts
|
|
146
|
+
function getCoinMeta(coinType) {
|
|
147
|
+
return BY_TYPE.get(coinType);
|
|
148
|
+
}
|
|
149
|
+
function isInRegistry(coinType) {
|
|
150
|
+
return BY_TYPE.has(coinType);
|
|
151
|
+
}
|
|
146
152
|
function isTier1(coinType) {
|
|
147
153
|
const meta = BY_TYPE.get(coinType);
|
|
148
154
|
return meta?.tier === 1;
|
|
@@ -726,18 +732,22 @@ __export(cetus_swap_exports, {
|
|
|
726
732
|
resolveTokenType: () => resolveTokenType,
|
|
727
733
|
simulateSwap: () => simulateSwap
|
|
728
734
|
});
|
|
729
|
-
function getClient(walletAddress) {
|
|
730
|
-
|
|
731
|
-
|
|
735
|
+
function getClient(walletAddress, overlayFee) {
|
|
736
|
+
const rate = overlayFee?.rate ?? 0;
|
|
737
|
+
const receiver = overlayFee?.receiver ?? "";
|
|
738
|
+
const key = `${walletAddress}|${rate}|${receiver}`;
|
|
739
|
+
const cached = clientCache.get(key);
|
|
740
|
+
if (cached) return cached;
|
|
741
|
+
const client = new AggregatorClient({
|
|
732
742
|
signer: walletAddress,
|
|
733
743
|
env: Env.Mainnet,
|
|
734
|
-
overlayFeeRate:
|
|
735
|
-
overlayFeeReceiver: OVERLAY_FEE_RECEIVER
|
|
744
|
+
...rate > 0 && receiver ? { overlayFeeRate: rate, overlayFeeReceiver: receiver } : {}
|
|
736
745
|
});
|
|
737
|
-
|
|
746
|
+
clientCache.set(key, client);
|
|
747
|
+
return client;
|
|
738
748
|
}
|
|
739
749
|
async function findSwapRoute(params) {
|
|
740
|
-
const client = getClient(params.walletAddress);
|
|
750
|
+
const client = getClient(params.walletAddress, params.overlayFee);
|
|
741
751
|
const findParams = {
|
|
742
752
|
from: params.from,
|
|
743
753
|
target: params.to,
|
|
@@ -774,7 +784,7 @@ function normalizePriceImpact(value) {
|
|
|
774
784
|
return Number.isFinite(n) ? n : 0;
|
|
775
785
|
}
|
|
776
786
|
async function buildSwapTx(params) {
|
|
777
|
-
const client = getClient(params.walletAddress);
|
|
787
|
+
const client = getClient(params.walletAddress, params.overlayFee);
|
|
778
788
|
const clampedSlippage = Math.max(1e-3, Math.min(params.slippage, 0.05));
|
|
779
789
|
const outputCoin = await client.routerSwap({
|
|
780
790
|
router: params.route.routerData,
|
|
@@ -785,7 +795,7 @@ async function buildSwapTx(params) {
|
|
|
785
795
|
return outputCoin;
|
|
786
796
|
}
|
|
787
797
|
async function simulateSwap(params) {
|
|
788
|
-
const client = getClient(params.walletAddress);
|
|
798
|
+
const client = getClient(params.walletAddress, params.overlayFee);
|
|
789
799
|
try {
|
|
790
800
|
await client.devInspectTransactionBlock(params.tx);
|
|
791
801
|
return { success: true };
|
|
@@ -793,13 +803,12 @@ async function simulateSwap(params) {
|
|
|
793
803
|
return { success: false, error: err instanceof Error ? err.message : String(err) };
|
|
794
804
|
}
|
|
795
805
|
}
|
|
796
|
-
var OVERLAY_FEE_RATE,
|
|
806
|
+
var OVERLAY_FEE_RATE, clientCache;
|
|
797
807
|
var init_cetus_swap = __esm({
|
|
798
808
|
"src/protocols/cetus-swap.ts"() {
|
|
799
809
|
init_token_registry();
|
|
800
810
|
OVERLAY_FEE_RATE = 1e-3;
|
|
801
|
-
|
|
802
|
-
clientInstance = null;
|
|
811
|
+
clientCache = /* @__PURE__ */ new Map();
|
|
803
812
|
}
|
|
804
813
|
});
|
|
805
814
|
|
|
@@ -895,13 +904,11 @@ function assertAllowedAsset(op, asset) {
|
|
|
895
904
|
);
|
|
896
905
|
}
|
|
897
906
|
}
|
|
898
|
-
var
|
|
899
|
-
var T2000_CONFIG_ID = process.env.T2000_CONFIG_ID ?? "0x08ba26f0d260b5edf6a19c71492b3eb914906a7419baf2df1426765157e5862a";
|
|
900
|
-
var T2000_TREASURY_ID = process.env.T2000_TREASURY_ID ?? "0xf420ec0dcad44433042fb56e1413fb88d3ff65be94fcf425ef9ff750164590e8";
|
|
907
|
+
var T2000_OVERLAY_FEE_WALLET = process.env.T2000_OVERLAY_FEE_WALLET ?? "0x5366efbf2b4fe5767fe2e78eb197aa5f5d138d88ac3333fbf3f80a1927da473a";
|
|
901
908
|
var DEFAULT_NETWORK = "mainnet";
|
|
902
909
|
var DEFAULT_RPC_URL = "https://fullnode.mainnet.sui.io:443";
|
|
903
910
|
var DEFAULT_KEY_PATH = "~/.t2000/wallet.key";
|
|
904
|
-
|
|
911
|
+
process.env.T2000_API_URL ?? "https://api.t2000.ai";
|
|
905
912
|
var CETUS_USDC_SUI_POOL = "0x51e883ba7c0b566a26cbc8a94cd33eb0abd418a77cc1e60ad22fd9b1f29cd2ab";
|
|
906
913
|
var GAS_RESERVE_MIN = 0.05;
|
|
907
914
|
|
|
@@ -1443,57 +1450,6 @@ function extractCommands(txBlock) {
|
|
|
1443
1450
|
// src/t2000.ts
|
|
1444
1451
|
init_token_registry();
|
|
1445
1452
|
|
|
1446
|
-
// src/protocols/protocolFee.ts
|
|
1447
|
-
var FEE_RATES = {
|
|
1448
|
-
save: SAVE_FEE_BPS,
|
|
1449
|
-
borrow: BORROW_FEE_BPS
|
|
1450
|
-
};
|
|
1451
|
-
var OP_CODES = {
|
|
1452
|
-
save: 0,
|
|
1453
|
-
borrow: 2
|
|
1454
|
-
};
|
|
1455
|
-
function calculateFee(operation, amount) {
|
|
1456
|
-
const bps = FEE_RATES[operation];
|
|
1457
|
-
const feeAmount = amount * Number(bps) / Number(BPS_DENOMINATOR);
|
|
1458
|
-
const rawAmount = usdcToRaw(feeAmount);
|
|
1459
|
-
return {
|
|
1460
|
-
amount: feeAmount,
|
|
1461
|
-
asset: "USDC",
|
|
1462
|
-
rate: Number(bps) / Number(BPS_DENOMINATOR),
|
|
1463
|
-
rawAmount
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
function addCollectFeeToTx(tx, paymentCoin, operation) {
|
|
1467
|
-
const bps = FEE_RATES[operation];
|
|
1468
|
-
if (bps <= 0n) return;
|
|
1469
|
-
tx.moveCall({
|
|
1470
|
-
target: `${T2000_PACKAGE_ID}::treasury::collect_fee`,
|
|
1471
|
-
typeArguments: [SUPPORTED_ASSETS.USDC.type],
|
|
1472
|
-
arguments: [
|
|
1473
|
-
tx.object(T2000_TREASURY_ID),
|
|
1474
|
-
tx.object(T2000_CONFIG_ID),
|
|
1475
|
-
paymentCoin,
|
|
1476
|
-
tx.pure.u8(OP_CODES[operation])
|
|
1477
|
-
]
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
async function reportFee(agentAddress, operation, feeAmount, feeRate, txDigest) {
|
|
1481
|
-
try {
|
|
1482
|
-
await fetch(`${API_BASE_URL}/api/fees`, {
|
|
1483
|
-
method: "POST",
|
|
1484
|
-
headers: { "Content-Type": "application/json" },
|
|
1485
|
-
body: JSON.stringify({
|
|
1486
|
-
agentAddress,
|
|
1487
|
-
operation,
|
|
1488
|
-
feeAmount: feeAmount.toString(),
|
|
1489
|
-
feeRate: feeRate.toString(),
|
|
1490
|
-
txDigest
|
|
1491
|
-
})
|
|
1492
|
-
});
|
|
1493
|
-
} catch {
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
1453
|
// ../../node_modules/.pnpm/@mysten+bcs@2.0.2/node_modules/@mysten/bcs/dist/uleb.mjs
|
|
1498
1454
|
function ulebEncode(num) {
|
|
1499
1455
|
let bigNum = BigInt(num);
|
|
@@ -5277,9 +5233,6 @@ async function buildSaveTx(client, address, amount, options = {}) {
|
|
|
5277
5233
|
const tx = new Transaction();
|
|
5278
5234
|
tx.setSender(address);
|
|
5279
5235
|
const coinObj = mergeCoins(tx, coins);
|
|
5280
|
-
if (options.collectFee) {
|
|
5281
|
-
addCollectFeeToTx(tx, coinObj, "save");
|
|
5282
|
-
}
|
|
5283
5236
|
const rawAmount = Math.min(Number(stableToRaw(amount, assetInfo.decimals)), Number(totalBalance));
|
|
5284
5237
|
try {
|
|
5285
5238
|
await Ce(tx, assetInfo.type, coinObj, {
|
|
@@ -5350,9 +5303,6 @@ async function addWithdrawToTx(tx, client, address, amount, options = {}) {
|
|
|
5350
5303
|
async function addSaveToTx(tx, _client, _address, coin, options = {}) {
|
|
5351
5304
|
const asset = options.asset ?? "USDC";
|
|
5352
5305
|
const assetInfo = resolveAssetInfo(asset);
|
|
5353
|
-
if (options.collectFee) {
|
|
5354
|
-
addCollectFeeToTx(tx, coin, "save");
|
|
5355
|
-
}
|
|
5356
5306
|
try {
|
|
5357
5307
|
await Ce(tx, assetInfo.type, coin, { env: "prod" });
|
|
5358
5308
|
} catch (err) {
|
|
@@ -5383,9 +5333,6 @@ async function buildBorrowTx(client, address, amount, options = {}) {
|
|
|
5383
5333
|
await refreshOracle(tx, client, address, { skipPythUpdate: options.skipPythUpdate });
|
|
5384
5334
|
try {
|
|
5385
5335
|
const borrowedCoin = await Xe(tx, assetInfo.type, rawAmount, sdkOptions(client));
|
|
5386
|
-
if (options.collectFee) {
|
|
5387
|
-
addCollectFeeToTx(tx, borrowedCoin, "borrow");
|
|
5388
|
-
}
|
|
5389
5336
|
tx.transferObjects([borrowedCoin], address);
|
|
5390
5337
|
} catch (err) {
|
|
5391
5338
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -5393,6 +5340,22 @@ async function buildBorrowTx(client, address, amount, options = {}) {
|
|
|
5393
5340
|
}
|
|
5394
5341
|
return tx;
|
|
5395
5342
|
}
|
|
5343
|
+
async function addBorrowToTx(tx, client, address, amount, options = {}) {
|
|
5344
|
+
if (!amount || amount <= 0 || !Number.isFinite(amount)) {
|
|
5345
|
+
throw new T2000Error("INVALID_AMOUNT", "Borrow amount must be a positive number");
|
|
5346
|
+
}
|
|
5347
|
+
const asset = options.asset ?? "USDC";
|
|
5348
|
+
const assetInfo = resolveAssetInfo(asset);
|
|
5349
|
+
const rawAmount = Number(stableToRaw(amount, assetInfo.decimals));
|
|
5350
|
+
await refreshOracle(tx, client, address, { skipPythUpdate: options.skipPythUpdate });
|
|
5351
|
+
try {
|
|
5352
|
+
const borrowedCoin = await Xe(tx, assetInfo.type, rawAmount, sdkOptions(client));
|
|
5353
|
+
return borrowedCoin;
|
|
5354
|
+
} catch (err) {
|
|
5355
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
5356
|
+
throw new T2000Error("PROTOCOL_UNAVAILABLE", `NAVI borrow failed: ${msg}`);
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5396
5359
|
async function buildRepayTx(client, address, amount, options = {}) {
|
|
5397
5360
|
if (!amount || amount <= 0 || !Number.isFinite(amount)) {
|
|
5398
5361
|
throw new T2000Error("INVALID_AMOUNT", "Repay amount must be a positive number");
|
|
@@ -5720,9 +5683,9 @@ var NaviAdapter = class {
|
|
|
5720
5683
|
async getHealth(address) {
|
|
5721
5684
|
return getHealthFactor(this.client, address);
|
|
5722
5685
|
}
|
|
5723
|
-
async buildSaveTx(address, amount, asset
|
|
5686
|
+
async buildSaveTx(address, amount, asset) {
|
|
5724
5687
|
const normalized = normalizeAsset(asset);
|
|
5725
|
-
const tx = await buildSaveTx(this.client, address, amount, {
|
|
5688
|
+
const tx = await buildSaveTx(this.client, address, amount, { asset: normalized });
|
|
5726
5689
|
return { tx };
|
|
5727
5690
|
}
|
|
5728
5691
|
async buildWithdrawTx(address, amount, asset, options) {
|
|
@@ -5760,9 +5723,16 @@ var NaviAdapter = class {
|
|
|
5760
5723
|
skipPythUpdate: options?.skipPythUpdate
|
|
5761
5724
|
});
|
|
5762
5725
|
}
|
|
5763
|
-
async addSaveToTx(tx, address, coin, asset
|
|
5726
|
+
async addSaveToTx(tx, address, coin, asset) {
|
|
5727
|
+
const normalized = normalizeAsset(asset);
|
|
5728
|
+
return addSaveToTx(tx, this.client, address, coin, { asset: normalized });
|
|
5729
|
+
}
|
|
5730
|
+
async addBorrowToTx(tx, address, amount, asset, options) {
|
|
5764
5731
|
const normalized = normalizeAsset(asset);
|
|
5765
|
-
return
|
|
5732
|
+
return addBorrowToTx(tx, this.client, address, amount, {
|
|
5733
|
+
asset: normalized,
|
|
5734
|
+
skipPythUpdate: options?.skipPythUpdate
|
|
5735
|
+
});
|
|
5766
5736
|
}
|
|
5767
5737
|
async addRepayToTx(tx, address, coin, asset, options) {
|
|
5768
5738
|
const normalized = normalizeAsset(asset);
|
|
@@ -6216,7 +6186,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6216
6186
|
// -- Swap --
|
|
6217
6187
|
async swap(params) {
|
|
6218
6188
|
this.enforcer.assertNotLocked();
|
|
6219
|
-
const { findSwapRoute: findSwapRoute2, buildSwapTx: buildSwapTx2, resolveTokenType: resolveTokenType2
|
|
6189
|
+
const { findSwapRoute: findSwapRoute2, buildSwapTx: buildSwapTx2, resolveTokenType: resolveTokenType2 } = await Promise.resolve().then(() => (init_cetus_swap(), cetus_swap_exports));
|
|
6220
6190
|
const fromType = resolveTokenType2(params.from);
|
|
6221
6191
|
const toType = resolveTokenType2(params.to);
|
|
6222
6192
|
if (!fromType) throw new T2000Error("ASSET_NOT_SUPPORTED", `Unknown token: ${params.from}. Provide the full coin type.`);
|
|
@@ -6317,7 +6287,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6317
6287
|
};
|
|
6318
6288
|
}
|
|
6319
6289
|
async swapQuote(params) {
|
|
6320
|
-
const { findSwapRoute: findSwapRoute2, resolveTokenType: resolveTokenType2
|
|
6290
|
+
const { findSwapRoute: findSwapRoute2, resolveTokenType: resolveTokenType2 } = await Promise.resolve().then(() => (init_cetus_swap(), cetus_swap_exports));
|
|
6321
6291
|
const fromType = resolveTokenType2(params.from);
|
|
6322
6292
|
const toType = resolveTokenType2(params.to);
|
|
6323
6293
|
if (!fromType) throw new T2000Error("ASSET_NOT_SUPPORTED", `Unknown token: ${params.from}. Provide the full coin type.`);
|
|
@@ -6504,7 +6474,6 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6504
6474
|
);
|
|
6505
6475
|
}
|
|
6506
6476
|
}
|
|
6507
|
-
const fee = calculateFee("save", amount);
|
|
6508
6477
|
const saveAmount = amount;
|
|
6509
6478
|
const adapter = await this.resolveLending(params.protocol, asset, "save");
|
|
6510
6479
|
const canPTB = !!adapter.addSaveToTx;
|
|
@@ -6517,14 +6486,13 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6517
6486
|
const merged = this._mergeCoinsInTx(tx2, coins);
|
|
6518
6487
|
const rawAmount = BigInt(Math.floor(saveAmount * 10 ** assetInfo.decimals));
|
|
6519
6488
|
const [inputCoin] = tx2.splitCoins(merged, [rawAmount]);
|
|
6520
|
-
await adapter.addSaveToTx(tx2, this._address, inputCoin, asset
|
|
6489
|
+
await adapter.addSaveToTx(tx2, this._address, inputCoin, asset);
|
|
6521
6490
|
return tx2;
|
|
6522
6491
|
}
|
|
6523
|
-
const { tx } = await adapter.buildSaveTx(this._address, saveAmount, asset
|
|
6492
|
+
const { tx } = await adapter.buildSaveTx(this._address, saveAmount, asset);
|
|
6524
6493
|
return tx;
|
|
6525
6494
|
});
|
|
6526
6495
|
const rates = await adapter.getRates(asset);
|
|
6527
|
-
reportFee(this._address, "save", fee.amount, fee.rate, gasResult.digest);
|
|
6528
6496
|
this.emitBalanceChange(asset, saveAmount, "save", gasResult.digest);
|
|
6529
6497
|
let savingsBalance = saveAmount;
|
|
6530
6498
|
for (let attempt = 0; attempt < 3; attempt++) {
|
|
@@ -6544,7 +6512,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6544
6512
|
tx: gasResult.digest,
|
|
6545
6513
|
amount: saveAmount,
|
|
6546
6514
|
apy: rates.saveApy,
|
|
6547
|
-
fee:
|
|
6515
|
+
fee: 0,
|
|
6548
6516
|
gasCost: gasResult.gasCostSui,
|
|
6549
6517
|
savingsBalance
|
|
6550
6518
|
};
|
|
@@ -6807,21 +6775,19 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
6807
6775
|
currentHF: maxResult.currentHF
|
|
6808
6776
|
});
|
|
6809
6777
|
}
|
|
6810
|
-
const fee = calculateFee("borrow", params.amount);
|
|
6811
6778
|
const borrowAmount = params.amount;
|
|
6812
6779
|
const gasResult = await executeTx(this.client, this._signer, async () => {
|
|
6813
|
-
const { tx } = await adapter.buildBorrowTx(this._address, borrowAmount, asset
|
|
6780
|
+
const { tx } = await adapter.buildBorrowTx(this._address, borrowAmount, asset);
|
|
6814
6781
|
return tx;
|
|
6815
6782
|
});
|
|
6816
6783
|
const hf = await adapter.getHealth(this._address);
|
|
6817
|
-
reportFee(this._address, "borrow", fee.amount, fee.rate, gasResult.digest);
|
|
6818
6784
|
this.emitBalanceChange(asset, borrowAmount, "borrow", gasResult.digest);
|
|
6819
6785
|
return {
|
|
6820
6786
|
success: true,
|
|
6821
6787
|
tx: gasResult.digest,
|
|
6822
6788
|
amount: borrowAmount,
|
|
6823
6789
|
asset,
|
|
6824
|
-
fee:
|
|
6790
|
+
fee: 0,
|
|
6825
6791
|
healthFactor: hf.healthFactor,
|
|
6826
6792
|
gasCost: gasResult.gasCostSui
|
|
6827
6793
|
};
|
|
@@ -7094,7 +7060,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
7094
7060
|
if (coins.length === 0) throw new T2000Error("INSUFFICIENT_BALANCE", "No USDC coins after swap");
|
|
7095
7061
|
const merged = this._mergeCoinsInTx(tx, coins);
|
|
7096
7062
|
const [inputCoin] = tx.splitCoins(merged, [gainedRaw]);
|
|
7097
|
-
await adapter.addSaveToTx(tx, this._address, inputCoin, "USDC"
|
|
7063
|
+
await adapter.addSaveToTx(tx, this._address, inputCoin, "USDC");
|
|
7098
7064
|
return tx;
|
|
7099
7065
|
});
|
|
7100
7066
|
depositTx = depositResult.digest;
|
|
@@ -7222,6 +7188,37 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
7222
7188
|
// src/index.ts
|
|
7223
7189
|
init_errors();
|
|
7224
7190
|
|
|
7191
|
+
// src/protocols/protocolFee.ts
|
|
7192
|
+
var FEE_RATES = {
|
|
7193
|
+
save: SAVE_FEE_BPS,
|
|
7194
|
+
borrow: BORROW_FEE_BPS,
|
|
7195
|
+
// Swap uses Cetus's overlay-fee mechanism (taken from output by the aggregator
|
|
7196
|
+
// and transferred to `overlayFee.receiver`). We list the rate here for display
|
|
7197
|
+
// / quote calculations only — `addFeeTransfer` is NOT called for swaps.
|
|
7198
|
+
swap: 10n
|
|
7199
|
+
// 0.1%
|
|
7200
|
+
};
|
|
7201
|
+
function calculateFee(operation, amount) {
|
|
7202
|
+
const bps = FEE_RATES[operation];
|
|
7203
|
+
const feeAmount = amount * Number(bps) / Number(BPS_DENOMINATOR);
|
|
7204
|
+
const rawAmount = usdcToRaw(feeAmount);
|
|
7205
|
+
return {
|
|
7206
|
+
amount: feeAmount,
|
|
7207
|
+
asset: "USDC",
|
|
7208
|
+
rate: Number(bps) / Number(BPS_DENOMINATOR),
|
|
7209
|
+
rawAmount
|
|
7210
|
+
};
|
|
7211
|
+
}
|
|
7212
|
+
function addFeeTransfer(tx, paymentCoin, feeBps, receiver, amount) {
|
|
7213
|
+
if (feeBps <= 0n) return;
|
|
7214
|
+
if (amount <= 0) return;
|
|
7215
|
+
const feeAmount = amount * Number(feeBps) / Number(BPS_DENOMINATOR);
|
|
7216
|
+
const rawFee = usdcToRaw(feeAmount);
|
|
7217
|
+
if (rawFee <= 0n) return;
|
|
7218
|
+
const [feeCoin] = tx.splitCoins(paymentCoin, [tx.pure.u64(rawFee)]);
|
|
7219
|
+
tx.transferObjects([feeCoin], tx.pure.address(receiver));
|
|
7220
|
+
}
|
|
7221
|
+
|
|
7225
7222
|
// src/protocols/financialSummary.ts
|
|
7226
7223
|
var HF_WARN_THRESHOLD = 1.8;
|
|
7227
7224
|
var HF_CRITICAL_THRESHOLD = 1.3;
|
|
@@ -7363,7 +7360,7 @@ function parseMoveAbort(errorStr) {
|
|
|
7363
7360
|
// src/swap-quote.ts
|
|
7364
7361
|
init_token_registry();
|
|
7365
7362
|
async function getSwapQuote(params) {
|
|
7366
|
-
const { findSwapRoute: findSwapRoute2, resolveTokenType: resolveTokenType2
|
|
7363
|
+
const { findSwapRoute: findSwapRoute2, resolveTokenType: resolveTokenType2 } = await Promise.resolve().then(() => (init_cetus_swap(), cetus_swap_exports));
|
|
7367
7364
|
const fromType = resolveTokenType2(params.from);
|
|
7368
7365
|
const toType = resolveTokenType2(params.to);
|
|
7369
7366
|
if (!fromType) throw new Error(`Unknown token: ${params.from}. Provide the full coin type.`);
|
|
@@ -7404,6 +7401,6 @@ init_volo();
|
|
|
7404
7401
|
(*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
7405
7402
|
*/
|
|
7406
7403
|
|
|
7407
|
-
export { ALL_NAVI_ASSETS, BORROW_FEE_BPS, BPS_DENOMINATOR, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, ContactManager, DEFAULT_NETWORK, DEFAULT_SAFEGUARD_CONFIG, ETH_TYPE, GAS_RESERVE_MIN, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, IKA_TYPE, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, NaviAdapter, OPERATION_ASSETS, OUTBOUND_OPS, OVERLAY_FEE_RATE, ProtocolRegistry, SAVE_FEE_BPS, STABLE_ASSETS, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SafeguardEnforcer, SafeguardError, T2000, T2000Error, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, WAL_TYPE, WBTC_TYPE, ZkLoginSigner,
|
|
7404
|
+
export { ALL_NAVI_ASSETS, BORROW_FEE_BPS, BPS_DENOMINATOR, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, ContactManager, DEFAULT_NETWORK, DEFAULT_SAFEGUARD_CONFIG, ETH_TYPE, GAS_RESERVE_MIN, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, IKA_TYPE, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, NaviAdapter, OPERATION_ASSETS, OUTBOUND_OPS, OVERLAY_FEE_RATE, ProtocolRegistry, SAVE_FEE_BPS, STABLE_ASSETS, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SafeguardEnforcer, SafeguardError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, WAL_TYPE, WBTC_TYPE, ZkLoginSigner, addFeeTransfer, allDescriptors, assertAllowedAsset, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, calculateFee, classifyAction, classifyLabel, classifyTransaction, exportPrivateKey, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, findSwapRoute, formatAssetAmount, formatSui, formatUsd, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getFinancialSummary, getPendingRewards, getRates, getSwapQuote, getTier, getVoloStats, isAllowedAsset, isInRegistry, isSupported, isTier1, isTier2, keypairFromPrivateKey, loadKey, mapMoveAbortCode, mapWalletError, mistToSui, naviDescriptor, normalizeCoinType, parseSuiRpcTx, queryHistory, queryTransaction, rawToStable, rawToUsdc, refineLendingLabel, resolveSymbol, resolveTokenType, saveKey, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, walletExists };
|
|
7408
7405
|
//# sourceMappingURL=index.js.map
|
|
7409
7406
|
//# sourceMappingURL=index.js.map
|