@t2000/sdk 3.2.0 → 3.3.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/README.md +1 -4
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/index.cjs +10 -236
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -135
- package/dist/index.d.ts +17 -135
- package/dist/index.js +12 -233
- package/dist/index.js.map +1 -1
- package/dist/{types-Bh_0d-te.d.cts → types-C1DH4kPA.d.cts} +1 -1
- package/dist/{types-BmgPRlnq.d.ts → types-DjeENMuV.d.ts} +1 -1
- package/dist/{types-Bk7NncQ_.d.cts → types-HJGbXJ37.d.cts} +1 -16
- package/dist/{types-Bk7NncQ_.d.ts → types-HJGbXJ37.d.ts} +1 -16
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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 { Q as TxMetadata, o as SafeguardConfig, T as T2000Error, H as TransactionSigner, _ as ZkLoginProof, v as SupportedAsset } from './types-
|
|
5
|
-
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, ax 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, ay as OPERATION_ASSETS, O as OUTBOUND_OPS, az as Operation, P as ProtocolFeeInfo, aA as SAVEABLE_ASSETS, S as SAVE_FEE_BPS, k as STABLE_ASSETS, l as SUI_DECIMALS, m as SUI_TYPE, n as SUPPORTED_ASSETS, p as SafeguardError, q as SafeguardErrorDetails, r as SafeguardRule, aB as SaveableAsset, s as SimulationResult, t as StableAsset, u as SuiRpcTxBlock, w as T2000ErrorCode, x as T2000ErrorData, y as T2000_OVERLAY_FEE_WALLET, z as TOKEN_MAP, J as TxDirection, U as USDC_DECIMALS, R as USDC_TYPE, V as USDE_TYPE, W as USDSUI_TYPE, X as USDT_TYPE, Y as WAL_TYPE, Z as WBTC_TYPE, $ as ZkLoginSigner, a0 as addFeeTransfer, aC as assertAllowedAsset, a1 as calculateFee, a2 as classifyAction, a3 as classifyLabel, a4 as classifyTransaction, a5 as extractAllUserLegs, a6 as extractTransferDetails, a7 as extractTxCommands, a8 as extractTxSender, a9 as fallbackLabel, aa as formatAssetAmount, ab as formatSui, ac as formatUsd, aD as getCoinMeta, ad as getDecimals, ae as getDecimalsForCoinType, af as getTier, aE as isAllowedAsset, aF as isInRegistry, ag as isSupported, ah as isTier1, ai as isTier2, aj as mapMoveAbortCode, ak as mapWalletError, al as mistToSui, aG as normalizeAsset, aH as normalizeCoinType, am as parseSuiRpcTx, aI as queryHistory, aJ as queryTransaction, an as rawToStable, ao as rawToUsdc, ap as refineLendingLabel, aq as resolveSymbol, ar as resolveTokenType, aK as simulateTransaction, as as stableToRaw, at as suiToMist, aL as throwIfSimulationFailed, au as truncateAddress, av as usdcToRaw, aw as validateAddress } from './types-
|
|
4
|
+
import { Q as TxMetadata, o as SafeguardConfig, T as T2000Error, H as TransactionSigner, _ as ZkLoginProof, v as SupportedAsset } from './types-C1DH4kPA.cjs';
|
|
5
|
+
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, ax 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, ay as OPERATION_ASSETS, O as OUTBOUND_OPS, az as Operation, P as ProtocolFeeInfo, aA as SAVEABLE_ASSETS, S as SAVE_FEE_BPS, k as STABLE_ASSETS, l as SUI_DECIMALS, m as SUI_TYPE, n as SUPPORTED_ASSETS, p as SafeguardError, q as SafeguardErrorDetails, r as SafeguardRule, aB as SaveableAsset, s as SimulationResult, t as StableAsset, u as SuiRpcTxBlock, w as T2000ErrorCode, x as T2000ErrorData, y as T2000_OVERLAY_FEE_WALLET, z as TOKEN_MAP, J as TxDirection, U as USDC_DECIMALS, R as USDC_TYPE, V as USDE_TYPE, W as USDSUI_TYPE, X as USDT_TYPE, Y as WAL_TYPE, Z as WBTC_TYPE, $ as ZkLoginSigner, a0 as addFeeTransfer, aC as assertAllowedAsset, a1 as calculateFee, a2 as classifyAction, a3 as classifyLabel, a4 as classifyTransaction, a5 as extractAllUserLegs, a6 as extractTransferDetails, a7 as extractTxCommands, a8 as extractTxSender, a9 as fallbackLabel, aa as formatAssetAmount, ab as formatSui, ac as formatUsd, aD as getCoinMeta, ad as getDecimals, ae as getDecimalsForCoinType, af as getTier, aE as isAllowedAsset, aF as isInRegistry, ag as isSupported, ah as isTier1, ai as isTier2, aj as mapMoveAbortCode, ak as mapWalletError, al as mistToSui, aG as normalizeAsset, aH as normalizeCoinType, am as parseSuiRpcTx, aI as queryHistory, aJ as queryTransaction, an as rawToStable, ao as rawToUsdc, ap as refineLendingLabel, aq as resolveSymbol, ar as resolveTokenType, aK as simulateTransaction, as as stableToRaw, at as suiToMist, aL as throwIfSimulationFailed, au as truncateAddress, av as usdcToRaw, aw as validateAddress } from './types-C1DH4kPA.cjs';
|
|
6
6
|
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-DqIb4AnV.cjs';
|
|
7
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-DqIb4AnV.cjs';
|
|
8
|
-
import { n as T2000Options, P as PayOptions, d as PayResult, o as
|
|
9
|
-
export { A as AssetRates, G as GasReserve,
|
|
8
|
+
import { n as T2000Options, P as PayOptions, d as PayResult, o as SwapResult, p as SwapQuoteResult, i as SendResult, B as BalanceResponse, k as TransactionRecord, D as DepositInfo, q as PaymentRequest, S as SaveResult, W as WithdrawResult, b as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, r as CompoundRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, c as OverlayFeeConfig, j as SwapRouteResult, s as FinancialSummary } from './types-HJGbXJ37.cjs';
|
|
9
|
+
export { A as AssetRates, G as GasReserve, t as HFAlertLevel, O as OVERLAY_FEE_RATE, f as PositionEntry, u as SerializedCetusRoute, v as SerializedCetusRoutePath, w as SerializedRouterDataV3, T as TransactionLeg, x as addSwapToTx, l as buildSwapTx, y as deserializeCetusRoute, m as findSwapRoute, z as isCetusRouteFresh, I as serializeCetusRoute, J as verifyCetusRouteCoinMatch } from './types-HJGbXJ37.cjs';
|
|
10
10
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
11
11
|
import { SuinsClient } from '@mysten/suins';
|
|
12
12
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.cjs';
|
|
@@ -111,12 +111,6 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
111
111
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
112
112
|
get signer(): TransactionSigner;
|
|
113
113
|
pay(options: PayOptions): Promise<PayResult>;
|
|
114
|
-
stakeVSui(params: {
|
|
115
|
-
amount: number;
|
|
116
|
-
}): Promise<StakeVSuiResult>;
|
|
117
|
-
unstakeVSui(params: {
|
|
118
|
-
amount: number | 'all';
|
|
119
|
-
}): Promise<UnstakeVSuiResult>;
|
|
120
114
|
swap(params: {
|
|
121
115
|
from: string;
|
|
122
116
|
to: string;
|
|
@@ -583,13 +577,18 @@ declare function selectSuiCoin(tx: Transaction, client: SuiJsonRpcClient, owner:
|
|
|
583
577
|
*/
|
|
584
578
|
|
|
585
579
|
/**
|
|
586
|
-
* Canonical write tools. The
|
|
587
|
-
*
|
|
580
|
+
* Canonical write tools. The 8 tools that can be composed into a PTB.
|
|
581
|
+
*
|
|
582
|
+
* History:
|
|
583
|
+
* - 2026-05-08 (Track B): added `harvest_rewards` (compound macro).
|
|
584
|
+
* - 2026-05-25 (S.323): removed `volo_stake` / `volo_unstake` — full Volo
|
|
585
|
+
* cut across SDK/CLI/MCP after the engine cut Volo in S.277. vSUI
|
|
586
|
+
* remains as a passive token (NAVI reward, Cetus swap target).
|
|
588
587
|
*
|
|
589
588
|
* Excluded by design:
|
|
590
589
|
* - `save_contact` — no on-chain leg (Prisma-only).
|
|
591
590
|
*/
|
|
592
|
-
type WriteToolName = 'save_deposit' | 'withdraw' | 'borrow' | 'repay_debt' | 'send_transfer' | 'swap_execute' | 'claim_rewards' | 'harvest_rewards'
|
|
591
|
+
type WriteToolName = 'save_deposit' | 'withdraw' | 'borrow' | 'repay_debt' | 'send_transfer' | 'swap_execute' | 'claim_rewards' | 'harvest_rewards';
|
|
593
592
|
interface SaveDepositInput {
|
|
594
593
|
amount: number;
|
|
595
594
|
asset?: 'USDC' | 'USDsui';
|
|
@@ -644,12 +643,6 @@ interface HarvestRewardsInput {
|
|
|
644
643
|
/** USD floor for "is this worth swapping?" — dust below transfers to wallet. Default $0.01. */
|
|
645
644
|
minRewardUsd?: number;
|
|
646
645
|
}
|
|
647
|
-
interface VoloStakeInput {
|
|
648
|
-
amountSui: number;
|
|
649
|
-
}
|
|
650
|
-
interface VoloUnstakeInput {
|
|
651
|
-
amountVSui: number | 'all';
|
|
652
|
-
}
|
|
653
646
|
/**
|
|
654
647
|
* Discriminated union mapping `toolName` → `input`. Used to type
|
|
655
648
|
* `WriteStep` so consumers get autocomplete + compile-time validation
|
|
@@ -695,14 +688,6 @@ type WriteStep = {
|
|
|
695
688
|
} | {
|
|
696
689
|
toolName: 'harvest_rewards';
|
|
697
690
|
input: HarvestRewardsInput;
|
|
698
|
-
} | {
|
|
699
|
-
toolName: 'volo_stake';
|
|
700
|
-
input: VoloStakeInput;
|
|
701
|
-
inputCoinFromStep?: number;
|
|
702
|
-
} | {
|
|
703
|
-
toolName: 'volo_unstake';
|
|
704
|
-
input: VoloUnstakeInput;
|
|
705
|
-
inputCoinFromStep?: number;
|
|
706
691
|
};
|
|
707
692
|
interface ComposeTxOptions {
|
|
708
693
|
sender: string;
|
|
@@ -831,12 +816,6 @@ type StepPreview = {
|
|
|
831
816
|
reason: 'untradeable' | 'dust' | 'no-route';
|
|
832
817
|
}>;
|
|
833
818
|
expectedUsdcDeposited: number;
|
|
834
|
-
} | {
|
|
835
|
-
toolName: 'volo_stake';
|
|
836
|
-
effectiveAmountMist: bigint;
|
|
837
|
-
} | {
|
|
838
|
-
toolName: 'volo_unstake';
|
|
839
|
-
effectiveAmountMist: bigint | 'all';
|
|
840
819
|
};
|
|
841
820
|
interface ComposeTxResult {
|
|
842
821
|
tx: Transaction;
|
|
@@ -898,8 +877,9 @@ interface AppenderContext {
|
|
|
898
877
|
* downstream consumer's `chainedCoin`. Terminal consumers
|
|
899
878
|
* (`save_deposit`, `repay_debt`, `send_transfer`) omit it.
|
|
900
879
|
*
|
|
901
|
-
* `swap_execute
|
|
902
|
-
*
|
|
880
|
+
* `swap_execute` is the only dual-mode tool — it accepts `chainedCoin`
|
|
881
|
+
* AND populates `outputCoin`. (`volo_stake` / `volo_unstake` were also
|
|
882
|
+
* dual-mode prior to S.323 / 2026-05-25; cut with the full Volo removal.)
|
|
903
883
|
*/
|
|
904
884
|
interface AppenderResult<TPreview extends StepPreview> {
|
|
905
885
|
preview: TPreview;
|
|
@@ -932,7 +912,7 @@ declare function getSponsoredSwapProviders(): Promise<string[]>;
|
|
|
932
912
|
/**
|
|
933
913
|
* The typed registry. Each entry is a wallet-mode dispatcher that takes
|
|
934
914
|
* (tx, input, ctx) and returns a per-step preview. Compile-time check
|
|
935
|
-
* that all
|
|
915
|
+
* that all 8 `WriteToolName` values have an entry — TypeScript will
|
|
936
916
|
* fail the build if a tool is missing.
|
|
937
917
|
*/
|
|
938
918
|
declare const WRITE_APPENDER_REGISTRY: {
|
|
@@ -960,12 +940,6 @@ declare const WRITE_APPENDER_REGISTRY: {
|
|
|
960
940
|
harvest_rewards: AppenderFn<HarvestRewardsInput, Extract<StepPreview, {
|
|
961
941
|
toolName: 'harvest_rewards';
|
|
962
942
|
}>>;
|
|
963
|
-
volo_stake: AppenderFn<VoloStakeInput, Extract<StepPreview, {
|
|
964
|
-
toolName: 'volo_stake';
|
|
965
|
-
}>>;
|
|
966
|
-
volo_unstake: AppenderFn<VoloUnstakeInput, Extract<StepPreview, {
|
|
967
|
-
toolName: 'volo_unstake';
|
|
968
|
-
}>>;
|
|
969
943
|
};
|
|
970
944
|
/**
|
|
971
945
|
* Walks the assembled PTB's command list and extracts every recipient
|
|
@@ -1274,98 +1248,6 @@ declare function getSwapQuote(params: {
|
|
|
1274
1248
|
providers?: string[];
|
|
1275
1249
|
}): Promise<SwapQuoteResult>;
|
|
1276
1250
|
|
|
1277
|
-
/**
|
|
1278
|
-
* VOLO vSUI liquid staking — thin transaction builders.
|
|
1279
|
-
* No SDK dependency. Two Move calls, immutable contract addresses.
|
|
1280
|
-
*/
|
|
1281
|
-
|
|
1282
|
-
declare const VOLO_PKG = "0x68d22cf8bdbcd11ecba1e094922873e4080d4d11133e2443fddda0bfd11dae20";
|
|
1283
|
-
declare const VOLO_POOL = "0x2d914e23d82fedef1b5f56a32d5c64bdcc3087ccfea2b4d6ea51a71f587840e5";
|
|
1284
|
-
declare const VOLO_METADATA = "0x680cd26af32b2bde8d3361e804c53ec1d1cfe24c7f039eb7f549e8dfde389a60";
|
|
1285
|
-
declare const VSUI_TYPE = "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT";
|
|
1286
|
-
interface VoloStats {
|
|
1287
|
-
apy: number;
|
|
1288
|
-
exchangeRate: number;
|
|
1289
|
-
tvl: number;
|
|
1290
|
-
}
|
|
1291
|
-
/**
|
|
1292
|
-
* Fetch VOLO vSUI staking stats (APY, exchange rate, TVL).
|
|
1293
|
-
*/
|
|
1294
|
-
declare function getVoloStats(): Promise<VoloStats>;
|
|
1295
|
-
/**
|
|
1296
|
-
* Build a PTB to stake SUI for vSUI.
|
|
1297
|
-
*/
|
|
1298
|
-
declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, amountMist: bigint): Promise<Transaction>;
|
|
1299
|
-
/**
|
|
1300
|
-
* Build a PTB to unstake vSUI back to SUI.
|
|
1301
|
-
*/
|
|
1302
|
-
declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
|
|
1303
|
-
/**
|
|
1304
|
-
* SPEC 7 § "Layer 1" Volo stake appender. Two modes.
|
|
1305
|
-
*
|
|
1306
|
-
* Wallet mode (`inputCoin` omitted): pre-flights via `getBalance` and
|
|
1307
|
-
* sources SUI through `coinWithBalance({ type: SUI, useGasCoin: false })`,
|
|
1308
|
-
* which resolves coin objects + address balance at build time. Mirrors
|
|
1309
|
-
* the audric host's `transactions/prepare/route.ts:524-545` volo-stake
|
|
1310
|
-
* branch — sponsored-flow safe (does NOT consume `tx.gas`, which
|
|
1311
|
-
* belongs to the Enoki sponsor in sponsored flows).
|
|
1312
|
-
*
|
|
1313
|
-
* For non-sponsored flows where the caller owns `tx.gas`, prefer
|
|
1314
|
-
* `buildStakeVSuiTx` directly (it splits from gas, which avoids one
|
|
1315
|
-
* `getBalance` RTT).
|
|
1316
|
-
*
|
|
1317
|
-
* Chain mode (`inputCoin` provided): consumes the passed-in SUI coin
|
|
1318
|
-
* ref entirely. Used for chained flows like "swap USDC → SUI → stake".
|
|
1319
|
-
* The caller is responsible for splitting upstream if they only want
|
|
1320
|
-
* part of the input coin staked.
|
|
1321
|
-
*
|
|
1322
|
-
* @returns
|
|
1323
|
-
* - `coin`: vSUI output coin ref, ready for downstream consumption or
|
|
1324
|
-
* wallet transfer (`tx.transferObjects`).
|
|
1325
|
-
* - `effectiveAmountMist`: SUI mist consumed (echoes `input.amountMist`
|
|
1326
|
-
* in both modes; chain-mode trusts the caller-supplied value since
|
|
1327
|
-
* the actual coin balance is opaque).
|
|
1328
|
-
*/
|
|
1329
|
-
declare function addStakeVSuiToTx(tx: Transaction, client: SuiJsonRpcClient, address: string, input: {
|
|
1330
|
-
amountMist: bigint;
|
|
1331
|
-
inputCoin?: TransactionObjectArgument;
|
|
1332
|
-
}): Promise<{
|
|
1333
|
-
coin: TransactionObjectArgument;
|
|
1334
|
-
effectiveAmountMist: bigint;
|
|
1335
|
-
}>;
|
|
1336
|
-
/**
|
|
1337
|
-
* SPEC 7 § "Layer 1" Volo unstake appender. Two modes.
|
|
1338
|
-
*
|
|
1339
|
-
* Wallet mode (`inputCoin` omitted): pre-flights via `getBalance` and
|
|
1340
|
-
* sources vSUI through `coinWithBalance({ type: VSUI, balance })`,
|
|
1341
|
-
* which resolves coin objects + address balance at build time. With
|
|
1342
|
-
* `'all'`, the entire balance is consumed.
|
|
1343
|
-
*
|
|
1344
|
-
* Chain mode (`inputCoin` provided): consumes the passed-in vSUI coin
|
|
1345
|
-
* ref. With `amountMist = 'all'`, the entire input coin is unstaked.
|
|
1346
|
-
* With a bigint `amountMist`, the input coin is split internally and
|
|
1347
|
-
* only that portion unstaked (the leftover stays accessible via the
|
|
1348
|
-
* original ref). Used for chained flows where vSUI was just produced
|
|
1349
|
-
* by a prior step.
|
|
1350
|
-
*
|
|
1351
|
-
* @returns
|
|
1352
|
-
* - `coin`: SUI output coin ref, ready for downstream consumption
|
|
1353
|
-
* (e.g. `addSendToTx`, `addStakeVSuiToTx` re-stake) or wallet
|
|
1354
|
-
* transfer (`tx.transferObjects`).
|
|
1355
|
-
* - `effectiveAmountMist`: input vSUI mist consumed; echoes
|
|
1356
|
-
* `input.amountMist` (`'all'` is preserved as-is — the actual SUI
|
|
1357
|
-
* received differs from input vSUI by the pool exchange rate, so
|
|
1358
|
-
* callers needing the SUI amount must query `getVoloStats` or
|
|
1359
|
-
* parse balance changes from the executed tx).
|
|
1360
|
-
*/
|
|
1361
|
-
declare function addUnstakeVSuiToTx(tx: Transaction, client: SuiJsonRpcClient, address: string, input: {
|
|
1362
|
-
amountMist: bigint | 'all';
|
|
1363
|
-
inputCoin?: TransactionObjectArgument;
|
|
1364
|
-
}): Promise<{
|
|
1365
|
-
coin: TransactionObjectArgument;
|
|
1366
|
-
effectiveAmountMist: bigint | 'all';
|
|
1367
|
-
}>;
|
|
1368
|
-
|
|
1369
1251
|
/**
|
|
1370
1252
|
* SuiNS leaf-subname builders for the `audric.sui` parent NFT.
|
|
1371
1253
|
*
|
|
@@ -1505,4 +1387,4 @@ declare function fullHandle(label: string): string;
|
|
|
1505
1387
|
*/
|
|
1506
1388
|
declare function displayHandle(label: string): string;
|
|
1507
1389
|
|
|
1508
|
-
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BorrowInput, BorrowResult, type BuildAddLeafParams, type BuildHarvestRewardsTxOptions, type BuildRevokeLeafParams, type ClaimRewardsInput, ClaimRewardsResult, type CoinPage, type ComposeTxFeeHookContext, type ComposeTxFeeHooks, type ComposeTxOptions, type ComposeTxResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, type HarvestPlan, type HarvestSkippedLeg, type HarvestSwapLeg, HealthFactorResult, InvalidAddressError, type LabelValidationResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, type RepayDebtInput, RepayResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SafeguardConfig, SafeguardEnforcer, type SaveDepositInput, SaveResult, type SelectAndSplitResult, SendResult, type SendTransferInput,
|
|
1390
|
+
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BorrowInput, BorrowResult, type BuildAddLeafParams, type BuildHarvestRewardsTxOptions, type BuildRevokeLeafParams, type ClaimRewardsInput, ClaimRewardsResult, type CoinPage, type ComposeTxFeeHookContext, type ComposeTxFeeHooks, type ComposeTxOptions, type ComposeTxResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, type HarvestPlan, type HarvestSkippedLeg, type HarvestSwapLeg, HealthFactorResult, InvalidAddressError, type LabelValidationResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, type RepayDebtInput, RepayResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SafeguardConfig, SafeguardEnforcer, type SaveDepositInput, SaveResult, type SelectAndSplitResult, SendResult, type SendTransferInput, type StepPreview, SuinsNotRegisteredError, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, TxMetadata, WRITE_APPENDER_REGISTRY, type WithdrawInput, WithdrawResult, type WriteStep, type WriteToolName, ZkLoginProof, addClaimRewardsToTx, addSendToTx, aggregateClaimableRewards, buildAddLeafTx, buildClaimRewardsTx, buildHarvestRewardsTx, buildRevokeLeafTx, buildSendTx, composeTx, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fetchAllCoins, fullHandle, generateKeypair, getAddress, getFinancialSummary, getPendingRewards, getPendingRewardsByAddress, getRates, getSponsoredSwapProviders, getSwapQuote, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveKey, selectAndSplitCoin, selectSuiCoin, validateLabel, walletExists };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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 { Q as TxMetadata, o as SafeguardConfig, T as T2000Error, H as TransactionSigner, _ as ZkLoginProof, v as SupportedAsset } from './types-
|
|
5
|
-
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, ax 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, ay as OPERATION_ASSETS, O as OUTBOUND_OPS, az as Operation, P as ProtocolFeeInfo, aA as SAVEABLE_ASSETS, S as SAVE_FEE_BPS, k as STABLE_ASSETS, l as SUI_DECIMALS, m as SUI_TYPE, n as SUPPORTED_ASSETS, p as SafeguardError, q as SafeguardErrorDetails, r as SafeguardRule, aB as SaveableAsset, s as SimulationResult, t as StableAsset, u as SuiRpcTxBlock, w as T2000ErrorCode, x as T2000ErrorData, y as T2000_OVERLAY_FEE_WALLET, z as TOKEN_MAP, J as TxDirection, U as USDC_DECIMALS, R as USDC_TYPE, V as USDE_TYPE, W as USDSUI_TYPE, X as USDT_TYPE, Y as WAL_TYPE, Z as WBTC_TYPE, $ as ZkLoginSigner, a0 as addFeeTransfer, aC as assertAllowedAsset, a1 as calculateFee, a2 as classifyAction, a3 as classifyLabel, a4 as classifyTransaction, a5 as extractAllUserLegs, a6 as extractTransferDetails, a7 as extractTxCommands, a8 as extractTxSender, a9 as fallbackLabel, aa as formatAssetAmount, ab as formatSui, ac as formatUsd, aD as getCoinMeta, ad as getDecimals, ae as getDecimalsForCoinType, af as getTier, aE as isAllowedAsset, aF as isInRegistry, ag as isSupported, ah as isTier1, ai as isTier2, aj as mapMoveAbortCode, ak as mapWalletError, al as mistToSui, aG as normalizeAsset, aH as normalizeCoinType, am as parseSuiRpcTx, aI as queryHistory, aJ as queryTransaction, an as rawToStable, ao as rawToUsdc, ap as refineLendingLabel, aq as resolveSymbol, ar as resolveTokenType, aK as simulateTransaction, as as stableToRaw, at as suiToMist, aL as throwIfSimulationFailed, au as truncateAddress, av as usdcToRaw, aw as validateAddress } from './types-
|
|
4
|
+
import { Q as TxMetadata, o as SafeguardConfig, T as T2000Error, H as TransactionSigner, _ as ZkLoginProof, v as SupportedAsset } from './types-DjeENMuV.js';
|
|
5
|
+
export { A as ALL_NAVI_ASSETS, B as BORROW_FEE_BPS, a as BPS_DENOMINATOR, ax 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, ay as OPERATION_ASSETS, O as OUTBOUND_OPS, az as Operation, P as ProtocolFeeInfo, aA as SAVEABLE_ASSETS, S as SAVE_FEE_BPS, k as STABLE_ASSETS, l as SUI_DECIMALS, m as SUI_TYPE, n as SUPPORTED_ASSETS, p as SafeguardError, q as SafeguardErrorDetails, r as SafeguardRule, aB as SaveableAsset, s as SimulationResult, t as StableAsset, u as SuiRpcTxBlock, w as T2000ErrorCode, x as T2000ErrorData, y as T2000_OVERLAY_FEE_WALLET, z as TOKEN_MAP, J as TxDirection, U as USDC_DECIMALS, R as USDC_TYPE, V as USDE_TYPE, W as USDSUI_TYPE, X as USDT_TYPE, Y as WAL_TYPE, Z as WBTC_TYPE, $ as ZkLoginSigner, a0 as addFeeTransfer, aC as assertAllowedAsset, a1 as calculateFee, a2 as classifyAction, a3 as classifyLabel, a4 as classifyTransaction, a5 as extractAllUserLegs, a6 as extractTransferDetails, a7 as extractTxCommands, a8 as extractTxSender, a9 as fallbackLabel, aa as formatAssetAmount, ab as formatSui, ac as formatUsd, aD as getCoinMeta, ad as getDecimals, ae as getDecimalsForCoinType, af as getTier, aE as isAllowedAsset, aF as isInRegistry, ag as isSupported, ah as isTier1, ai as isTier2, aj as mapMoveAbortCode, ak as mapWalletError, al as mistToSui, aG as normalizeAsset, aH as normalizeCoinType, am as parseSuiRpcTx, aI as queryHistory, aJ as queryTransaction, an as rawToStable, ao as rawToUsdc, ap as refineLendingLabel, aq as resolveSymbol, ar as resolveTokenType, aK as simulateTransaction, as as stableToRaw, at as suiToMist, aL as throwIfSimulationFailed, au as truncateAddress, av as usdcToRaw, aw as validateAddress } from './types-DjeENMuV.js';
|
|
6
6
|
import { L as LendingAdapter, a as LendingRates, P as PendingReward$1 } from './descriptors-DqIb4AnV.js';
|
|
7
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-DqIb4AnV.js';
|
|
8
|
-
import { n as T2000Options, P as PayOptions, d as PayResult, o as
|
|
9
|
-
export { A as AssetRates, G as GasReserve,
|
|
8
|
+
import { n as T2000Options, P as PayOptions, d as PayResult, o as SwapResult, p as SwapQuoteResult, i as SendResult, B as BalanceResponse, k as TransactionRecord, D as DepositInfo, q as PaymentRequest, S as SaveResult, W as WithdrawResult, b as MaxWithdrawResult, a as BorrowResult, h as RepayResult, M as MaxBorrowResult, H as HealthFactorResult, e as PendingReward, C as ClaimRewardsResult, r as CompoundRewardsResult, g as PositionsResult, R as RatesResult, E as EarningsResult, F as FundStatusResult, c as OverlayFeeConfig, j as SwapRouteResult, s as FinancialSummary } from './types-HJGbXJ37.js';
|
|
9
|
+
export { A as AssetRates, G as GasReserve, t as HFAlertLevel, O as OVERLAY_FEE_RATE, f as PositionEntry, u as SerializedCetusRoute, v as SerializedCetusRoutePath, w as SerializedRouterDataV3, T as TransactionLeg, x as addSwapToTx, l as buildSwapTx, y as deserializeCetusRoute, m as findSwapRoute, z as isCetusRouteFresh, I as serializeCetusRoute, J as verifyCetusRouteCoinMatch } from './types-HJGbXJ37.js';
|
|
10
10
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
11
11
|
import { SuinsClient } from '@mysten/suins';
|
|
12
12
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.js';
|
|
@@ -111,12 +111,6 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
111
111
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
112
112
|
get signer(): TransactionSigner;
|
|
113
113
|
pay(options: PayOptions): Promise<PayResult>;
|
|
114
|
-
stakeVSui(params: {
|
|
115
|
-
amount: number;
|
|
116
|
-
}): Promise<StakeVSuiResult>;
|
|
117
|
-
unstakeVSui(params: {
|
|
118
|
-
amount: number | 'all';
|
|
119
|
-
}): Promise<UnstakeVSuiResult>;
|
|
120
114
|
swap(params: {
|
|
121
115
|
from: string;
|
|
122
116
|
to: string;
|
|
@@ -583,13 +577,18 @@ declare function selectSuiCoin(tx: Transaction, client: SuiJsonRpcClient, owner:
|
|
|
583
577
|
*/
|
|
584
578
|
|
|
585
579
|
/**
|
|
586
|
-
* Canonical write tools. The
|
|
587
|
-
*
|
|
580
|
+
* Canonical write tools. The 8 tools that can be composed into a PTB.
|
|
581
|
+
*
|
|
582
|
+
* History:
|
|
583
|
+
* - 2026-05-08 (Track B): added `harvest_rewards` (compound macro).
|
|
584
|
+
* - 2026-05-25 (S.323): removed `volo_stake` / `volo_unstake` — full Volo
|
|
585
|
+
* cut across SDK/CLI/MCP after the engine cut Volo in S.277. vSUI
|
|
586
|
+
* remains as a passive token (NAVI reward, Cetus swap target).
|
|
588
587
|
*
|
|
589
588
|
* Excluded by design:
|
|
590
589
|
* - `save_contact` — no on-chain leg (Prisma-only).
|
|
591
590
|
*/
|
|
592
|
-
type WriteToolName = 'save_deposit' | 'withdraw' | 'borrow' | 'repay_debt' | 'send_transfer' | 'swap_execute' | 'claim_rewards' | 'harvest_rewards'
|
|
591
|
+
type WriteToolName = 'save_deposit' | 'withdraw' | 'borrow' | 'repay_debt' | 'send_transfer' | 'swap_execute' | 'claim_rewards' | 'harvest_rewards';
|
|
593
592
|
interface SaveDepositInput {
|
|
594
593
|
amount: number;
|
|
595
594
|
asset?: 'USDC' | 'USDsui';
|
|
@@ -644,12 +643,6 @@ interface HarvestRewardsInput {
|
|
|
644
643
|
/** USD floor for "is this worth swapping?" — dust below transfers to wallet. Default $0.01. */
|
|
645
644
|
minRewardUsd?: number;
|
|
646
645
|
}
|
|
647
|
-
interface VoloStakeInput {
|
|
648
|
-
amountSui: number;
|
|
649
|
-
}
|
|
650
|
-
interface VoloUnstakeInput {
|
|
651
|
-
amountVSui: number | 'all';
|
|
652
|
-
}
|
|
653
646
|
/**
|
|
654
647
|
* Discriminated union mapping `toolName` → `input`. Used to type
|
|
655
648
|
* `WriteStep` so consumers get autocomplete + compile-time validation
|
|
@@ -695,14 +688,6 @@ type WriteStep = {
|
|
|
695
688
|
} | {
|
|
696
689
|
toolName: 'harvest_rewards';
|
|
697
690
|
input: HarvestRewardsInput;
|
|
698
|
-
} | {
|
|
699
|
-
toolName: 'volo_stake';
|
|
700
|
-
input: VoloStakeInput;
|
|
701
|
-
inputCoinFromStep?: number;
|
|
702
|
-
} | {
|
|
703
|
-
toolName: 'volo_unstake';
|
|
704
|
-
input: VoloUnstakeInput;
|
|
705
|
-
inputCoinFromStep?: number;
|
|
706
691
|
};
|
|
707
692
|
interface ComposeTxOptions {
|
|
708
693
|
sender: string;
|
|
@@ -831,12 +816,6 @@ type StepPreview = {
|
|
|
831
816
|
reason: 'untradeable' | 'dust' | 'no-route';
|
|
832
817
|
}>;
|
|
833
818
|
expectedUsdcDeposited: number;
|
|
834
|
-
} | {
|
|
835
|
-
toolName: 'volo_stake';
|
|
836
|
-
effectiveAmountMist: bigint;
|
|
837
|
-
} | {
|
|
838
|
-
toolName: 'volo_unstake';
|
|
839
|
-
effectiveAmountMist: bigint | 'all';
|
|
840
819
|
};
|
|
841
820
|
interface ComposeTxResult {
|
|
842
821
|
tx: Transaction;
|
|
@@ -898,8 +877,9 @@ interface AppenderContext {
|
|
|
898
877
|
* downstream consumer's `chainedCoin`. Terminal consumers
|
|
899
878
|
* (`save_deposit`, `repay_debt`, `send_transfer`) omit it.
|
|
900
879
|
*
|
|
901
|
-
* `swap_execute
|
|
902
|
-
*
|
|
880
|
+
* `swap_execute` is the only dual-mode tool — it accepts `chainedCoin`
|
|
881
|
+
* AND populates `outputCoin`. (`volo_stake` / `volo_unstake` were also
|
|
882
|
+
* dual-mode prior to S.323 / 2026-05-25; cut with the full Volo removal.)
|
|
903
883
|
*/
|
|
904
884
|
interface AppenderResult<TPreview extends StepPreview> {
|
|
905
885
|
preview: TPreview;
|
|
@@ -932,7 +912,7 @@ declare function getSponsoredSwapProviders(): Promise<string[]>;
|
|
|
932
912
|
/**
|
|
933
913
|
* The typed registry. Each entry is a wallet-mode dispatcher that takes
|
|
934
914
|
* (tx, input, ctx) and returns a per-step preview. Compile-time check
|
|
935
|
-
* that all
|
|
915
|
+
* that all 8 `WriteToolName` values have an entry — TypeScript will
|
|
936
916
|
* fail the build if a tool is missing.
|
|
937
917
|
*/
|
|
938
918
|
declare const WRITE_APPENDER_REGISTRY: {
|
|
@@ -960,12 +940,6 @@ declare const WRITE_APPENDER_REGISTRY: {
|
|
|
960
940
|
harvest_rewards: AppenderFn<HarvestRewardsInput, Extract<StepPreview, {
|
|
961
941
|
toolName: 'harvest_rewards';
|
|
962
942
|
}>>;
|
|
963
|
-
volo_stake: AppenderFn<VoloStakeInput, Extract<StepPreview, {
|
|
964
|
-
toolName: 'volo_stake';
|
|
965
|
-
}>>;
|
|
966
|
-
volo_unstake: AppenderFn<VoloUnstakeInput, Extract<StepPreview, {
|
|
967
|
-
toolName: 'volo_unstake';
|
|
968
|
-
}>>;
|
|
969
943
|
};
|
|
970
944
|
/**
|
|
971
945
|
* Walks the assembled PTB's command list and extracts every recipient
|
|
@@ -1274,98 +1248,6 @@ declare function getSwapQuote(params: {
|
|
|
1274
1248
|
providers?: string[];
|
|
1275
1249
|
}): Promise<SwapQuoteResult>;
|
|
1276
1250
|
|
|
1277
|
-
/**
|
|
1278
|
-
* VOLO vSUI liquid staking — thin transaction builders.
|
|
1279
|
-
* No SDK dependency. Two Move calls, immutable contract addresses.
|
|
1280
|
-
*/
|
|
1281
|
-
|
|
1282
|
-
declare const VOLO_PKG = "0x68d22cf8bdbcd11ecba1e094922873e4080d4d11133e2443fddda0bfd11dae20";
|
|
1283
|
-
declare const VOLO_POOL = "0x2d914e23d82fedef1b5f56a32d5c64bdcc3087ccfea2b4d6ea51a71f587840e5";
|
|
1284
|
-
declare const VOLO_METADATA = "0x680cd26af32b2bde8d3361e804c53ec1d1cfe24c7f039eb7f549e8dfde389a60";
|
|
1285
|
-
declare const VSUI_TYPE = "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT";
|
|
1286
|
-
interface VoloStats {
|
|
1287
|
-
apy: number;
|
|
1288
|
-
exchangeRate: number;
|
|
1289
|
-
tvl: number;
|
|
1290
|
-
}
|
|
1291
|
-
/**
|
|
1292
|
-
* Fetch VOLO vSUI staking stats (APY, exchange rate, TVL).
|
|
1293
|
-
*/
|
|
1294
|
-
declare function getVoloStats(): Promise<VoloStats>;
|
|
1295
|
-
/**
|
|
1296
|
-
* Build a PTB to stake SUI for vSUI.
|
|
1297
|
-
*/
|
|
1298
|
-
declare function buildStakeVSuiTx(_client: SuiJsonRpcClient, address: string, amountMist: bigint): Promise<Transaction>;
|
|
1299
|
-
/**
|
|
1300
|
-
* Build a PTB to unstake vSUI back to SUI.
|
|
1301
|
-
*/
|
|
1302
|
-
declare function buildUnstakeVSuiTx(client: SuiJsonRpcClient, address: string, amountMist: bigint | 'all'): Promise<Transaction>;
|
|
1303
|
-
/**
|
|
1304
|
-
* SPEC 7 § "Layer 1" Volo stake appender. Two modes.
|
|
1305
|
-
*
|
|
1306
|
-
* Wallet mode (`inputCoin` omitted): pre-flights via `getBalance` and
|
|
1307
|
-
* sources SUI through `coinWithBalance({ type: SUI, useGasCoin: false })`,
|
|
1308
|
-
* which resolves coin objects + address balance at build time. Mirrors
|
|
1309
|
-
* the audric host's `transactions/prepare/route.ts:524-545` volo-stake
|
|
1310
|
-
* branch — sponsored-flow safe (does NOT consume `tx.gas`, which
|
|
1311
|
-
* belongs to the Enoki sponsor in sponsored flows).
|
|
1312
|
-
*
|
|
1313
|
-
* For non-sponsored flows where the caller owns `tx.gas`, prefer
|
|
1314
|
-
* `buildStakeVSuiTx` directly (it splits from gas, which avoids one
|
|
1315
|
-
* `getBalance` RTT).
|
|
1316
|
-
*
|
|
1317
|
-
* Chain mode (`inputCoin` provided): consumes the passed-in SUI coin
|
|
1318
|
-
* ref entirely. Used for chained flows like "swap USDC → SUI → stake".
|
|
1319
|
-
* The caller is responsible for splitting upstream if they only want
|
|
1320
|
-
* part of the input coin staked.
|
|
1321
|
-
*
|
|
1322
|
-
* @returns
|
|
1323
|
-
* - `coin`: vSUI output coin ref, ready for downstream consumption or
|
|
1324
|
-
* wallet transfer (`tx.transferObjects`).
|
|
1325
|
-
* - `effectiveAmountMist`: SUI mist consumed (echoes `input.amountMist`
|
|
1326
|
-
* in both modes; chain-mode trusts the caller-supplied value since
|
|
1327
|
-
* the actual coin balance is opaque).
|
|
1328
|
-
*/
|
|
1329
|
-
declare function addStakeVSuiToTx(tx: Transaction, client: SuiJsonRpcClient, address: string, input: {
|
|
1330
|
-
amountMist: bigint;
|
|
1331
|
-
inputCoin?: TransactionObjectArgument;
|
|
1332
|
-
}): Promise<{
|
|
1333
|
-
coin: TransactionObjectArgument;
|
|
1334
|
-
effectiveAmountMist: bigint;
|
|
1335
|
-
}>;
|
|
1336
|
-
/**
|
|
1337
|
-
* SPEC 7 § "Layer 1" Volo unstake appender. Two modes.
|
|
1338
|
-
*
|
|
1339
|
-
* Wallet mode (`inputCoin` omitted): pre-flights via `getBalance` and
|
|
1340
|
-
* sources vSUI through `coinWithBalance({ type: VSUI, balance })`,
|
|
1341
|
-
* which resolves coin objects + address balance at build time. With
|
|
1342
|
-
* `'all'`, the entire balance is consumed.
|
|
1343
|
-
*
|
|
1344
|
-
* Chain mode (`inputCoin` provided): consumes the passed-in vSUI coin
|
|
1345
|
-
* ref. With `amountMist = 'all'`, the entire input coin is unstaked.
|
|
1346
|
-
* With a bigint `amountMist`, the input coin is split internally and
|
|
1347
|
-
* only that portion unstaked (the leftover stays accessible via the
|
|
1348
|
-
* original ref). Used for chained flows where vSUI was just produced
|
|
1349
|
-
* by a prior step.
|
|
1350
|
-
*
|
|
1351
|
-
* @returns
|
|
1352
|
-
* - `coin`: SUI output coin ref, ready for downstream consumption
|
|
1353
|
-
* (e.g. `addSendToTx`, `addStakeVSuiToTx` re-stake) or wallet
|
|
1354
|
-
* transfer (`tx.transferObjects`).
|
|
1355
|
-
* - `effectiveAmountMist`: input vSUI mist consumed; echoes
|
|
1356
|
-
* `input.amountMist` (`'all'` is preserved as-is — the actual SUI
|
|
1357
|
-
* received differs from input vSUI by the pool exchange rate, so
|
|
1358
|
-
* callers needing the SUI amount must query `getVoloStats` or
|
|
1359
|
-
* parse balance changes from the executed tx).
|
|
1360
|
-
*/
|
|
1361
|
-
declare function addUnstakeVSuiToTx(tx: Transaction, client: SuiJsonRpcClient, address: string, input: {
|
|
1362
|
-
amountMist: bigint | 'all';
|
|
1363
|
-
inputCoin?: TransactionObjectArgument;
|
|
1364
|
-
}): Promise<{
|
|
1365
|
-
coin: TransactionObjectArgument;
|
|
1366
|
-
effectiveAmountMist: bigint | 'all';
|
|
1367
|
-
}>;
|
|
1368
|
-
|
|
1369
1251
|
/**
|
|
1370
1252
|
* SuiNS leaf-subname builders for the `audric.sui` parent NFT.
|
|
1371
1253
|
*
|
|
@@ -1505,4 +1387,4 @@ declare function fullHandle(label: string): string;
|
|
|
1505
1387
|
*/
|
|
1506
1388
|
declare function displayHandle(label: string): string;
|
|
1507
1389
|
|
|
1508
|
-
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BorrowInput, BorrowResult, type BuildAddLeafParams, type BuildHarvestRewardsTxOptions, type BuildRevokeLeafParams, type ClaimRewardsInput, ClaimRewardsResult, type CoinPage, type ComposeTxFeeHookContext, type ComposeTxFeeHooks, type ComposeTxOptions, type ComposeTxResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, type HarvestPlan, type HarvestSkippedLeg, type HarvestSwapLeg, HealthFactorResult, InvalidAddressError, type LabelValidationResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, type RepayDebtInput, RepayResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SafeguardConfig, SafeguardEnforcer, type SaveDepositInput, SaveResult, type SelectAndSplitResult, SendResult, type SendTransferInput,
|
|
1390
|
+
export { AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AppenderContext, BalanceResponse, type BorrowInput, BorrowResult, type BuildAddLeafParams, type BuildHarvestRewardsTxOptions, type BuildRevokeLeafParams, type ClaimRewardsInput, ClaimRewardsResult, type CoinPage, type ComposeTxFeeHookContext, type ComposeTxFeeHooks, type ComposeTxOptions, type ComposeTxResult, CompoundRewardsResult, ContactManager, DepositInfo, EarningsResult, FinancialSummary, type FinancialSummaryOptions, FundStatusResult, HF_CRITICAL_THRESHOLD, HF_WARN_THRESHOLD, type HarvestPlan, type HarvestSkippedLeg, type HarvestSwapLeg, HealthFactorResult, InvalidAddressError, type LabelValidationResult, LendingAdapter, LendingRates, MaxBorrowResult, MaxWithdrawResult, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, PendingReward, PositionsResult, RatesResult, type RepayDebtInput, RepayResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SafeguardConfig, SafeguardEnforcer, type SaveDepositInput, SaveResult, type SelectAndSplitResult, SendResult, type SendTransferInput, type StepPreview, SuinsNotRegisteredError, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, TxMetadata, WRITE_APPENDER_REGISTRY, type WithdrawInput, WithdrawResult, type WriteStep, type WriteToolName, ZkLoginProof, addClaimRewardsToTx, addSendToTx, aggregateClaimableRewards, buildAddLeafTx, buildClaimRewardsTx, buildHarvestRewardsTx, buildRevokeLeafTx, buildSendTx, composeTx, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fetchAllCoins, fullHandle, generateKeypair, getAddress, getFinancialSummary, getPendingRewards, getPendingRewardsByAddress, getRates, getSponsoredSwapProviders, getSwapQuote, keypairFromPrivateKey, loadKey, looksLikeSuiNs, normalizeAddressInput, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveKey, selectAndSplitCoin, selectSuiCoin, validateLabel, walletExists };
|