@axonfi/sdk 0.1.1 → 0.2.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/dist/index.d.cts CHANGED
@@ -1,5 +1,340 @@
1
- import { Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
1
+ import { Address, Hex, WalletClient, PublicClient, Chain as Chain$1 } from 'viem';
2
2
 
3
+ declare enum Token {
4
+ USDC = "USDC",
5
+ USDT = "USDT",
6
+ DAI = "DAI",
7
+ WETH = "WETH",
8
+ WBTC = "WBTC",
9
+ cbBTC = "cbBTC",
10
+ cbETH = "cbETH",
11
+ wstETH = "wstETH",
12
+ rETH = "rETH",
13
+ LINK = "LINK",
14
+ UNI = "UNI",
15
+ AAVE = "AAVE",
16
+ COMP = "COMP",
17
+ CRV = "CRV",
18
+ SNX = "SNX",
19
+ ARB = "ARB",
20
+ AERO = "AERO",
21
+ GMX = "GMX"
22
+ }
23
+ interface KnownToken {
24
+ symbol: string;
25
+ name: string;
26
+ decimals: number;
27
+ /** Address per chainId. Missing key = not available on that chain. */
28
+ addresses: Partial<Record<number, Address>>;
29
+ }
30
+ /**
31
+ * Master token registry keyed by symbol.
32
+ * At a glance you see which chains each token lives on.
33
+ *
34
+ * Chain IDs: 8453 = Base, 84532 = Base Sepolia, 42161 = Arbitrum One, 421614 = Arbitrum Sepolia
35
+ */
36
+ declare const KNOWN_TOKENS: {
37
+ readonly USDC: {
38
+ readonly symbol: "USDC";
39
+ readonly name: "USD Coin";
40
+ readonly decimals: 6;
41
+ readonly addresses: {
42
+ readonly 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
43
+ readonly 84532: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
44
+ readonly 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
45
+ readonly 421614: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
46
+ };
47
+ };
48
+ readonly USDT: {
49
+ readonly symbol: "USDT";
50
+ readonly name: "Tether USD";
51
+ readonly decimals: 6;
52
+ readonly addresses: {
53
+ readonly 8453: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2";
54
+ readonly 42161: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9";
55
+ };
56
+ };
57
+ readonly DAI: {
58
+ readonly symbol: "DAI";
59
+ readonly name: "Dai Stablecoin";
60
+ readonly decimals: 18;
61
+ readonly addresses: {
62
+ readonly 8453: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb";
63
+ readonly 84532: "0x819ffecd4e64f193e959944bcd57eedc7755e17a";
64
+ readonly 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
65
+ };
66
+ };
67
+ readonly WETH: {
68
+ readonly symbol: "WETH";
69
+ readonly name: "Wrapped Ether";
70
+ readonly decimals: 18;
71
+ readonly addresses: {
72
+ readonly 8453: "0x4200000000000000000000000000000000000006";
73
+ readonly 84532: "0x4200000000000000000000000000000000000006";
74
+ readonly 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
75
+ };
76
+ };
77
+ readonly WBTC: {
78
+ readonly symbol: "WBTC";
79
+ readonly name: "Wrapped BTC";
80
+ readonly decimals: 8;
81
+ readonly addresses: {
82
+ readonly 8453: "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c";
83
+ readonly 42161: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f";
84
+ };
85
+ };
86
+ readonly cbBTC: {
87
+ readonly symbol: "cbBTC";
88
+ readonly name: "Coinbase Wrapped BTC";
89
+ readonly decimals: 8;
90
+ readonly addresses: {
91
+ readonly 8453: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
92
+ readonly 42161: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
93
+ };
94
+ };
95
+ readonly cbETH: {
96
+ readonly symbol: "cbETH";
97
+ readonly name: "Coinbase Staked ETH";
98
+ readonly decimals: 18;
99
+ readonly addresses: {
100
+ readonly 8453: "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22";
101
+ readonly 42161: "0x1DEBd73E752bEaF79865Fd6446b0c970EaE7732f";
102
+ };
103
+ };
104
+ readonly wstETH: {
105
+ readonly symbol: "wstETH";
106
+ readonly name: "Lido Wrapped stETH";
107
+ readonly decimals: 18;
108
+ readonly addresses: {
109
+ readonly 8453: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452";
110
+ readonly 42161: "0x5979D7b546E38E414F7E9822514be443A4800529";
111
+ };
112
+ };
113
+ readonly rETH: {
114
+ readonly symbol: "rETH";
115
+ readonly name: "Rocket Pool ETH";
116
+ readonly decimals: 18;
117
+ readonly addresses: {
118
+ readonly 42161: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8";
119
+ };
120
+ };
121
+ readonly LINK: {
122
+ readonly symbol: "LINK";
123
+ readonly name: "Chainlink";
124
+ readonly decimals: 18;
125
+ readonly addresses: {
126
+ readonly 8453: "0x88Fb150BDc53A65fe94Dea0c9BA0a6dAf8C6e196";
127
+ readonly 84532: "0xE4aB69C077896252FAFBD49EFD26B5D171A32410";
128
+ readonly 42161: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4";
129
+ };
130
+ };
131
+ readonly UNI: {
132
+ readonly symbol: "UNI";
133
+ readonly name: "Uniswap";
134
+ readonly decimals: 18;
135
+ readonly addresses: {
136
+ readonly 8453: "0xc3De830EA07524a0761646a6a4e4be0e114a3C83";
137
+ readonly 42161: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0";
138
+ };
139
+ };
140
+ readonly AAVE: {
141
+ readonly symbol: "AAVE";
142
+ readonly name: "Aave";
143
+ readonly decimals: 18;
144
+ readonly addresses: {
145
+ readonly 8453: "0x63706e401c06ac8513145b7687A14804d17f814b";
146
+ readonly 42161: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196";
147
+ };
148
+ };
149
+ readonly COMP: {
150
+ readonly symbol: "COMP";
151
+ readonly name: "Compound";
152
+ readonly decimals: 18;
153
+ readonly addresses: {
154
+ readonly 8453: "0x9e1028F5F1D5eDE59748FFceE5532509976840E0";
155
+ readonly 42161: "0x354A6dA3fcde098F8389cad84b0182725c6C91dE";
156
+ };
157
+ };
158
+ readonly CRV: {
159
+ readonly symbol: "CRV";
160
+ readonly name: "Curve DAO";
161
+ readonly decimals: 18;
162
+ readonly addresses: {
163
+ readonly 8453: "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415";
164
+ readonly 42161: "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978";
165
+ };
166
+ };
167
+ readonly SNX: {
168
+ readonly symbol: "SNX";
169
+ readonly name: "Synthetix";
170
+ readonly decimals: 18;
171
+ readonly addresses: {
172
+ readonly 8453: "0x22e6966B799c4D5B13BE962E1D117b56327FDa66";
173
+ };
174
+ };
175
+ readonly ARB: {
176
+ readonly symbol: "ARB";
177
+ readonly name: "Arbitrum";
178
+ readonly decimals: 18;
179
+ readonly addresses: {
180
+ readonly 42161: "0x912CE59144191C1204E64559FE8253a0e49E6548";
181
+ };
182
+ };
183
+ readonly AERO: {
184
+ readonly symbol: "AERO";
185
+ readonly name: "Aerodrome";
186
+ readonly decimals: 18;
187
+ readonly addresses: {
188
+ readonly 8453: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
189
+ };
190
+ };
191
+ readonly GMX: {
192
+ readonly symbol: "GMX";
193
+ readonly name: "GMX";
194
+ readonly decimals: 18;
195
+ readonly addresses: {
196
+ readonly 42161: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a";
197
+ };
198
+ };
199
+ };
200
+ type KnownTokenSymbol = keyof typeof KNOWN_TOKENS;
201
+ /** All known tokens available on a specific chain. */
202
+ declare function getKnownTokensForChain(chainId: number): (KnownToken & {
203
+ address: Address;
204
+ })[];
205
+ /** Reverse-lookup: address → symbol (case-insensitive). Returns null if unknown. */
206
+ declare function getTokenSymbolByAddress(address: string): string | null;
207
+ /**
208
+ * Resolve a Token enum symbol to its on-chain address for a given chain.
209
+ * If an Address (0x...) is passed, it is returned as-is.
210
+ *
211
+ * @throws if the symbol has no address on the given chain.
212
+ */
213
+ declare function resolveToken(token: Address | Token | KnownTokenSymbol, chainId: number): Address;
214
+
215
+ /**
216
+ * keccak256 of the PaymentIntent type string — used for manual digest
217
+ * verification. viem's signTypedData computes this internally; you don't
218
+ * need this value for signing, only for low-level verification.
219
+ */
220
+ declare const PAYMENT_INTENT_TYPEHASH: `0x${string}`;
221
+ /** keccak256 of the ExecuteIntent type string for DeFi protocol interactions. */
222
+ declare const EXECUTE_INTENT_TYPEHASH: `0x${string}`;
223
+ /** keccak256 of the SwapIntent type string for in-vault token rebalancing. */
224
+ declare const SWAP_INTENT_TYPEHASH: `0x${string}`;
225
+ /** EIP-712 domain name and version for AxonVault. Matches the constructor. */
226
+ declare const EIP712_DOMAIN_NAME: "AxonVault";
227
+ declare const EIP712_DOMAIN_VERSION: "1";
228
+ /** Sentinel address representing native ETH in PaymentIntents and deposits. */
229
+ declare const NATIVE_ETH: Address;
230
+ declare const USDC: Record<number, Address>;
231
+ declare enum Chain {
232
+ Base = 8453,
233
+ BaseSepolia = 84532,
234
+ Arbitrum = 42161,
235
+ ArbitrumSepolia = 421614
236
+ }
237
+ declare const SUPPORTED_CHAIN_IDS: readonly [8453, 84532, 42161, 421614];
238
+ type SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];
239
+ /** Human-readable chain names. */
240
+ declare const CHAIN_NAMES: Record<number, string>;
241
+ /** Block explorer TX URL prefix per chain. */
242
+ declare const EXPLORER_TX: Record<number, string>;
243
+ /** Block explorer address URL prefix per chain. */
244
+ declare const EXPLORER_ADDR: Record<number, string>;
245
+ /** Default intent validity window when no deadline is specified. */
246
+ declare const DEFAULT_DEADLINE_SECONDS = 300;
247
+ /** Window presets for SpendingLimit.windowSeconds. */
248
+ declare const WINDOW: {
249
+ readonly ONE_HOUR: 3600n;
250
+ readonly ONE_DAY: 86400n;
251
+ readonly ONE_WEEK: 604800n;
252
+ readonly THIRTY_DAYS: 2592000n;
253
+ };
254
+ /**
255
+ * Structured error codes returned by the relayer when a payment is rejected.
256
+ * Bots should import these to programmatically handle failures.
257
+ */
258
+ declare const PaymentErrorCode: {
259
+ /** Payment destination is the vault itself */
260
+ readonly SELF_PAYMENT: "SELF_PAYMENT";
261
+ /** Payment destination is the zero address */
262
+ readonly ZERO_ADDRESS: "ZERO_ADDRESS";
263
+ /** Payment amount is zero */
264
+ readonly ZERO_AMOUNT: "ZERO_AMOUNT";
265
+ /** Vault does not hold enough of the requested token */
266
+ readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
267
+ /** EIP-712 signature verification failed */
268
+ readonly INVALID_SIGNATURE: "INVALID_SIGNATURE";
269
+ /** Payment intent deadline has passed */
270
+ readonly DEADLINE_EXPIRED: "DEADLINE_EXPIRED";
271
+ /** Bot is temporarily paused by the operator */
272
+ readonly BOT_PAUSED: "BOT_PAUSED";
273
+ /** Bot address is not registered/active in the vault */
274
+ readonly BOT_NOT_ACTIVE: "BOT_NOT_ACTIVE";
275
+ /** Destination address is on the global or vault blacklist */
276
+ readonly BLACKLISTED: "BLACKLISTED";
277
+ /** Rolling-window spending limit (USD amount) exceeded */
278
+ readonly SPENDING_LIMIT_EXCEEDED: "SPENDING_LIMIT_EXCEEDED";
279
+ /** Rolling-window transaction count limit exceeded */
280
+ readonly TX_COUNT_EXCEEDED: "TX_COUNT_EXCEEDED";
281
+ /** Single transaction exceeds the bot's on-chain maxPerTxAmount */
282
+ readonly MAX_PER_TX_EXCEEDED: "MAX_PER_TX_EXCEEDED";
283
+ /** Vault-level daily aggregate spending limit exceeded */
284
+ readonly VAULT_AGGREGATE_EXCEEDED: "VAULT_AGGREGATE_EXCEEDED";
285
+ /** eth_call simulation of the on-chain transaction reverted */
286
+ readonly SIMULATION_FAILED: "SIMULATION_FAILED";
287
+ /** Routed to human review (AI scan flagged or no consensus) */
288
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
289
+ /** Relayer wallet has insufficient gas to submit the transaction */
290
+ readonly RELAYER_OUT_OF_GAS: "RELAYER_OUT_OF_GAS";
291
+ /** On-chain transaction submission failed */
292
+ readonly SUBMISSION_FAILED: "SUBMISSION_FAILED";
293
+ /** Destination not in the vault/bot whitelist */
294
+ readonly DESTINATION_NOT_WHITELISTED: "DESTINATION_NOT_WHITELISTED";
295
+ /** Vault address is not a valid AxonVault or was not deployed by a known factory */
296
+ readonly INVALID_VAULT: "INVALID_VAULT";
297
+ /** Rebalance output token is not in the whitelist (on-chain or relayer default) */
298
+ readonly REBALANCE_TOKEN_NOT_ALLOWED: "REBALANCE_TOKEN_NOT_ALLOWED";
299
+ /** Rebalance input amount exceeds the bot's maxRebalanceAmount cap */
300
+ readonly MAX_REBALANCE_AMOUNT_EXCEEDED: "MAX_REBALANCE_AMOUNT_EXCEEDED";
301
+ /** Unknown or internal error */
302
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
303
+ };
304
+ type PaymentErrorCode = (typeof PaymentErrorCode)[keyof typeof PaymentErrorCode];
305
+ declare const RELAYER_API: {
306
+ readonly PAYMENTS: "/v1/payments";
307
+ readonly payment: (requestId: string) => string;
308
+ readonly EXECUTE: "/v1/execute";
309
+ readonly execute: (requestId: string) => string;
310
+ readonly SWAP: "/v1/swap";
311
+ readonly swap: (requestId: string) => string;
312
+ readonly vaultBalance: (vault: string, token: string, chainId: number) => string;
313
+ readonly vaultBalances: (vault: string, chainId: number) => string;
314
+ readonly vaultInfo: (vault: string, chainId: number) => string;
315
+ readonly botStatus: (vault: string, bot: string, chainId: number) => string;
316
+ readonly destinationCheck: (vault: string, bot: string, destination: string, chainId: number) => string;
317
+ readonly protocolCheck: (vault: string, protocol: string, chainId: number) => string;
318
+ readonly rebalanceTokens: (vault: string, chainId: number) => string;
319
+ readonly rebalanceTokenCheck: (vault: string, token: string, chainId: number) => string;
320
+ readonly tosStatus: (wallet: string) => string;
321
+ readonly TOS_ACCEPT: "/v1/tos/accept";
322
+ };
323
+
324
+ /**
325
+ * Accepts any way to identify a token:
326
+ * - `Address` ('0x...') — raw contract address
327
+ * - `Token` enum (Token.USDC) — type-safe symbol
328
+ * - `KnownTokenSymbol` string ('USDC') — bare string shorthand
329
+ */
330
+ type TokenInput = Address | Token | KnownTokenSymbol;
331
+ /**
332
+ * Accepts amounts in any format:
333
+ * - `bigint` — raw base units (e.g. 5_000_000n for 5 USDC). Passed through as-is.
334
+ * - `number` — human-readable (e.g. 5.2 for 5.2 USDC). SDK converts using token decimals.
335
+ * - `string` — human-readable string (e.g. '5.2'). Recommended for computed values to avoid float precision issues.
336
+ */
337
+ type AmountInput = bigint | number | string;
3
338
  /** Rolling window spending limit. Stored on-chain, enforced by relayer. */
