@t2000/sdk 0.22.3 → 0.23.0

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/index.d.cts CHANGED
@@ -1,14 +1,14 @@
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 T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset } from './token-registry-bf_caDsv.cjs';
5
- export { A as ALL_NAVI_ASSETS, a as AutoTopUpResult, B as BPS_DENOMINATOR, an as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as CoinMeta, D as DEFAULT_NETWORK, d as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, F as FeeOperation, G as GAS_RESERVE_MIN, e as GasExecutionResult, f as GasRequestType, g as GasSponsorResponse, h as GasStatusResponse, I as IKA_TYPE, K as KeypairSigner, L as LOFI_TYPE, M as MANIFEST_TYPE, i as MIST_PER_SUI, N as NAVX_TYPE, ao as OPERATION_ASSETS, O as OUTBOUND_OPS, ap as Operation, P as ProtocolFeeInfo, S as STABLE_ASSETS, j as SUI_DECIMALS, k as SUI_TYPE, l as SUPPORTED_ASSETS, m as SafeguardConfig, n as SafeguardError, o as SafeguardErrorDetails, p as SafeguardRule, q as SimulationResult, r as StableAsset, t as T2000ErrorCode, u as T2000ErrorData, v as TOKEN_MAP, x as TxMetadata, U as USDC_DECIMALS, y as USDC_TYPE, z as USDE_TYPE, H as USDSUI_TYPE, J as USDT_TYPE, W as WAL_TYPE, Q as WBTC_TYPE, R as ZkLoginSigner, V as addCollectFeeToTx, aq as assertAllowedAsset, X as calculateFee, Y as executeAutoTopUp, _ as executeWithGas, $ as formatAssetAmount, a0 as formatSui, a1 as formatUsd, a2 as getDecimals, a3 as getDecimalsForCoinType, a4 as getGasStatus, a5 as getTier, ar as isAllowedAsset, a6 as isSupported, a7 as isTier1, a8 as isTier2, a9 as mapMoveAbortCode, aa as mapWalletError, ab as mistToSui, ac as rawToStable, ad as rawToUsdc, ae as resolveSymbol, af as resolveTokenType, ag as shouldAutoTopUp, as as simulateTransaction, ah as stableToRaw, ai as suiToMist, at as throwIfSimulationFailed, aj as truncateAddress, ak as usdcToRaw, al as validateAddress } from './token-registry-bf_caDsv.cjs';
4
+ import { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-DDy743E6.cjs';
5
+ export { ao as ALLOWANCE_FEATURES, A as ALL_NAVI_ASSETS, a as AutoTopUpResult, B as BPS_DENOMINATOR, ap as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as CoinMeta, D as DEFAULT_NETWORK, d as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, F as FeeOperation, G as GAS_RESERVE_MIN, e as GasExecutionResult, f as GasRequestType, g as GasSponsorResponse, h as GasStatusResponse, I as IKA_TYPE, K as KeypairSigner, L as LOFI_TYPE, M as MANIFEST_TYPE, i as MIST_PER_SUI, N as NAVX_TYPE, aq as OPERATION_ASSETS, O as OUTBOUND_OPS, ar as Operation, P as ProtocolFeeInfo, S as STABLE_ASSETS, j as SUI_DECIMALS, k as SUI_TYPE, l as SUPPORTED_ASSETS, m as SafeguardConfig, n as SafeguardError, o as SafeguardErrorDetails, p as SafeguardRule, q as SimulationResult, r as StableAsset, t as T2000ErrorCode, u as T2000ErrorData, v as TOKEN_MAP, x as TxMetadata, U as USDC_DECIMALS, y as USDC_TYPE, z as USDE_TYPE, H as USDSUI_TYPE, J as USDT_TYPE, W as WAL_TYPE, Q as WBTC_TYPE, R as ZkLoginSigner, V as addCollectFeeToTx, as as assertAllowedAsset, X as calculateFee, Y as executeAutoTopUp, _ as executeWithGas, $ as formatAssetAmount, a0 as formatSui, a1 as formatUsd, a2 as getDecimals, a3 as getDecimalsForCoinType, a4 as getGasStatus, a5 as getTier, at as isAllowedAsset, a6 as isSupported, a7 as isTier1, a8 as isTier2, a9 as mapMoveAbortCode, aa as mapWalletError, ab as mistToSui, ac as rawToStable, ad as rawToUsdc, ae as resolveSymbol, af as resolveTokenType, ag as shouldAutoTopUp, au as simulateTransaction, ah as stableToRaw, ai as suiToMist, av as throwIfSimulationFailed, aj as truncateAddress, ak as usdcToRaw, al as validateAddress } from './token-registry-DDy743E6.cjs';
6
6
  import { L as LendingAdapter, a as LendingRates } from './descriptors-Be4FAgN5.cjs';
7
7
  export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, P as ProtocolDescriptor, d as allDescriptors, n as naviDescriptor } from './descriptors-Be4FAgN5.cjs';
8
- import { j as T2000Options, P as PayOptions, d as PayResult, k as StakeVSuiResult, U as UnstakeVSuiResult, l as SwapResult, m as SwapQuoteResult, i as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, S as SaveResult, W as WithdrawResult, c as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult } from './types-XWEUAS-X.cjs';
9
- export { A as AssetRates, G as GasMethod, b as GasReserve, f as PositionEntry } from './types-XWEUAS-X.cjs';
10
- import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
8
+ import { j as T2000Options, P as PayOptions, d as PayResult, k as StakeVSuiResult, U as UnstakeVSuiResult, l as SwapResult, m as SwapQuoteResult, i as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, S as SaveResult, W as WithdrawResult, c as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, n as AllowanceInfo, o as FinancialSummary } from './types-DT-3gVTX.cjs';
9
+ export { p as AllowanceCreateResult, q as AllowanceDeductResult, r as AllowanceDepositResult, s as AllowanceWithdrawResult, A as AssetRates, G as GasMethod, b as GasReserve, t as HFAlertLevel, f as PositionEntry } from './types-DT-3gVTX.cjs';
11
10
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
11
+ import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
12
12
  export { NaviAdapter, ProtocolRegistry } from './adapters/index.cjs';
