@t2000/sdk 4.4.0 → 5.1.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 +3 -3
- package/dist/browser.cjs +333 -161
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +333 -150
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +802 -6702
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -541
- package/dist/index.d.ts +29 -541
- package/dist/index.js +805 -6677
- package/dist/index.js.map +1 -1
- package/dist/types-C01EGu76.d.cts +1222 -0
- package/dist/types-C01EGu76.d.ts +1222 -0
- package/package.json +3 -16
- package/dist/adapters/descriptors.cjs +0 -48
- package/dist/adapters/descriptors.cjs.map +0 -1
- package/dist/adapters/descriptors.d.cts +0 -3
- package/dist/adapters/descriptors.d.ts +0 -3
- package/dist/adapters/descriptors.js +0 -45
- package/dist/adapters/descriptors.js.map +0 -1
- package/dist/adapters/index.cjs +0 -4815
- package/dist/adapters/index.cjs.map +0 -1
- package/dist/adapters/index.d.cts +0 -91
- package/dist/adapters/index.d.ts +0 -91
- package/dist/adapters/index.js +0 -4810
- package/dist/adapters/index.js.map +0 -1
- package/dist/descriptors-DqIb4AnV.d.cts +0 -134
- package/dist/descriptors-DqIb4AnV.d.ts +0 -134
- package/dist/types-CFV4VcJJ.d.cts +0 -667
- package/dist/types-Ch0zVUpC.d.cts +0 -727
- package/dist/types-Ch0zVUpC.d.ts +0 -727
- package/dist/types-DqRLGfOC.d.ts +0 -667
|
@@ -1,667 +0,0 @@
|
|
|
1
|
-
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
2
|
-
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
3
|
-
import { P as PayOptions, d as PayResult, T as TransactionLeg, k as TransactionRecord } from './types-Ch0zVUpC.cjs';
|
|
4
|
-
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
5
|
-
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Abstract signing interface that decouples the SDK from any specific
|
|
9
|
-
* key management strategy (Ed25519 keypair, zkLogin, multisig, …).
|
|
10
|
-
*/
|
|
11
|
-
interface TransactionSigner {
|
|
12
|
-
getAddress(): string;
|
|
13
|
-
signTransaction(txBytes: Uint8Array): Promise<{
|
|
14
|
-
signature: string;
|
|
15
|
-
}>;
|
|
16
|
-
/**
|
|
17
|
-
* Sign an arbitrary personal message. Required by `@suimpp/mpp` 0.7+ for
|
|
18
|
-
* grief-protection proofs (sender identity verification on settled payments).
|
|
19
|
-
*/
|
|
20
|
-
signPersonalMessage(messageBytes: Uint8Array): Promise<{
|
|
21
|
-
signature: string;
|
|
22
|
-
bytes?: string;
|
|
23
|
-
}>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare class KeypairSigner implements TransactionSigner {
|
|
27
|
-
private readonly keypair;
|
|
28
|
-
constructor(keypair: Ed25519Keypair);
|
|
29
|
-
getAddress(): string;
|
|
30
|
-
signTransaction(txBytes: Uint8Array): Promise<{
|
|
31
|
-
signature: string;
|
|
32
|
-
}>;
|
|
33
|
-
signPersonalMessage(messageBytes: Uint8Array): Promise<{
|
|
34
|
-
signature: string;
|
|
35
|
-
bytes: string;
|
|
36
|
-
}>;
|
|
37
|
-
/** Access the underlying keypair for APIs that still require it directly. */
|
|
38
|
-
getKeypair(): Ed25519Keypair;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface ZkLoginProof {
|
|
42
|
-
proofPoints: {
|
|
43
|
-
a: string[];
|
|
44
|
-
b: string[][];
|
|
45
|
-
c: string[];
|
|
46
|
-
};
|
|
47
|
-
issBase64Details: {
|
|
48
|
-
indexMod4: number;
|
|
49
|
-
value: string;
|
|
50
|
-
};
|
|
51
|
-
headerBase64: string;
|
|
52
|
-
addressSeed: string;
|
|
53
|
-
}
|
|
54
|
-
declare class ZkLoginSigner implements TransactionSigner {
|
|
55
|
-
private readonly ephemeralKeypair;
|
|
56
|
-
private readonly zkProof;
|
|
57
|
-
private readonly userAddress;
|
|
58
|
-
private readonly maxEpoch;
|
|
59
|
-
constructor(ephemeralKeypair: Ed25519Keypair, zkProof: ZkLoginProof, userAddress: string, maxEpoch: number);
|
|
60
|
-
getAddress(): string;
|
|
61
|
-
signTransaction(txBytes: Uint8Array): Promise<{
|
|
62
|
-
signature: string;
|
|
63
|
-
}>;
|
|
64
|
-
signPersonalMessage(messageBytes: Uint8Array): Promise<{
|
|
65
|
-
signature: string;
|
|
66
|
-
bytes: string;
|
|
67
|
-
}>;
|
|
68
|
-
isExpired(currentEpoch: number): boolean;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Unified token registry — single source of truth for coin types, decimals, symbols, and tiers.
|
|
73
|
-
*
|
|
74
|
-
* ZERO heavy dependencies. Safe to import from any context (server, browser, Edge).
|
|
75
|
-
*
|
|
76
|
-
* Tier 1: USDC — the financial layer (save, borrow, receive, yield, allowances, marketplace, MPP).
|
|
77
|
-
* Tier 2: 15 curated swap assets — hold, trade, and send only.
|
|
78
|
-
* No tier: Legacy tokens kept for display accuracy (existing NAVI positions). No new operations.
|
|
79
|
-
*
|
|
80
|
-
* To add a new token: add ONE entry to COIN_REGISTRY below. Everything else derives from it.
|
|
81
|
-
* Gate for Tier 2 addition: confirmed deep Cetus liquidity + clear user need.
|
|
82
|
-
*/
|
|
83
|
-
interface CoinMeta {
|
|
84
|
-
type: string;
|
|
85
|
-
decimals: number;
|
|
86
|
-
symbol: string;
|
|
87
|
-
tier?: 1 | 2;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Canonical coin registry.
|
|
91
|
-
* Key = user-friendly name (used in swap_execute, CLI, prompts).
|
|
92
|
-
*/
|
|
93
|
-
declare const COIN_REGISTRY: Record<string, CoinMeta>;
|
|
94
|
-
/**
|
|
95
|
-
* Returns the registry metadata for a coin type, or `undefined` if the coin
|
|
96
|
-
* is not in the registry. Use this when you need to distinguish "known coin"
|
|
97
|
-
* from "supported coin" — `isSupported` only flags tiered (active) coins,
|
|
98
|
-
* but legacy coins like USDsui / USDe / USDT are in the registry without a
|
|
99
|
-
* tier and still need canonical-symbol resolution.
|
|
100
|
-
*/
|
|
101
|
-
declare function getCoinMeta(coinType: string): CoinMeta | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* Returns true if the coin type appears anywhere in COIN_REGISTRY (tier 1, 2,
|
|
104
|
-
* OR legacy/no-tier). Different from `isSupported`, which excludes legacy
|
|
105
|
-
* entries. The blockvision-prices canonical-symbol gate uses this looser
|
|
106
|
-
* check so that USDsui (legacy/no-tier today, but with a registry-canonical
|
|
107
|
-
* mixed-case symbol) still wins over BlockVision's uppercase 'USDSUI'.
|
|
108
|
-
*/
|
|
109
|
-
declare function isInRegistry(coinType: string): boolean;
|
|
110
|
-
/** Returns true if the coin type is Tier 1 (USDC — the financial layer). */
|
|
111
|
-
declare function isTier1(coinType: string): boolean;
|
|
112
|
-
/** Returns true if the coin type is Tier 2 (curated swap asset). */
|
|
113
|
-
declare function isTier2(coinType: string): boolean;
|
|
114
|
-
/** Returns true if the coin type is actively supported (Tier 1 or Tier 2). */
|
|
115
|
-
declare function isSupported(coinType: string): boolean;
|
|
116
|
-
/** Returns the tier for a coin type, or undefined if legacy/unknown. */
|
|
117
|
-
declare function getTier(coinType: string): 1 | 2 | undefined;
|
|
118
|
-
/**
|
|
119
|
-
* Get decimals for any coin type. Checks full type match, then suffix match, then defaults to 9.
|
|
120
|
-
* Works for both tiered and legacy tokens.
|
|
121
|
-
*/
|
|
122
|
-
declare function getDecimalsForCoinType(coinType: string): number;
|
|
123
|
-
/**
|
|
124
|
-
* Resolve a full coin type to a user-friendly symbol.
|
|
125
|
-
* Returns the last `::` segment if not in the registry.
|
|
126
|
-
*/
|
|
127
|
-
declare function resolveSymbol(coinType: string): string;
|
|
128
|
-
/**
|
|
129
|
-
* Name → type map for swap resolution. Derived from COIN_REGISTRY.
|
|
130
|
-
* Contains BOTH original-case and UPPERCASE keys for case-insensitive lookup.
|
|
131
|
-
*/
|
|
132
|
-
declare const TOKEN_MAP: Record<string, string>;
|
|
133
|
-
/**
|
|
134
|
-
* Resolve a user-friendly token name to its full coin type.
|
|
135
|
-
* Returns the input unchanged if already a full coin type (contains "::").
|
|
136
|
-
* Case-insensitive: 'usde', 'USDe', 'USDE' all resolve correctly.
|
|
137
|
-
*/
|
|
138
|
-
declare function resolveTokenType(nameOrType: string): string | null;
|
|
139
|
-
/** Common type constants for direct import. */
|
|
140
|
-
declare const SUI_TYPE: string;
|
|
141
|
-
declare const USDC_TYPE: string;
|
|
142
|
-
declare const USDT_TYPE: string;
|
|
143
|
-
declare const USDSUI_TYPE: string;
|
|
144
|
-
declare const USDE_TYPE: string;
|
|
145
|
-
declare const ETH_TYPE: string;
|
|
146
|
-
declare const WBTC_TYPE: string;
|
|
147
|
-
declare const WAL_TYPE: string;
|
|
148
|
-
declare const NAVX_TYPE: string;
|
|
149
|
-
declare const IKA_TYPE: string;
|
|
150
|
-
declare const LOFI_TYPE: string;
|
|
151
|
-
declare const MANIFEST_TYPE: string;
|
|
152
|
-
|
|
153
|
-
declare function payWithMpp(args: {
|
|
154
|
-
signer: TransactionSigner;
|
|
155
|
-
client: SuiJsonRpcClient;
|
|
156
|
-
options: PayOptions;
|
|
157
|
-
}): Promise<PayResult>;
|
|
158
|
-
|
|
159
|
-
type SuiTransactionEffects = NonNullable<Awaited<ReturnType<SuiJsonRpcClient['executeTransactionBlock']>>['effects']>;
|
|
160
|
-
type BuildClient = NonNullable<Parameters<Transaction['build']>[0]>['client'];
|
|
161
|
-
declare function executeTx(client: SuiJsonRpcClient, signer: TransactionSigner, buildTx: () => Promise<Transaction> | Transaction, options?: {
|
|
162
|
-
buildClient?: BuildClient;
|
|
163
|
-
}): Promise<{
|
|
164
|
-
digest: string;
|
|
165
|
-
gasCostSui: number;
|
|
166
|
-
effects: SuiTransactionEffects | undefined;
|
|
167
|
-
}>;
|
|
168
|
-
|
|
169
|
-
type T2000ErrorCode = 'INSUFFICIENT_BALANCE' | 'ADDRESS_BALANCE_UNSPONSORABLE' | 'INSUFFICIENT_GAS' | 'INVALID_ADDRESS' | 'INVALID_AMOUNT' | 'WALLET_NOT_FOUND' | 'WALLET_LOCKED' | 'WALLET_EXISTS' | 'WALLET_CORRUPT' | 'INVALID_KEY' | 'SIMULATION_FAILED' | 'TRANSACTION_FAILED' | 'ASSET_NOT_SUPPORTED' | 'INVALID_ASSET' | 'HEALTH_FACTOR_TOO_LOW' | 'WITHDRAW_WOULD_LIQUIDATE' | 'WITHDRAW_FAILED' | 'NO_COLLATERAL' | 'PROTOCOL_PAUSED' | 'PROTOCOL_UNAVAILABLE' | 'RPC_ERROR' | 'RPC_UNREACHABLE' | 'PRICE_EXCEEDS_LIMIT' | 'UNSUPPORTED_NETWORK' | 'PAYMENT_EXPIRED' | 'DUPLICATE_PAYMENT' | 'FACILITATOR_REJECTION' | 'CONTACT_NOT_FOUND' | 'INVALID_CONTACT_NAME' | 'SUINS_NOT_REGISTERED' | 'FACILITATOR_TIMEOUT' | 'SAFEGUARD_BLOCKED' | 'SWAP_NO_ROUTE' | 'SWAP_FAILED' | 'CHAIN_MODE_INVALID' | 'UNKNOWN';
|
|
170
|
-
interface T2000ErrorData {
|
|
171
|
-
reason?: string;
|
|
172
|
-
[key: string]: unknown;
|
|
173
|
-
}
|
|
174
|
-
declare class T2000Error extends Error {
|
|
175
|
-
readonly code: T2000ErrorCode;
|
|
176
|
-
readonly data?: T2000ErrorData;
|
|
177
|
-
readonly retryable: boolean;
|
|
178
|
-
constructor(code: T2000ErrorCode, message: string, data?: T2000ErrorData, retryable?: boolean);
|
|
179
|
-
toJSON(): {
|
|
180
|
-
retryable: boolean;
|
|
181
|
-
data?: T2000ErrorData | undefined;
|
|
182
|
-
error: T2000ErrorCode;
|
|
183
|
-
message: string;
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
declare function mapWalletError(error: unknown): T2000Error;
|
|
187
|
-
declare function mapMoveAbortCode(code: number): string;
|
|
188
|
-
|
|
189
|
-
declare const MIST_PER_SUI = 1000000000n;
|
|
190
|
-
declare const SUI_DECIMALS = 9;
|
|
191
|
-
declare const USDC_DECIMALS = 6;
|
|
192
|
-
declare const BPS_DENOMINATOR = 10000n;
|
|
193
|
-
declare const SAVE_FEE_BPS = 10n;
|
|
194
|
-
declare const BORROW_FEE_BPS = 5n;
|
|
195
|
-
declare const CLOCK_ID = "0x6";
|
|
196
|
-
declare const SUPPORTED_ASSETS: {
|
|
197
|
-
readonly USDC: {
|
|
198
|
-
readonly type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
|
|
199
|
-
readonly decimals: 6;
|
|
200
|
-
readonly symbol: "USDC";
|
|
201
|
-
readonly displayName: "USDC";
|
|
202
|
-
};
|
|
203
|
-
readonly USDT: {
|
|
204
|
-
readonly type: "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT";
|
|
205
|
-
readonly decimals: 6;
|
|
206
|
-
readonly symbol: "USDT";
|
|
207
|
-
readonly displayName: "suiUSDT";
|
|
208
|
-
};
|
|
209
|
-
readonly USDe: {
|
|
210
|
-
readonly type: "0x41d587e5336f1c86cad50d38a7136db99333bb9bda91cea4ba69115defeb1402::sui_usde::SUI_USDE";
|
|
211
|
-
readonly decimals: 6;
|
|
212
|
-
readonly symbol: "USDe";
|
|
213
|
-
readonly displayName: "suiUSDe";
|
|
214
|
-
};
|
|
215
|
-
readonly USDsui: {
|
|
216
|
-
readonly type: "0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1::usdsui::USDSUI";
|
|
217
|
-
readonly decimals: 6;
|
|
218
|
-
readonly symbol: "USDsui";
|
|
219
|
-
readonly displayName: "USDsui";
|
|
220
|
-
};
|
|
221
|
-
readonly SUI: {
|
|
222
|
-
readonly type: "0x2::sui::SUI";
|
|
223
|
-
readonly decimals: 9;
|
|
224
|
-
readonly symbol: "SUI";
|
|
225
|
-
readonly displayName: "SUI";
|
|
226
|
-
};
|
|
227
|
-
readonly WAL: {
|
|
228
|
-
readonly type: "0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL";
|
|
229
|
-
readonly decimals: 9;
|
|
230
|
-
readonly symbol: "WAL";
|
|
231
|
-
readonly displayName: "WAL";
|
|
232
|
-
};
|
|
233
|
-
readonly ETH: {
|
|
234
|
-
readonly type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH";
|
|
235
|
-
readonly decimals: 8;
|
|
236
|
-
readonly symbol: "ETH";
|
|
237
|
-
readonly displayName: "suiETH";
|
|
238
|
-
};
|
|
239
|
-
readonly NAVX: {
|
|
240
|
-
readonly type: "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX";
|
|
241
|
-
readonly decimals: 9;
|
|
242
|
-
readonly symbol: "NAVX";
|
|
243
|
-
readonly displayName: "NAVX";
|
|
244
|
-
};
|
|
245
|
-
readonly GOLD: {
|
|
246
|
-
readonly type: "0x9d297676e7a4b771ab023291377b2adfaa4938fb9080b8d12430e4b108b836a9::xaum::XAUM";
|
|
247
|
-
readonly decimals: 6;
|
|
248
|
-
readonly symbol: "GOLD";
|
|
249
|
-
readonly displayName: "XAUM";
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
type SupportedAsset = keyof typeof SUPPORTED_ASSETS;
|
|
253
|
-
type StableAsset = 'USDC' | 'USDsui';
|
|
254
|
-
declare const STABLE_ASSETS: readonly StableAsset[];
|
|
255
|
-
type SaveableAsset = 'USDC' | 'USDsui';
|
|
256
|
-
declare const SAVEABLE_ASSETS: readonly SaveableAsset[];
|
|
257
|
-
declare const ALL_NAVI_ASSETS: readonly SupportedAsset[];
|
|
258
|
-
declare const OPERATION_ASSETS: {
|
|
259
|
-
readonly save: readonly ["USDC", "USDsui"];
|
|
260
|
-
readonly borrow: readonly ["USDC", "USDsui"];
|
|
261
|
-
readonly withdraw: "*";
|
|
262
|
-
readonly repay: "*";
|
|
263
|
-
readonly send: readonly ["USDC", "USDsui", "SUI"];
|
|
264
|
-
readonly swap: "*";
|
|
265
|
-
};
|
|
266
|
-
type Operation = keyof typeof OPERATION_ASSETS;
|
|
267
|
-
declare function isAllowedAsset(op: Operation, asset: string): boolean;
|
|
268
|
-
/**
|
|
269
|
-
* Throws if the asset is not permitted for the given operation.
|
|
270
|
-
*
|
|
271
|
-
* [v4.0 Phase A Day 2] Pre-v4 this allowed `undefined` as a silent default
|
|
272
|
-
* to USDC. Removed because every write path now requires explicit asset
|
|
273
|
-
* (see `T2000.send` + `buildSendTx` + `composeTx.send_transfer`). Save /
|
|
274
|
-
* borrow / repay still call this with `params.asset` (which may be
|
|
275
|
-
* undefined when the caller relies on the per-method `?? 'USDC'` default
|
|
276
|
-
* before this assertion fires), so the `undefined → no-op` branch stays
|
|
277
|
-
* for back-compat; the `send_transfer` flow validates non-undefined.
|
|
278
|
-
*/
|
|
279
|
-
declare function assertAllowedAsset(op: Operation, asset: string | undefined): void;
|
|
280
|
-
/**
|
|
281
|
-
* [v4.0 Phase A Day 2] Narrow type alias for assets sendable through the
|
|
282
|
-
* Agent Wallet. Matches `OPERATION_ASSETS.send` exactly. Exported so the
|
|
283
|
-
* CLI / SDK / composeTx can share one type without re-declaring it.
|
|
284
|
-
*/
|
|
285
|
-
type SendableAsset = 'USDC' | 'USDsui' | 'SUI';
|
|
286
|
-
declare const SENDABLE_ASSETS: readonly SendableAsset[];
|
|
287
|
-
/**
|
|
288
|
-
* [v4.0 Phase A Day 2] Coin types for the two gasless-allowlisted stables.
|
|
289
|
-
* Used by `wallet/send.ts` + `composeTx.send_transfer` to construct the
|
|
290
|
-
* `0x2::balance::send_funds` Move call's `typeArguments`. SUI is excluded
|
|
291
|
-
* because SUI transfers are NOT gasless (gas-native, uses `tx.gas` split +
|
|
292
|
-
* `transferObjects` per the existing path).
|
|
293
|
-
*/
|
|
294
|
-
declare const GASLESS_STABLE_TYPES: Record<'USDC' | 'USDsui', string>;
|
|
295
|
-
declare const T2000_OVERLAY_FEE_WALLET: string;
|
|
296
|
-
declare const DEFAULT_NETWORK: "mainnet";
|
|
297
|
-
declare const DEFAULT_GRPC_URL = "https://fullnode.mainnet.sui.io:443";
|
|
298
|
-
declare const GASLESS_MIN_STABLE_AMOUNT = 0.01;
|
|
299
|
-
declare const CETUS_USDC_SUI_POOL = "0x51e883ba7c0b566a26cbc8a94cd33eb0abd418a77cc1e60ad22fd9b1f29cd2ab";
|
|
300
|
-
declare const GAS_RESERVE_MIN = 0.05;
|
|
301
|
-
|
|
302
|
-
declare function getSuiClient(rpcUrl?: string): SuiJsonRpcClient;
|
|
303
|
-
declare function createSuiClient(network?: 'mainnet' | 'testnet'): SuiJsonRpcClient;
|
|
304
|
-
/**
|
|
305
|
-
* Cached `SuiGrpcClient` for gasless stablecoin transfer builds.
|
|
306
|
-
*
|
|
307
|
-
* [v4.0 Phase A Day 2 — SPEC_AGENT_WALLET_GREENFIELD §A]
|
|
308
|
-
*
|
|
309
|
-
* Why this exists: Sui mainnet's protocol-level gasless stablecoin transfers
|
|
310
|
-
* (`0x2::balance::send_funds` on the USDC + USDsui allowlist) are detected
|
|
311
|
-
* ONLY when the transaction is built through a `SuiGrpcClient`. The gRPC
|
|
312
|
-
* client's build resolver inspects the PTB at `tx.build()` time and, if it
|
|
313
|
-
* matches the gasless pattern, sets `gasPrice=0` + `gasBudget=0` automatically.
|
|
314
|
-
* Building the SAME PTB through `SuiJsonRpcClient` produces the same bytes
|
|
315
|
-
* but with non-zero gas — the tx still works, but the user pays SUI gas.
|
|
316
|
-
*
|
|
317
|
-
* Execution stays on JSON-RPC (`SuiJsonRpcClient.executeTransactionBlock`)
|
|
318
|
-
* because (a) the rest of the SDK expects JSON-RPC and (b) Sui's docs
|
|
319
|
-
* explicitly support a "build via gRPC, execute via JSON-RPC" hybrid:
|
|
320
|
-
* https://docs.sui.io/develop/transaction-payment/gasless-stablecoin-transfers
|
|
321
|
-
*
|
|
322
|
-
* Override the endpoint with the `T2000_GRPC_URL` env var or the
|
|
323
|
-
* `grpcUrl` arg. Cache is keyed by URL so multiple endpoints can
|
|
324
|
-
* co-exist (e.g., the rare testnet smoke + production usage from the
|
|
325
|
-
* same process).
|
|
326
|
-
*/
|
|
327
|
-
declare function getSuiGrpcClient(grpcUrl?: string): SuiGrpcClient;
|
|
328
|
-
declare function validateAddress(address: string): string;
|
|
329
|
-
declare function truncateAddress(address: string): string;
|
|
330
|
-
/**
|
|
331
|
-
* Normalize a Sui coin type to its canonical long-form 64-hex address.
|
|
332
|
-
* `0x2::sui::SUI` → `0x0000…0002::sui::SUI`. Idempotent on already-long
|
|
333
|
-
* forms. Returns the input unchanged if it doesn't look like a coin type
|
|
334
|
-
* (`<address>::<module>::<name>`) so callers can pass arbitrary strings
|
|
335
|
-
* without crashing.
|
|
336
|
-
*
|
|
337
|
-
* Why this exists: BlockVision's `/v2/sui/coin/price/list` endpoint
|
|
338
|
-
* silently returns an empty `prices` map for short-form coin types
|
|
339
|
-
* (notably `0x2::sui::SUI` — the native gas coin). Internal callers must
|
|
340
|
-
* pass the long form, but external callers (LLM tool args, cached
|
|
341
|
-
* coin-type strings, audit logs) commonly use the short form. Normalize
|
|
342
|
-
* before the network call, denormalize back to the caller's input shape
|
|
343
|
-
* after, and short/long become interchangeable.
|
|
344
|
-
*/
|
|
345
|
-
declare function normalizeCoinType(coinType: string): string;
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Shared transaction classifier.
|
|
349
|
-
*
|
|
350
|
-
* Consumed by both the SDK's `parseTxRecord` (production agent path) and
|
|
351
|
-
* the engine's `transaction_history` tool (cold-start RPC path). Keeping
|
|
352
|
-
* a single source of truth here prevents the two paths from drifting —
|
|
353
|
-
* see v1.5.3 regression where the SDK path was emitting `action:
|
|
354
|
-
* 'transaction'` (rendered as "On-chain") while the engine path was
|
|
355
|
-
* already producing fine-grained labels.
|
|
356
|
-
*/
|
|
357
|
-
/**
|
|
358
|
-
* Coarse action bucket — one of `'send' | 'lending' | 'swap' |
|
|
359
|
-
* 'transaction'`. Used by the ACI `action` filter on the
|
|
360
|
-
* `transaction_history` tool. STABLE: downstream queries depend on
|
|
361
|
-
* exactly these values.
|
|
362
|
-
*
|
|
363
|
-
* Order matters: more specific buckets first. Lending patterns precede
|
|
364
|
-
* swap patterns so a NAVI `::swap` helper (if one ever existed) would
|
|
365
|
-
* still bucket as lending.
|
|
366
|
-
*/
|
|
367
|
-
declare const KNOWN_TARGETS: readonly [RegExp, string][];
|
|
368
|
-
/**
|
|
369
|
-
* Finer-grained display labels — derived from MoveCall function names.
|
|
370
|
-
* The card renders `label ?? action`, so when this map matches we get
|
|
371
|
-
* "Deposit" / "Withdraw" / "Borrow" / "Repay" / "Payment link" instead
|
|
372
|
-
* of the generic "Lending" or "Transaction".
|
|
373
|
-
*
|
|
374
|
-
* Order matters: more specific patterns first. Each entry is
|
|
375
|
-
* (regex, label) where the regex is matched against the
|
|
376
|
-
* fully-qualified MoveCall target `pkg::module::function`.
|
|
377
|
-
*/
|
|
378
|
-
declare const LABEL_PATTERNS: readonly [RegExp, string][];
|
|
379
|
-
interface ClassifyBalanceChange {
|
|
380
|
-
owner: {
|
|
381
|
-
AddressOwner?: string;
|
|
382
|
-
} | string;
|
|
383
|
-
coinType: string;
|
|
384
|
-
amount: string;
|
|
385
|
-
}
|
|
386
|
-
declare function classifyAction(targets: string[], commandTypes: string[]): string;
|
|
387
|
-
/**
|
|
388
|
-
* Last-resort fallback when neither `LABEL_PATTERNS` nor the action
|
|
389
|
-
* bucket produces something useful.
|
|
390
|
-
*
|
|
391
|
-
* Returns the first MoveCall's *module* name (e.g. "navi", "spam") so
|
|
392
|
-
* the card shows something better than the literal word "transaction".
|
|
393
|
-
* When no MoveCall exists, returns 'on-chain'.
|
|
394
|
-
*
|
|
395
|
-
* Note: callers should prefer `classifyLabel` which now layers
|
|
396
|
-
* pattern-match → coarse action → module name (see commentary there).
|
|
397
|
-
*/
|
|
398
|
-
declare function fallbackLabel(targets: string[]): string;
|
|
399
|
-
/**
|
|
400
|
-
* Three-tier label resolution for the transaction history card:
|
|
401
|
-
* 1. Specific keyword match in `LABEL_PATTERNS` ("deposit",
|
|
402
|
-
* "payment_link", …).
|
|
403
|
-
* 2. Coarse action bucket from `classifyAction` ("swap", "send",
|
|
404
|
-
* "lending") — prevents leaking opaque internal module names like
|
|
405
|
-
* "router" (Cetus aggregator) or "cross_swap" (third-party DEX
|
|
406
|
-
* aggregators) for txs that we already classified as a swap.
|
|
407
|
-
* 3. Module name from the first MoveCall (`fallbackLabel`) — only
|
|
408
|
-
* used when the action bucket itself is the generic "transaction".
|
|
409
|
-
*
|
|
410
|
-
* Pre-v0.46.2 we skipped tier 2, so swaps showed labels like "router",
|
|
411
|
-
* "cross_swap", "scallop_router", etc. instead of the clean "swap".
|
|
412
|
-
*/
|
|
413
|
-
declare function classifyLabel(targets: string[], commandTypes: string[]): string;
|
|
414
|
-
/**
|
|
415
|
-
* Balance-direction tiebreaker for ambiguous lending calls.
|
|
416
|
-
*
|
|
417
|
-
* Many lending modules expose generic entry points (NAVI's bundled
|
|
418
|
-
* flash actions, `lending_core::*::entry_*`, etc.) that don't carry
|
|
419
|
-
* a `deposit`/`withdraw`/`borrow`/`repay` keyword in the function
|
|
420
|
-
* name. When `classifyLabel` falls back to a bare module name like
|
|
421
|
-
* `"lending"` for a known lending tx, infer direction from the user's
|
|
422
|
-
* non-SUI balance change:
|
|
423
|
-
* - net outflow of the supplied asset → deposit (also covers repay,
|
|
424
|
-
* but repay-without-keyword is essentially never emitted).
|
|
425
|
-
* - net inflow of the supplied asset → withdraw (also covers borrow).
|
|
426
|
-
* SUI is excluded so gas-only transactions don't get mislabeled.
|
|
427
|
-
*
|
|
428
|
-
* If `LABEL_PATTERNS` matched a specific keyword, the existing label is
|
|
429
|
-
* returned unchanged.
|
|
430
|
-
*/
|
|
431
|
-
declare function refineLendingLabel(currentAction: string, currentLabel: string, moveCallTargets: string[], changes: ClassifyBalanceChange[], address: string): string;
|
|
432
|
-
interface ClassifyResult {
|
|
433
|
-
action: string;
|
|
434
|
-
label: string;
|
|
435
|
-
}
|
|
436
|
-
declare function classifyTransaction(moveCallTargets: string[], commandTypes: string[], balanceChanges: ClassifyBalanceChange[], address: string): ClassifyResult;
|
|
437
|
-
/**
|
|
438
|
-
* Direction of the user's net non-gas movement for this transaction.
|
|
439
|
-
*
|
|
440
|
-
* - `'out'` — the user spent the asset (sends, deposits, repays,
|
|
441
|
-
* swap-in, payment-link payouts).
|
|
442
|
-
* - `'in'` — the user received the asset (withdraws, borrows,
|
|
443
|
-
* swap-out, claims, deposits credited from another wallet).
|
|
444
|
-
*
|
|
445
|
-
* Used by the `TransactionHistoryCard` to choose the `+`/`−` sign and
|
|
446
|
-
* color. Direction is computed from the actual on-chain balance change
|
|
447
|
-
* — never from the textual label — so opaque action types (`'router'`,
|
|
448
|
-
* `'cross_swap'`, …) still render the correct sign.
|
|
449
|
-
*/
|
|
450
|
-
type TxDirection = 'in' | 'out';
|
|
451
|
-
interface ExtractedTransfer {
|
|
452
|
-
amount?: number;
|
|
453
|
-
asset?: string;
|
|
454
|
-
recipient?: string;
|
|
455
|
-
direction?: TxDirection;
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Extracts the principal amount/asset/direction for a transaction
|
|
459
|
-
* from its `balanceChanges`.
|
|
460
|
-
*
|
|
461
|
-
* Algorithm:
|
|
462
|
-
* 1. Restrict to the user's *own* balance changes.
|
|
463
|
-
* 2. Prefer non-SUI changes (gas-only SUI deltas are noise).
|
|
464
|
-
* 3. Pick the change with the largest absolute value — the "principal".
|
|
465
|
-
* 4. If no non-SUI change exists, fall back to the largest SUI change
|
|
466
|
-
* so pure-SUI transfers (stake/unstake/native send) still render.
|
|
467
|
-
* 5. Direction follows the sign of the principal.
|
|
468
|
-
* 6. Recipient is set only on outflows, by finding a matching inflow
|
|
469
|
-
* on a *non-user* address with the same coinType.
|
|
470
|
-
*
|
|
471
|
-
* Pre-v0.46.2 this function only inspected outflows, so withdraws,
|
|
472
|
-
* borrows, claims, swap-receives and payment-link receives all
|
|
473
|
-
* rendered with no amount on the rich card (and with a wrong sign,
|
|
474
|
-
* because the card guessed direction from the label string).
|
|
475
|
-
*/
|
|
476
|
-
declare function extractTransferDetails(changes: ClassifyBalanceChange[] | undefined, sender: string): ExtractedTransfer;
|
|
477
|
-
/**
|
|
478
|
-
* Extract every non-zero user balance leg for a transaction — not
|
|
479
|
-
* just the largest one. Order is RPC order; callers responsible for
|
|
480
|
-
* any sorting (e.g. audric sorts by USD value once it's priced).
|
|
481
|
-
*
|
|
482
|
-
* Sui collapses balance changes by coin type, so a 3-step bundle
|
|
483
|
-
* touching USDC three times surfaces as ONE leg of net USDC delta.
|
|
484
|
-
* Distinguishing per-step legs would require parsing the PTB's
|
|
485
|
-
* commands; this helper deliberately stops at the balance-change
|
|
486
|
-
* granularity because that's what's reliably available across all
|
|
487
|
-
* Sui RPC versions.
|
|
488
|
-
*
|
|
489
|
-
* Pre-v1.27.2 the only public API was `extractTransferDetails`,
|
|
490
|
-
* which returned a single "primary" leg and made swap rows
|
|
491
|
-
* unrenderable (showed `Swapped 987.60 MANIFEST` because MANIFEST
|
|
492
|
-
* was the largest raw delta even though USDC was the value side).
|
|
493
|
-
*/
|
|
494
|
-
declare function extractAllUserLegs(changes: ClassifyBalanceChange[] | undefined, sender: string): TransactionLeg[];
|
|
495
|
-
|
|
496
|
-
declare function queryHistory(client: SuiJsonRpcClient, address: string, limit?: number): Promise<TransactionRecord[]>;
|
|
497
|
-
declare function queryTransaction(client: SuiJsonRpcClient, digest: string, senderAddress: string): Promise<TransactionRecord | null>;
|
|
498
|
-
/**
|
|
499
|
-
* Shape of a transaction block as returned by `suix_queryTransactionBlocks`
|
|
500
|
-
* with `showEffects | showInput | showBalanceChanges` enabled. Exported so
|
|
501
|
-
* downstream consumers (audric dashboard `/api/history`, `/api/activity`,
|
|
502
|
-
* etc.) can type their RPC calls without redeclaring the structure.
|
|
503
|
-
*/
|
|
504
|
-
interface SuiRpcTxBlock {
|
|
505
|
-
digest: string;
|
|
506
|
-
timestampMs?: string;
|
|
507
|
-
transaction?: unknown;
|
|
508
|
-
effects?: {
|
|
509
|
-
gasUsed?: {
|
|
510
|
-
computationCost: string;
|
|
511
|
-
storageCost: string;
|
|
512
|
-
storageRebate: string;
|
|
513
|
-
};
|
|
514
|
-
};
|
|
515
|
-
balanceChanges?: ClassifyBalanceChange[];
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Convert a single Sui RPC transaction block to a {@link TransactionRecord}
|
|
519
|
-
* using the canonical (shared) classifier and balance-change extractor.
|
|
520
|
-
*
|
|
521
|
-
* This is the single source of truth for transaction parsing across the
|
|
522
|
-
* agent-tool path AND the dashboard-API path. Use it instead of writing
|
|
523
|
-
* a bespoke parser per surface.
|
|
524
|
-
*
|
|
525
|
-
* @param tx Raw RPC tx block (must include `effects`, `input`, `balanceChanges`).
|
|
526
|
-
* @param address Wallet address whose perspective we're parsing from.
|
|
527
|
-
*/
|
|
528
|
-
declare function parseSuiRpcTx(tx: SuiRpcTxBlock, address: string): TransactionRecord;
|
|
529
|
-
/**
|
|
530
|
-
* Extract the sender (signer) address from a raw RPC tx block.
|
|
531
|
-
* Returns `null` if the block shape is unexpected.
|
|
532
|
-
*/
|
|
533
|
-
declare function extractTxSender(txBlock: unknown): string | null;
|
|
534
|
-
/**
|
|
535
|
-
* Extract MoveCall targets (`<pkg>::<module>::<function>`) and the
|
|
536
|
-
* sequence of programmable-transaction command types (e.g. `MoveCall`,
|
|
537
|
-
* `TransferObjects`) from a raw RPC tx block. Tolerates both the
|
|
538
|
-
* legacy `inner.transactions` field and the newer `inner.commands`
|
|
539
|
-
* field.
|
|
540
|
-
*/
|
|
541
|
-
declare function extractTxCommands(txBlock: unknown): {
|
|
542
|
-
moveCallTargets: string[];
|
|
543
|
-
commandTypes: string[];
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
declare function mistToSui(mist: bigint): number;
|
|
547
|
-
declare function suiToMist(sui: number): bigint;
|
|
548
|
-
declare function usdcToRaw(amount: number): bigint;
|
|
549
|
-
declare function rawToUsdc(raw: bigint): number;
|
|
550
|
-
declare function stableToRaw(amount: number, decimals: number): bigint;
|
|
551
|
-
declare function rawToStable(raw: bigint, decimals: number): number;
|
|
552
|
-
declare function getDecimals(asset: SupportedAsset): number;
|
|
553
|
-
declare function formatUsd(amount: number): string;
|
|
554
|
-
declare function formatSui(amount: number): string;
|
|
555
|
-
declare function formatAssetAmount(amount: number, asset: string): string;
|
|
556
|
-
/**
|
|
557
|
-
* Case-insensitive lookup against SUPPORTED_ASSETS keys AND display names.
|
|
558
|
-
* 'usde' → 'USDe', 'suiusde' → 'USDe', 'suiusdt' → 'USDT', 'usdsui' → 'USDsui'.
|
|
559
|
-
* Returns the original input if not found so downstream validation can reject it.
|
|
560
|
-
*/
|
|
561
|
-
declare function normalizeAsset(input: string): string;
|
|
562
|
-
|
|
563
|
-
interface SimulationResult {
|
|
564
|
-
success: boolean;
|
|
565
|
-
gasEstimateSui: number;
|
|
566
|
-
error?: {
|
|
567
|
-
moveAbortCode?: number;
|
|
568
|
-
moveModule?: string;
|
|
569
|
-
reason: string;
|
|
570
|
-
rawError: string;
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
declare function simulateTransaction(client: SuiJsonRpcClient, tx: Transaction, sender: string): Promise<SimulationResult>;
|
|
574
|
-
declare function throwIfSimulationFailed(sim: SimulationResult): void;
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* Protocol fee primitives — wallet-direct transfer model.
|
|
578
|
-
*
|
|
579
|
-
* Fees are collected by splitting from the payment coin and transferring directly
|
|
580
|
-
* to the treasury wallet inside the same PTB. Atomic with the operation (PTB
|
|
581
|
-
* semantics); the wallet IS the ledger; the server-side indexer reads
|
|
582
|
-
* `balanceChanges` and writes a `ProtocolFeeLedger` row tagged with the operation
|
|
583
|
-
* classified from the tx's moveCall targets.
|
|
584
|
-
*
|
|
585
|
-
* The SDK / CLI never call this helper — they're fee-free by design (t2000 = infra
|
|
586
|
-
* brand, no opinion on fees). Audric's `prepare/route.ts` is the canonical caller.
|
|
587
|
-
*/
|
|
588
|
-
|
|
589
|
-
type FeeOperation = 'save' | 'borrow' | 'swap';
|
|
590
|
-
interface ProtocolFeeInfo {
|
|
591
|
-
amount: number;
|
|
592
|
-
asset: string;
|
|
593
|
-
rate: number;
|
|
594
|
-
rawAmount: bigint;
|
|
595
|
-
}
|
|
596
|
-
/**
|
|
597
|
-
* Compute the fee amount for a given operation against a USD-denominated input.
|
|
598
|
-
* Used pre-tx for receipt display + quote math. Does not modify any tx.
|
|
599
|
-
*/
|
|
600
|
-
declare function calculateFee(operation: FeeOperation, amount: number): ProtocolFeeInfo;
|
|
601
|
-
/**
|
|
602
|
-
* Split a fee from `paymentCoin` and transfer it to `receiver` inside the given PTB.
|
|
603
|
-
*
|
|
604
|
-
* **Order is load-bearing.** Call this BEFORE the protocol operation that consumes
|
|
605
|
-
* `paymentCoin` (e.g. NAVI deposit). `splitCoins` mutates the source coin in place,
|
|
606
|
-
* leaving the remainder for the protocol step. If you split AFTER the deposit,
|
|
607
|
-
* the deposit will have consumed the coin and the split will fail.
|
|
608
|
-
*
|
|
609
|
-
* Atomicity: `splitCoins` + `transferObjects` are PTB ops; if anything later in
|
|
610
|
-
* the PTB reverts, the fee transfer reverts too.
|
|
611
|
-
*
|
|
612
|
-
* @param tx Active PTB
|
|
613
|
-
* @param paymentCoin Coin to split the fee from (mutated in place)
|
|
614
|
-
* @param feeBps Fee rate in basis points (e.g. `SAVE_FEE_BPS = 10n` = 0.1%)
|
|
615
|
-
* @param receiver Treasury wallet address (typically `T2000_OVERLAY_FEE_WALLET`)
|
|
616
|
-
* @param amount Display-units input amount (matches what was passed to the
|
|
617
|
-
* protocol operation; used to compute the raw fee amount)
|
|
618
|
-
* @param decimals Coin decimals for raw conversion. Defaults to USDC_DECIMALS
|
|
619
|
-
* (6). Pass the actual coin decimals when skimming a fee
|
|
620
|
-
* from a non-USDC coin (e.g. USDsui = 6, GOLD = 6, ETH = 8,
|
|
621
|
-
* SUI = 9). Backward-compatible: existing USDC callers can
|
|
622
|
-
* omit. Wrong decimals → wrong raw amount → either fee
|
|
623
|
-
* too small (silent loss) or too large (PTB revert from
|
|
624
|
-
* insufficient coin balance).
|
|
625
|
-
*/
|
|
626
|
-
declare function addFeeTransfer(tx: Transaction, paymentCoin: TransactionObjectArgument, feeBps: bigint, receiver: string, amount: number, decimals?: number): void;
|
|
627
|
-
|
|
628
|
-
type SafeguardRule = 'locked' | 'maxPerTx' | 'maxDailySend';
|
|
629
|
-
interface SafeguardErrorDetails {
|
|
630
|
-
attempted?: number;
|
|
631
|
-
limit?: number;
|
|
632
|
-
current?: number;
|
|
633
|
-
}
|
|
634
|
-
declare class SafeguardError extends T2000Error {
|
|
635
|
-
readonly rule: SafeguardRule;
|
|
636
|
-
readonly details: SafeguardErrorDetails;
|
|
637
|
-
constructor(rule: SafeguardRule, details: SafeguardErrorDetails, message?: string);
|
|
638
|
-
toJSON(): {
|
|
639
|
-
error: "SAFEGUARD_BLOCKED";
|
|
640
|
-
message: string;
|
|
641
|
-
retryable: boolean;
|
|
642
|
-
data: {
|
|
643
|
-
attempted?: number;
|
|
644
|
-
limit?: number;
|
|
645
|
-
current?: number;
|
|
646
|
-
rule: SafeguardRule;
|
|
647
|
-
};
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
interface SafeguardConfig {
|
|
652
|
-
locked: boolean;
|
|
653
|
-
maxPerTx: number;
|
|
654
|
-
maxDailySend: number;
|
|
655
|
-
dailyUsed: number;
|
|
656
|
-
dailyResetDate: string;
|
|
657
|
-
maxLeverage?: number;
|
|
658
|
-
maxPositionSize?: number;
|
|
659
|
-
}
|
|
660
|
-
interface TxMetadata {
|
|
661
|
-
operation: 'send' | 'save' | 'withdraw' | 'borrow' | 'repay' | 'pay';
|
|
662
|
-
amount?: number;
|
|
663
|
-
}
|
|
664
|
-
declare const OUTBOUND_OPS: Set<"save" | "borrow" | "withdraw" | "repay" | "send" | "pay">;
|
|
665
|
-
declare const DEFAULT_SAFEGUARD_CONFIG: SafeguardConfig;
|
|
666
|
-
|
|
667
|
-
export { ZkLoginSigner 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 TransactionSigner as H, IKA_TYPE as I, type TxDirection 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 TxMetadata as Q, USDC_TYPE as R, SAVE_FEE_BPS as S, T2000Error as T, USDC_DECIMALS as U, USDE_TYPE as V, USDSUI_TYPE as W, USDT_TYPE as X, WAL_TYPE as Y, WBTC_TYPE as Z, type ZkLoginProof as _, BPS_DENOMINATOR as a, addFeeTransfer as a0, calculateFee as a1, classifyAction as a2, classifyLabel as a3, classifyTransaction as a4, executeTx as a5, extractAllUserLegs as a6, extractTransferDetails as a7, extractTxCommands as a8, extractTxSender as a9, CETUS_USDC_SUI_POOL as aA, DEFAULT_GRPC_URL as aB, GASLESS_MIN_STABLE_AMOUNT as aC, GASLESS_STABLE_TYPES as aD, OPERATION_ASSETS as aE, type Operation as aF, SAVEABLE_ASSETS as aG, SENDABLE_ASSETS as aH, type SaveableAsset as aI, assertAllowedAsset as aJ, createSuiClient as aK, getCoinMeta as aL, getSuiClient as aM, getSuiGrpcClient as aN, isAllowedAsset as aO, isInRegistry as aP, normalizeAsset as aQ, normalizeCoinType as aR, queryHistory as aS, queryTransaction as aT, simulateTransaction as aU, throwIfSimulationFailed as aV, fallbackLabel as aa, formatAssetAmount as ab, formatSui as ac, formatUsd as ad, getDecimals as ae, getDecimalsForCoinType as af, getTier as ag, isSupported as ah, isTier1 as ai, isTier2 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 SendableAsset 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, STABLE_ASSETS as k, SUI_DECIMALS as l, SUI_TYPE as m, SUPPORTED_ASSETS as n, type SafeguardConfig as o, SafeguardError as p, type SafeguardErrorDetails as q, type SafeguardRule as r, type SimulationResult as s, type StableAsset as t, type SuiRpcTxBlock as u, type SupportedAsset as v, type T2000ErrorCode as w, type T2000ErrorData as x, T2000_OVERLAY_FEE_WALLET as y, TOKEN_MAP as z };
|