4
339
  interface SpendingLimit {
5
340
  /** Max spend in this window (token base units, e.g. USDC has 6 decimals). */
@@ -77,10 +412,10 @@ interface PaymentIntent {
77
412
  interface PayInput {
78
413
  /** Payment recipient. */
79
414
  to: Address;
80
- /** Desired output token (e.g. USDC[chainId]). */
81
- token: Address;
82
- /** Amount in token base units. For USDC: 1 USDC = 1_000_000n. */
83
- amount: bigint;
415
+ /** Desired output token — an address, Token enum, or bare symbol string ('USDC'). */
416
+ token: TokenInput;
417
+ /** Amount: bigint (raw base units), number (human-readable), or string (human-readable). */
418
+ amount: AmountInput;
84
419
  /**
85
420
  * Human-readable payment description. Stored in relayer's PostgreSQL.
86
421
  * Gets keccak256-hashed to populate the on-chain `ref` field.
@@ -176,10 +511,10 @@ interface ExecuteInput {
176
511
  protocol: Address;
177
512
  /** The actual calldata bytes to send to the protocol. */
178
513
  callData: Hex;
179
- /** Token to approve to the protocol. */
180
- token: Address;
181
- /** Amount to approve (in token base units). */
182
- amount: bigint;
514
+ /** Token to approve to the protocol — an address, Token enum, or bare symbol string ('USDC'). */
515
+ token: TokenInput;
516
+ /** Amount to approve: bigint (raw base units), number (human-readable), or string (human-readable). */
517
+ amount: AmountInput;
183
518
  /** Human-readable description. Gets keccak256-hashed to ref. */
184
519
  memo?: string;
185
520
  /**
@@ -195,20 +530,20 @@ interface ExecuteInput {
195
530
  deadline?: bigint;
196
531
  /** Arbitrary metadata stored off-chain. */
197
532
  metadata?: Record<string, string>;
198
- /** Source token for pre-swap (relayer resolves automatically if omitted). */
199
- fromToken?: Address;
200
- /** Max input for pre-swap. */
201
- maxFromAmount?: bigint;
533
+ /** Source token for pre-swap an address, Token enum, or bare symbol string. */
534
+ fromToken?: TokenInput;
535
+ /** Max input for pre-swap: bigint (raw), number (human), or string (human). */
536
+ maxFromAmount?: AmountInput;
202
537
  }
203
538
  /**
204
539
  * Input for AxonClient.swap(). Signs a SwapIntent and submits to
205
540
  * the relayer's POST /v1/swap endpoint.
206
541
  */
207
542
  interface SwapInput {
208
- /** Desired output token. */
209
- toToken: Address;
210
- /** Minimum output amount (slippage floor). */
211
- minToAmount: bigint;
543
+ /** Desired output token — an address, Token enum, or bare symbol string ('WETH'). */
544
+ toToken: TokenInput;
545
+ /** Minimum output amount (slippage floor): bigint (raw), number (human), or string (human). */
546
+ minToAmount: AmountInput;
212
547
  /** Human-readable description. Gets keccak256-hashed to ref. */
213
548
  memo?: string;
214
549
  /** Override ref bytes32 directly. */
@@ -217,10 +552,10 @@ interface SwapInput {
217
552
  idempotencyKey?: string;
218
553
  /** Intent expiry (defaults to 5 min). */
219
554
  deadline?: bigint;
220
- /** Source token to swap from. */
221
- fromToken?: Address;
222
- /** Max input amount for swap. */
223
- maxFromAmount?: bigint;
555
+ /** Source token to swap from — an address, Token enum, or bare symbol string. */
556
+ fromToken?: TokenInput;
557
+ /** Max input amount for swap: bigint (raw), number (human), or string (human). */
558
+ maxFromAmount?: AmountInput;
224
559
  }
225
560
  /** Possible statuses returned by the relayer. */
226
561
  type PaymentStatus = 'approved' | 'pending_review' | 'rejected';
@@ -268,8 +603,8 @@ interface TosStatus {
268
603
  interface AxonClientConfig {
269
604
  /** Vault contract address to sign against. */
270
605
  vaultAddress: Address;
271
- /** Chain ID of the network the vault is deployed on. */
272
- chainId: number;
606
+ /** Chain ID a number or a Chain enum value (e.g. Chain.Base). */
607
+ chainId: Chain | number;
273
608
  /**
274
609
  * Bot's private key (hex, 0x-prefixed). Used to sign payment intents.
275
610
  * The SDK constructs a local signer internally — no RPC connection needed.
@@ -306,8 +641,8 @@ interface AxonClientConfig {
306
641
  *
307
642
  * const result = await client.pay({
308
643
  * to: '0x...recipient...',
309
- * token: USDC[84532],
310
- * amount: 5_000_000n, // 5 USDC
644
+ * token: 'USDC',
645
+ * amount: 5, // 5 USDC — SDK handles decimals
311
646
  * memo: 'API call #1234 — weather data',
312
647
  * })
313
648
  *
@@ -358,169 +693,72 @@ declare class AxonClient {
358
693
  /** Returns whether the vault is currently paused (via relayer). */
359
694
  isPaused(): Promise<boolean>;
360
695
  /** Returns high-level vault info (owner, operator, paused, version, trackUsedIntents) via relayer. */
361
- getVaultInfo(): Promise<VaultInfo>;
362
- /**
363
- * Check whether this bot can pay to a given destination address (via relayer).
364
- * Checks blacklist → global whitelist → bot whitelist, matching on-chain logic.
365
- */
366
- canPayTo(destination: Address): Promise<DestinationCheckResult>;
367
- /** Returns whether a protocol address is approved for executeProtocol() calls (via relayer). */
368
- isProtocolApproved(protocol: Address): Promise<boolean>;
369
- /**
370
- * Returns the effective rebalance token whitelist for this vault.
371
- *
372
- * If the owner set tokens on-chain, those override entirely.
373
- * If no on-chain whitelist, returns relayer defaults (USDC, WETH, USDT).
374
- * Use this before calling swap() to check which output tokens are allowed.
375
- */
376
- getRebalanceTokens(): Promise<RebalanceTokensResult>;
377
- /** Check if a specific token is allowed for rebalancing (executeSwap output) on this vault. */
378
- isRebalanceTokenAllowed(token: Address): Promise<{
379
- allowed: boolean;
380
- source: 'default' | 'on_chain';
381
- }>;
382
- /** Check if a wallet has accepted the current TOS version. */
383
- getTosStatus(wallet: string): Promise<TosStatus>;
384
- /**
385
- * Sign and submit TOS acceptance. Uses the owner's wallet (not the bot key).
386
- *
387
- * @param signer - Object with a `signMessage` method (e.g. a viem WalletClient
388
- * or ethers Signer). This should be the vault owner's wallet, not the bot key.
389
- * @param wallet - The owner's wallet address (must match the signer).
390
- */
391
- acceptTos(signer: {
392
- signMessage: (args: {
393
- message: string;
394
- }) => Promise<Hex>;
395
- }, wallet: string): Promise<TosStatus>;
396
- /**
397
- * Poll the relayer for the status of an async payment.
398
- *
399
- * Use this when pay() returns `status: "pending_review"`. Poll until
400
- * status is `"approved"` or `"rejected"`.
401
- *
402
- * Recommended polling interval: 5–10 seconds.
403
- */
404
- poll(requestId: string): Promise<PaymentResult>;
405
- /** Poll the relayer for the status of an async protocol execution. */
406
- pollExecute(requestId: string): Promise<PaymentResult>;
407
- /** Poll the relayer for the status of an async swap. */
408
- pollSwap(requestId: string): Promise<PaymentResult>;
409
- /**
410
- * Sign a PaymentIntent directly without submitting to the relayer.
411
- *
412
- * Use this if you want to build the intent yourself and pass the signature
413
- * to another system (e.g. a custom relayer integration).
414
- */
415
- signPayment(intent: PaymentIntent): Promise<Hex>;
416
- private _get;
417
- private _defaultDeadline;
418
- private _resolveRef;
419
- private _buildPaymentIntent;
420
- private _buildExecuteIntent;
421
- private _buildSwapIntent;
422
- private _submitPayment;
423
- private _submitExecute;
424
- private _submitSwap;
425
- private _post;
426
- }
427
-
428
- /**
429
- * keccak256 of the PaymentIntent type string — used for manual digest
430
- * verification. viem's signTypedData computes this internally; you don't
431
- * need this value for signing, only for low-level verification.
432
- */
433
- declare const PAYMENT_INTENT_TYPEHASH: `0x${string}`;
434
- /** keccak256 of the ExecuteIntent type string for DeFi protocol interactions. */
435
- declare const EXECUTE_INTENT_TYPEHASH: `0x${string}`;
436
- /** keccak256 of the SwapIntent type string for in-vault token rebalancing. */
437
- declare const SWAP_INTENT_TYPEHASH: `0x${string}`;
438
- /** EIP-712 domain name and version for AxonVault. Matches the constructor. */
439
- declare const EIP712_DOMAIN_NAME: "AxonVault";
440
- declare const EIP712_DOMAIN_VERSION: "1";
441
- /** Sentinel address representing native ETH in PaymentIntents and deposits. */
442
- declare const NATIVE_ETH: Address;
443
- declare const USDC: Record<number, Address>;
444
- declare const SUPPORTED_CHAIN_IDS: readonly [8453, 84532, 42161, 421614];
445
- type SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];
446
- /** Default intent validity window when no deadline is specified. */
447
- declare const DEFAULT_DEADLINE_SECONDS = 300;
448
- /** Window presets for SpendingLimit.windowSeconds. */
449
- declare const WINDOW: {
450
- readonly ONE_HOUR: 3600n;
451
- readonly ONE_DAY: 86400n;
452
- readonly ONE_WEEK: 604800n;
453
- readonly THIRTY_DAYS: 2592000n;
454
- };
455
- /**
456
- * Structured error codes returned by the relayer when a payment is rejected.
457
- * Bots should import these to programmatically handle failures.
458
- */
459
- declare const PaymentErrorCode: {
460
- /** Payment destination is the vault itself */
461
- readonly SELF_PAYMENT: "SELF_PAYMENT";
462
- /** Payment destination is the zero address */
463
- readonly ZERO_ADDRESS: "ZERO_ADDRESS";
464
- /** Payment amount is zero */
465
- readonly ZERO_AMOUNT: "ZERO_AMOUNT";
466
- /** Vault does not hold enough of the requested token */
467
- readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
468
- /** EIP-712 signature verification failed */
469
- readonly INVALID_SIGNATURE: "INVALID_SIGNATURE";
470
- /** Payment intent deadline has passed */
471
- readonly DEADLINE_EXPIRED: "DEADLINE_EXPIRED";
472
- /** Bot is temporarily paused by the operator */
473
- readonly BOT_PAUSED: "BOT_PAUSED";
474
- /** Bot address is not registered/active in the vault */
475
- readonly BOT_NOT_ACTIVE: "BOT_NOT_ACTIVE";
476
- /** Destination address is on the global or vault blacklist */
477
- readonly BLACKLISTED: "BLACKLISTED";
478
- /** Rolling-window spending limit (USD amount) exceeded */
479
- readonly SPENDING_LIMIT_EXCEEDED: "SPENDING_LIMIT_EXCEEDED";
480
- /** Rolling-window transaction count limit exceeded */
481
- readonly TX_COUNT_EXCEEDED: "TX_COUNT_EXCEEDED";
482
- /** Single transaction exceeds the bot's on-chain maxPerTxAmount */
483
- readonly MAX_PER_TX_EXCEEDED: "MAX_PER_TX_EXCEEDED";
484
- /** Vault-level daily aggregate spending limit exceeded */
485
- readonly VAULT_AGGREGATE_EXCEEDED: "VAULT_AGGREGATE_EXCEEDED";
486
- /** eth_call simulation of the on-chain transaction reverted */
487
- readonly SIMULATION_FAILED: "SIMULATION_FAILED";
488
- /** Routed to human review (AI scan flagged or no consensus) */
489
- readonly PENDING_REVIEW: "PENDING_REVIEW";
490
- /** Relayer wallet has insufficient gas to submit the transaction */
491
- readonly RELAYER_OUT_OF_GAS: "RELAYER_OUT_OF_GAS";
492
- /** On-chain transaction submission failed */
493
- readonly SUBMISSION_FAILED: "SUBMISSION_FAILED";
494
- /** Destination not in the vault/bot whitelist */
495
- readonly DESTINATION_NOT_WHITELISTED: "DESTINATION_NOT_WHITELISTED";
496
- /** Vault address is not a valid AxonVault or was not deployed by a known factory */
497
- readonly INVALID_VAULT: "INVALID_VAULT";
498
- /** Rebalance output token is not in the whitelist (on-chain or relayer default) */
499
- readonly REBALANCE_TOKEN_NOT_ALLOWED: "REBALANCE_TOKEN_NOT_ALLOWED";
500
- /** Rebalance input amount exceeds the bot's maxRebalanceAmount cap */
501
- readonly MAX_REBALANCE_AMOUNT_EXCEEDED: "MAX_REBALANCE_AMOUNT_EXCEEDED";
502
- /** Unknown or internal error */
503
- readonly INTERNAL_ERROR: "INTERNAL_ERROR";
504
- };
505
- type PaymentErrorCode = (typeof PaymentErrorCode)[keyof typeof PaymentErrorCode];
506
- declare const RELAYER_API: {
507
- readonly PAYMENTS: "/v1/payments";
508
- readonly payment: (requestId: string) => string;
509
- readonly EXECUTE: "/v1/execute";
510
- readonly execute: (requestId: string) => string;
511
- readonly SWAP: "/v1/swap";
512
- readonly swap: (requestId: string) => string;
513
- readonly vaultBalance: (vault: string, token: string, chainId: number) => string;
514
- readonly vaultBalances: (vault: string, chainId: number) => string;
515
- readonly vaultInfo: (vault: string, chainId: number) => string;
516
- readonly botStatus: (vault: string, bot: string, chainId: number) => string;
517
- readonly destinationCheck: (vault: string, bot: string, destination: string, chainId: number) => string;
518
- readonly protocolCheck: (vault: string, protocol: string, chainId: number) => string;
519
- readonly rebalanceTokens: (vault: string, chainId: number) => string;
520
- readonly rebalanceTokenCheck: (vault: string, token: string, chainId: number) => string;
521
- readonly tosStatus: (wallet: string) => string;
522
- readonly TOS_ACCEPT: "/v1/tos/accept";
523
- };
696
+ getVaultInfo(): Promise<VaultInfo>;
697
+ /**
698
+ * Check whether this bot can pay to a given destination address (via relayer).
699
+ * Checks blacklist → global whitelist → bot whitelist, matching on-chain logic.
700
+ */
701
+ canPayTo(destination: Address): Promise<DestinationCheckResult>;
702
+ /** Returns whether a protocol address is approved for executeProtocol() calls (via relayer). */
703
+ isProtocolApproved(protocol: Address): Promise<boolean>;
704
+ /**
705
+ * Returns the effective rebalance token whitelist for this vault.
706
+ *
707
+ * If the owner set tokens on-chain, those override entirely.
708
+ * If no on-chain whitelist, returns relayer defaults (USDC, WETH, USDT).
709
+ * Use this before calling swap() to check which output tokens are allowed.
710
+ */
711
+ getRebalanceTokens(): Promise<RebalanceTokensResult>;
712
+ /** Check if a specific token is allowed for rebalancing (executeSwap output) on this vault. */
713
+ isRebalanceTokenAllowed(token: Address): Promise<{
714
+ allowed: boolean;
715
+ source: 'default' | 'on_chain';
716
+ }>;
717
+ /** Check if a wallet has accepted the current TOS version. */
718
+ getTosStatus(wallet: string): Promise<TosStatus>;
719
+ /**
720
+ * Sign and submit TOS acceptance. Uses the owner's wallet (not the bot key).
721
+ *
722
+ * @param signer - Object with a `signMessage` method (e.g. a viem WalletClient
723
+ * or ethers Signer). This should be the vault owner's wallet, not the bot key.
724
+ * @param wallet - The owner's wallet address (must match the signer).
725
+ */
726
+ acceptTos(signer: {
727
+ signMessage: (args: {
728
+ message: string;
729
+ }) => Promise<Hex>;
730
+ }, wallet: string): Promise<TosStatus>;
731
+ /**
732
+ * Poll the relayer for the status of an async payment.
733
+ *
734
+ * Use this when pay() returns `status: "pending_review"`. Poll until
735
+ * status is `"approved"` or `"rejected"`.
736
+ *
737
+ * Recommended polling interval: 5–10 seconds.
738
+ */
739
+ poll(requestId: string): Promise<PaymentResult>;
740
+ /** Poll the relayer for the status of an async protocol execution. */
741
+ pollExecute(requestId: string): Promise<PaymentResult>;
742
+ /** Poll the relayer for the status of an async swap. */
743
+ pollSwap(requestId: string): Promise<PaymentResult>;
744
+ /**
745
+ * Sign a PaymentIntent directly without submitting to the relayer.
746
+ *
747
+ * Use this if you want to build the intent yourself and pass the signature
748
+ * to another system (e.g. a custom relayer integration).
749
+ */
750
+ signPayment(intent: PaymentIntent): Promise<Hex>;
751
+ private _get;
752
+ private _defaultDeadline;
753
+ private _resolveRef;
754
+ private _buildPaymentIntent;
755
+ private _buildExecuteIntent;
756
+ private _buildSwapIntent;
757
+ private _submitPayment;
758
+ private _submitExecute;
759
+ private _submitSwap;
760
+ private _post;
761
+ }
524
762
 
525
763
  /**
526
764
  * Sign a PaymentIntent using EIP-712 typed structured data.
@@ -556,7 +794,7 @@ declare function signSwapIntent(walletClient: WalletClient, vaultAddress: Addres
556
794
  declare function encodeRef(memo: string): Hex;
557
795
 
558
796
  /** Returns the viem Chain object for a supported Axon chain ID. */
559
- declare function getChain(chainId: number): Chain;
797
+ declare function getChain(chainId: number): Chain$1;
560
798
  /** Create a viem PublicClient for the given chain and RPC URL. */
561
799
  declare function createAxonPublicClient(chainId: number, rpcUrl: string): PublicClient;
562
800
  /** Create a viem WalletClient from a raw private key (signing-only, no RPC needed). */
@@ -677,190 +915,39 @@ declare function encryptKeystore(privateKey: Hex, passphrase: string): Promise<K
677
915
  */
678
916
  declare function decryptKeystore(keystore: KeystoreV3 | string, passphrase: string): Promise<Hex>;
679
917
 
680
- interface KnownToken {
681
- symbol: string;
682
- name: string;
683
- decimals: number;
684
- /** Address per chainId. Missing key = not available on that chain. */
685
- addresses: Partial<Record<number, Address>>;
686
- }
687
918
  /**
688
- * Master token registry keyed by symbol.
689
- * At a glance you see which chains each token lives on.
919
+ * Look up decimals for a token by symbol, Token enum, or address.
690
920
  *
691
- * Chain IDs: 8453 = Base, 84532 = Base Sepolia, 42161 = Arbitrum One, 421614 = Arbitrum Sepolia
921
+ * @param token - A KnownTokenSymbol ('USDC'), Token enum (Token.USDC), or address ('0x...')
922
+ * @param chainId - Optional chain ID (unused for decimal lookup, but reserved for future use)
923
+ * @returns The number of decimals for the token
924
+ * @throws If the token is an unknown address with no entry in KNOWN_TOKENS
692
925
  */
693
- declare const KNOWN_TOKENS: {
694
- readonly USDC: {
695
- readonly symbol: "USDC";
696
- readonly name: "USD Coin";
697
- readonly decimals: 6;
698
- readonly addresses: {
699
- readonly 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
700
- readonly 84532: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
701
- readonly 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
702
- readonly 421614: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
703
- };
704
- };
705
- readonly USDT: {
706
- readonly symbol: "USDT";
707
- readonly name: "Tether USD";
708
- readonly decimals: 6;
709
- readonly addresses: {
710
- readonly 8453: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2";
711
- readonly 42161: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9";
712
- };
713
- };
714
- readonly DAI: {
715
- readonly symbol: "DAI";
716
- readonly name: "Dai Stablecoin";
717
- readonly decimals: 18;
718
- readonly addresses: {
719
- readonly 8453: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb";
720
- readonly 84532: "0x819ffecd4e64f193e959944bcd57eedc7755e17a";
721
- readonly 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
722
- };
723
- };
724
- readonly WETH: {
725
- readonly symbol: "WETH";
726
- readonly name: "Wrapped Ether";
727
- readonly decimals: 18;
728
- readonly addresses: {
729
- readonly 8453: "0x4200000000000000000000000000000000000006";
730
- readonly 84532: "0x4200000000000000000000000000000000000006";
731
- readonly 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
732
- };
733
- };
734
- readonly WBTC: {
735
- readonly symbol: "WBTC";
736
- readonly name: "Wrapped BTC";
737
- readonly decimals: 8;
738
- readonly addresses: {
739
- readonly 8453: "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c";
740
- readonly 42161: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f";
741
- };
742
- };
743
- readonly cbBTC: {
744
- readonly symbol: "cbBTC";
745
- readonly name: "Coinbase Wrapped BTC";
746
- readonly decimals: 8;
747
- readonly addresses: {
748
- readonly 8453: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
749
- readonly 42161: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
750
- };
751
- };
752
- readonly cbETH: {
753
- readonly symbol: "cbETH";
754
- readonly name: "Coinbase Staked ETH";
755
- readonly decimals: 18;
756
- readonly addresses: {
757
- readonly 8453: "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22";
758
- readonly 42161: "0x1DEBd73E752bEaF79865Fd6446b0c970EaE7732f";
759
- };
760
- };
761
- readonly wstETH: {
762
- readonly symbol: "wstETH";
763
- readonly name: "Lido Wrapped stETH";
764
- readonly decimals: 18;
765
- readonly addresses: {
766
- readonly 8453: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452";
767
- readonly 42161: "0x5979D7b546E38E414F7E9822514be443A4800529";
768
- };
769
- };
770
- readonly rETH: {
771
- readonly symbol: "rETH";
772
- readonly name: "Rocket Pool ETH";
773
- readonly decimals: 18;
774
- readonly addresses: {
775
- readonly 42161: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8";
776
- };
777
- };
778
- readonly LINK: {
779
- readonly symbol: "LINK";
780
- readonly name: "Chainlink";
781
- readonly decimals: 18;
782
- readonly addresses: {
783
- readonly 8453: "0x88Fb150BDc53A65fe94Dea0c9BA0a6dAf8C6e196";
784
- readonly 84532: "0xE4aB69C077896252FAFBD49EFD26B5D171A32410";
785
- readonly 42161: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4";
786
- };
787
- };
788
- readonly UNI: {
789
- readonly symbol: "UNI";
790
- readonly name: "Uniswap";
791
- readonly decimals: 18;
792
- readonly addresses: {
793
- readonly 8453: "0xc3De830EA07524a0761646a6a4e4be0e114a3C83";
794
- readonly 42161: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0";
795
- };
796
- };
797
- readonly AAVE: {
798
- readonly symbol: "AAVE";
799
- readonly name: "Aave";
800
- readonly decimals: 18;
801
- readonly addresses: {
802
- readonly 8453: "0x63706e401c06ac8513145b7687A14804d17f814b";
803
- readonly 42161: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196";
804
- };
805
- };
806
- readonly COMP: {
807
- readonly symbol: "COMP";
808
- readonly name: "Compound";
809
- readonly decimals: 18;
810
- readonly addresses: {
811
- readonly 8453: "0x9e1028F5F1D5eDE59748FFceE5532509976840E0";
812
- readonly 42161: "0x354A6dA3fcde098F8389cad84b0182725c6C91dE";
813
- };
814
- };
815
- readonly CRV: {
816
- readonly symbol: "CRV";
817
- readonly name: "Curve DAO";
818
- readonly decimals: 18;
819
- readonly addresses: {
820
- readonly 8453: "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415";
821
- readonly 42161: "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978";
822
- };
823
- };
824
- readonly SNX: {
825
- readonly symbol: "SNX";
826
- readonly name: "Synthetix";
827
- readonly decimals: 18;
828
- readonly addresses: {
829
- readonly 8453: "0x22e6966B799c4D5B13BE962E1D117b56327FDa66";
830
- };
831
- };
832
- readonly ARB: {
833
- readonly symbol: "ARB";
834
- readonly name: "Arbitrum";
835
- readonly decimals: 18;
836
- readonly addresses: {
837
- readonly 42161: "0x912CE59144191C1204E64559FE8253a0e49E6548";
838
- };
839
- };
840
- readonly AERO: {
841
- readonly symbol: "AERO";
842
- readonly name: "Aerodrome";
843
- readonly decimals: 18;
844
- readonly addresses: {
845
- readonly 8453: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
846
- };
847
- };
848
- readonly GMX: {
849
- readonly symbol: "GMX";
850
- readonly name: "GMX";
851
- readonly decimals: 18;
852
- readonly addresses: {
853
- readonly 42161: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a";
854
- };
855
- };
856
- };
857
- type KnownTokenSymbol = keyof typeof KNOWN_TOKENS;
858
- /** All known tokens available on a specific chain. */
859
- declare function getKnownTokensForChain(chainId: number): (KnownToken & {
860
- address: Address;
861
- })[];
862
- /** Reverse-lookup: address → symbol (case-insensitive). Returns null if unknown. */
863
- declare function getTokenSymbolByAddress(address: string): string | null;
926
+ declare function resolveTokenDecimals(token: Address | Token | KnownTokenSymbol, chainId?: number): number;
927
+ /**
928
+ * Convert a human-friendly amount to raw base units (bigint).
929
+ *
930
+ * - **bigint** → passed through as-is (already in base units)
931
+ * - **number** → converted to string, then parsed via `parseUnits(str, decimals)`
932
+ * - **string** → parsed directly via `parseUnits(str, decimals)`
933
+ *
934
+ * @param amount - The amount as bigint (raw), number (human), or string (human)
935
+ * @param token - Token identifier used to look up decimals (symbol, enum, or address)
936
+ * @param chainId - Optional chain ID (passed to resolveTokenDecimals)
937
+ * @returns The amount in token base units as bigint
938
+ *
939
+ * @example
940
+ * ```ts
941
+ * parseAmount(5_000_000n, 'USDC') // 5000000n (passthrough)
942
+ * parseAmount(5.2, 'USDC') // 5200000n
943
+ * parseAmount('5.2', 'USDC') // 5200000n
944
+ * parseAmount(0.001, 'WETH') // 1000000000000000n
945
+ * ```
946
+ *
947
+ * @throws If the amount has more decimal places than the token supports
948
+ * @throws If the token is unknown and amount is not bigint
949
+ */
950
+ declare function parseAmount(amount: bigint | number | string, token: Address | Token | KnownTokenSymbol, chainId?: number): bigint;
864
951
 
865
952
  declare const AxonVaultAbi: readonly [{
866
953
  readonly type: "constructor";
@@ -2959,4 +3046,4 @@ declare const AxonRegistryAbi: readonly [{
2959
3046
  readonly inputs: readonly [];
2960
3047
  }];
2961
3048
 
2962
- export { AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigParams, DEFAULT_DEADLINE_SECONDS, type DestinationCheckResult, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, EXECUTE_INTENT_TYPEHASH, type ExecuteInput, type ExecuteIntent, KNOWN_TOKENS, type KeystoreV3, type KnownToken, type KnownTokenSymbol, NATIVE_ETH, type OperatorCeilings, PAYMENT_INTENT_TYPEHASH, type PayInput, PaymentErrorCode, type PaymentIntent, type PaymentResult, type PaymentStatus, RELAYER_API, type RebalanceTokensResult, SUPPORTED_CHAIN_IDS, SWAP_INTENT_TYPEHASH, type SpendingLimit, type SupportedChainId, type SwapInput, type SwapIntent, type TosStatus, USDC, type VaultInfo, WINDOW, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, encodeRef, encryptKeystore, getBotConfig, getChain, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getTrackUsedIntents, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, signExecuteIntent, signPayment, signSwapIntent };
3049
+ export { type AmountInput, AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigParams, CHAIN_NAMES, Chain, DEFAULT_DEADLINE_SECONDS, type DestinationCheckResult, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, EXECUTE_INTENT_TYPEHASH, EXPLORER_ADDR, EXPLORER_TX, type ExecuteInput, type ExecuteIntent, KNOWN_TOKENS, type KeystoreV3, type KnownToken, type KnownTokenSymbol, NATIVE_ETH, type OperatorCeilings, PAYMENT_INTENT_TYPEHASH, type PayInput, PaymentErrorCode, type PaymentIntent, type PaymentResult, type PaymentStatus, RELAYER_API, type RebalanceTokensResult, SUPPORTED_CHAIN_IDS, SWAP_INTENT_TYPEHASH, type SpendingLimit, type SupportedChainId, type SwapInput, type SwapIntent, Token, type TokenInput, type TosStatus, USDC, type VaultInfo, WINDOW, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, encodeRef, encryptKeystore, getBotConfig, getChain, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getTrackUsedIntents, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signSwapIntent };