13
13
 
14
14
  interface Contact {
@@ -203,6 +203,67 @@ declare function getAddress(keypair: Ed25519Keypair): string;
203
203
 
204
204
  declare function solveHashcash(challenge: string): string;
205
205
 
206
+ interface CreateAllowanceOptions {
207
+ permittedFeatures?: bigint;
208
+ expiresAt?: bigint;
209
+ dailyLimit?: bigint;
210
+ }
211
+ /**
212
+ * Build a PTB that creates a new shared Allowance<USDC> for the signer.
213
+ */
214
+ declare function buildCreateAllowanceTx(options?: CreateAllowanceOptions): Transaction;
215
+ /**
216
+ * Add an owner deposit call to an existing PTB.
217
+ * The caller must provide a coin reference (e.g. from `tx.splitCoins`).
218
+ */
219
+ declare function addDepositAllowanceTx(tx: Transaction, allowanceId: string, paymentCoin: TransactionObjectArgument): void;
220
+ /**
221
+ * Build a standalone deposit PTB that splits `amount` (raw USDC) from
222
+ * the given USDC coin and deposits into the allowance.
223
+ */
224
+ declare function buildDepositAllowanceTx(allowanceId: string, usdcCoin: string, amount: bigint): Transaction;
225
+ /**
226
+ * Build an admin-sponsored deposit PTB. Requires AdminCap in the signer's wallet.
227
+ */
228
+ declare function buildAdminDepositAllowanceTx(allowanceId: string, usdcCoin: string, amount: bigint): Transaction;
229
+ /**
230
+ * Build a deduct PTB. Only callable by the AdminCap holder (server/cron).
231
+ * Enforces on-chain: feature permission, expiry, daily limit.
232
+ */
233
+ declare function buildDeductAllowanceTx(allowanceId: string, amount: bigint, feature: AllowanceFeature): Transaction;
234
+ /**
235
+ * Build a full-withdrawal PTB. Returns entire remaining balance to the owner.
236
+ */
237
+ declare function buildWithdrawAllowanceTx(allowanceId: string): Transaction;
238
+ /**
239
+ * Build a partial-withdrawal PTB. Returns `amount` (raw USDC) to the owner.
240
+ */
241
+ declare function buildWithdrawAmountAllowanceTx(allowanceId: string, amount: bigint): Transaction;
242
+ /**
243
+ * Fetch the full allowance state from an on-chain Allowance<T> shared object.
244
+ */
245
+ declare function getAllowance(client: SuiJsonRpcClient, allowanceId: string): Promise<AllowanceInfo>;
246
+ /**
247
+ * Shorthand: get just the USDC balance of an allowance.
248
+ */
249
+ declare function getAllowanceBalance(client: SuiJsonRpcClient, allowanceId: string): Promise<bigint>;
250
+
251
+ declare const HF_WARN_THRESHOLD = 1.8;
252
+ declare const HF_CRITICAL_THRESHOLD = 1.3;
253
+ interface FinancialSummaryOptions {
254
+ allowanceId?: string;
255
+ }
256
+ /**
257
+ * Fetch a complete financial snapshot for one wallet in parallel.
258
+ * Designed for the notification cron — one call returns everything
259
+ * a briefing, HF alert, or rate alert needs.
260
+ *
261
+ * Every sub-call has a fallback so a single RPC failure doesn't
262
+ * crash the entire batch. Callers can check individual zero values
263
+ * to detect degraded data.
264
+ */
265
+ declare function getFinancialSummary(client: SuiJsonRpcClient, walletAddress: string, options?: FinancialSummaryOptions): Promise<FinancialSummary>;
266
+
206
267
  declare function getRates(client: SuiJsonRpcClient): Promise<RatesResult>;
207
268
 
208
269
  declare function getSwapQuote(params: {
@@ -275,4 +336,48 @@ declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, am
275
336
  */
276
337
  declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
277
338
 
278
- export { BalanceResponse, BorrowResult, ClaimRewardsResult, ContactManager, DepositInfo, EarningsResult, FundStatusResult, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardEnforcer, SaveResult, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, type SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, exportPrivateKey, findSwapRoute, generateKeypair, getAddress, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, solveHashcash, walletExists };
339
+ /**
340
+ * Short-lived signed authorization for a single autonomous cron execution.
341
+ * Built off-chain, verified off-chain before any on-chain PTB is constructed.
342
+ *
343
+ * Security properties:
344
+ * - 60s TTL (configurable) — expired intents rejected before execution
345
+ * - Single-use nonce — stored in IntentLog, duplicate rejected immediately
346
+ * - Ed25519 signature by admin key — tamper-proof envelope
347
+ * - maxAmount ceiling — PTB builder must not exceed this
348
+ */
349
+ interface ScopedIntent {
350
+ version: 1;
351
+ userId: string;
352
+ walletAddress: string;
353
+ allowanceObjectId: string;
354
+ featureCode: AllowanceFeature;
355
+ maxAmount: number;
356
+ issuedAt: number;
357
+ expiresAt: number;
358
+ nonce: string;
359
+ signature: string;
360
+ }
361
+ type ScopedIntentPayload = Omit<ScopedIntent, 'signature'>;
362
+
363
+ interface BuildIntentParams {
364
+ userId: string;
365
+ walletAddress: string;
366
+ allowanceObjectId: string;
367
+ featureCode: AllowanceFeature;
368
+ maxAmount: number;
369
+ ttlMs?: number;
370
+ }
371
+ /**
372
+ * Build a ScopedIntent signed by the admin keypair.
373
+ * Generates a cryptographically random 32-byte nonce and signs the canonical payload.
374
+ */
375
+ declare function buildScopedIntent(adminKeypair: Ed25519Keypair, params: BuildIntentParams): Promise<ScopedIntent>;
376
+ /**
377
+ * Verify a ScopedIntent:
378
+ * 1. Check TTL — reject expired intents immediately (fast path)
379
+ * 2. Verify Ed25519 signature over canonical payload
380
+ */
381
+ declare function verifyScopedIntent(intent: ScopedIntent, adminPublicKeyBytes: Uint8Array): Promise<boolean>;
382
+
383
+ export { AllowanceFeature, AllowanceInfo, BalanceResponse, BorrowResult, type BuildIntentParams, ClaimRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardEnforcer, SaveResult, type ScopedIntent, type ScopedIntentPayload, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, type SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, addDepositAllowanceTx, buildAdminDepositAllowanceTx, buildCreateAllowanceTx, buildDeductAllowanceTx, buildDepositAllowanceTx, buildScopedIntent, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, buildWithdrawAllowanceTx, buildWithdrawAmountAllowanceTx, exportPrivateKey, findSwapRoute, generateKeypair, getAddress, getAllowance, getAllowanceBalance, getFinancialSummary, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, solveHashcash, verifyScopedIntent, walletExists };
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
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 T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset } from './token-registry-DLEKjV8I.js';
5
- export { A as ALL_NAVI_ASSETS, a as AutoTopUpResult, B as BPS_DENOMINATOR, an as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as CoinMeta, D as DEFAULT_NETWORK, d as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, F as FeeOperation, G as GAS_RESERVE_MIN, e as GasExecutionResult, f as GasRequestType, g as GasSponsorResponse, h as GasStatusResponse, I as IKA_TYPE, K as KeypairSigner, L as LOFI_TYPE, M as MANIFEST_TYPE, i as MIST_PER_SUI, N as NAVX_TYPE, ao as OPERATION_ASSETS, O as OUTBOUND_OPS, ap as Operation, P as ProtocolFeeInfo, S as STABLE_ASSETS, j as SUI_DECIMALS, k as SUI_TYPE, l as SUPPORTED_ASSETS, m as SafeguardConfig, n as SafeguardError, o as SafeguardErrorDetails, p as SafeguardRule, q as SimulationResult, r as StableAsset, t as T2000ErrorCode, u as T2000ErrorData, v as TOKEN_MAP, x as TxMetadata, U as USDC_DECIMALS, y as USDC_TYPE, z as USDE_TYPE, H as USDSUI_TYPE, J as USDT_TYPE, W as WAL_TYPE, Q as WBTC_TYPE, R as ZkLoginSigner, V as addCollectFeeToTx, aq as assertAllowedAsset, X as calculateFee, Y as executeAutoTopUp, _ as executeWithGas, $ as formatAssetAmount, a0 as formatSui, a1 as formatUsd, a2 as getDecimals, a3 as getDecimalsForCoinType, a4 as getGasStatus, a5 as getTier, ar as isAllowedAsset, a6 as isSupported, a7 as isTier1, a8 as isTier2, a9 as mapMoveAbortCode, aa as mapWalletError, ab as mistToSui, ac as rawToStable, ad as rawToUsdc, ae as resolveSymbol, af as resolveTokenType, ag as shouldAutoTopUp, as as simulateTransaction, ah as stableToRaw, ai as suiToMist, at as throwIfSimulationFailed, aj as truncateAddress, ak as usdcToRaw, al as validateAddress } from './token-registry-DLEKjV8I.js';
4
+ import { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-Bv1I9qeU.js';
5
+ export { ao as ALLOWANCE_FEATURES, A as ALL_NAVI_ASSETS, a as AutoTopUpResult, B as BPS_DENOMINATOR, ap as CETUS_USDC_SUI_POOL, C as CLOCK_ID, b as COIN_REGISTRY, c as CoinMeta, D as DEFAULT_NETWORK, d as DEFAULT_SAFEGUARD_CONFIG, E as ETH_TYPE, F as FeeOperation, G as GAS_RESERVE_MIN, e as GasExecutionResult, f as GasRequestType, g as GasSponsorResponse, h as GasStatusResponse, I as IKA_TYPE, K as KeypairSigner, L as LOFI_TYPE, M as MANIFEST_TYPE, i as MIST_PER_SUI, N as NAVX_TYPE, aq as OPERATION_ASSETS, O as OUTBOUND_OPS, ar as Operation, P as ProtocolFeeInfo, S as STABLE_ASSETS, j as SUI_DECIMALS, k as SUI_TYPE, l as SUPPORTED_ASSETS, m as SafeguardConfig, n as SafeguardError, o as SafeguardErrorDetails, p as SafeguardRule, q as SimulationResult, r as StableAsset, t as T2000ErrorCode, u as T2000ErrorData, v as TOKEN_MAP, x as TxMetadata, U as USDC_DECIMALS, y as USDC_TYPE, z as USDE_TYPE, H as USDSUI_TYPE, J as USDT_TYPE, W as WAL_TYPE, Q as WBTC_TYPE, R as ZkLoginSigner, V as addCollectFeeToTx, as as assertAllowedAsset, X as calculateFee, Y as executeAutoTopUp, _ as executeWithGas, $ as formatAssetAmount, a0 as formatSui, a1 as formatUsd, a2 as getDecimals, a3 as getDecimalsForCoinType, a4 as getGasStatus, a5 as getTier, at as isAllowedAsset, a6 as isSupported, a7 as isTier1, a8 as isTier2, a9 as mapMoveAbortCode, aa as mapWalletError, ab as mistToSui, ac as rawToStable, ad as rawToUsdc, ae as resolveSymbol, af as resolveTokenType, ag as shouldAutoTopUp, au as simulateTransaction, ah as stableToRaw, ai as suiToMist, av as throwIfSimulationFailed, aj as truncateAddress, ak as usdcToRaw, al as validateAddress } from './token-registry-Bv1I9qeU.js';
6
6
  import { L as LendingAdapter, a as LendingRates } from './descriptors-Be4FAgN5.js';
7
7
  export { A as AdapterCapability, b as AdapterPositions, c as AdapterTxResult, H as HealthInfo, P as ProtocolDescriptor, d as allDescriptors, n as naviDescriptor } from './descriptors-Be4FAgN5.js';
8
- import { j as T2000Options, P as PayOptions, d as PayResult, k as StakeVSuiResult, U as UnstakeVSuiResult, l as SwapResult, m as SwapQuoteResult, i as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, S as SaveResult, W as WithdrawResult, c as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult } from './types-XWEUAS-X.js';
9
- export { A as AssetRates, G as GasMethod, b as GasReserve, f as PositionEntry } from './types-XWEUAS-X.js';
10
- import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
8
+ import { j as T2000Options, P as PayOptions, d as PayResult, k as StakeVSuiResult, U as UnstakeVSuiResult, l as SwapResult, m as SwapQuoteResult, i as SendResult, B as BalanceResponse, T as TransactionRecord, D as DepositInfo, S as SaveResult, W as WithdrawResult, c as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, n as AllowanceInfo, o as FinancialSummary } from './types-DT-3gVTX.js';
9
+ export { p as AllowanceCreateResult, q as AllowanceDeductResult, r as AllowanceDepositResult, s as AllowanceWithdrawResult, A as AssetRates, G as GasMethod, b as GasReserve, t as HFAlertLevel, f as PositionEntry } from './types-DT-3gVTX.js';
11
10
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
11
+ import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
12
12
  export { NaviAdapter, ProtocolRegistry } from './adapters/index.js';
13
13
 
14
14
  interface Contact {
@@ -203,6 +203,67 @@ declare function getAddress(keypair: Ed25519Keypair): string;
203
203
 
204
204
  declare function solveHashcash(challenge: string): string;
205
205
 
206
+ interface CreateAllowanceOptions {
207
+ permittedFeatures?: bigint;
208
+ expiresAt?: bigint;
209
+ dailyLimit?: bigint;
210
+ }
211
+ /**
212
+ * Build a PTB that creates a new shared Allowance<USDC> for the signer.
213
+ */
214
+ declare function buildCreateAllowanceTx(options?: CreateAllowanceOptions): Transaction;
215
+ /**
216
+ * Add an owner deposit call to an existing PTB.
217
+ * The caller must provide a coin reference (e.g. from `tx.splitCoins`).
218
+ */
219
+ declare function addDepositAllowanceTx(tx: Transaction, allowanceId: string, paymentCoin: TransactionObjectArgument): void;
220
+ /**
221
+ * Build a standalone deposit PTB that splits `amount` (raw USDC) from
222
+ * the given USDC coin and deposits into the allowance.
223
+ */
224
+ declare function buildDepositAllowanceTx(allowanceId: string, usdcCoin: string, amount: bigint): Transaction;
225
+ /**
226
+ * Build an admin-sponsored deposit PTB. Requires AdminCap in the signer's wallet.
227
+ */
228
+ declare function buildAdminDepositAllowanceTx(allowanceId: string, usdcCoin: string, amount: bigint): Transaction;
229
+ /**
230
+ * Build a deduct PTB. Only callable by the AdminCap holder (server/cron).
231
+ * Enforces on-chain: feature permission, expiry, daily limit.
232
+ */
233
+ declare function buildDeductAllowanceTx(allowanceId: string, amount: bigint, feature: AllowanceFeature): Transaction;
234
+ /**
235
+ * Build a full-withdrawal PTB. Returns entire remaining balance to the owner.
236
+ */
237
+ declare function buildWithdrawAllowanceTx(allowanceId: string): Transaction;
238
+ /**
239
+ * Build a partial-withdrawal PTB. Returns `amount` (raw USDC) to the owner.
240
+ */
241
+ declare function buildWithdrawAmountAllowanceTx(allowanceId: string, amount: bigint): Transaction;
242
+ /**
243
+ * Fetch the full allowance state from an on-chain Allowance<T> shared object.
244
+ */
245
+ declare function getAllowance(client: SuiJsonRpcClient, allowanceId: string): Promise<AllowanceInfo>;
246
+ /**
247
+ * Shorthand: get just the USDC balance of an allowance.
248
+ */
249
+ declare function getAllowanceBalance(client: SuiJsonRpcClient, allowanceId: string): Promise<bigint>;
250
+
251
+ declare const HF_WARN_THRESHOLD = 1.8;
252
+ declare const HF_CRITICAL_THRESHOLD = 1.3;
253
+ interface FinancialSummaryOptions {
254
+ allowanceId?: string;
255
+ }
256
+ /**
257
+ * Fetch a complete financial snapshot for one wallet in parallel.
258
+ * Designed for the notification cron — one call returns everything
259
+ * a briefing, HF alert, or rate alert needs.
260
+ *
261
+ * Every sub-call has a fallback so a single RPC failure doesn't
262
+ * crash the entire batch. Callers can check individual zero values
263
+ * to detect degraded data.
264
+ */
265
+ declare function getFinancialSummary(client: SuiJsonRpcClient, walletAddress: string, options?: FinancialSummaryOptions): Promise<FinancialSummary>;
266
+
206
267
  declare function getRates(client: SuiJsonRpcClient): Promise<RatesResult>;
207
268
 
208
269
  declare function getSwapQuote(params: {
@@ -275,4 +336,48 @@ declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, am
275
336
  */
276
337
  declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
277
338
 
278
- export { BalanceResponse, BorrowResult, ClaimRewardsResult, ContactManager, DepositInfo, EarningsResult, FundStatusResult, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardEnforcer, SaveResult, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, type SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, exportPrivateKey, findSwapRoute, generateKeypair, getAddress, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, solveHashcash, walletExists };
339
+ /**
340
+ * Short-lived signed authorization for a single autonomous cron execution.
341
+ * Built off-chain, verified off-chain before any on-chain PTB is constructed.
342
+ *
343
+ * Security properties:
344
+ * - 60s TTL (configurable) — expired intents rejected before execution
345
+ * - Single-use nonce — stored in IntentLog, duplicate rejected immediately
346
+ * - Ed25519 signature by admin key — tamper-proof envelope
347
+ * - maxAmount ceiling — PTB builder must not exceed this
348
+ */
349
+ interface ScopedIntent {
350
+ version: 1;
351
+ userId: string;
352
+ walletAddress: string;
353
+ allowanceObjectId: string;
354
+ featureCode: AllowanceFeature;
355
+ maxAmount: number;
356
+ issuedAt: number;
357
+ expiresAt: number;
358
+ nonce: string;
359
+ signature: string;
360
+ }
361
+ type ScopedIntentPayload = Omit<ScopedIntent, 'signature'>;
362
+
363
+ interface BuildIntentParams {
364
+ userId: string;
365
+ walletAddress: string;
366
+ allowanceObjectId: string;
367
+ featureCode: AllowanceFeature;
368
+ maxAmount: number;
369
+ ttlMs?: number;
370
+ }
371
+ /**
372
+ * Build a ScopedIntent signed by the admin keypair.
373
+ * Generates a cryptographically random 32-byte nonce and signs the canonical payload.
374
+ */
375
+ declare function buildScopedIntent(adminKeypair: Ed25519Keypair, params: BuildIntentParams): Promise<ScopedIntent>;
376
+ /**
377
+ * Verify a ScopedIntent:
378
+ * 1. Check TTL — reject expired intents immediately (fast path)
379
+ * 2. Verify Ed25519 signature over canonical payload
380
+ */
381
+ declare function verifyScopedIntent(intent: ScopedIntent, adminPublicKeyBytes: Uint8Array): Promise<boolean>;
382
+
383
+ export { AllowanceFeature, AllowanceInfo, BalanceResponse, BorrowResult, type BuildIntentParams, ClaimRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, HealthFactorResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, PayOptions, PayResult, PendingReward, PositionsResult, RatesResult, RepayResult, SafeguardEnforcer, SaveResult, type ScopedIntent, type ScopedIntentPayload, SendResult, StakeVSuiResult, SupportedAsset, SwapQuoteResult, SwapResult, type SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, UnstakeVSuiResult, VOLO_METADATA, VOLO_PKG, VOLO_POOL, VSUI_TYPE, type VoloStats, WithdrawResult, ZkLoginProof, addDepositAllowanceTx, buildAdminDepositAllowanceTx, buildCreateAllowanceTx, buildDeductAllowanceTx, buildDepositAllowanceTx, buildScopedIntent, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, buildWithdrawAllowanceTx, buildWithdrawAmountAllowanceTx, exportPrivateKey, findSwapRoute, generateKeypair, getAddress, getAllowance, getAllowanceBalance, getFinancialSummary, getRates, getSwapQuote, getVoloStats, keypairFromPrivateKey, loadKey, saveKey, solveHashcash, verifyScopedIntent, walletExists };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { AggregatorClient, Env } from '@cetusprotocol/aggregator-sdk';
3
3
  import { EventEmitter } from 'eventemitter3';
4
4
  import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
5
5
  import { normalizeSuiAddress, isValidSuiAddress } from '@mysten/sui/utils';
6
- import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
6
+ import { Ed25519Keypair, Ed25519PublicKey } from '@mysten/sui/keypairs/ed25519';
7
7
  import { decodeSuiPrivateKey } from '@mysten/sui/cryptography';
8
8
  import { createHash, randomBytes, createCipheriv, createDecipheriv, scryptSync } from 'crypto';
9
9
  import { access, mkdir, writeFile, readFile } from 'fs/promises';
@@ -488,15 +488,27 @@ function assertAllowedAsset(op, asset) {
488
488
  );
489
489
  }
490
490
  }
491
- var T2000_PACKAGE_ID = process.env.T2000_PACKAGE_ID ?? "0xab92e9f1fe549ad3d6a52924a73181b45791e76120b975138fac9ec9b75db9f3";
492
- var T2000_CONFIG_ID = process.env.T2000_CONFIG_ID ?? "0x408add9aa9322f93cfd87523d8f603006eb8713894f4c460283c58a6888dae8a";
493
- var T2000_TREASURY_ID = process.env.T2000_TREASURY_ID ?? "0x3bb501b8300125dca59019247941a42af6b292a150ce3cfcce9449456be2ec91";
491
+ var T2000_PACKAGE_ID = process.env.T2000_PACKAGE_ID ?? "0xd775fcc66eae26797654d435d751dea56b82eeb999de51fd285348e573b968ad";
492
+ var T2000_CONFIG_ID = process.env.T2000_CONFIG_ID ?? "0x08ba26f0d260b5edf6a19c71492b3eb914906a7419baf2df1426765157e5862a";
493
+ var T2000_ADMIN_CAP_ID = "0xa97bfff140f5a2c268a03fe5422d382c228057deb7bcfdaf2967ca18b9bdbbd9";
494
+ var T2000_TREASURY_ID = process.env.T2000_TREASURY_ID ?? "0xf420ec0dcad44433042fb56e1413fb88d3ff65be94fcf425ef9ff750164590e8";
494
495
  var DEFAULT_NETWORK = "mainnet";
495
496
  var DEFAULT_RPC_URL = "https://fullnode.mainnet.sui.io:443";
496
497
  var DEFAULT_KEY_PATH = "~/.t2000/wallet.key";
497
498
  var API_BASE_URL = process.env.T2000_API_URL ?? "https://api.t2000.ai";
498
499
  var CETUS_USDC_SUI_POOL = "0x51e883ba7c0b566a26cbc8a94cd33eb0abd418a77cc1e60ad22fd9b1f29cd2ab";
499
500
  var GAS_RESERVE_MIN = 0.05;
501
+ var ALLOWANCE_FEATURES = {
502
+ BRIEFING: 0,
503
+ YIELD_ALERT: 1,
504
+ PAYMENT_ALERT: 2,
505
+ ACTION_REMIND: 3,
506
+ SESSION: 4,
507
+ AUTO_COMPOUND: 5,
508
+ DCA: 6,
509
+ HF_ALERT: 7
510
+ };
511
+ var FEATURES_ALL = 255;
500
512
 
501
513
  // src/utils/sui.ts
502
514
  init_errors();
@@ -3261,6 +3273,190 @@ async function callUsdcSponsorApi(address) {
3261
3273
 
3262
3274
  // src/index.ts
3263
3275
  init_errors();
3276
+ var USDC_TYPE2 = SUPPORTED_ASSETS.USDC.type;
3277
+ function buildCreateAllowanceTx(options = {}) {
3278
+ const tx = new Transaction();
3279
+ tx.moveCall({
3280
+ target: `${T2000_PACKAGE_ID}::allowance::create`,
3281
+ typeArguments: [USDC_TYPE2],
3282
+ arguments: [
3283
+ tx.pure.u64(options.permittedFeatures ?? BigInt(FEATURES_ALL)),
3284
+ tx.pure.u64(options.expiresAt ?? 0n),
3285
+ tx.pure.u64(options.dailyLimit ?? 0n),
3286
+ tx.object(CLOCK_ID)
3287
+ ]
3288
+ });
3289
+ return tx;
3290
+ }
3291
+ function addDepositAllowanceTx(tx, allowanceId, paymentCoin) {
3292
+ tx.moveCall({
3293
+ target: `${T2000_PACKAGE_ID}::allowance::deposit`,
3294
+ typeArguments: [USDC_TYPE2],
3295
+ arguments: [tx.object(allowanceId), paymentCoin]
3296
+ });
3297
+ }
3298
+ function buildDepositAllowanceTx(allowanceId, usdcCoin, amount) {
3299
+ const tx = new Transaction();
3300
+ const [split] = tx.splitCoins(tx.object(usdcCoin), [tx.pure.u64(amount)]);
3301
+ addDepositAllowanceTx(tx, allowanceId, split);
3302
+ return tx;
3303
+ }
3304
+ function buildAdminDepositAllowanceTx(allowanceId, usdcCoin, amount) {
3305
+ const tx = new Transaction();
3306
+ const [split] = tx.splitCoins(tx.object(usdcCoin), [tx.pure.u64(amount)]);
3307
+ tx.moveCall({
3308
+ target: `${T2000_PACKAGE_ID}::allowance::admin_deposit`,
3309
+ typeArguments: [USDC_TYPE2],
3310
+ arguments: [
3311
+ tx.object(allowanceId),
3312
+ tx.object(T2000_ADMIN_CAP_ID),
3313
+ split
3314
+ ]
3315
+ });
3316
+ return tx;
3317
+ }
3318
+ function buildDeductAllowanceTx(allowanceId, amount, feature) {
3319
+ const tx = new Transaction();
3320
+ tx.moveCall({
3321
+ target: `${T2000_PACKAGE_ID}::allowance::deduct`,
3322
+ typeArguments: [USDC_TYPE2],
3323
+ arguments: [
3324
+ tx.object(allowanceId),
3325
+ tx.object(T2000_CONFIG_ID),
3326
+ tx.object(T2000_ADMIN_CAP_ID),
3327
+ tx.pure.u64(amount),
3328
+ tx.pure.u8(feature),
3329
+ tx.object(CLOCK_ID)
3330
+ ]
3331
+ });
3332
+ return tx;
3333
+ }
3334
+ function buildWithdrawAllowanceTx(allowanceId) {
3335
+ const tx = new Transaction();
3336
+ tx.moveCall({
3337
+ target: `${T2000_PACKAGE_ID}::allowance::withdraw`,
3338
+ typeArguments: [USDC_TYPE2],
3339
+ arguments: [tx.object(allowanceId)]
3340
+ });
3341
+ return tx;
3342
+ }
3343
+ function buildWithdrawAmountAllowanceTx(allowanceId, amount) {
3344
+ const tx = new Transaction();
3345
+ tx.moveCall({
3346
+ target: `${T2000_PACKAGE_ID}::allowance::withdraw_amount`,
3347
+ typeArguments: [USDC_TYPE2],
3348
+ arguments: [tx.object(allowanceId), tx.pure.u64(amount)]
3349
+ });
3350
+ return tx;
3351
+ }
3352
+ async function getAllowance(client, allowanceId) {
3353
+ const obj = await client.getObject({
3354
+ id: allowanceId,
3355
+ options: { showContent: true, showType: true }
3356
+ });
3357
+ if (!obj.data?.content || obj.data.content.dataType !== "moveObject") {
3358
+ throw new Error(`Allowance ${allowanceId} not found or is not a Move object`);
3359
+ }
3360
+ const fields = obj.data.content.fields;
3361
+ const coinType = extractCoinType(obj.data.content.type);
3362
+ return {
3363
+ id: allowanceId,
3364
+ owner: fields.owner,
3365
+ balance: parseU64Field(fields.balance),
3366
+ totalDeposited: parseU64Field(fields.total_deposited),
3367
+ totalSpent: parseU64Field(fields.total_spent),
3368
+ createdAt: Number(fields.created_at),
3369
+ coinType,
3370
+ permittedFeatures: parseU64Field(fields.permitted_features),
3371
+ expiresAt: Number(fields.expires_at),
3372
+ dailyLimit: parseU64Field(fields.daily_limit),
3373
+ dailySpent: parseU64Field(fields.daily_spent),
3374
+ windowStart: Number(fields.window_start)
3375
+ };
3376
+ }
3377
+ async function getAllowanceBalance(client, allowanceId) {
3378
+ const info = await getAllowance(client, allowanceId);
3379
+ return info.balance;
3380
+ }
3381
+ function parseU64Field(raw) {
3382
+ if (typeof raw === "string" || typeof raw === "number") return BigInt(raw);
3383
+ if (typeof raw === "object" && raw !== null && "value" in raw) {
3384
+ return BigInt(raw.value);
3385
+ }
3386
+ return 0n;
3387
+ }
3388
+ function extractCoinType(objectType) {
3389
+ const match = objectType.match(/<(.+)>/);
3390
+ return match ? match[1] : "unknown";
3391
+ }
3392
+
3393
+ // src/protocols/financialSummary.ts
3394
+ var HF_WARN_THRESHOLD = 1.8;
3395
+ var HF_CRITICAL_THRESHOLD = 1.3;
3396
+ var HF_FALLBACK = {
3397
+ healthFactor: Infinity,
3398
+ supplied: 0,
3399
+ borrowed: 0,
3400
+ maxBorrow: 0,
3401
+ liquidationThreshold: 0.75
3402
+ };
3403
+ function classifyHF(hf, hasBorrow) {
3404
+ if (!hasBorrow || !Number.isFinite(hf)) return "none";
3405
+ if (hf <= HF_CRITICAL_THRESHOLD) return "critical";
3406
+ if (hf <= HF_WARN_THRESHOLD) return "warn";
3407
+ return "none";
3408
+ }
3409
+ async function fetchSuiPriceUsd(client) {
3410
+ try {
3411
+ const pool = await client.getObject({
3412
+ id: CETUS_USDC_SUI_POOL,
3413
+ options: { showContent: true }
3414
+ });
3415
+ if (pool.data?.content?.dataType === "moveObject") {
3416
+ const fields = pool.data.content.fields;
3417
+ const sqrtPrice = BigInt(String(fields.current_sqrt_price ?? "0"));
3418
+ if (sqrtPrice > 0n) {
3419
+ const Q64 = 2n ** 64n;
3420
+ const sqrtFloat = Number(sqrtPrice) / Number(Q64);
3421
+ const price = 1e3 / (sqrtFloat * sqrtFloat);
3422
+ if (price > 0.01 && price < 1e3) return price;
3423
+ }
3424
+ }
3425
+ } catch {
3426
+ }
3427
+ return 1;
3428
+ }
3429
+ async function getFinancialSummary(client, walletAddress, options = {}) {
3430
+ const [usdcBal, suiBal, hf, rates, suiPrice, allowance] = await Promise.all([
3431
+ client.getBalance({ owner: walletAddress, coinType: SUPPORTED_ASSETS.USDC.type }).catch(() => ({ totalBalance: "0" })),
3432
+ client.getBalance({ owner: walletAddress, coinType: SUPPORTED_ASSETS.SUI.type }).catch(() => ({ totalBalance: "0" })),
3433
+ getHealthFactor(client, walletAddress).catch(() => HF_FALLBACK),
3434
+ getRates(client),
3435
+ fetchSuiPriceUsd(client),
3436
+ options.allowanceId ? getAllowanceBalance(client, options.allowanceId).catch(() => null) : Promise.resolve(null)
3437
+ ]);
3438
+ const usdcAvailable = Number(usdcBal.totalBalance) / 10 ** SUPPORTED_ASSETS.USDC.decimals;
3439
+ const gasReserveSui = Number(suiBal.totalBalance) / Number(MIST_PER_SUI);
3440
+ const saveApy = rates.USDC?.saveApy ?? 0;
3441
+ const borrowApy = rates.USDC?.borrowApy ?? 0;
3442
+ const dailyYield = hf.supplied * (saveApy / 365);
3443
+ return {
3444
+ walletAddress,
3445
+ usdcAvailable,
3446
+ savingsBalance: hf.supplied,
3447
+ debtBalance: hf.borrowed,
3448
+ idleUsdc: Math.max(0, usdcAvailable),
3449
+ healthFactor: hf.healthFactor,
3450
+ hfAlertLevel: classifyHF(hf.healthFactor, hf.borrowed > 0),
3451
+ saveApy,
3452
+ borrowApy,
3453
+ dailyYield,
3454
+ gasReserveSui,
3455
+ gasReserveUsd: gasReserveSui * suiPrice,
3456
+ allowanceBalance: allowance,
3457
+ fetchedAt: Date.now()
3458
+ };
3459
+ }
3264
3460
 
3265
3461
  // src/utils/simulate.ts
3266
3462
  init_errors();
@@ -3372,7 +3568,59 @@ async function getSwapQuote(params) {
3372
3568
  init_cetus_swap();
3373
3569
  init_token_registry();
3374
3570
  init_volo();
3571
+ var DEFAULT_TTL_MS = 6e4;
3572
+ async function buildScopedIntent(adminKeypair, params) {
3573
+ const now = Date.now();
3574
+ const nonceBytes = new Uint8Array(32);
3575
+ crypto.getRandomValues(nonceBytes);
3576
+ const nonce = Buffer.from(nonceBytes).toString("hex");
3577
+ const payload = {
3578
+ version: 1,
3579
+ userId: params.userId,
3580
+ walletAddress: params.walletAddress,
3581
+ allowanceObjectId: params.allowanceObjectId,
3582
+ featureCode: params.featureCode,
3583
+ maxAmount: params.maxAmount,
3584
+ issuedAt: now,
3585
+ expiresAt: now + (params.ttlMs ?? DEFAULT_TTL_MS),
3586
+ nonce
3587
+ };
3588
+ const message = canonicalIntentBytes(payload);
3589
+ const signature = await adminKeypair.sign(message);
3590
+ return {
3591
+ ...payload,
3592
+ signature: Buffer.from(signature).toString("hex")
3593
+ };
3594
+ }
3595
+ async function verifyScopedIntent(intent, adminPublicKeyBytes) {
3596
+ if (Date.now() > intent.expiresAt) return false;
3597
+ const payload = {
3598
+ version: intent.version,
3599
+ userId: intent.userId,
3600
+ walletAddress: intent.walletAddress,
3601
+ allowanceObjectId: intent.allowanceObjectId,
3602
+ featureCode: intent.featureCode,
3603
+ maxAmount: intent.maxAmount,
3604
+ issuedAt: intent.issuedAt,
3605
+ expiresAt: intent.expiresAt,
3606
+ nonce: intent.nonce
3607
+ };
3608
+ const message = canonicalIntentBytes(payload);
3609
+ const signatureBytes = Buffer.from(intent.signature, "hex");
3610
+ try {
3611
+ const publicKey = new Ed25519PublicKey(adminPublicKeyBytes);
3612
+ return await publicKey.verify(message, signatureBytes);
3613
+ } catch {
3614
+ return false;
3615
+ }
3616
+ }
3617
+ function canonicalIntentBytes(payload) {
3618
+ const sorted = Object.fromEntries(
3619
+ Object.entries(payload).sort(([a], [b]) => a.localeCompare(b))
3620
+ );
3621
+ return new TextEncoder().encode(JSON.stringify(sorted));
3622
+ }
3375
3623
 
3376
- export { ALL_NAVI_ASSETS, BPS_DENOMINATOR, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, ContactManager, DEFAULT_NETWORK, DEFAULT_SAFEGUARD_CONFIG, ETH_TYPE, GAS_RESERVE_MIN, IKA_TYPE, KeypairSigner, LOFI_TYPE, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, NaviAdapter, OPERATION_ASSETS, OUTBOUND_OPS, ProtocolRegistry, 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, addCollectFeeToTx, allDescriptors, assertAllowedAsset, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, calculateFee, executeAutoTopUp, executeWithGas, exportPrivateKey, findSwapRoute, formatAssetAmount, formatSui, formatUsd, generateKeypair, getAddress, getDecimals, getDecimalsForCoinType, getGasStatus, getRates, getSwapQuote, getTier, getVoloStats, isAllowedAsset, isSupported, isTier1, isTier2, keypairFromPrivateKey, loadKey, mapMoveAbortCode, mapWalletError, mistToSui, naviDescriptor, rawToStable, rawToUsdc, resolveSymbol, resolveTokenType, saveKey, shouldAutoTopUp, simulateTransaction, solveHashcash, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, walletExists };
3624
+ export { ALLOWANCE_FEATURES, ALL_NAVI_ASSETS, 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, KeypairSigner, LOFI_TYPE, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, NaviAdapter, OPERATION_ASSETS, OUTBOUND_OPS, ProtocolRegistry, 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, addCollectFeeToTx, addDepositAllowanceTx, allDescriptors, assertAllowedAsset, buildAdminDepositAllowanceTx, buildCreateAllowanceTx, buildDeductAllowanceTx, buildDepositAllowanceTx, buildScopedIntent, buildStakeVSuiTx, buildSwapTx, buildUnstakeVSuiTx, buildWithdrawAllowanceTx, buildWithdrawAmountAllowanceTx, calculateFee, executeAutoTopUp, executeWithGas, exportPrivateKey, findSwapRoute, formatAssetAmount, formatSui, formatUsd, generateKeypair, getAddress, getAllowance, getAllowanceBalance, getDecimals, getDecimalsForCoinType, getFinancialSummary, getGasStatus, getRates, getSwapQuote, getTier, getVoloStats, isAllowedAsset, isSupported, isTier1, isTier2, keypairFromPrivateKey, loadKey, mapMoveAbortCode, mapWalletError, mistToSui, naviDescriptor, rawToStable, rawToUsdc, resolveSymbol, resolveTokenType, saveKey, shouldAutoTopUp, simulateTransaction, solveHashcash, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, verifyScopedIntent, walletExists };
3377
3625
  //# sourceMappingURL=index.js.map
3378
3626
  //# sourceMappingURL=index.js.map