@t2000/sdk 0.46.16 → 0.47.1
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/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/{token-registry-_ehntRHs.d.cts → token-registry-BYXTvp_b.d.cts} +17 -1
- package/dist/{token-registry-B4FfUwvm.d.ts → token-registry-DbI2moHp.d.ts} +17 -1
- package/package.json +1 -1
|
@@ -240,6 +240,22 @@ declare const GAS_RESERVE_MIN = 0.05;
|
|
|
240
240
|
|
|
241
241
|
declare function validateAddress(address: string): string;
|
|
242
242
|
declare function truncateAddress(address: string): string;
|
|
243
|
+
/**
|
|
244
|
+
* Normalize a Sui coin type to its canonical long-form 64-hex address.
|
|
245
|
+
* `0x2::sui::SUI` → `0x0000…0002::sui::SUI`. Idempotent on already-long
|
|
246
|
+
* forms. Returns the input unchanged if it doesn't look like a coin type
|
|
247
|
+
* (`<address>::<module>::<name>`) so callers can pass arbitrary strings
|
|
248
|
+
* without crashing.
|
|
249
|
+
*
|
|
250
|
+
* Why this exists: BlockVision's `/v2/sui/coin/price/list` endpoint
|
|
251
|
+
* silently returns an empty `prices` map for short-form coin types
|
|
252
|
+
* (notably `0x2::sui::SUI` — the native gas coin). Internal callers must
|
|
253
|
+
* pass the long form, but external callers (LLM tool args, cached
|
|
254
|
+
* coin-type strings, audit logs) commonly use the short form. Normalize
|
|
255
|
+
* before the network call, denormalize back to the caller's input shape
|
|
256
|
+
* after, and short/long become interchangeable.
|
|
257
|
+
*/
|
|
258
|
+
declare function normalizeCoinType(coinType: string): string;
|
|
243
259
|
|
|
244
260
|
/**
|
|
245
261
|
* Shared transaction classifier.
|
|
@@ -550,4 +566,4 @@ declare const IKA_TYPE: string;
|
|
|
550
566
|
declare const LOFI_TYPE: string;
|
|
551
567
|
declare const MANIFEST_TYPE: string;
|
|
552
568
|
|
|
553
|
-
export { WBTC_TYPE as $, ALL_NAVI_ASSETS as A, BPS_DENOMINATOR 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, TOKEN_MAP 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, type TransactionSigner as Q, type TxDirection as R, STABLE_ASSETS as S, T2000Error as T, type TxMetadata as U, USDC_DECIMALS as V, USDC_TYPE as W, USDE_TYPE as X, USDSUI_TYPE as Y, USDT_TYPE as Z, WAL_TYPE as _, type AutoTopUpResult as a, type ZkLoginProof as a0, ZkLoginSigner as a1, addCollectFeeToTx as a2, calculateFee as a3, classifyAction as a4, classifyLabel as a5, classifyTransaction as a6, executeAutoTopUp as a7, executeWithGas as a8, extractTransferDetails as a9, usdcToRaw as aA, validateAddress as aB, SafeguardEnforcer as aC, BORROW_FEE_BPS as aD, CETUS_USDC_SUI_POOL as aE, OPERATION_ASSETS as aF, type Operation as aG, SAVE_FEE_BPS as aH, assertAllowedAsset as aI, isAllowedAsset as aJ,
|
|
569
|
+
export { WBTC_TYPE as $, ALL_NAVI_ASSETS as A, BPS_DENOMINATOR 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, TOKEN_MAP 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, type TransactionSigner as Q, type TxDirection as R, STABLE_ASSETS as S, T2000Error as T, type TxMetadata as U, USDC_DECIMALS as V, USDC_TYPE as W, USDE_TYPE as X, USDSUI_TYPE as Y, USDT_TYPE as Z, WAL_TYPE as _, type AutoTopUpResult as a, type ZkLoginProof as a0, ZkLoginSigner as a1, addCollectFeeToTx as a2, calculateFee as a3, classifyAction as a4, classifyLabel as a5, classifyTransaction as a6, executeAutoTopUp as a7, executeWithGas as a8, extractTransferDetails as a9, usdcToRaw as aA, validateAddress as aB, SafeguardEnforcer as aC, BORROW_FEE_BPS as aD, CETUS_USDC_SUI_POOL as aE, OPERATION_ASSETS as aF, type Operation as aG, SAVE_FEE_BPS as aH, assertAllowedAsset as aI, isAllowedAsset 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, formatAssetAmount as ad, formatSui as ae, formatUsd as af, getDecimals as ag, getDecimalsForCoinType as ah, getGasStatus 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, shouldAutoTopUp as aw, stableToRaw as ax, suiToMist as ay, truncateAddress 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, type GasExecutionResult as h, type GasRequestType as i, type GasSponsorResponse as j, type GasStatusResponse as k, KeypairSigner as l, LOFI_TYPE as m, MIST_PER_SUI as n, SUI_DECIMALS as o, SUI_TYPE as p, SUPPORTED_ASSETS as q, type SafeguardConfig as r, SafeguardError as s, type SafeguardErrorDetails as t, type SafeguardRule as u, type SimulationResult as v, type StableAsset as w, type SuiRpcTxBlock as x, type SupportedAsset as y, type T2000ErrorCode as z };
|
|
@@ -240,6 +240,22 @@ declare const GAS_RESERVE_MIN = 0.05;
|
|
|
240
240
|
|
|
241
241
|
declare function validateAddress(address: string): string;
|
|
242
242
|
declare function truncateAddress(address: string): string;
|
|
243
|
+
/**
|
|
244
|
+
* Normalize a Sui coin type to its canonical long-form 64-hex address.
|
|
245
|
+
* `0x2::sui::SUI` → `0x0000…0002::sui::SUI`. Idempotent on already-long
|
|
246
|
+
* forms. Returns the input unchanged if it doesn't look like a coin type
|
|
247
|
+
* (`<address>::<module>::<name>`) so callers can pass arbitrary strings
|
|
248
|
+
* without crashing.
|
|
249
|
+
*
|
|
250
|
+
* Why this exists: BlockVision's `/v2/sui/coin/price/list` endpoint
|
|
251
|
+
* silently returns an empty `prices` map for short-form coin types
|
|
252
|
+
* (notably `0x2::sui::SUI` — the native gas coin). Internal callers must
|
|
253
|
+
* pass the long form, but external callers (LLM tool args, cached
|
|
254
|
+
* coin-type strings, audit logs) commonly use the short form. Normalize
|
|
255
|
+
* before the network call, denormalize back to the caller's input shape
|
|
256
|
+
* after, and short/long become interchangeable.
|
|
257
|
+
*/
|
|
258
|
+
declare function normalizeCoinType(coinType: string): string;
|
|
243
259
|
|
|
244
260
|
/**
|
|
245
261
|
* Shared transaction classifier.
|
|
@@ -550,4 +566,4 @@ declare const IKA_TYPE: string;
|
|
|
550
566
|
declare const LOFI_TYPE: string;
|
|
551
567
|
declare const MANIFEST_TYPE: string;
|
|
552
568
|
|
|
553
|
-
export { WBTC_TYPE as $, ALL_NAVI_ASSETS as A, BPS_DENOMINATOR 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, TOKEN_MAP 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, type TransactionSigner as Q, type TxDirection as R, STABLE_ASSETS as S, T2000Error as T, type TxMetadata as U, USDC_DECIMALS as V, USDC_TYPE as W, USDE_TYPE as X, USDSUI_TYPE as Y, USDT_TYPE as Z, WAL_TYPE as _, type AutoTopUpResult as a, type ZkLoginProof as a0, ZkLoginSigner as a1, addCollectFeeToTx as a2, calculateFee as a3, classifyAction as a4, classifyLabel as a5, classifyTransaction as a6, executeAutoTopUp as a7, executeWithGas as a8, extractTransferDetails as a9, usdcToRaw as aA, validateAddress as aB, SafeguardEnforcer as aC, BORROW_FEE_BPS as aD, CETUS_USDC_SUI_POOL as aE, OPERATION_ASSETS as aF, type Operation as aG, SAVE_FEE_BPS as aH, assertAllowedAsset as aI, isAllowedAsset as aJ,
|
|
569
|
+
export { WBTC_TYPE as $, ALL_NAVI_ASSETS as A, BPS_DENOMINATOR 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, TOKEN_MAP 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, type TransactionSigner as Q, type TxDirection as R, STABLE_ASSETS as S, T2000Error as T, type TxMetadata as U, USDC_DECIMALS as V, USDC_TYPE as W, USDE_TYPE as X, USDSUI_TYPE as Y, USDT_TYPE as Z, WAL_TYPE as _, type AutoTopUpResult as a, type ZkLoginProof as a0, ZkLoginSigner as a1, addCollectFeeToTx as a2, calculateFee as a3, classifyAction as a4, classifyLabel as a5, classifyTransaction as a6, executeAutoTopUp as a7, executeWithGas as a8, extractTransferDetails as a9, usdcToRaw as aA, validateAddress as aB, SafeguardEnforcer as aC, BORROW_FEE_BPS as aD, CETUS_USDC_SUI_POOL as aE, OPERATION_ASSETS as aF, type Operation as aG, SAVE_FEE_BPS as aH, assertAllowedAsset as aI, isAllowedAsset 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, formatAssetAmount as ad, formatSui as ae, formatUsd as af, getDecimals as ag, getDecimalsForCoinType as ah, getGasStatus 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, shouldAutoTopUp as aw, stableToRaw as ax, suiToMist as ay, truncateAddress 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, type GasExecutionResult as h, type GasRequestType as i, type GasSponsorResponse as j, type GasStatusResponse as k, KeypairSigner as l, LOFI_TYPE as m, MIST_PER_SUI as n, SUI_DECIMALS as o, SUI_TYPE as p, SUPPORTED_ASSETS as q, type SafeguardConfig as r, SafeguardError as s, type SafeguardErrorDetails as t, type SafeguardRule as u, type SimulationResult as v, type StableAsset as w, type SuiRpcTxBlock as x, type SupportedAsset as y, type T2000ErrorCode as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2000/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
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",
|