@t2000/sdk 0.23.0 → 0.28.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 -0
- 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 +27 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/{token-registry-DDy743E6.d.cts → token-registry-BYEXDwjs.d.cts} +1 -1
- package/dist/{token-registry-Bv1I9qeU.d.ts → token-registry-CX_RDDO_.d.ts} +1 -1
- package/dist/{types-DT-3gVTX.d.cts → types-D9NstGUu.d.cts} +13 -1
- package/dist/{types-DT-3gVTX.d.ts → types-D9NstGUu.d.ts} +13 -1
- 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 { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-
|
|
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-
|
|
4
|
+
import { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-BYEXDwjs.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-BYEXDwjs.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,
|
|
9
|
-
export {
|
|
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, n as PaymentRequest, 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, o as AllowanceInfo, p as FinancialSummary } from './types-D9NstGUu.cjs';
|
|
9
|
+
export { q as AllowanceCreateResult, r as AllowanceDeductResult, s as AllowanceDepositResult, t as AllowanceWithdrawResult, A as AssetRates, G as GasMethod, b as GasReserve, u as HFAlertLevel, f as PositionEntry } from './types-D9NstGUu.cjs';
|
|
10
10
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
11
11
|
import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
|
|
12
12
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.cjs';
|
|
@@ -136,6 +136,12 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
136
136
|
}): Promise<TransactionRecord[]>;
|
|
137
137
|
transactionDetail(digest: string): Promise<TransactionRecord | null>;
|
|
138
138
|
deposit(): Promise<DepositInfo>;
|
|
139
|
+
receive(params?: {
|
|
140
|
+
amount?: number;
|
|
141
|
+
currency?: string;
|
|
142
|
+
memo?: string;
|
|
143
|
+
label?: string;
|
|
144
|
+
}): PaymentRequest;
|
|
139
145
|
exportKey(): string;
|
|
140
146
|
static fromZkLogin(opts: {
|
|
141
147
|
ephemeralKeypair: Ed25519Keypair;
|
|
@@ -380,4 +386,4 @@ declare function buildScopedIntent(adminKeypair: Ed25519Keypair, params: BuildIn
|
|
|
380
386
|
*/
|
|
381
387
|
declare function verifyScopedIntent(intent: ScopedIntent, adminPublicKeyBytes: Uint8Array): Promise<boolean>;
|
|
382
388
|
|
|
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 };
|
|
389
|
+
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, PaymentRequest, 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,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 { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-
|
|
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-
|
|
4
|
+
import { T as T2000Error, am as SafeguardEnforcer, w as TransactionSigner, Z as ZkLoginProof, s as SupportedAsset, an as AllowanceFeature } from './token-registry-CX_RDDO_.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-CX_RDDO_.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,
|
|
9
|
-
export {
|
|
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, n as PaymentRequest, 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, o as AllowanceInfo, p as FinancialSummary } from './types-D9NstGUu.js';
|
|
9
|
+
export { q as AllowanceCreateResult, r as AllowanceDeductResult, s as AllowanceDepositResult, t as AllowanceWithdrawResult, A as AssetRates, G as GasMethod, b as GasReserve, u as HFAlertLevel, f as PositionEntry } from './types-D9NstGUu.js';
|
|
10
10
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
11
11
|
import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
|
|
12
12
|
export { NaviAdapter, ProtocolRegistry } from './adapters/index.js';
|
|
@@ -136,6 +136,12 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
136
136
|
}): Promise<TransactionRecord[]>;
|
|
137
137
|
transactionDetail(digest: string): Promise<TransactionRecord | null>;
|
|
138
138
|
deposit(): Promise<DepositInfo>;
|
|
139
|
+
receive(params?: {
|
|
140
|
+
amount?: number;
|
|
141
|
+
currency?: string;
|
|
142
|
+
memo?: string;
|
|
143
|
+
label?: string;
|
|
144
|
+
}): PaymentRequest;
|
|
139
145
|
exportKey(): string;
|
|
140
146
|
static fromZkLogin(opts: {
|
|
141
147
|
ephemeralKeypair: Ed25519Keypair;
|
|
@@ -380,4 +386,4 @@ declare function buildScopedIntent(adminKeypair: Ed25519Keypair, params: BuildIn
|
|
|
380
386
|
*/
|
|
381
387
|
declare function verifyScopedIntent(intent: ScopedIntent, adminPublicKeyBytes: Uint8Array): Promise<boolean>;
|
|
382
388
|
|
|
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 };
|
|
389
|
+
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, PaymentRequest, 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
|
@@ -901,7 +901,7 @@ function extractCommands(txBlock) {
|
|
|
901
901
|
if (!data || typeof data !== "object") return result;
|
|
902
902
|
const inner = "transaction" in data ? data.transaction : void 0;
|
|
903
903
|
if (!inner || typeof inner !== "object") return result;
|
|
904
|
-
const commands = "commands" in inner ? inner.commands : void 0;
|
|
904
|
+
const commands = "commands" in inner ? inner.commands : "transactions" in inner ? inner.transactions : void 0;
|
|
905
905
|
if (!Array.isArray(commands)) return result;
|
|
906
906
|
for (const cmd of commands) {
|
|
907
907
|
if (cmd.MoveCall) {
|
|
@@ -2627,6 +2627,32 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
2627
2627
|
].join("\n")
|
|
2628
2628
|
};
|
|
2629
2629
|
}
|
|
2630
|
+
receive(params) {
|
|
2631
|
+
const amount = params?.amount ?? null;
|
|
2632
|
+
const currency = params?.currency ?? "USDC";
|
|
2633
|
+
const memo = params?.memo ?? null;
|
|
2634
|
+
const label = params?.label ?? null;
|
|
2635
|
+
const qrParts = [`sui:${this._address}`];
|
|
2636
|
+
const queryParams = [];
|
|
2637
|
+
if (amount != null) queryParams.push(`amount=${amount}`);
|
|
2638
|
+
if (currency !== "SUI") queryParams.push(`currency=${currency}`);
|
|
2639
|
+
if (memo) queryParams.push(`memo=${encodeURIComponent(memo)}`);
|
|
2640
|
+
if (label) queryParams.push(`label=${encodeURIComponent(label)}`);
|
|
2641
|
+
const qrUri = queryParams.length > 0 ? `${qrParts[0]}?${queryParams.join("&")}` : qrParts[0];
|
|
2642
|
+
const amountStr = amount != null ? `$${amount.toFixed(2)} ` : "";
|
|
2643
|
+
const displayParts = [`Send ${amountStr}${currency} to ${truncateAddress(this._address)}`];
|
|
2644
|
+
if (memo) displayParts.push(`Memo: ${memo}`);
|
|
2645
|
+
return {
|
|
2646
|
+
address: this._address,
|
|
2647
|
+
network: "mainnet",
|
|
2648
|
+
amount,
|
|
2649
|
+
currency,
|
|
2650
|
+
memo,
|
|
2651
|
+
label,
|
|
2652
|
+
qrUri,
|
|
2653
|
+
displayText: displayParts.join("\n")
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2630
2656
|
exportKey() {
|
|
2631
2657
|
return exportPrivateKey(this.keypair);
|
|
2632
2658
|
}
|