@t2000/sdk 5.1.0 → 5.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.
@@ -787,6 +787,8 @@ interface PayOptions {
787
787
  body?: string;
788
788
  headers?: Record<string, string>;
789
789
  maxPrice?: number;
790
+ /** Bypass the spending-limit gate for this call (caller owns consent). */
791
+ force?: boolean;
790
792
  }
791
793
  interface PayResult {
792
794
  status: number;
@@ -1181,42 +1183,4 @@ interface SimulationResult {
1181
1183
  declare function simulateTransaction(client: SuiCoreClient, tx: Transaction, sender: string): Promise<SimulationResult>;
1182
1184
  declare function throwIfSimulationFailed(sim: SimulationResult): void;
1183
1185
 
1184
- type SafeguardRule = 'locked' | 'maxPerTx' | 'maxDailySend';
1185
- interface SafeguardErrorDetails {
1186
- attempted?: number;
1187
- limit?: number;
1188
- current?: number;
1189
- }
1190
- declare class SafeguardError extends T2000Error {
1191
- readonly rule: SafeguardRule;
1192
- readonly details: SafeguardErrorDetails;
1193
- constructor(rule: SafeguardRule, details: SafeguardErrorDetails, message?: string);
1194
- toJSON(): {
1195
- error: "SAFEGUARD_BLOCKED";
1196
- message: string;
1197
- retryable: boolean;
1198
- data: {
1199
- attempted?: number;
1200
- limit?: number;
1201
- current?: number;
1202
- rule: SafeguardRule;
1203
- };
1204
- };
1205
- }
1206
-
1207
- interface SafeguardConfig {
1208
- locked: boolean;
1209
- maxPerTx: number;
1210
- maxDailySend: number;
1211
- dailyUsed: number;
1212
- dailyResetDate: string;
1213
- maxLeverage?: number;
1214
- maxPositionSize?: number;
1215
- }
1216
- interface TxMetadata {
1217
- operation: 'send' | 'pay';
1218
- amount?: number;
1219
- }
1220
- declare const DEFAULT_SAFEGUARD_CONFIG: SafeguardConfig;
1221
-
1222
- export { USDT_TYPE as $, type T2000ErrorCode as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type T2000ErrorData as F, GAS_RESERVE_MIN as G, T2000_OVERLAY_FEE_WALLET 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, OVERLAY_FEE_RATE as O, type PayOptions as P, type TransactionLeg as Q, type TransactionRecord as R, STABLE_ASSETS as S, T2000Error as T, type TransactionSigner as U, type TxDirection as V, type TxMetadata as W, USDC_DECIMALS as X, USDC_TYPE as Y, USDE_TYPE as Z, USDSUI_TYPE as _, COIN_REGISTRY as a, isInRegistry as a$, WAL_TYPE as a0, WBTC_TYPE as a1, type ZkLoginProof as a2, ZkLoginSigner as a3, buildSwapTx as a4, classifyAction as a5, classifyLabel as a6, classifyTransaction as a7, executeTx as a8, extractAllUserLegs as a9, type SwapResult as aA, type SwapQuoteResult as aB, type PaymentRequest as aC, type SuiCoreClient as aD, type SendableAsset as aE, type SponsoredCoinMergeCache as aF, CETUS_USDC_SUI_POOL as aG, type CoinPage as aH, DEFAULT_GRPC_URL as aI, GASLESS_MIN_STABLE_AMOUNT as aJ, GASLESS_STABLE_TYPES as aK, OPERATION_ASSETS as aL, type Operation as aM, SENDABLE_ASSETS as aN, type SelectAndSplitResult as aO, type SerializedCetusRoute as aP, type SerializedCetusRoutePath as aQ, type SerializedRouterDataV3 as aR, addSwapToTx as aS, assertAllowedAsset as aT, deserializeCetusRoute as aU, fetchAllCoins as aV, getCoinMeta as aW, getSuiClient as aX, getSuiGrpcClient as aY, isAllowedAsset as aZ, isCetusRouteFresh as a_, extractTransferDetails as aa, extractTxCommands as ab, extractTxSender as ac, fallbackLabel as ad, findSwapRoute as ae, formatAssetAmount as af, formatSui as ag, formatUsd as ah, getDecimals as ai, getDecimalsForCoinType as aj, mapMoveAbortCode as ak, mapWalletError as al, mistToSui as am, parseSuiRpcTx as an, payWithMpp as ao, rawToStable as ap, rawToUsdc as aq, refineLendingLabel as ar, resolveSymbol as as, resolveTokenType as at, stableToRaw as au, suiToMist as av, truncateAddress as aw, usdcToRaw as ax, validateAddress as ay, type T2000Options as az, type ClassifyBalanceChange as b, normalizeAsset as b0, normalizeCoinType as b1, queryHistory as b2, queryTransaction as b3, selectAndSplitCoin as b4, selectSuiCoin as b5, serializeCetusRoute as b6, simulateTransaction as b7, throwIfSimulationFailed as b8, verifyCetusRouteCoinMatch as b9, type ClassifyResult as c, type CoinMeta as d, DEFAULT_SAFEGUARD_CONFIG as e, type DepositInfo as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, type OverlayFeeConfig as k, type PayResult as l, SUI_DECIMALS as m, SUI_TYPE as n, SUPPORTED_ASSETS as o, type SafeguardConfig as p, SafeguardError as q, type SafeguardErrorDetails as r, type SafeguardRule as s, type SendResult as t, type SimulationResult as u, type StableAsset as v, type SuiHolding as w, type SuiRpcTxBlock as x, type SupportedAsset as y, type SwapRouteResult as z };
1186
+ export { classifyAction as $, type TransactionRecord as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type TransactionSigner as F, GAS_RESERVE_MIN as G, type TxDirection as H, IKA_TYPE as I, USDC_TYPE as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OVERLAY_FEE_RATE as O, type PayOptions as P, USDE_TYPE as Q, USDSUI_TYPE as R, STABLE_ASSETS as S, T2000Error as T, USDC_DECIMALS as U, USDT_TYPE as V, WAL_TYPE as W, WBTC_TYPE as X, ZkLoginSigner as Y, type ZkLoginProof as Z, buildSwapTx as _, COIN_REGISTRY as a, selectSuiCoin as a$, classifyLabel as a0, classifyTransaction as a1, executeTx as a2, extractAllUserLegs as a3, extractTransferDetails as a4, extractTxCommands as a5, extractTxSender as a6, fallbackLabel as a7, findSwapRoute as a8, formatAssetAmount as a9, CETUS_USDC_SUI_POOL as aA, type CoinPage as aB, DEFAULT_GRPC_URL as aC, GASLESS_MIN_STABLE_AMOUNT as aD, GASLESS_STABLE_TYPES as aE, OPERATION_ASSETS as aF, type Operation as aG, SENDABLE_ASSETS as aH, type SelectAndSplitResult as aI, type SerializedCetusRoute as aJ, type SerializedCetusRoutePath as aK, type SerializedRouterDataV3 as aL, addSwapToTx as aM, assertAllowedAsset as aN, deserializeCetusRoute as aO, fetchAllCoins as aP, getCoinMeta as aQ, getSuiClient as aR, getSuiGrpcClient as aS, isAllowedAsset as aT, isCetusRouteFresh as aU, isInRegistry as aV, normalizeAsset as aW, normalizeCoinType as aX, queryHistory as aY, queryTransaction as aZ, selectAndSplitCoin as a_, formatSui as aa, formatUsd as ab, getDecimals as ac, getDecimalsForCoinType as ad, mapMoveAbortCode as ae, mapWalletError as af, mistToSui as ag, parseSuiRpcTx as ah, payWithMpp as ai, rawToStable as aj, rawToUsdc as ak, refineLendingLabel as al, resolveSymbol as am, resolveTokenType as an, stableToRaw as ao, suiToMist as ap, truncateAddress as aq, usdcToRaw as ar, validateAddress as as, type T2000Options as at, type SwapResult as au, type SwapQuoteResult as av, type PaymentRequest as aw, type SuiCoreClient as ax, type SendableAsset as ay, type SponsoredCoinMergeCache as az, type ClassifyBalanceChange as b, serializeCetusRoute as b0, simulateTransaction as b1, throwIfSimulationFailed as b2, verifyCetusRouteCoinMatch as b3, type ClassifyResult as c, type CoinMeta as d, type DepositInfo as e, type ExtractedTransfer as f, KeypairSigner as g, LOFI_TYPE as h, MIST_PER_SUI as i, type OverlayFeeConfig as j, type PayResult as k, SUI_DECIMALS as l, SUI_TYPE as m, SUPPORTED_ASSETS as n, type SendResult as o, type SimulationResult as p, type StableAsset as q, type SuiHolding as r, type SuiRpcTxBlock as s, type SupportedAsset as t, type SwapRouteResult as u, type T2000ErrorCode as v, type T2000ErrorData as w, T2000_OVERLAY_FEE_WALLET as x, TOKEN_MAP as y, type TransactionLeg as z };
@@ -787,6 +787,8 @@ interface PayOptions {
787
787
  body?: string;
788
788
  headers?: Record<string, string>;
789
789
  maxPrice?: number;
790
+ /** Bypass the spending-limit gate for this call (caller owns consent). */
791
+ force?: boolean;
790
792
  }
791
793
  interface PayResult {
792
794
  status: number;
@@ -1181,42 +1183,4 @@ interface SimulationResult {
1181
1183
  declare function simulateTransaction(client: SuiCoreClient, tx: Transaction, sender: string): Promise<SimulationResult>;
1182
1184
  declare function throwIfSimulationFailed(sim: SimulationResult): void;
1183
1185
 
1184
- type SafeguardRule = 'locked' | 'maxPerTx' | 'maxDailySend';
1185
- interface SafeguardErrorDetails {
1186
- attempted?: number;
1187
- limit?: number;
1188
- current?: number;
1189
- }
1190
- declare class SafeguardError extends T2000Error {
1191
- readonly rule: SafeguardRule;
1192
- readonly details: SafeguardErrorDetails;
1193
- constructor(rule: SafeguardRule, details: SafeguardErrorDetails, message?: string);
1194
- toJSON(): {
1195
- error: "SAFEGUARD_BLOCKED";
1196
- message: string;
1197
- retryable: boolean;
1198
- data: {
1199
- attempted?: number;
1200
- limit?: number;
1201
- current?: number;
1202
- rule: SafeguardRule;
1203
- };
1204
- };
1205
- }
1206
-
1207
- interface SafeguardConfig {
1208
- locked: boolean;
1209
- maxPerTx: number;
1210
- maxDailySend: number;
1211
- dailyUsed: number;
1212
- dailyResetDate: string;
1213
- maxLeverage?: number;
1214
- maxPositionSize?: number;
1215
- }
1216
- interface TxMetadata {
1217
- operation: 'send' | 'pay';
1218
- amount?: number;
1219
- }
1220
- declare const DEFAULT_SAFEGUARD_CONFIG: SafeguardConfig;
1221
-
1222
- export { USDT_TYPE as $, type T2000ErrorCode as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type T2000ErrorData as F, GAS_RESERVE_MIN as G, T2000_OVERLAY_FEE_WALLET 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, OVERLAY_FEE_RATE as O, type PayOptions as P, type TransactionLeg as Q, type TransactionRecord as R, STABLE_ASSETS as S, T2000Error as T, type TransactionSigner as U, type TxDirection as V, type TxMetadata as W, USDC_DECIMALS as X, USDC_TYPE as Y, USDE_TYPE as Z, USDSUI_TYPE as _, COIN_REGISTRY as a, isInRegistry as a$, WAL_TYPE as a0, WBTC_TYPE as a1, type ZkLoginProof as a2, ZkLoginSigner as a3, buildSwapTx as a4, classifyAction as a5, classifyLabel as a6, classifyTransaction as a7, executeTx as a8, extractAllUserLegs as a9, type SwapResult as aA, type SwapQuoteResult as aB, type PaymentRequest as aC, type SuiCoreClient as aD, type SendableAsset as aE, type SponsoredCoinMergeCache as aF, CETUS_USDC_SUI_POOL as aG, type CoinPage as aH, DEFAULT_GRPC_URL as aI, GASLESS_MIN_STABLE_AMOUNT as aJ, GASLESS_STABLE_TYPES as aK, OPERATION_ASSETS as aL, type Operation as aM, SENDABLE_ASSETS as aN, type SelectAndSplitResult as aO, type SerializedCetusRoute as aP, type SerializedCetusRoutePath as aQ, type SerializedRouterDataV3 as aR, addSwapToTx as aS, assertAllowedAsset as aT, deserializeCetusRoute as aU, fetchAllCoins as aV, getCoinMeta as aW, getSuiClient as aX, getSuiGrpcClient as aY, isAllowedAsset as aZ, isCetusRouteFresh as a_, extractTransferDetails as aa, extractTxCommands as ab, extractTxSender as ac, fallbackLabel as ad, findSwapRoute as ae, formatAssetAmount as af, formatSui as ag, formatUsd as ah, getDecimals as ai, getDecimalsForCoinType as aj, mapMoveAbortCode as ak, mapWalletError as al, mistToSui as am, parseSuiRpcTx as an, payWithMpp as ao, rawToStable as ap, rawToUsdc as aq, refineLendingLabel as ar, resolveSymbol as as, resolveTokenType as at, stableToRaw as au, suiToMist as av, truncateAddress as aw, usdcToRaw as ax, validateAddress as ay, type T2000Options as az, type ClassifyBalanceChange as b, normalizeAsset as b0, normalizeCoinType as b1, queryHistory as b2, queryTransaction as b3, selectAndSplitCoin as b4, selectSuiCoin as b5, serializeCetusRoute as b6, simulateTransaction as b7, throwIfSimulationFailed as b8, verifyCetusRouteCoinMatch as b9, type ClassifyResult as c, type CoinMeta as d, DEFAULT_SAFEGUARD_CONFIG as e, type DepositInfo as f, type ExtractedTransfer as g, KeypairSigner as h, LOFI_TYPE as i, MIST_PER_SUI as j, type OverlayFeeConfig as k, type PayResult as l, SUI_DECIMALS as m, SUI_TYPE as n, SUPPORTED_ASSETS as o, type SafeguardConfig as p, SafeguardError as q, type SafeguardErrorDetails as r, type SafeguardRule as s, type SendResult as t, type SimulationResult as u, type StableAsset as v, type SuiHolding as w, type SuiRpcTxBlock as x, type SupportedAsset as y, type SwapRouteResult as z };
1186
+ export { classifyAction as $, type TransactionRecord as A, type BalanceResponse as B, CLOCK_ID as C, DEFAULT_NETWORK as D, ETH_TYPE as E, type TransactionSigner as F, GAS_RESERVE_MIN as G, type TxDirection as H, IKA_TYPE as I, USDC_TYPE as J, KNOWN_TARGETS as K, LABEL_PATTERNS as L, MANIFEST_TYPE as M, NAVX_TYPE as N, OVERLAY_FEE_RATE as O, type PayOptions as P, USDE_TYPE as Q, USDSUI_TYPE as R, STABLE_ASSETS as S, T2000Error as T, USDC_DECIMALS as U, USDT_TYPE as V, WAL_TYPE as W, WBTC_TYPE as X, ZkLoginSigner as Y, type ZkLoginProof as Z, buildSwapTx as _, COIN_REGISTRY as a, selectSuiCoin as a$, classifyLabel as a0, classifyTransaction as a1, executeTx as a2, extractAllUserLegs as a3, extractTransferDetails as a4, extractTxCommands as a5, extractTxSender as a6, fallbackLabel as a7, findSwapRoute as a8, formatAssetAmount as a9, CETUS_USDC_SUI_POOL as aA, type CoinPage as aB, DEFAULT_GRPC_URL as aC, GASLESS_MIN_STABLE_AMOUNT as aD, GASLESS_STABLE_TYPES as aE, OPERATION_ASSETS as aF, type Operation as aG, SENDABLE_ASSETS as aH, type SelectAndSplitResult as aI, type SerializedCetusRoute as aJ, type SerializedCetusRoutePath as aK, type SerializedRouterDataV3 as aL, addSwapToTx as aM, assertAllowedAsset as aN, deserializeCetusRoute as aO, fetchAllCoins as aP, getCoinMeta as aQ, getSuiClient as aR, getSuiGrpcClient as aS, isAllowedAsset as aT, isCetusRouteFresh as aU, isInRegistry as aV, normalizeAsset as aW, normalizeCoinType as aX, queryHistory as aY, queryTransaction as aZ, selectAndSplitCoin as a_, formatSui as aa, formatUsd as ab, getDecimals as ac, getDecimalsForCoinType as ad, mapMoveAbortCode as ae, mapWalletError as af, mistToSui as ag, parseSuiRpcTx as ah, payWithMpp as ai, rawToStable as aj, rawToUsdc as ak, refineLendingLabel as al, resolveSymbol as am, resolveTokenType as an, stableToRaw as ao, suiToMist as ap, truncateAddress as aq, usdcToRaw as ar, validateAddress as as, type T2000Options as at, type SwapResult as au, type SwapQuoteResult as av, type PaymentRequest as aw, type SuiCoreClient as ax, type SendableAsset as ay, type SponsoredCoinMergeCache as az, type ClassifyBalanceChange as b, serializeCetusRoute as b0, simulateTransaction as b1, throwIfSimulationFailed as b2, verifyCetusRouteCoinMatch as b3, type ClassifyResult as c, type CoinMeta as d, type DepositInfo as e, type ExtractedTransfer as f, KeypairSigner as g, LOFI_TYPE as h, MIST_PER_SUI as i, type OverlayFeeConfig as j, type PayResult as k, SUI_DECIMALS as l, SUI_TYPE as m, SUPPORTED_ASSETS as n, type SendResult as o, type SimulationResult as p, type StableAsset as q, type SuiHolding as r, type SuiRpcTxBlock as s, type SupportedAsset as t, type SwapRouteResult as u, type T2000ErrorCode as v, type T2000ErrorData as w, T2000_OVERLAY_FEE_WALLET as x, TOKEN_MAP as y, type TransactionLeg as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2000/sdk",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "TypeScript SDK for Agent Wallets on Sui — gasless USDC + USDsui transfers, Cetus swap routing, NAVI lending (programmatic), MPP paid API access, zkLogin compatible.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",