@t2000/sdk 1.11.1 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -369,6 +369,12 @@ declare function getDecimals(asset: SupportedAsset): number;
369
369
  declare function formatUsd(amount: number): string;
370
370
  declare function formatSui(amount: number): string;
371
371
  declare function formatAssetAmount(amount: number, asset: string): string;
372
+ /**
373
+ * Case-insensitive lookup against SUPPORTED_ASSETS keys AND display names.
374
+ * 'usde' → 'USDe', 'suiusde' → 'USDe', 'suiusdt' → 'USDT', 'usdsui' → 'USDsui'.
375
+ * Returns the original input if not found so downstream validation can reject it.
376
+ */
377
+ declare function normalizeAsset(input: string): string;
372
378
 
373
379
  interface SimulationResult {
374
380
  success: boolean;
@@ -692,4 +698,4 @@ interface TxMetadata {
692
698
  declare const OUTBOUND_OPS: Set<"save" | "borrow" | "withdraw" | "repay" | "send" | "pay">;
693
699
  declare const DEFAULT_SAFEGUARD_CONFIG: SafeguardConfig;
694
700
 
695
- export { WAL_TYPE as $, ALL_NAVI_ASSETS as A, BORROW_FEE_BPS as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type FeeOperation as F, GAS_RESERVE_MIN as G, type T2000ErrorData as H, IKA_TYPE as I, T2000_OVERLAY_FEE_WALLET as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OUTBOUND_OPS as O, type ProtocolFeeInfo as P, TOKEN_MAP as Q, type TransactionSigner as R, SAVE_FEE_BPS as S, T2000Error as T, type TxDirection as U, type TxMetadata as V, USDC_DECIMALS as W, USDC_TYPE as X, USDE_TYPE as Y, USDSUI_TYPE as Z, USDT_TYPE as _, BPS_DENOMINATOR as a, WBTC_TYPE as a0, type ZkLoginProof as a1, ZkLoginSigner as a2, addFeeTransfer as a3, buildSwapTx as a4, calculateFee as a5, classifyAction as a6, classifyLabel as a7, classifyTransaction as a8, extractTransferDetails as a9, validateAddress as aA, CETUS_USDC_SUI_POOL as aB, OPERATION_ASSETS as aC, type Operation as aD, addSwapToTx as aE, assertAllowedAsset as aF, getCoinMeta as aG, isAllowedAsset as aH, isInRegistry as aI, normalizeCoinType as aJ, queryHistory as aK, queryTransaction as aL, simulateTransaction as aM, throwIfSimulationFailed as aN, extractTxCommands as aa, extractTxSender as ab, fallbackLabel as ac, findSwapRoute as ad, formatAssetAmount as ae, formatSui as af, formatUsd as ag, getDecimals as ah, getDecimalsForCoinType as ai, getTier as aj, isSupported as ak, isTier1 as al, isTier2 as am, mapMoveAbortCode as an, mapWalletError as ao, mistToSui as ap, parseSuiRpcTx as aq, rawToStable as ar, rawToUsdc as as, refineLendingLabel as at, resolveSymbol as au, resolveTokenType as av, stableToRaw as aw, suiToMist as ax, truncateAddress as ay, usdcToRaw as az, COIN_REGISTRY as b, type ClassifyBalanceChange as c, type ClassifyResult as d, type CoinMeta as e, DEFAULT_SAFEGUARD_CONFIG as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, OVERLAY_FEE_RATE as k, type OverlayFeeConfig as l, STABLE_ASSETS as m, SUI_DECIMALS as n, SUI_TYPE as o, SUPPORTED_ASSETS as p, type SafeguardConfig as q, SafeguardError as r, type SafeguardErrorDetails as s, type SafeguardRule as t, type SimulationResult as u, type StableAsset as v, type SuiRpcTxBlock as w, type SupportedAsset as x, type SwapRouteResult as y, type T2000ErrorCode as z };
701
+ export { WAL_TYPE as $, ALL_NAVI_ASSETS as A, BORROW_FEE_BPS as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type FeeOperation as F, GAS_RESERVE_MIN as G, type T2000ErrorData as H, IKA_TYPE as I, T2000_OVERLAY_FEE_WALLET as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OUTBOUND_OPS as O, type ProtocolFeeInfo as P, TOKEN_MAP as Q, type TransactionSigner as R, SAVE_FEE_BPS as S, T2000Error as T, type TxDirection as U, type TxMetadata as V, USDC_DECIMALS as W, USDC_TYPE as X, USDE_TYPE as Y, USDSUI_TYPE as Z, USDT_TYPE as _, BPS_DENOMINATOR as a, WBTC_TYPE as a0, type ZkLoginProof as a1, ZkLoginSigner as a2, addFeeTransfer as a3, buildSwapTx as a4, calculateFee as a5, classifyAction as a6, classifyLabel as a7, classifyTransaction as a8, extractTransferDetails as a9, validateAddress as aA, CETUS_USDC_SUI_POOL as aB, OPERATION_ASSETS as aC, type Operation as aD, addSwapToTx as aE, assertAllowedAsset as aF, getCoinMeta as aG, isAllowedAsset as aH, isInRegistry as aI, normalizeAsset as aJ, normalizeCoinType as aK, queryHistory as aL, queryTransaction as aM, simulateTransaction as aN, throwIfSimulationFailed as aO, extractTxCommands as aa, extractTxSender as ab, fallbackLabel as ac, findSwapRoute as ad, formatAssetAmount as ae, formatSui as af, formatUsd as ag, getDecimals as ah, getDecimalsForCoinType as ai, getTier as aj, isSupported as ak, isTier1 as al, isTier2 as am, mapMoveAbortCode as an, mapWalletError as ao, mistToSui as ap, parseSuiRpcTx as aq, rawToStable as ar, rawToUsdc as as, refineLendingLabel as at, resolveSymbol as au, resolveTokenType as av, stableToRaw as aw, suiToMist as ax, truncateAddress as ay, usdcToRaw as az, COIN_REGISTRY as b, type ClassifyBalanceChange as c, type ClassifyResult as d, type CoinMeta as e, DEFAULT_SAFEGUARD_CONFIG as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, OVERLAY_FEE_RATE as k, type OverlayFeeConfig as l, STABLE_ASSETS as m, SUI_DECIMALS as n, SUI_TYPE as o, SUPPORTED_ASSETS as p, type SafeguardConfig as q, SafeguardError as r, type SafeguardErrorDetails as s, type SafeguardRule as t, type SimulationResult as u, type StableAsset as v, type SuiRpcTxBlock as w, type SupportedAsset as x, type SwapRouteResult as y, type T2000ErrorCode as z };
@@ -369,6 +369,12 @@ declare function getDecimals(asset: SupportedAsset): number;
369
369
  declare function formatUsd(amount: number): string;
370
370
  declare function formatSui(amount: number): string;
371
371
  declare function formatAssetAmount(amount: number, asset: string): string;
372
+ /**
373
+ * Case-insensitive lookup against SUPPORTED_ASSETS keys AND display names.
374
+ * 'usde' → 'USDe', 'suiusde' → 'USDe', 'suiusdt' → 'USDT', 'usdsui' → 'USDsui'.
375
+ * Returns the original input if not found so downstream validation can reject it.
376
+ */
377
+ declare function normalizeAsset(input: string): string;
372
378
 
373
379
  interface SimulationResult {
374
380
  success: boolean;
@@ -692,4 +698,4 @@ interface TxMetadata {
692
698
  declare const OUTBOUND_OPS: Set<"save" | "borrow" | "withdraw" | "repay" | "send" | "pay">;
693
699
  declare const DEFAULT_SAFEGUARD_CONFIG: SafeguardConfig;
694
700
 
695
- export { WAL_TYPE as $, ALL_NAVI_ASSETS as A, BORROW_FEE_BPS as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type FeeOperation as F, GAS_RESERVE_MIN as G, type T2000ErrorData as H, IKA_TYPE as I, T2000_OVERLAY_FEE_WALLET as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OUTBOUND_OPS as O, type ProtocolFeeInfo as P, TOKEN_MAP as Q, type TransactionSigner as R, SAVE_FEE_BPS as S, T2000Error as T, type TxDirection as U, type TxMetadata as V, USDC_DECIMALS as W, USDC_TYPE as X, USDE_TYPE as Y, USDSUI_TYPE as Z, USDT_TYPE as _, BPS_DENOMINATOR as a, WBTC_TYPE as a0, type ZkLoginProof as a1, ZkLoginSigner as a2, addFeeTransfer as a3, buildSwapTx as a4, calculateFee as a5, classifyAction as a6, classifyLabel as a7, classifyTransaction as a8, extractTransferDetails as a9, validateAddress as aA, CETUS_USDC_SUI_POOL as aB, OPERATION_ASSETS as aC, type Operation as aD, addSwapToTx as aE, assertAllowedAsset as aF, getCoinMeta as aG, isAllowedAsset as aH, isInRegistry as aI, normalizeCoinType as aJ, queryHistory as aK, queryTransaction as aL, simulateTransaction as aM, throwIfSimulationFailed as aN, extractTxCommands as aa, extractTxSender as ab, fallbackLabel as ac, findSwapRoute as ad, formatAssetAmount as ae, formatSui as af, formatUsd as ag, getDecimals as ah, getDecimalsForCoinType as ai, getTier as aj, isSupported as ak, isTier1 as al, isTier2 as am, mapMoveAbortCode as an, mapWalletError as ao, mistToSui as ap, parseSuiRpcTx as aq, rawToStable as ar, rawToUsdc as as, refineLendingLabel as at, resolveSymbol as au, resolveTokenType as av, stableToRaw as aw, suiToMist as ax, truncateAddress as ay, usdcToRaw as az, COIN_REGISTRY as b, type ClassifyBalanceChange as c, type ClassifyResult as d, type CoinMeta as e, DEFAULT_SAFEGUARD_CONFIG as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, OVERLAY_FEE_RATE as k, type OverlayFeeConfig as l, STABLE_ASSETS as m, SUI_DECIMALS as n, SUI_TYPE as o, SUPPORTED_ASSETS as p, type SafeguardConfig as q, SafeguardError as r, type SafeguardErrorDetails as s, type SafeguardRule as t, type SimulationResult as u, type StableAsset as v, type SuiRpcTxBlock as w, type SupportedAsset as x, type SwapRouteResult as y, type T2000ErrorCode as z };
701
+ export { WAL_TYPE as $, ALL_NAVI_ASSETS as A, BORROW_FEE_BPS as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type FeeOperation as F, GAS_RESERVE_MIN as G, type T2000ErrorData as H, IKA_TYPE as I, T2000_OVERLAY_FEE_WALLET as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OUTBOUND_OPS as O, type ProtocolFeeInfo as P, TOKEN_MAP as Q, type TransactionSigner as R, SAVE_FEE_BPS as S, T2000Error as T, type TxDirection as U, type TxMetadata as V, USDC_DECIMALS as W, USDC_TYPE as X, USDE_TYPE as Y, USDSUI_TYPE as Z, USDT_TYPE as _, BPS_DENOMINATOR as a, WBTC_TYPE as a0, type ZkLoginProof as a1, ZkLoginSigner as a2, addFeeTransfer as a3, buildSwapTx as a4, calculateFee as a5, classifyAction as a6, classifyLabel as a7, classifyTransaction as a8, extractTransferDetails as a9, validateAddress as aA, CETUS_USDC_SUI_POOL as aB, OPERATION_ASSETS as aC, type Operation as aD, addSwapToTx as aE, assertAllowedAsset as aF, getCoinMeta as aG, isAllowedAsset as aH, isInRegistry as aI, normalizeAsset as aJ, normalizeCoinType as aK, queryHistory as aL, queryTransaction as aM, simulateTransaction as aN, throwIfSimulationFailed as aO, extractTxCommands as aa, extractTxSender as ab, fallbackLabel as ac, findSwapRoute as ad, formatAssetAmount as ae, formatSui as af, formatUsd as ag, getDecimals as ah, getDecimalsForCoinType as ai, getTier as aj, isSupported as ak, isTier1 as al, isTier2 as am, mapMoveAbortCode as an, mapWalletError as ao, mistToSui as ap, parseSuiRpcTx as aq, rawToStable as ar, rawToUsdc as as, refineLendingLabel as at, resolveSymbol as au, resolveTokenType as av, stableToRaw as aw, suiToMist as ax, truncateAddress as ay, usdcToRaw as az, COIN_REGISTRY as b, type ClassifyBalanceChange as c, type ClassifyResult as d, type CoinMeta as e, DEFAULT_SAFEGUARD_CONFIG as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, OVERLAY_FEE_RATE as k, type OverlayFeeConfig as l, STABLE_ASSETS as m, SUI_DECIMALS as n, SUI_TYPE as o, SUPPORTED_ASSETS as p, type SafeguardConfig as q, SafeguardError as r, type SafeguardErrorDetails as s, type SafeguardRule as t, type SimulationResult as u, type StableAsset as v, type SuiRpcTxBlock as w, type SupportedAsset as x, type SwapRouteResult as y, type T2000ErrorCode as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2000/sdk",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "TypeScript SDK for AI agent bank accounts on Sui — send, save, borrow, swap. NAVI lending + Cetus aggregator routing, sponsored gas, zkLogin compatible.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",