@axonfi/sdk 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +15 -9
  2. package/dist/index.cjs +4325 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +3256 -0
  5. package/dist/index.d.ts +3256 -21
  6. package/dist/index.js +4261 -27
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/dist/abis/AxonRegistry.d.ts +0 -294
  10. package/dist/abis/AxonRegistry.d.ts.map +0 -1
  11. package/dist/abis/AxonRegistry.js +0 -381
  12. package/dist/abis/AxonRegistry.js.map +0 -1
  13. package/dist/abis/AxonVault.d.ts +0 -1577
  14. package/dist/abis/AxonVault.d.ts.map +0 -1
  15. package/dist/abis/AxonVault.js +0 -2026
  16. package/dist/abis/AxonVault.js.map +0 -1
  17. package/dist/abis/AxonVaultFactory.d.ts +0 -207
  18. package/dist/abis/AxonVaultFactory.d.ts.map +0 -1
  19. package/dist/abis/AxonVaultFactory.js +0 -269
  20. package/dist/abis/AxonVaultFactory.js.map +0 -1
  21. package/dist/amounts.d.ts +0 -37
  22. package/dist/amounts.d.ts.map +0 -1
  23. package/dist/amounts.js +0 -72
  24. package/dist/amounts.js.map +0 -1
  25. package/dist/amounts.spec.d.ts +0 -2
  26. package/dist/amounts.spec.d.ts.map +0 -1
  27. package/dist/amounts.spec.js +0 -92
  28. package/dist/amounts.spec.js.map +0 -1
  29. package/dist/client.d.ts +0 -196
  30. package/dist/client.d.ts.map +0 -1
  31. package/dist/client.js +0 -621
  32. package/dist/client.js.map +0 -1
  33. package/dist/client.spec.d.ts +0 -2
  34. package/dist/client.spec.d.ts.map +0 -1
  35. package/dist/client.spec.js +0 -437
  36. package/dist/client.spec.js.map +0 -1
  37. package/dist/constants.d.ts +0 -110
  38. package/dist/constants.d.ts.map +0 -1
  39. package/dist/constants.js +0 -172
  40. package/dist/constants.js.map +0 -1
  41. package/dist/constants.spec.d.ts +0 -2
  42. package/dist/constants.spec.d.ts.map +0 -1
  43. package/dist/constants.spec.js +0 -95
  44. package/dist/constants.spec.js.map +0 -1
  45. package/dist/eip3009.d.ts +0 -45
  46. package/dist/eip3009.d.ts.map +0 -1
  47. package/dist/eip3009.js +0 -85
  48. package/dist/eip3009.js.map +0 -1
  49. package/dist/index.d.ts.map +0 -1
  50. package/dist/keystore.d.ts +0 -60
  51. package/dist/keystore.d.ts.map +0 -1
  52. package/dist/keystore.js +0 -182
  53. package/dist/keystore.js.map +0 -1
  54. package/dist/keystore.spec.d.ts +0 -2
  55. package/dist/keystore.spec.d.ts.map +0 -1
  56. package/dist/keystore.spec.js +0 -71
  57. package/dist/keystore.spec.js.map +0 -1
  58. package/dist/permit2.d.ts +0 -45
  59. package/dist/permit2.d.ts.map +0 -1
  60. package/dist/permit2.js +0 -81
  61. package/dist/permit2.js.map +0 -1
  62. package/dist/signer.d.ts +0 -35
  63. package/dist/signer.d.ts.map +0 -1
  64. package/dist/signer.js +0 -132
  65. package/dist/signer.js.map +0 -1
  66. package/dist/signer.spec.d.ts +0 -2
  67. package/dist/signer.spec.d.ts.map +0 -1
  68. package/dist/signer.spec.js +0 -94
  69. package/dist/signer.spec.js.map +0 -1
  70. package/dist/tokens.d.ts +0 -215
  71. package/dist/tokens.d.ts.map +0 -1
  72. package/dist/tokens.js +0 -247
  73. package/dist/tokens.js.map +0 -1
  74. package/dist/types.d.ts +0 -302
  75. package/dist/types.d.ts.map +0 -1
  76. package/dist/types.js +0 -2
  77. package/dist/types.js.map +0 -1
  78. package/dist/utils.d.ts +0 -8
  79. package/dist/utils.d.ts.map +0 -1
  80. package/dist/utils.js +0 -29
  81. package/dist/utils.js.map +0 -1
  82. package/dist/vault.d.ts +0 -60
  83. package/dist/vault.d.ts.map +0 -1
  84. package/dist/vault.js +0 -267
  85. package/dist/vault.js.map +0 -1
  86. package/dist/vault.spec.d.ts +0 -2
  87. package/dist/vault.spec.d.ts.map +0 -1
  88. package/dist/vault.spec.js +0 -162
  89. package/dist/vault.spec.js.map +0 -1
  90. package/dist/x402.d.ts +0 -88
  91. package/dist/x402.d.ts.map +0 -1
  92. package/dist/x402.js +0 -124
  93. package/dist/x402.js.map +0 -1
  94. package/dist/x402.spec.d.ts +0 -2
  95. package/dist/x402.spec.d.ts.map +0 -1
  96. package/dist/x402.spec.js +0 -411
  97. package/dist/x402.spec.js.map +0 -1
@@ -0,0 +1,3256 @@
1
+ import { Address, Hex, WalletClient, PublicClient, Chain as Chain$1 } from 'viem';
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 84532: "0x323e78f944A9a1FcF3a10efcC5319DBb0bB6e673";
55
+ readonly 42161: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9";
56
+ };
57
+ };
58
+ readonly DAI: {
59
+ readonly symbol: "DAI";
60
+ readonly name: "Dai Stablecoin";
61
+ readonly decimals: 18;
62
+ readonly addresses: {
63
+ readonly 8453: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb";
64
+ readonly 84532: "0x819ffecd4e64f193e959944bcd57eedc7755e17a";
65
+ readonly 42161: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
66
+ };
67
+ };
68
+ readonly WETH: {
69
+ readonly symbol: "WETH";
70
+ readonly name: "Wrapped Ether";
71
+ readonly decimals: 18;
72
+ readonly addresses: {
73
+ readonly 8453: "0x4200000000000000000000000000000000000006";
74
+ readonly 84532: "0x4200000000000000000000000000000000000006";
75
+ readonly 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
76
+ readonly 421614: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73";
77
+ };
78
+ };
79
+ readonly WBTC: {
80
+ readonly symbol: "WBTC";
81
+ readonly name: "Wrapped BTC";
82
+ readonly decimals: 8;
83
+ readonly addresses: {
84
+ readonly 8453: "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c";
85
+ readonly 42161: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f";
86
+ };
87
+ };
88
+ readonly cbBTC: {
89
+ readonly symbol: "cbBTC";
90
+ readonly name: "Coinbase Wrapped BTC";
91
+ readonly decimals: 8;
92
+ readonly addresses: {
93
+ readonly 8453: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
94
+ readonly 42161: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf";
95
+ };
96
+ };
97
+ readonly cbETH: {
98
+ readonly symbol: "cbETH";
99
+ readonly name: "Coinbase Staked ETH";
100
+ readonly decimals: 18;
101
+ readonly addresses: {
102
+ readonly 8453: "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22";
103
+ readonly 42161: "0x1DEBd73E752bEaF79865Fd6446b0c970EaE7732f";
104
+ };
105
+ };
106
+ readonly wstETH: {
107
+ readonly symbol: "wstETH";
108
+ readonly name: "Lido Wrapped stETH";
109
+ readonly decimals: 18;
110
+ readonly addresses: {
111
+ readonly 8453: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452";
112
+ readonly 42161: "0x5979D7b546E38E414F7E9822514be443A4800529";
113
+ };
114
+ };
115
+ readonly rETH: {
116
+ readonly symbol: "rETH";
117
+ readonly name: "Rocket Pool ETH";
118
+ readonly decimals: 18;
119
+ readonly addresses: {
120
+ readonly 42161: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8";
121
+ };
122
+ };
123
+ readonly LINK: {
124
+ readonly symbol: "LINK";
125
+ readonly name: "Chainlink";
126
+ readonly decimals: 18;
127
+ readonly addresses: {
128
+ readonly 8453: "0x88Fb150BDc53A65fe94Dea0c9BA0a6dAf8C6e196";
129
+ readonly 84532: "0xE4aB69C077896252FAFBD49EFD26B5D171A32410";
130
+ readonly 42161: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4";
131
+ };
132
+ };
133
+ readonly UNI: {
134
+ readonly symbol: "UNI";
135
+ readonly name: "Uniswap";
136
+ readonly decimals: 18;
137
+ readonly addresses: {
138
+ readonly 8453: "0xc3De830EA07524a0761646a6a4e4be0e114a3C83";
139
+ readonly 42161: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0";
140
+ };
141
+ };
142
+ readonly AAVE: {
143
+ readonly symbol: "AAVE";
144
+ readonly name: "Aave";
145
+ readonly decimals: 18;
146
+ readonly addresses: {
147
+ readonly 8453: "0x63706e401c06ac8513145b7687A14804d17f814b";
148
+ readonly 42161: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196";
149
+ };
150
+ };
151
+ readonly COMP: {
152
+ readonly symbol: "COMP";
153
+ readonly name: "Compound";
154
+ readonly decimals: 18;
155
+ readonly addresses: {
156
+ readonly 8453: "0x9e1028F5F1D5eDE59748FFceE5532509976840E0";
157
+ readonly 42161: "0x354A6dA3fcde098F8389cad84b0182725c6C91dE";
158
+ };
159
+ };
160
+ readonly CRV: {
161
+ readonly symbol: "CRV";
162
+ readonly name: "Curve DAO";
163
+ readonly decimals: 18;
164
+ readonly addresses: {
165
+ readonly 8453: "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415";
166
+ readonly 42161: "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978";
167
+ };
168
+ };
169
+ readonly SNX: {
170
+ readonly symbol: "SNX";
171
+ readonly name: "Synthetix";
172
+ readonly decimals: 18;
173
+ readonly addresses: {
174
+ readonly 8453: "0x22e6966B799c4D5B13BE962E1D117b56327FDa66";
175
+ };
176
+ };
177
+ readonly ARB: {
178
+ readonly symbol: "ARB";
179
+ readonly name: "Arbitrum";
180
+ readonly decimals: 18;
181
+ readonly addresses: {
182
+ readonly 42161: "0x912CE59144191C1204E64559FE8253a0e49E6548";
183
+ };
184
+ };
185
+ readonly AERO: {
186
+ readonly symbol: "AERO";
187
+ readonly name: "Aerodrome";
188
+ readonly decimals: 18;
189
+ readonly addresses: {
190
+ readonly 8453: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
191
+ };
192
+ };
193
+ readonly GMX: {
194
+ readonly symbol: "GMX";
195
+ readonly name: "GMX";
196
+ readonly decimals: 18;
197
+ readonly addresses: {
198
+ readonly 42161: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a";
199
+ };
200
+ };
201
+ };
202
+ type KnownTokenSymbol = keyof typeof KNOWN_TOKENS;
203
+ /** All known tokens available on a specific chain. */
204
+ declare function getKnownTokensForChain(chainId: number): (KnownToken & {
205
+ address: Address;
206
+ })[];
207
+ /** Reverse-lookup: address → symbol (case-insensitive). Returns null if unknown. */
208
+ declare function getTokenSymbolByAddress(address: string): string | null;
209
+ /**
210
+ * Resolve a Token enum symbol to its on-chain address for a given chain.
211
+ * If an Address (0x...) is passed, it is returned as-is.
212
+ *
213
+ * @throws if the symbol has no address on the given chain.
214
+ */
215
+ declare function resolveToken(token: Address | Token | KnownTokenSymbol, chainId: number): Address;
216
+
217
+ /**
218
+ * keccak256 of the PaymentIntent type string — used for manual digest
219
+ * verification. viem's signTypedData computes this internally; you don't
220
+ * need this value for signing, only for low-level verification.
221
+ */
222
+ declare const PAYMENT_INTENT_TYPEHASH: `0x${string}`;
223
+ /** keccak256 of the ExecuteIntent type string for DeFi protocol interactions. */
224
+ declare const EXECUTE_INTENT_TYPEHASH: `0x${string}`;
225
+ /** keccak256 of the SwapIntent type string for in-vault token rebalancing. */
226
+ declare const SWAP_INTENT_TYPEHASH: `0x${string}`;
227
+ /** EIP-712 domain name and version for AxonVault. Matches the constructor. */
228
+ declare const EIP712_DOMAIN_NAME: "AxonVault";
229
+ declare const EIP712_DOMAIN_VERSION: "1";
230
+ /** Sentinel address representing native ETH in PaymentIntents and deposits. */
231
+ declare const NATIVE_ETH: Address;
232
+ declare const USDC: Record<number, Address>;
233
+ declare enum Chain {
234
+ Base = 8453,
235
+ BaseSepolia = 84532,
236
+ Arbitrum = 42161,
237
+ ArbitrumSepolia = 421614
238
+ }
239
+ declare const SUPPORTED_CHAIN_IDS: readonly [8453, 84532, 42161, 421614];
240
+ type SupportedChainId = (typeof SUPPORTED_CHAIN_IDS)[number];
241
+ /** Human-readable chain names. */
242
+ declare const CHAIN_NAMES: Record<number, string>;
243
+ /** Block explorer TX URL prefix per chain. */
244
+ declare const EXPLORER_TX: Record<number, string>;
245
+ /** Block explorer address URL prefix per chain. */
246
+ declare const EXPLORER_ADDR: Record<number, string>;
247
+ /** Default intent validity window when no deadline is specified. */
248
+ declare const DEFAULT_DEADLINE_SECONDS = 300;
249
+ /** Window presets for SpendingLimit.windowSeconds. */
250
+ declare const WINDOW: {
251
+ readonly ONE_HOUR: 3600n;
252
+ readonly ONE_DAY: 86400n;
253
+ readonly ONE_WEEK: 604800n;
254
+ readonly THIRTY_DAYS: 2592000n;
255
+ };
256
+ /**
257
+ * Structured error codes returned by the relayer when a payment is rejected.
258
+ * Bots should import these to programmatically handle failures.
259
+ */
260
+ declare const PaymentErrorCode: {
261
+ /** Payment destination is the vault itself */
262
+ readonly SELF_PAYMENT: "SELF_PAYMENT";
263
+ /** Payment destination is the zero address */
264
+ readonly ZERO_ADDRESS: "ZERO_ADDRESS";
265
+ /** Payment amount is zero */
266
+ readonly ZERO_AMOUNT: "ZERO_AMOUNT";
267
+ /** Vault does not hold enough of the requested token */
268
+ readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
269
+ /** EIP-712 signature verification failed */
270
+ readonly INVALID_SIGNATURE: "INVALID_SIGNATURE";
271
+ /** Payment intent deadline has passed */
272
+ readonly DEADLINE_EXPIRED: "DEADLINE_EXPIRED";
273
+ /** Bot is temporarily paused by the operator */
274
+ readonly BOT_PAUSED: "BOT_PAUSED";
275
+ /** Bot address is not registered/active in the vault */
276
+ readonly BOT_NOT_ACTIVE: "BOT_NOT_ACTIVE";
277
+ /** Destination address is on the global or vault blacklist */
278
+ readonly BLACKLISTED: "BLACKLISTED";
279
+ /** Rolling-window spending limit (USD amount) exceeded */
280
+ readonly SPENDING_LIMIT_EXCEEDED: "SPENDING_LIMIT_EXCEEDED";
281
+ /** Rolling-window transaction count limit exceeded */
282
+ readonly TX_COUNT_EXCEEDED: "TX_COUNT_EXCEEDED";
283
+ /** Single transaction exceeds the bot's on-chain maxPerTxAmount */
284
+ readonly MAX_PER_TX_EXCEEDED: "MAX_PER_TX_EXCEEDED";
285
+ /** Vault-level daily aggregate spending limit exceeded */
286
+ readonly VAULT_AGGREGATE_EXCEEDED: "VAULT_AGGREGATE_EXCEEDED";
287
+ /** eth_call simulation of the on-chain transaction reverted */
288
+ readonly SIMULATION_FAILED: "SIMULATION_FAILED";
289
+ /** Routed to human review (AI scan flagged or no consensus) */
290
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
291
+ /** Relayer wallet has insufficient gas to submit the transaction */
292
+ readonly RELAYER_OUT_OF_GAS: "RELAYER_OUT_OF_GAS";
293
+ /** On-chain transaction submission failed */
294
+ readonly SUBMISSION_FAILED: "SUBMISSION_FAILED";
295
+ /** Destination not in the vault/bot whitelist */
296
+ readonly DESTINATION_NOT_WHITELISTED: "DESTINATION_NOT_WHITELISTED";
297
+ /** Vault address is not a valid AxonVault or was not deployed by a known factory */
298
+ readonly INVALID_VAULT: "INVALID_VAULT";
299
+ /** Rebalance output token is not in the whitelist (on-chain or relayer default) */
300
+ readonly REBALANCE_TOKEN_NOT_ALLOWED: "REBALANCE_TOKEN_NOT_ALLOWED";
301
+ /** Rebalance input amount exceeds the bot's maxRebalanceAmount cap */
302
+ readonly MAX_REBALANCE_AMOUNT_EXCEEDED: "MAX_REBALANCE_AMOUNT_EXCEEDED";
303
+ /** Unknown or internal error */
304
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
305
+ };
306
+ type PaymentErrorCode = (typeof PaymentErrorCode)[keyof typeof PaymentErrorCode];
307
+ declare const RELAYER_API: {
308
+ readonly PAYMENTS: "/v1/payments";
309
+ readonly payment: (requestId: string) => string;
310
+ readonly EXECUTE: "/v1/execute";
311
+ readonly execute: (requestId: string) => string;
312
+ readonly SWAP: "/v1/swap";
313
+ readonly swap: (requestId: string) => string;
314
+ readonly vaultBalance: (vault: string, token: string, chainId: number) => string;
315
+ readonly vaultBalances: (vault: string, chainId: number) => string;
316
+ readonly vaultInfo: (vault: string, chainId: number) => string;
317
+ readonly botStatus: (vault: string, bot: string, chainId: number) => string;
318
+ readonly destinationCheck: (vault: string, bot: string, destination: string, chainId: number) => string;
319
+ readonly protocolCheck: (vault: string, protocol: string, chainId: number) => string;
320
+ readonly rebalanceTokens: (vault: string, chainId: number) => string;
321
+ readonly rebalanceTokenCheck: (vault: string, token: string, chainId: number) => string;
322
+ readonly tosStatus: (wallet: string) => string;
323
+ readonly TOS_ACCEPT: "/v1/tos/accept";
324
+ };
325
+
326
+ /**
327
+ * Accepts any way to identify a token:
328
+ * - `Address` ('0x...') — raw contract address
329
+ * - `Token` enum (Token.USDC) — type-safe symbol
330
+ * - `KnownTokenSymbol` string ('USDC') — bare string shorthand
331
+ */
332
+ type TokenInput = Address | Token | KnownTokenSymbol;
333
+ /**
334
+ * Accepts amounts in any format:
335
+ * - `bigint` — raw base units (e.g. 5_000_000n for 5 USDC). Passed through as-is.
336
+ * - `number` — human-readable (e.g. 5.2 for 5.2 USDC). SDK converts using token decimals.
337
+ * - `string` — human-readable string (e.g. '5.2'). Recommended for computed values to avoid float precision issues.
338
+ */
339
+ type AmountInput = bigint | number | string;
340
+ /** Rolling window spending limit. Stored on-chain, enforced by relayer. */
341
+ interface SpendingLimit {
342
+ /** Max spend in this window (token base units, e.g. USDC has 6 decimals). */
343
+ amount: bigint;
344
+ /** Max number of transactions in this window. 0 = no count limit. */
345
+ maxCount: bigint;
346
+ /** Window size: 3600=1h, 86400=1d, 604800=1w, 2592000=30d */
347
+ windowSeconds: bigint;
348
+ }
349
+ /** Per-bot configuration returned by getBotConfig(). */
350
+ interface BotConfig {
351
+ isActive: boolean;
352
+ registeredAt: bigint;
353
+ /** Hard per-tx cap for payments, enforced on-chain. 0 = no cap. */
354
+ maxPerTxAmount: bigint;
355
+ /** Hard cap for rebalancing (executeSwap) input amount in USD. 0 = no cap. */
356
+ maxRebalanceAmount: bigint;
357
+ /** Rolling window limits — stored on-chain, enforced by relayer. */
358
+ spendingLimits: SpendingLimit[];
359
+ /** Relayer triggers AI scan above this amount. 0 = never by amount alone. */
360
+ aiTriggerThreshold: bigint;
361
+ /** Relayer always requires AI scan for this bot regardless of amount. */
362
+ requireAiVerification: boolean;
363
+ }
364
+ /** Parameters for addBot / updateBotConfig. */
365
+ interface BotConfigParams {
366
+ maxPerTxAmount: bigint;
367
+ /** Hard cap for rebalancing (executeSwap) input amount in USD. 0 = no cap (default). */
368
+ maxRebalanceAmount: bigint;
369
+ spendingLimits: SpendingLimit[];
370
+ aiTriggerThreshold: bigint;
371
+ requireAiVerification: boolean;
372
+ }
373
+ /** Owner-set ceilings bounding operator actions. */
374
+ interface OperatorCeilings {
375
+ /** Operator cannot set a bot's maxPerTxAmount above this. 0 = no ceiling. */
376
+ maxPerTxAmount: bigint;
377
+ /** Operator cannot set a bot's daily limit above this. 0 = no ceiling. */
378
+ maxBotDailyLimit: bigint;
379
+ /** 0 = operator CANNOT add bots. Must be explicitly set by owner. */
380
+ maxOperatorBots: bigint;
381
+ /** Total vault daily outflow cap — relayer reads and enforces. 0 = none. */
382
+ vaultDailyAggregate: bigint;
383
+ /** Operator cannot set aiTriggerThreshold above this. 0 = no floor. */
384
+ minAiTriggerFloor: bigint;
385
+ }
386
+ /**
387
+ * Signed payment intent. This is the core signed data unit.
388
+ *
389
+ * The bot signs this struct using EIP-712. The relayer submits it to
390
+ * executePayment() on-chain. The bot never interacts with the chain directly.
391
+ *
392
+ * Domain: { name: "AxonVault", version: "1", chainId, verifyingContract: vaultAddress }
393
+ * TypeHash: keccak256("PaymentIntent(address bot,address to,address token,uint256 amount,uint256 deadline,bytes32 ref)")
394
+ */
395
+ interface PaymentIntent {
396
+ /** Bot's own address. Must be registered in the vault. */
397
+ bot: Address;
398
+ /** Payment recipient address. */
399
+ to: Address;
400
+ /** Desired output token address (e.g. USDC). Vault may hold this directly
401
+ * or the relayer may swap to it transparently. */
402
+ token: Address;
403
+ /** Token amount in base units (USDC: 6 decimals, so 1 USDC = 1_000_000n). */
404
+ amount: bigint;
405
+ /** Unix timestamp after which this intent is invalid. */
406
+ deadline: bigint;
407
+ /** keccak256 of the off-chain memo. Full memo text stored by relayer. */
408
+ ref: Hex;
409
+ }
410
+ /**
411
+ * Input for AxonClient.pay(). The SDK fills in bot address, deadline,
412
+ * and ref (from memo). You provide the payment destination and metadata.
413
+ */
414
+ interface PayInput {
415
+ /** Payment recipient. */
416
+ to: Address;
417
+ /** Desired output token — an address, Token enum, or bare symbol string ('USDC'). */
418
+ token: TokenInput;
419
+ /** Amount: bigint (raw base units), number (human-readable), or string (human-readable). */
420
+ amount: AmountInput;
421
+ /**
422
+ * Human-readable payment description. Stored in relayer's PostgreSQL.
423
+ * Gets keccak256-hashed to populate the on-chain `ref` field.
424
+ * Example: "API call #1234 — weather data lookup"
425
+ */
426
+ memo?: string;
427
+ /**
428
+ * Mandatory per-request unique key for idempotency. The relayer uses
429
+ * this to deduplicate retries — submitting the same idempotencyKey twice
430
+ * is safe and returns the original result. If omitted, the SDK generates
431
+ * a UUID automatically.
432
+ */
433
+ idempotencyKey?: string;
434
+ /**
435
+ * For x402 / HTTP 402 flows: the URL whose resource is being unlocked
436
+ * by this payment. Stored off-chain, not signed.
437
+ */
438
+ resourceUrl?: string;
439
+ /** Your external invoice ID. Stored off-chain for reconciliation. */
440
+ invoiceId?: string;
441
+ /** Your external order ID. Stored off-chain for reconciliation. */
442
+ orderId?: string;
443
+ /**
444
+ * Human-readable name for the recipient. Displayed on dashboards instead of
445
+ * the raw address. Example: "Weather Bot", "Alice", "OpenAI API".
446
+ */
447
+ recipientLabel?: string;
448
+ /** Arbitrary key-value metadata. Stored off-chain. Values must be strings. */
449
+ metadata?: Record<string, string>;
450
+ /**
451
+ * Intent expiry. Defaults to 5 minutes from now.
452
+ * Must be within the relayer's acceptance window (typically ±5 min).
453
+ */
454
+ deadline?: bigint;
455
+ /**
456
+ * Override the on-chain ref bytes32 directly. Use this when you need to
457
+ * match an exact ref value (e.g. for cross-chain deposit tracking).
458
+ * If set, `memo` is ignored for ref generation but still stored off-chain.
459
+ */
460
+ ref?: Hex;
461
+ /**
462
+ * Marks this payment as x402 bot-EOA funding. When true, the relayer
463
+ * records the flag for audit/context (e.g. "bot self-payment for x402").
464
+ * Does NOT bypass any policy checks — full pipeline still applies.
465
+ */
466
+ x402Funding?: boolean;
467
+ }
468
+ /**
469
+ * Signed execute intent for DeFi protocol interactions.
470
+ *
471
+ * The bot signs this struct using EIP-712. The relayer submits it to
472
+ * executeProtocol() on-chain. The contract approves `token` to `protocol`,
473
+ * calls it with `callData`, then revokes the approval.
474
+ *
475
+ * TypeHash: keccak256("ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 deadline,bytes32 ref)")
476
+ */
477
+ interface ExecuteIntent {
478
+ /** Bot's own address. Must be registered in the vault. */
479
+ bot: Address;
480
+ /** Target DeFi protocol contract address. Must be in vault's approvedProtocols. */
481
+ protocol: Address;
482
+ /** keccak256 of the callData bytes. Verified by relayer before submission. */
483
+ calldataHash: Hex;
484
+ /** Token to approve to the protocol before calling. */
485
+ token: Address;
486
+ /** Amount to approve (in token base units). */
487
+ amount: bigint;
488
+ /** Unix timestamp after which this intent is invalid. */
489
+ deadline: bigint;
490
+ /** keccak256 of the off-chain memo. Full memo text stored by relayer. */
491
+ ref: Hex;
492
+ }
493
+ /**
494
+ * Signed swap intent for in-vault token rebalancing.
495
+ *
496
+ * The bot signs this struct using EIP-712. The relayer submits it to
497
+ * executeSwap() on-chain. Tokens stay in the vault (no recipient).
498
+ *
499
+ * TypeHash: keccak256("SwapIntent(address bot,address toToken,uint256 minToAmount,uint256 deadline,bytes32 ref)")
500
+ */
501
+ interface SwapIntent {
502
+ /** Bot's own address. Must be registered in the vault. */
503
+ bot: Address;
504
+ /** Desired output token. */
505
+ toToken: Address;
506
+ /** Minimum output amount (slippage floor). */
507
+ minToAmount: bigint;
508
+ /** Unix timestamp after which this intent is invalid. */
509
+ deadline: bigint;
510
+ /** keccak256 of the off-chain memo. Full memo text stored by relayer. */
511
+ ref: Hex;
512
+ }
513
+ /**
514
+ * Input for AxonClient.execute(). Signs an ExecuteIntent and submits to
515
+ * the relayer's POST /v1/execute endpoint.
516
+ */
517
+ interface ExecuteInput {
518
+ /** Target protocol contract address. */
519
+ protocol: Address;
520
+ /** The actual calldata bytes to send to the protocol. */
521
+ callData: Hex;
522
+ /** Token to approve to the protocol — an address, Token enum, or bare symbol string ('USDC'). */
523
+ token: TokenInput;
524
+ /** Amount to approve: bigint (raw base units), number (human-readable), or string (human-readable). */
525
+ amount: AmountInput;
526
+ /** Human-readable description. Gets keccak256-hashed to ref. */
527
+ memo?: string;
528
+ /**
529
+ * Human-readable name for the protocol interaction. Displayed on dashboards
530
+ * instead of the raw contract address. Example: "Uniswap Swap", "Aave Borrow".
531
+ */
532
+ protocolName?: string;
533
+ /** Override ref bytes32 directly. */
534
+ ref?: Hex;
535
+ /** Idempotency key (auto-generated if omitted). */
536
+ idempotencyKey?: string;
537
+ /** Intent expiry (defaults to 5 min). */
538
+ deadline?: bigint;
539
+ /** Arbitrary metadata stored off-chain. */
540
+ metadata?: Record<string, string>;
541
+ /** Source token for pre-swap — an address, Token enum, or bare symbol string. */
542
+ fromToken?: TokenInput;
543
+ /** Max input for pre-swap: bigint (raw), number (human), or string (human). */
544
+ maxFromAmount?: AmountInput;
545
+ }
546
+ /**
547
+ * Input for AxonClient.swap(). Signs a SwapIntent and submits to
548
+ * the relayer's POST /v1/swap endpoint.
549
+ */
550
+ interface SwapInput {
551
+ /** Desired output token — an address, Token enum, or bare symbol string ('WETH'). */
552
+ toToken: TokenInput;
553
+ /** Minimum output amount (slippage floor): bigint (raw), number (human), or string (human). */
554
+ minToAmount: AmountInput;
555
+ /** Human-readable description. Gets keccak256-hashed to ref. */
556
+ memo?: string;
557
+ /** Override ref bytes32 directly. */
558
+ ref?: Hex;
559
+ /** Idempotency key (auto-generated if omitted). */
560
+ idempotencyKey?: string;
561
+ /** Intent expiry (defaults to 5 min). */
562
+ deadline?: bigint;
563
+ /** Source token to swap from — an address, Token enum, or bare symbol string. */
564
+ fromToken?: TokenInput;
565
+ /** Max input amount for swap: bigint (raw), number (human), or string (human). */
566
+ maxFromAmount?: AmountInput;
567
+ }
568
+ /** Possible statuses returned by the relayer. */
569
+ type PaymentStatus = 'approved' | 'pending_review' | 'rejected';
570
+ /** Result of AxonClient.pay() or AxonClient.poll(). */
571
+ interface PaymentResult {
572
+ requestId: string;
573
+ status: PaymentStatus;
574
+ /** On-chain transaction hash. Present when status === 'approved'. */
575
+ txHash?: Hex;
576
+ /** URL to poll for async results. */
577
+ pollUrl?: string;
578
+ /** Estimated milliseconds until resolution (relayer hint). */
579
+ estimatedResolutionMs?: number;
580
+ /** Rejection reason. Present when status === 'rejected'. */
581
+ reason?: string;
582
+ }
583
+ /** High-level vault info returned by AxonClient.getVaultInfo(). */
584
+ interface VaultInfo {
585
+ owner: Address;
586
+ operator: Address;
587
+ paused: boolean;
588
+ version: number;
589
+ }
590
+ /** Result of a destination check (canPayTo / isDestinationAllowed). */
591
+ interface DestinationCheckResult {
592
+ allowed: boolean;
593
+ reason?: string;
594
+ }
595
+ /** Result of getRebalanceTokens() — the effective rebalance token whitelist. */
596
+ interface RebalanceTokensResult {
597
+ /** "default" = relayer defaults (no on-chain whitelist), "on_chain" = owner-set override. */
598
+ source: 'default' | 'on_chain';
599
+ /** Lowercase token addresses allowed for rebalancing (executeSwap output). */
600
+ tokens: Address[];
601
+ /** Number of tokens set on-chain. 0 = using relayer defaults. */
602
+ rebalanceTokenCount: number;
603
+ }
604
+ /** TOS acceptance status for a wallet. */
605
+ interface TosStatus {
606
+ accepted: boolean;
607
+ tosVersion: string;
608
+ }
609
+ /** Configuration for AxonClient. */
610
+ interface AxonClientConfig {
611
+ /** Vault contract address to sign against. */
612
+ vaultAddress: Address;
613
+ /** Chain ID — a number or a Chain enum value (e.g. Chain.Base). */
614
+ chainId: Chain | number;
615
+ /**
616
+ * Bot's private key (hex, 0x-prefixed). Used to sign payment intents.
617
+ * The SDK constructs a local signer internally — no RPC connection needed.
618
+ * Provide either this or `account`.
619
+ */
620
+ botPrivateKey?: Hex;
621
+ /** Override the relayer URL (defaults to https://relay.axonfi.xyz). */
622
+ relayerUrl?: string;
623
+ }
624
+
625
+ /** Resource descriptor from the x402 PAYMENT-REQUIRED header. */
626
+ interface X402Resource {
627
+ /** URL of the resource being unlocked. */
628
+ url: string;
629
+ /** Human-readable description of the resource. */
630
+ description?: string;
631
+ /** MIME type of the resource. */
632
+ mimeType?: string;
633
+ }
634
+ /** A single payment option from the `accepts` array. */
635
+ interface X402PaymentOption {
636
+ /** Recipient address (merchant). */
637
+ payTo: string;
638
+ /** Amount in token base units (string). */
639
+ amount: string;
640
+ /** Token contract address. */
641
+ asset: string;
642
+ /** CAIP-2 network identifier, e.g. "eip155:8453". */
643
+ network: string;
644
+ /** Settlement scheme: "exact" (EIP-3009) or "permit2". */
645
+ scheme?: string;
646
+ /** Additional option-specific fields. */
647
+ extra?: Record<string, unknown>;
648
+ }
649
+ /** Parsed x402 PAYMENT-REQUIRED response. */
650
+ interface X402PaymentRequired {
651
+ /** x402 protocol version. */
652
+ x402Version: number;
653
+ /** Resource being unlocked. */
654
+ resource: X402Resource;
655
+ /** Accepted payment options. */
656
+ accepts: X402PaymentOption[];
657
+ }
658
+ /** Result of handlePaymentRequired — contains everything needed to retry the request. */
659
+ interface X402HandleResult {
660
+ /** Base64-encoded JSON for the PAYMENT-SIGNATURE header. */
661
+ paymentSignature: string;
662
+ /** The payment option that was selected and funded. */
663
+ selectedOption: X402PaymentOption;
664
+ /** Axon payment result (txHash, requestId, etc.). */
665
+ fundingResult: {
666
+ requestId: string;
667
+ status: string;
668
+ txHash?: string;
669
+ };
670
+ }
671
+ /**
672
+ * Parse the PAYMENT-REQUIRED header value (base64 JSON).
673
+ *
674
+ * The x402 spec encodes the payment requirements as a base64-encoded JSON
675
+ * string in the response header.
676
+ */
677
+ declare function parsePaymentRequired(headerValue: string): X402PaymentRequired;
678
+ /**
679
+ * Parse a CAIP-2 network identifier to a numeric chain ID.
680
+ *
681
+ * @example parseChainId("eip155:8453") // → 8453
682
+ * @example parseChainId("eip155:84532") // → 84532
683
+ */
684
+ declare function parseChainId(network: string): number;
685
+ /**
686
+ * Find a payment option matching the bot's chain ID.
687
+ *
688
+ * Prefers USDC options (EIP-3009 path — no gas needed from bot).
689
+ * Falls back to any matching chain option.
690
+ *
691
+ * @returns The best matching payment option, or null if none match.
692
+ */
693
+ declare function findMatchingOption(accepts: X402PaymentOption[], chainId: number): X402PaymentOption | null;
694
+ /**
695
+ * Extract metadata fields from a parsed x402 header for payment enrichment.
696
+ *
697
+ * These fields flow into the Axon payment record, giving vault owners
698
+ * full visibility into what their bots are accessing.
699
+ */
700
+ declare function extractX402Metadata(parsed: X402PaymentRequired, selectedOption: X402PaymentOption): {
701
+ resourceUrl: string;
702
+ memo: string | null;
703
+ recipientLabel: string | null;
704
+ metadata: Record<string, string>;
705
+ };
706
+ /**
707
+ * Format a payment signature payload for the PAYMENT-SIGNATURE header.
708
+ *
709
+ * The x402 spec requires the header value to be base64-encoded JSON.
710
+ */
711
+ declare function formatPaymentSignature(payload: Record<string, unknown>): string;
712
+
713
+ /**
714
+ * Main entry point for bots interacting with Axon.
715
+ *
716
+ * Handles EIP-712 signing, relayer communication, and status polling.
717
+ * Bots never submit transactions directly — they sign intents and the relayer
718
+ * handles all on-chain execution.
719
+ *
720
+ * All chain reads (balances, bot status, vault info) go through the relayer
721
+ * API — bots never need an RPC endpoint.
722
+ *
723
+ * @example
724
+ * ```ts
725
+ * import { AxonClient, USDC } from '@axonfi/sdk'
726
+ *
727
+ * const client = new AxonClient({
728
+ * vaultAddress: '0x...',
729
+ * chainId: 84532, // Base Sepolia
730
+ * botPrivateKey: '0x...',
731
+ * })
732
+ *
733
+ * const result = await client.pay({
734
+ * to: '0x...recipient...',
735
+ * token: 'USDC',
736
+ * amount: 5, // 5 USDC — SDK handles decimals
737
+ * memo: 'API call #1234 — weather data',
738
+ * })
739
+ *
740
+ * console.log(result.status, result.txHash)
741
+ * ```
742
+ */
743
+ declare class AxonClient {
744
+ private readonly vaultAddress;
745
+ private readonly chainId;
746
+ private readonly relayerUrl;
747
+ private readonly walletClient;
748
+ private readonly botPrivateKey;
749
+ constructor(config: AxonClientConfig);
750
+ /** Returns the bot's address derived from the configured private key. */
751
+ get botAddress(): Address;
752
+ /**
753
+ * Create, sign, and submit a payment intent to the Axon relayer.
754
+ *
755
+ * Three possible outcomes (all included in PaymentResult.status):
756
+ * - `"approved"`: fast path — txHash available immediately
757
+ * - `"pending_review"`: AI scan or human review in progress — poll for status
758
+ * - `"rejected"`: payment was rejected — reason field explains why
759
+ */
760
+ pay(input: PayInput): Promise<PaymentResult>;
761
+ /**
762
+ * Sign and submit a DeFi protocol execution to the Axon relayer.
763
+ *
764
+ * The vault approves `token` to `protocol`, calls it with `callData`,
765
+ * then revokes the approval. Tokens stay in the vault or go to the protocol
766
+ * as specified by the calldata.
767
+ */
768
+ execute(input: ExecuteInput): Promise<PaymentResult>;
769
+ /**
770
+ * Sign and submit an in-vault token swap to the Axon relayer.
771
+ *
772
+ * Swaps tokens within the vault (no external recipient). Useful for
773
+ * rebalancing vault holdings.
774
+ */
775
+ swap(input: SwapInput): Promise<PaymentResult>;
776
+ /** Read the vault's ERC-20 balance for a given token (via relayer). */
777
+ getBalance(token: Address): Promise<bigint>;
778
+ /**
779
+ * Read the vault's ERC-20 balances for multiple tokens in a single call (via relayer).
780
+ * Returns a record mapping token address → balance.
781
+ */
782
+ getBalances(tokens: Address[]): Promise<Record<Address, bigint>>;
783
+ /** Returns whether this bot is registered and active in the vault (via relayer). */
784
+ isActive(): Promise<boolean>;
785
+ /** Returns whether the vault is currently paused (via relayer). */
786
+ isPaused(): Promise<boolean>;
787
+ /** Returns high-level vault info (owner, operator, paused, version) via relayer. */
788
+ getVaultInfo(): Promise<VaultInfo>;
789
+ /**
790
+ * Check whether this bot can pay to a given destination address (via relayer).
791
+ * Checks blacklist → global whitelist → bot whitelist, matching on-chain logic.
792
+ */
793
+ canPayTo(destination: Address): Promise<DestinationCheckResult>;
794
+ /** Returns whether a protocol address is approved for executeProtocol() calls (via relayer). */
795
+ isProtocolApproved(protocol: Address): Promise<boolean>;
796
+ /**
797
+ * Returns the effective rebalance token whitelist for this vault.
798
+ *
799
+ * If the owner set tokens on-chain, those override entirely.
800
+ * If no on-chain whitelist, returns relayer defaults (USDC, WETH, USDT).
801
+ * Use this before calling swap() to check which output tokens are allowed.
802
+ */
803
+ getRebalanceTokens(): Promise<RebalanceTokensResult>;
804
+ /** Check if a specific token is allowed for rebalancing (executeSwap output) on this vault. */
805
+ isRebalanceTokenAllowed(token: Address): Promise<{
806
+ allowed: boolean;
807
+ source: 'default' | 'on_chain';
808
+ }>;
809
+ /** Check if a wallet has accepted the current TOS version. */
810
+ getTosStatus(wallet: string): Promise<TosStatus>;
811
+ /**
812
+ * Sign and submit TOS acceptance. Uses the owner's wallet (not the bot key).
813
+ *
814
+ * @param signer - Object with a `signMessage` method (e.g. a viem WalletClient
815
+ * or ethers Signer). This should be the vault owner's wallet, not the bot key.
816
+ * @param wallet - The owner's wallet address (must match the signer).
817
+ */
818
+ acceptTos(signer: {
819
+ signMessage: (args: {
820
+ message: string;
821
+ }) => Promise<Hex>;
822
+ }, wallet: string): Promise<TosStatus>;
823
+ /**
824
+ * Poll the relayer for the status of an async payment.
825
+ *
826
+ * Use this when pay() returns `status: "pending_review"`. Poll until
827
+ * status is `"approved"` or `"rejected"`.
828
+ *
829
+ * Recommended polling interval: 5–10 seconds.
830
+ */
831
+ poll(requestId: string): Promise<PaymentResult>;
832
+ /** Poll the relayer for the status of an async protocol execution. */
833
+ pollExecute(requestId: string): Promise<PaymentResult>;
834
+ /** Poll the relayer for the status of an async swap. */
835
+ pollSwap(requestId: string): Promise<PaymentResult>;
836
+ /**
837
+ * Sign a PaymentIntent directly without submitting to the relayer.
838
+ *
839
+ * Use this if you want to build the intent yourself and pass the signature
840
+ * to another system (e.g. a custom relayer integration).
841
+ */
842
+ signPayment(intent: PaymentIntent): Promise<Hex>;
843
+ /**
844
+ * x402 utilities for handling HTTP 402 Payment Required responses.
845
+ *
846
+ * The x402 flow:
847
+ * 1. Bot hits an API that returns HTTP 402 + PAYMENT-REQUIRED header
848
+ * 2. SDK parses the header, finds a matching payment option
849
+ * 3. SDK funds the bot's EOA from the vault (full Axon pipeline applies)
850
+ * 4. Bot signs an EIP-3009 or Permit2 authorization
851
+ * 5. SDK returns a PAYMENT-SIGNATURE header for the bot to retry with
852
+ *
853
+ * @example
854
+ * ```ts
855
+ * const response = await fetch('https://api.example.com/data');
856
+ * if (response.status === 402) {
857
+ * const result = await client.x402.handlePaymentRequired(response.headers);
858
+ * const data = await fetch('https://api.example.com/data', {
859
+ * headers: { 'PAYMENT-SIGNATURE': result.paymentSignature },
860
+ * });
861
+ * }
862
+ * ```
863
+ */
864
+ readonly x402: {
865
+ /**
866
+ * Fund the bot's EOA from the vault for x402 settlement.
867
+ *
868
+ * This is a regular Axon payment (to = bot's own address) that goes through
869
+ * the full pipeline: policy engine, AI scan, human review if needed.
870
+ *
871
+ * @param amount - Amount in token base units
872
+ * @param token - Token address (defaults to USDC on this chain)
873
+ * @param metadata - Optional metadata for the payment record
874
+ */
875
+ fund: (amount: bigint, token?: Address, metadata?: {
876
+ resourceUrl?: string;
877
+ memo?: string;
878
+ recipientLabel?: string;
879
+ metadata?: Record<string, string>;
880
+ }) => Promise<PaymentResult>;
881
+ /**
882
+ * Handle a full x402 flow: parse header, fund bot, sign authorization, return header.
883
+ *
884
+ * Supports both EIP-3009 (USDC) and Permit2 (any ERC-20) settlement.
885
+ * The bot's EOA is funded from the vault first (full Axon pipeline applies).
886
+ *
887
+ * @param headers - Response headers from the 402 response (must contain PAYMENT-REQUIRED)
888
+ * @param maxTimeoutMs - Maximum time to wait for pending_review resolution (default: 120s)
889
+ * @param pollIntervalMs - Polling interval for pending_review (default: 5s)
890
+ * @returns Payment signature header value + funding details
891
+ */
892
+ handlePaymentRequired: (headers: Headers | Record<string, string>, maxTimeoutMs?: number, pollIntervalMs?: number) => Promise<X402HandleResult>;
893
+ };
894
+ private _get;
895
+ private _defaultDeadline;
896
+ private _resolveRef;
897
+ private _buildPaymentIntent;
898
+ private _buildExecuteIntent;
899
+ private _buildSwapIntent;
900
+ private _submitPayment;
901
+ private _submitExecute;
902
+ private _submitSwap;
903
+ private _post;
904
+ }
905
+
906
+ /**
907
+ * Sign a PaymentIntent using EIP-712 typed structured data.
908
+ *
909
+ * The resulting signature can be submitted to the Axon relayer API, which
910
+ * passes it to AxonVault.executePayment() on-chain.
911
+ */
912
+ declare function signPayment(walletClient: WalletClient, vaultAddress: Address, chainId: number, intent: PaymentIntent): Promise<Hex>;
913
+ /**
914
+ * Sign an ExecuteIntent using EIP-712 typed structured data.
915
+ *
916
+ * The resulting signature can be submitted to the Axon relayer API, which
917
+ * passes it to AxonVault.executeProtocol() on-chain.
918
+ */
919
+ declare function signExecuteIntent(walletClient: WalletClient, vaultAddress: Address, chainId: number, intent: ExecuteIntent): Promise<Hex>;
920
+ /**
921
+ * Sign a SwapIntent using EIP-712 typed structured data.
922
+ *
923
+ * The resulting signature can be submitted to the Axon relayer API, which
924
+ * passes it to AxonVault.executeSwap() on-chain.
925
+ */
926
+ declare function signSwapIntent(walletClient: WalletClient, vaultAddress: Address, chainId: number, intent: SwapIntent): Promise<Hex>;
927
+ /**
928
+ * Derive the on-chain `ref` bytes32 from a human-readable memo string.
929
+ *
930
+ * The full memo text is stored off-chain by the relayer (PostgreSQL), linked
931
+ * to the transaction. The keccak256 hash goes into the signed PaymentIntent
932
+ * and is emitted in the PaymentExecuted on-chain event.
933
+ *
934
+ * @param memo Human-readable description, e.g. "API call #1234 — weather data"
935
+ * @returns keccak256 hash of the UTF-8 encoded memo, as a bytes32 hex.
936
+ */
937
+ declare function encodeRef(memo: string): Hex;
938
+
939
+ /** Returns the viem Chain object for a supported Axon chain ID. */
940
+ declare function getChain(chainId: number): Chain$1;
941
+ /** Create a viem PublicClient for the given chain and RPC URL. */
942
+ declare function createAxonPublicClient(chainId: number, rpcUrl: string): PublicClient;
943
+ /** Create a viem WalletClient from a raw private key (signing-only, no RPC needed). */
944
+ declare function createAxonWalletClient(privateKey: Hex, chainId: number): WalletClient;
945
+ /**
946
+ * Returns the full BotConfig for a bot address from the vault.
947
+ * If the bot has never been added, isActive will be false and all
948
+ * numeric fields will be 0n.
949
+ */
950
+ declare function getBotConfig(publicClient: PublicClient, vaultAddress: Address, botAddress: Address): Promise<BotConfig>;
951
+ /** Returns whether a bot address is currently active in the vault. */
952
+ declare function isBotActive(publicClient: PublicClient, vaultAddress: Address, botAddress: Address): Promise<boolean>;
953
+ /** Returns the operator ceilings set by the vault owner. */
954
+ declare function getOperatorCeilings(publicClient: PublicClient, vaultAddress: Address): Promise<OperatorCeilings>;
955
+ /**
956
+ * Returns the maximum USDC an operator-compromised wallet could drain per day.
957
+ * Computed on-chain as: min(maxOperatorBots × maxBotDailyLimit, vaultDailyAggregate).
958
+ * Returns 0n if operator has no bot-add permission.
959
+ */
960
+ declare function operatorMaxDrainPerDay(publicClient: PublicClient, vaultAddress: Address): Promise<bigint>;
961
+ /** Returns whether the vault is currently paused. */
962
+ declare function isVaultPaused(publicClient: PublicClient, vaultAddress: Address): Promise<boolean>;
963
+ /** Returns the EIP-712 domain separator for this vault (for off-chain verification). */
964
+ declare function getDomainSeparator(publicClient: PublicClient, vaultAddress: Address): Promise<Hex>;
965
+ /** Returns the vault contract version number. */
966
+ declare function getVaultVersion(publicClient: PublicClient, vaultAddress: Address): Promise<number>;
967
+ /** Returns the vault owner address. */
968
+ declare function getVaultOwner(publicClient: PublicClient, vaultAddress: Address): Promise<Address>;
969
+ /** Returns the vault operator address (address(0) if no operator set). */
970
+ declare function getVaultOperator(publicClient: PublicClient, vaultAddress: Address): Promise<Address>;
971
+ /**
972
+ * Check whether a destination address is allowed for a given bot.
973
+ *
974
+ * Logic mirrors the on-chain enforcement order:
975
+ * 1. If destination is on the global blacklist → blocked
976
+ * 2. If global whitelist is non-empty → destination must be on it
977
+ * 3. If bot-specific whitelist is non-empty → destination must be on it
978
+ * 4. Otherwise → allowed
979
+ */
980
+ declare function isDestinationAllowed(publicClient: PublicClient, vaultAddress: Address, botAddress: Address, destination: Address): Promise<DestinationCheckResult>;
981
+ /** Returns the number of tokens in the vault's on-chain rebalance whitelist. 0 = no on-chain whitelist. */
982
+ declare function getRebalanceTokenCount(publicClient: PublicClient, vaultAddress: Address): Promise<number>;
983
+ /** Returns whether a token is in the vault's on-chain rebalance whitelist. */
984
+ declare function isRebalanceTokenWhitelisted(publicClient: PublicClient, vaultAddress: Address, token: Address): Promise<boolean>;
985
+ /**
986
+ * Deploy a new AxonVault via the factory.
987
+ *
988
+ * The vault is owned by the walletClient's account. Permissionless — any
989
+ * address can deploy, no Axon approval required.
990
+ *
991
+ * @param walletClient Wallet that will own the deployed vault.
992
+ * @param factoryAddress Address of the deployed AxonVaultFactory.
993
+ * @returns Address of the newly deployed vault.
994
+ */
995
+ declare function deployVault(walletClient: WalletClient, publicClient: PublicClient, factoryAddress: Address): Promise<Address>;
996
+
997
+ interface KeystoreV3 {
998
+ version: 3;
999
+ id: string;
1000
+ address: string;
1001
+ crypto: {
1002
+ ciphertext: string;
1003
+ cipherparams: {
1004
+ iv: string;
1005
+ };
1006
+ cipher: 'aes-128-ctr';
1007
+ kdf: 'scrypt';
1008
+ kdfparams: {
1009
+ dklen: number;
1010
+ salt: string;
1011
+ n: number;
1012
+ r: number;
1013
+ p: number;
1014
+ };
1015
+ mac: string;
1016
+ };
1017
+ }
1018
+ /**
1019
+ * Encrypt a raw private key into a V3 keystore JSON object.
1020
+ *
1021
+ * Uses scrypt KDF (n=262144, r=8, p=1) and AES-128-CTR cipher —
1022
+ * the same format as MetaMask and Geth.
1023
+ *
1024
+ * @param privateKey - Raw private key as 0x-prefixed hex string
1025
+ * @param passphrase - Passphrase to encrypt with (min 1 character)
1026
+ * @returns V3 keystore object ready to serialize as JSON
1027
+ *
1028
+ * @example
1029
+ * ```ts
1030
+ * import { encryptKeystore } from '@axonfi/sdk';
1031
+ *
1032
+ * const keystore = await encryptKeystore('0xabc...', 'my-strong-passphrase');
1033
+ * fs.writeFileSync('bot-keystore.json', JSON.stringify(keystore, null, 2));
1034
+ * ```
1035
+ */
1036
+ declare function encryptKeystore(privateKey: Hex, passphrase: string): Promise<KeystoreV3>;
1037
+ /**
1038
+ * Decrypt a V3 keystore back to a raw private key.
1039
+ *
1040
+ * @param keystore - V3 keystore object or JSON string
1041
+ * @param passphrase - Passphrase used during encryption
1042
+ * @returns Raw private key as 0x-prefixed hex string
1043
+ * @throws Error if passphrase is wrong (MAC mismatch) or keystore is invalid
1044
+ *
1045
+ * @example
1046
+ * ```ts
1047
+ * import { AxonClient, decryptKeystore } from '@axonfi/sdk';
1048
+ *
1049
+ * const keystore = JSON.parse(fs.readFileSync('bot-keystore.json', 'utf8'));
1050
+ * const privateKey = await decryptKeystore(keystore, process.env.BOT_PASSPHRASE!);
1051
+ * const client = new AxonClient({ botPrivateKey: privateKey, ... });
1052
+ * ```
1053
+ */
1054
+ declare function decryptKeystore(keystore: KeystoreV3 | string, passphrase: string): Promise<Hex>;
1055
+
1056
+ /**
1057
+ * Look up decimals for a token by symbol, Token enum, or address.
1058
+ *
1059
+ * @param token - A KnownTokenSymbol ('USDC'), Token enum (Token.USDC), or address ('0x...')
1060
+ * @param chainId - Optional chain ID (unused for decimal lookup, but reserved for future use)
1061
+ * @returns The number of decimals for the token
1062
+ * @throws If the token is an unknown address with no entry in KNOWN_TOKENS
1063
+ */
1064
+ declare function resolveTokenDecimals(token: Address | Token | KnownTokenSymbol, chainId?: number): number;
1065
+ /**
1066
+ * Convert a human-friendly amount to raw base units (bigint).
1067
+ *
1068
+ * - **bigint** → passed through as-is (already in base units)
1069
+ * - **number** → converted to string, then parsed via `parseUnits(str, decimals)`
1070
+ * - **string** → parsed directly via `parseUnits(str, decimals)`
1071
+ *
1072
+ * @param amount - The amount as bigint (raw), number (human), or string (human)
1073
+ * @param token - Token identifier used to look up decimals (symbol, enum, or address)
1074
+ * @param chainId - Optional chain ID (passed to resolveTokenDecimals)
1075
+ * @returns The amount in token base units as bigint
1076
+ *
1077
+ * @example
1078
+ * ```ts
1079
+ * parseAmount(5_000_000n, 'USDC') // 5000000n (passthrough)
1080
+ * parseAmount(5.2, 'USDC') // 5200000n
1081
+ * parseAmount('5.2', 'USDC') // 5200000n
1082
+ * parseAmount(0.001, 'WETH') // 1000000000000000n
1083
+ * ```
1084
+ *
1085
+ * @throws If the amount has more decimal places than the token supports
1086
+ * @throws If the token is unknown and amount is not bigint
1087
+ */
1088
+ declare function parseAmount(amount: bigint | number | string, token: Address | Token | KnownTokenSymbol, chainId?: number): bigint;
1089
+
1090
+ /**
1091
+ * Per-chain EIP-712 domain parameters for USDC's EIP-3009 implementation.
1092
+ * These differ between testnets and mainnets (Circle uses different `name` values).
1093
+ *
1094
+ * Verified on-chain via `cast call <usdc> "name()(string)"` and
1095
+ * `cast call <usdc> "version()(string)"`.
1096
+ */
1097
+ declare const USDC_EIP712_DOMAIN: Record<number, {
1098
+ name: string;
1099
+ version: string;
1100
+ }>;
1101
+ /** Parameters for EIP-3009 TransferWithAuthorization. */
1102
+ interface TransferAuthorization {
1103
+ /** Token holder (sender). */
1104
+ from: Address;
1105
+ /** Recipient of the transfer. */
1106
+ to: Address;
1107
+ /** Amount in token base units (USDC: 6 decimals). */
1108
+ value: bigint;
1109
+ /** Unix timestamp — transfer is invalid before this time. Usually 0. */
1110
+ validAfter: bigint;
1111
+ /** Unix timestamp — transfer is invalid after this time. */
1112
+ validBefore: bigint;
1113
+ /** Random bytes32 nonce (must not have been used before for this sender). */
1114
+ nonce: Hex;
1115
+ }
1116
+ /**
1117
+ * Generate a random bytes32 nonce for EIP-3009.
1118
+ * Uses crypto.getRandomValues for cryptographic randomness.
1119
+ */
1120
+ declare function randomNonce(): Hex;
1121
+ /**
1122
+ * Sign an EIP-3009 TransferWithAuthorization for USDC.
1123
+ *
1124
+ * The resulting signature can be submitted to a facilitator contract that calls
1125
+ * `USDC.transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s)`.
1126
+ *
1127
+ * @param privateKey - Signer's private key (must match auth.from)
1128
+ * @param chainId - Chain ID (determines USDC domain name/version)
1129
+ * @param auth - Transfer authorization parameters
1130
+ * @returns EIP-712 signature (65 bytes, 0x-prefixed)
1131
+ */
1132
+ declare function signTransferWithAuthorization(privateKey: Hex, chainId: number, auth: TransferAuthorization): Promise<Hex>;
1133
+
1134
+ /** Canonical Permit2 contract address (same on all EVM chains). */
1135
+ declare const PERMIT2_ADDRESS: Address;
1136
+ /** x402 facilitator proxy contract address (same on all supported chains). */
1137
+ declare const X402_PROXY_ADDRESS: Address;
1138
+ /**
1139
+ * Witness type string for x402's PermitWitnessTransferFrom.
1140
+ * Must match what the x402 facilitator contract expects.
1141
+ */
1142
+ declare const WITNESS_TYPE_STRING: "TransferDetails witness)TokenPermissions(address token,uint256 amount)TransferDetails(address to,uint256 requestedAmount)";
1143
+ /** Parameters for Permit2 PermitWitnessTransferFrom. */
1144
+ interface Permit2Authorization {
1145
+ /** Token to transfer. */
1146
+ token: Address;
1147
+ /** Maximum amount the spender can transfer. */
1148
+ amount: bigint;
1149
+ /** Spender address (the x402 proxy). */
1150
+ spender: Address;
1151
+ /** Unique nonce (random uint256). */
1152
+ nonce: bigint;
1153
+ /** Unix timestamp — signature is invalid after this time. */
1154
+ deadline: bigint;
1155
+ /** Witness: recipient address. */
1156
+ witnessTo: Address;
1157
+ /** Witness: requested amount. */
1158
+ witnessRequestedAmount: bigint;
1159
+ }
1160
+ /**
1161
+ * Generate a random uint256 nonce for Permit2.
1162
+ * Uses crypto.getRandomValues for cryptographic randomness.
1163
+ */
1164
+ declare function randomPermit2Nonce(): bigint;
1165
+ /**
1166
+ * Sign a Permit2 PermitWitnessTransferFrom for x402.
1167
+ *
1168
+ * The resulting signature is submitted to the x402 facilitator proxy,
1169
+ * which calls `Permit2.permitWitnessTransferFrom(...)` to settle the payment.
1170
+ *
1171
+ * @param privateKey - Signer's private key (token holder)
1172
+ * @param chainId - Chain ID
1173
+ * @param permit - Permit2 authorization parameters
1174
+ * @returns EIP-712 signature (65 bytes, 0x-prefixed)
1175
+ */
1176
+ declare function signPermit2WitnessTransfer(privateKey: Hex, chainId: number, permit: Permit2Authorization): Promise<Hex>;
1177
+
1178
+ declare const AxonVaultAbi: readonly [{
1179
+ readonly type: "constructor";
1180
+ readonly inputs: readonly [{
1181
+ readonly name: "_owner";
1182
+ readonly type: "address";
1183
+ readonly internalType: "address";
1184
+ }, {
1185
+ readonly name: "_axonRegistry";
1186
+ readonly type: "address";
1187
+ readonly internalType: "address";
1188
+ }];
1189
+ readonly stateMutability: "nonpayable";
1190
+ }, {
1191
+ readonly type: "receive";
1192
+ readonly stateMutability: "payable";
1193
+ }, {
1194
+ readonly type: "function";
1195
+ readonly name: "DOMAIN_SEPARATOR";
1196
+ readonly inputs: readonly [];
1197
+ readonly outputs: readonly [{
1198
+ readonly name: "";
1199
+ readonly type: "bytes32";
1200
+ readonly internalType: "bytes32";
1201
+ }];
1202
+ readonly stateMutability: "view";
1203
+ }, {
1204
+ readonly type: "function";
1205
+ readonly name: "MAX_SPENDING_LIMITS";
1206
+ readonly inputs: readonly [];
1207
+ readonly outputs: readonly [{
1208
+ readonly name: "";
1209
+ readonly type: "uint8";
1210
+ readonly internalType: "uint8";
1211
+ }];
1212
+ readonly stateMutability: "view";
1213
+ }, {
1214
+ readonly type: "function";
1215
+ readonly name: "NATIVE_ETH";
1216
+ readonly inputs: readonly [];
1217
+ readonly outputs: readonly [{
1218
+ readonly name: "";
1219
+ readonly type: "address";
1220
+ readonly internalType: "address";
1221
+ }];
1222
+ readonly stateMutability: "view";
1223
+ }, {
1224
+ readonly type: "function";
1225
+ readonly name: "VERSION";
1226
+ readonly inputs: readonly [];
1227
+ readonly outputs: readonly [{
1228
+ readonly name: "";
1229
+ readonly type: "uint16";
1230
+ readonly internalType: "uint16";
1231
+ }];
1232
+ readonly stateMutability: "view";
1233
+ }, {
1234
+ readonly type: "function";
1235
+ readonly name: "acceptOwnership";
1236
+ readonly inputs: readonly [];
1237
+ readonly outputs: readonly [];
1238
+ readonly stateMutability: "nonpayable";
1239
+ }, {
1240
+ readonly type: "function";
1241
+ readonly name: "addBot";
1242
+ readonly inputs: readonly [{
1243
+ readonly name: "bot";
1244
+ readonly type: "address";
1245
+ readonly internalType: "address";
1246
+ }, {
1247
+ readonly name: "params";
1248
+ readonly type: "tuple";
1249
+ readonly internalType: "struct AxonVault.BotConfigParams";
1250
+ readonly components: readonly [{
1251
+ readonly name: "maxPerTxAmount";
1252
+ readonly type: "uint256";
1253
+ readonly internalType: "uint256";
1254
+ }, {
1255
+ readonly name: "maxRebalanceAmount";
1256
+ readonly type: "uint256";
1257
+ readonly internalType: "uint256";
1258
+ }, {
1259
+ readonly name: "spendingLimits";
1260
+ readonly type: "tuple[]";
1261
+ readonly internalType: "struct AxonVault.SpendingLimit[]";
1262
+ readonly components: readonly [{
1263
+ readonly name: "amount";
1264
+ readonly type: "uint256";
1265
+ readonly internalType: "uint256";
1266
+ }, {
1267
+ readonly name: "maxCount";
1268
+ readonly type: "uint256";
1269
+ readonly internalType: "uint256";
1270
+ }, {
1271
+ readonly name: "windowSeconds";
1272
+ readonly type: "uint256";
1273
+ readonly internalType: "uint256";
1274
+ }];
1275
+ }, {
1276
+ readonly name: "aiTriggerThreshold";
1277
+ readonly type: "uint256";
1278
+ readonly internalType: "uint256";
1279
+ }, {
1280
+ readonly name: "requireAiVerification";
1281
+ readonly type: "bool";
1282
+ readonly internalType: "bool";
1283
+ }];
1284
+ }];
1285
+ readonly outputs: readonly [];
1286
+ readonly stateMutability: "nonpayable";
1287
+ }, {
1288
+ readonly type: "function";
1289
+ readonly name: "addBotDestination";
1290
+ readonly inputs: readonly [{
1291
+ readonly name: "bot";
1292
+ readonly type: "address";
1293
+ readonly internalType: "address";
1294
+ }, {
1295
+ readonly name: "destination";
1296
+ readonly type: "address";
1297
+ readonly internalType: "address";
1298
+ }];
1299
+ readonly outputs: readonly [];
1300
+ readonly stateMutability: "nonpayable";
1301
+ }, {
1302
+ readonly type: "function";
1303
+ readonly name: "addGlobalBlacklist";
1304
+ readonly inputs: readonly [{
1305
+ readonly name: "destination";
1306
+ readonly type: "address";
1307
+ readonly internalType: "address";
1308
+ }];
1309
+ readonly outputs: readonly [];
1310
+ readonly stateMutability: "nonpayable";
1311
+ }, {
1312
+ readonly type: "function";
1313
+ readonly name: "addGlobalDestination";
1314
+ readonly inputs: readonly [{
1315
+ readonly name: "destination";
1316
+ readonly type: "address";
1317
+ readonly internalType: "address";
1318
+ }];
1319
+ readonly outputs: readonly [];
1320
+ readonly stateMutability: "nonpayable";
1321
+ }, {
1322
+ readonly type: "function";
1323
+ readonly name: "addProtocol";
1324
+ readonly inputs: readonly [{
1325
+ readonly name: "protocol";
1326
+ readonly type: "address";
1327
+ readonly internalType: "address";
1328
+ }];
1329
+ readonly outputs: readonly [];
1330
+ readonly stateMutability: "nonpayable";
1331
+ }, {
1332
+ readonly type: "function";
1333
+ readonly name: "addRebalanceTokens";
1334
+ readonly inputs: readonly [{
1335
+ readonly name: "tokens";
1336
+ readonly type: "address[]";
1337
+ readonly internalType: "address[]";
1338
+ }];
1339
+ readonly outputs: readonly [];
1340
+ readonly stateMutability: "nonpayable";
1341
+ }, {
1342
+ readonly type: "function";
1343
+ readonly name: "approvedProtocolCount";
1344
+ readonly inputs: readonly [];
1345
+ readonly outputs: readonly [{
1346
+ readonly name: "";
1347
+ readonly type: "uint256";
1348
+ readonly internalType: "uint256";
1349
+ }];
1350
+ readonly stateMutability: "view";
1351
+ }, {
1352
+ readonly type: "function";
1353
+ readonly name: "approvedProtocols";
1354
+ readonly inputs: readonly [{
1355
+ readonly name: "";
1356
+ readonly type: "address";
1357
+ readonly internalType: "address";
1358
+ }];
1359
+ readonly outputs: readonly [{
1360
+ readonly name: "";
1361
+ readonly type: "bool";
1362
+ readonly internalType: "bool";
1363
+ }];
1364
+ readonly stateMutability: "view";
1365
+ }, {
1366
+ readonly type: "function";
1367
+ readonly name: "axonRegistry";
1368
+ readonly inputs: readonly [];
1369
+ readonly outputs: readonly [{
1370
+ readonly name: "";
1371
+ readonly type: "address";
1372
+ readonly internalType: "address";
1373
+ }];
1374
+ readonly stateMutability: "view";
1375
+ }, {
1376
+ readonly type: "function";
1377
+ readonly name: "botAddedByOperator";
1378
+ readonly inputs: readonly [{
1379
+ readonly name: "";
1380
+ readonly type: "address";
1381
+ readonly internalType: "address";
1382
+ }];
1383
+ readonly outputs: readonly [{
1384
+ readonly name: "";
1385
+ readonly type: "bool";
1386
+ readonly internalType: "bool";
1387
+ }];
1388
+ readonly stateMutability: "view";
1389
+ }, {
1390
+ readonly type: "function";
1391
+ readonly name: "botDestinationCount";
1392
+ readonly inputs: readonly [{
1393
+ readonly name: "";
1394
+ readonly type: "address";
1395
+ readonly internalType: "address";
1396
+ }];
1397
+ readonly outputs: readonly [{
1398
+ readonly name: "";
1399
+ readonly type: "uint256";
1400
+ readonly internalType: "uint256";
1401
+ }];
1402
+ readonly stateMutability: "view";
1403
+ }, {
1404
+ readonly type: "function";
1405
+ readonly name: "botDestinationWhitelist";
1406
+ readonly inputs: readonly [{
1407
+ readonly name: "";
1408
+ readonly type: "address";
1409
+ readonly internalType: "address";
1410
+ }, {
1411
+ readonly name: "";
1412
+ readonly type: "address";
1413
+ readonly internalType: "address";
1414
+ }];
1415
+ readonly outputs: readonly [{
1416
+ readonly name: "";
1417
+ readonly type: "bool";
1418
+ readonly internalType: "bool";
1419
+ }];
1420
+ readonly stateMutability: "view";
1421
+ }, {
1422
+ readonly type: "function";
1423
+ readonly name: "deposit";
1424
+ readonly inputs: readonly [{
1425
+ readonly name: "token";
1426
+ readonly type: "address";
1427
+ readonly internalType: "address";
1428
+ }, {
1429
+ readonly name: "amount";
1430
+ readonly type: "uint256";
1431
+ readonly internalType: "uint256";
1432
+ }, {
1433
+ readonly name: "ref";
1434
+ readonly type: "bytes32";
1435
+ readonly internalType: "bytes32";
1436
+ }];
1437
+ readonly outputs: readonly [];
1438
+ readonly stateMutability: "payable";
1439
+ }, {
1440
+ readonly type: "function";
1441
+ readonly name: "eip712Domain";
1442
+ readonly inputs: readonly [];
1443
+ readonly outputs: readonly [{
1444
+ readonly name: "fields";
1445
+ readonly type: "bytes1";
1446
+ readonly internalType: "bytes1";
1447
+ }, {
1448
+ readonly name: "name";
1449
+ readonly type: "string";
1450
+ readonly internalType: "string";
1451
+ }, {
1452
+ readonly name: "version";
1453
+ readonly type: "string";
1454
+ readonly internalType: "string";
1455
+ }, {
1456
+ readonly name: "chainId";
1457
+ readonly type: "uint256";
1458
+ readonly internalType: "uint256";
1459
+ }, {
1460
+ readonly name: "verifyingContract";
1461
+ readonly type: "address";
1462
+ readonly internalType: "address";
1463
+ }, {
1464
+ readonly name: "salt";
1465
+ readonly type: "bytes32";
1466
+ readonly internalType: "bytes32";
1467
+ }, {
1468
+ readonly name: "extensions";
1469
+ readonly type: "uint256[]";
1470
+ readonly internalType: "uint256[]";
1471
+ }];
1472
+ readonly stateMutability: "view";
1473
+ }, {
1474
+ readonly type: "function";
1475
+ readonly name: "executePayment";
1476
+ readonly inputs: readonly [{
1477
+ readonly name: "intent";
1478
+ readonly type: "tuple";
1479
+ readonly internalType: "struct AxonVault.PaymentIntent";
1480
+ readonly components: readonly [{
1481
+ readonly name: "bot";
1482
+ readonly type: "address";
1483
+ readonly internalType: "address";
1484
+ }, {
1485
+ readonly name: "to";
1486
+ readonly type: "address";
1487
+ readonly internalType: "address";
1488
+ }, {
1489
+ readonly name: "token";
1490
+ readonly type: "address";
1491
+ readonly internalType: "address";
1492
+ }, {
1493
+ readonly name: "amount";
1494
+ readonly type: "uint256";
1495
+ readonly internalType: "uint256";
1496
+ }, {
1497
+ readonly name: "deadline";
1498
+ readonly type: "uint256";
1499
+ readonly internalType: "uint256";
1500
+ }, {
1501
+ readonly name: "ref";
1502
+ readonly type: "bytes32";
1503
+ readonly internalType: "bytes32";
1504
+ }];
1505
+ }, {
1506
+ readonly name: "signature";
1507
+ readonly type: "bytes";
1508
+ readonly internalType: "bytes";
1509
+ }, {
1510
+ readonly name: "fromToken";
1511
+ readonly type: "address";
1512
+ readonly internalType: "address";
1513
+ }, {
1514
+ readonly name: "maxFromAmount";
1515
+ readonly type: "uint256";
1516
+ readonly internalType: "uint256";
1517
+ }, {
1518
+ readonly name: "swapRouter";
1519
+ readonly type: "address";
1520
+ readonly internalType: "address";
1521
+ }, {
1522
+ readonly name: "swapCalldata";
1523
+ readonly type: "bytes";
1524
+ readonly internalType: "bytes";
1525
+ }];
1526
+ readonly outputs: readonly [];
1527
+ readonly stateMutability: "nonpayable";
1528
+ }, {
1529
+ readonly type: "function";
1530
+ readonly name: "executeProtocol";
1531
+ readonly inputs: readonly [{
1532
+ readonly name: "intent";
1533
+ readonly type: "tuple";
1534
+ readonly internalType: "struct AxonVault.ExecuteIntent";
1535
+ readonly components: readonly [{
1536
+ readonly name: "bot";
1537
+ readonly type: "address";
1538
+ readonly internalType: "address";
1539
+ }, {
1540
+ readonly name: "protocol";
1541
+ readonly type: "address";
1542
+ readonly internalType: "address";
1543
+ }, {
1544
+ readonly name: "calldataHash";
1545
+ readonly type: "bytes32";
1546
+ readonly internalType: "bytes32";
1547
+ }, {
1548
+ readonly name: "token";
1549
+ readonly type: "address";
1550
+ readonly internalType: "address";
1551
+ }, {
1552
+ readonly name: "amount";
1553
+ readonly type: "uint256";
1554
+ readonly internalType: "uint256";
1555
+ }, {
1556
+ readonly name: "deadline";
1557
+ readonly type: "uint256";
1558
+ readonly internalType: "uint256";
1559
+ }, {
1560
+ readonly name: "ref";
1561
+ readonly type: "bytes32";
1562
+ readonly internalType: "bytes32";
1563
+ }];
1564
+ }, {
1565
+ readonly name: "signature";
1566
+ readonly type: "bytes";
1567
+ readonly internalType: "bytes";
1568
+ }, {
1569
+ readonly name: "callData";
1570
+ readonly type: "bytes";
1571
+ readonly internalType: "bytes";
1572
+ }, {
1573
+ readonly name: "fromToken";
1574
+ readonly type: "address";
1575
+ readonly internalType: "address";
1576
+ }, {
1577
+ readonly name: "maxFromAmount";
1578
+ readonly type: "uint256";
1579
+ readonly internalType: "uint256";
1580
+ }, {
1581
+ readonly name: "swapRouter";
1582
+ readonly type: "address";
1583
+ readonly internalType: "address";
1584
+ }, {
1585
+ readonly name: "swapCalldata";
1586
+ readonly type: "bytes";
1587
+ readonly internalType: "bytes";
1588
+ }];
1589
+ readonly outputs: readonly [{
1590
+ readonly name: "";
1591
+ readonly type: "bytes";
1592
+ readonly internalType: "bytes";
1593
+ }];
1594
+ readonly stateMutability: "nonpayable";
1595
+ }, {
1596
+ readonly type: "function";
1597
+ readonly name: "executeSwap";
1598
+ readonly inputs: readonly [{
1599
+ readonly name: "intent";
1600
+ readonly type: "tuple";
1601
+ readonly internalType: "struct AxonVault.SwapIntent";
1602
+ readonly components: readonly [{
1603
+ readonly name: "bot";
1604
+ readonly type: "address";
1605
+ readonly internalType: "address";
1606
+ }, {
1607
+ readonly name: "toToken";
1608
+ readonly type: "address";
1609
+ readonly internalType: "address";
1610
+ }, {
1611
+ readonly name: "minToAmount";
1612
+ readonly type: "uint256";
1613
+ readonly internalType: "uint256";
1614
+ }, {
1615
+ readonly name: "deadline";
1616
+ readonly type: "uint256";
1617
+ readonly internalType: "uint256";
1618
+ }, {
1619
+ readonly name: "ref";
1620
+ readonly type: "bytes32";
1621
+ readonly internalType: "bytes32";
1622
+ }];
1623
+ }, {
1624
+ readonly name: "signature";
1625
+ readonly type: "bytes";
1626
+ readonly internalType: "bytes";
1627
+ }, {
1628
+ readonly name: "fromToken";
1629
+ readonly type: "address";
1630
+ readonly internalType: "address";
1631
+ }, {
1632
+ readonly name: "maxFromAmount";
1633
+ readonly type: "uint256";
1634
+ readonly internalType: "uint256";
1635
+ }, {
1636
+ readonly name: "swapRouter";
1637
+ readonly type: "address";
1638
+ readonly internalType: "address";
1639
+ }, {
1640
+ readonly name: "swapCalldata";
1641
+ readonly type: "bytes";
1642
+ readonly internalType: "bytes";
1643
+ }];
1644
+ readonly outputs: readonly [];
1645
+ readonly stateMutability: "nonpayable";
1646
+ }, {
1647
+ readonly type: "function";
1648
+ readonly name: "getBotConfig";
1649
+ readonly inputs: readonly [{
1650
+ readonly name: "bot";
1651
+ readonly type: "address";
1652
+ readonly internalType: "address";
1653
+ }];
1654
+ readonly outputs: readonly [{
1655
+ readonly name: "";
1656
+ readonly type: "tuple";
1657
+ readonly internalType: "struct AxonVault.BotConfig";
1658
+ readonly components: readonly [{
1659
+ readonly name: "isActive";
1660
+ readonly type: "bool";
1661
+ readonly internalType: "bool";
1662
+ }, {
1663
+ readonly name: "registeredAt";
1664
+ readonly type: "uint256";
1665
+ readonly internalType: "uint256";
1666
+ }, {
1667
+ readonly name: "maxPerTxAmount";
1668
+ readonly type: "uint256";
1669
+ readonly internalType: "uint256";
1670
+ }, {
1671
+ readonly name: "maxRebalanceAmount";
1672
+ readonly type: "uint256";
1673
+ readonly internalType: "uint256";
1674
+ }, {
1675
+ readonly name: "spendingLimits";
1676
+ readonly type: "tuple[]";
1677
+ readonly internalType: "struct AxonVault.SpendingLimit[]";
1678
+ readonly components: readonly [{
1679
+ readonly name: "amount";
1680
+ readonly type: "uint256";
1681
+ readonly internalType: "uint256";
1682
+ }, {
1683
+ readonly name: "maxCount";
1684
+ readonly type: "uint256";
1685
+ readonly internalType: "uint256";
1686
+ }, {
1687
+ readonly name: "windowSeconds";
1688
+ readonly type: "uint256";
1689
+ readonly internalType: "uint256";
1690
+ }];
1691
+ }, {
1692
+ readonly name: "aiTriggerThreshold";
1693
+ readonly type: "uint256";
1694
+ readonly internalType: "uint256";
1695
+ }, {
1696
+ readonly name: "requireAiVerification";
1697
+ readonly type: "bool";
1698
+ readonly internalType: "bool";
1699
+ }];
1700
+ }];
1701
+ readonly stateMutability: "view";
1702
+ }, {
1703
+ readonly type: "function";
1704
+ readonly name: "globalBlacklistCount";
1705
+ readonly inputs: readonly [];
1706
+ readonly outputs: readonly [{
1707
+ readonly name: "";
1708
+ readonly type: "uint256";
1709
+ readonly internalType: "uint256";
1710
+ }];
1711
+ readonly stateMutability: "view";
1712
+ }, {
1713
+ readonly type: "function";
1714
+ readonly name: "globalDestinationBlacklist";
1715
+ readonly inputs: readonly [{
1716
+ readonly name: "";
1717
+ readonly type: "address";
1718
+ readonly internalType: "address";
1719
+ }];
1720
+ readonly outputs: readonly [{
1721
+ readonly name: "";
1722
+ readonly type: "bool";
1723
+ readonly internalType: "bool";
1724
+ }];
1725
+ readonly stateMutability: "view";
1726
+ }, {
1727
+ readonly type: "function";
1728
+ readonly name: "globalDestinationCount";
1729
+ readonly inputs: readonly [];
1730
+ readonly outputs: readonly [{
1731
+ readonly name: "";
1732
+ readonly type: "uint256";
1733
+ readonly internalType: "uint256";
1734
+ }];
1735
+ readonly stateMutability: "view";
1736
+ }, {
1737
+ readonly type: "function";
1738
+ readonly name: "globalDestinationWhitelist";
1739
+ readonly inputs: readonly [{
1740
+ readonly name: "";
1741
+ readonly type: "address";
1742
+ readonly internalType: "address";
1743
+ }];
1744
+ readonly outputs: readonly [{
1745
+ readonly name: "";
1746
+ readonly type: "bool";
1747
+ readonly internalType: "bool";
1748
+ }];
1749
+ readonly stateMutability: "view";
1750
+ }, {
1751
+ readonly type: "function";
1752
+ readonly name: "isBotActive";
1753
+ readonly inputs: readonly [{
1754
+ readonly name: "bot";
1755
+ readonly type: "address";
1756
+ readonly internalType: "address";
1757
+ }];
1758
+ readonly outputs: readonly [{
1759
+ readonly name: "";
1760
+ readonly type: "bool";
1761
+ readonly internalType: "bool";
1762
+ }];
1763
+ readonly stateMutability: "view";
1764
+ }, {
1765
+ readonly type: "function";
1766
+ readonly name: "isProtocolApproved";
1767
+ readonly inputs: readonly [{
1768
+ readonly name: "protocol";
1769
+ readonly type: "address";
1770
+ readonly internalType: "address";
1771
+ }];
1772
+ readonly outputs: readonly [{
1773
+ readonly name: "";
1774
+ readonly type: "bool";
1775
+ readonly internalType: "bool";
1776
+ }];
1777
+ readonly stateMutability: "view";
1778
+ }, {
1779
+ readonly type: "function";
1780
+ readonly name: "operator";
1781
+ readonly inputs: readonly [];
1782
+ readonly outputs: readonly [{
1783
+ readonly name: "";
1784
+ readonly type: "address";
1785
+ readonly internalType: "address";
1786
+ }];
1787
+ readonly stateMutability: "view";
1788
+ }, {
1789
+ readonly type: "function";
1790
+ readonly name: "operatorBotCount";
1791
+ readonly inputs: readonly [];
1792
+ readonly outputs: readonly [{
1793
+ readonly name: "";
1794
+ readonly type: "uint256";
1795
+ readonly internalType: "uint256";
1796
+ }];
1797
+ readonly stateMutability: "view";
1798
+ }, {
1799
+ readonly type: "function";
1800
+ readonly name: "operatorCeilings";
1801
+ readonly inputs: readonly [];
1802
+ readonly outputs: readonly [{
1803
+ readonly name: "maxPerTxAmount";
1804
+ readonly type: "uint256";
1805
+ readonly internalType: "uint256";
1806
+ }, {
1807
+ readonly name: "maxBotDailyLimit";
1808
+ readonly type: "uint256";
1809
+ readonly internalType: "uint256";
1810
+ }, {
1811
+ readonly name: "maxOperatorBots";
1812
+ readonly type: "uint256";
1813
+ readonly internalType: "uint256";
1814
+ }, {
1815
+ readonly name: "vaultDailyAggregate";
1816
+ readonly type: "uint256";
1817
+ readonly internalType: "uint256";
1818
+ }, {
1819
+ readonly name: "minAiTriggerFloor";
1820
+ readonly type: "uint256";
1821
+ readonly internalType: "uint256";
1822
+ }];
1823
+ readonly stateMutability: "view";
1824
+ }, {
1825
+ readonly type: "function";
1826
+ readonly name: "operatorMaxDrainPerDay";
1827
+ readonly inputs: readonly [];
1828
+ readonly outputs: readonly [{
1829
+ readonly name: "";
1830
+ readonly type: "uint256";
1831
+ readonly internalType: "uint256";
1832
+ }];
1833
+ readonly stateMutability: "view";
1834
+ }, {
1835
+ readonly type: "function";
1836
+ readonly name: "owner";
1837
+ readonly inputs: readonly [];
1838
+ readonly outputs: readonly [{
1839
+ readonly name: "";
1840
+ readonly type: "address";
1841
+ readonly internalType: "address";
1842
+ }];
1843
+ readonly stateMutability: "view";
1844
+ }, {
1845
+ readonly type: "function";
1846
+ readonly name: "pause";
1847
+ readonly inputs: readonly [];
1848
+ readonly outputs: readonly [];
1849
+ readonly stateMutability: "nonpayable";
1850
+ }, {
1851
+ readonly type: "function";
1852
+ readonly name: "paused";
1853
+ readonly inputs: readonly [];
1854
+ readonly outputs: readonly [{
1855
+ readonly name: "";
1856
+ readonly type: "bool";
1857
+ readonly internalType: "bool";
1858
+ }];
1859
+ readonly stateMutability: "view";
1860
+ }, {
1861
+ readonly type: "function";
1862
+ readonly name: "pendingOwner";
1863
+ readonly inputs: readonly [];
1864
+ readonly outputs: readonly [{
1865
+ readonly name: "";
1866
+ readonly type: "address";
1867
+ readonly internalType: "address";
1868
+ }];
1869
+ readonly stateMutability: "view";
1870
+ }, {
1871
+ readonly type: "function";
1872
+ readonly name: "rebalanceTokenCount";
1873
+ readonly inputs: readonly [];
1874
+ readonly outputs: readonly [{
1875
+ readonly name: "";
1876
+ readonly type: "uint256";
1877
+ readonly internalType: "uint256";
1878
+ }];
1879
+ readonly stateMutability: "view";
1880
+ }, {
1881
+ readonly type: "function";
1882
+ readonly name: "rebalanceTokenWhitelist";
1883
+ readonly inputs: readonly [{
1884
+ readonly name: "";
1885
+ readonly type: "address";
1886
+ readonly internalType: "address";
1887
+ }];
1888
+ readonly outputs: readonly [{
1889
+ readonly name: "";
1890
+ readonly type: "bool";
1891
+ readonly internalType: "bool";
1892
+ }];
1893
+ readonly stateMutability: "view";
1894
+ }, {
1895
+ readonly type: "function";
1896
+ readonly name: "removeBot";
1897
+ readonly inputs: readonly [{
1898
+ readonly name: "bot";
1899
+ readonly type: "address";
1900
+ readonly internalType: "address";
1901
+ }];
1902
+ readonly outputs: readonly [];
1903
+ readonly stateMutability: "nonpayable";
1904
+ }, {
1905
+ readonly type: "function";
1906
+ readonly name: "removeBotDestination";
1907
+ readonly inputs: readonly [{
1908
+ readonly name: "bot";
1909
+ readonly type: "address";
1910
+ readonly internalType: "address";
1911
+ }, {
1912
+ readonly name: "destination";
1913
+ readonly type: "address";
1914
+ readonly internalType: "address";
1915
+ }];
1916
+ readonly outputs: readonly [];
1917
+ readonly stateMutability: "nonpayable";
1918
+ }, {
1919
+ readonly type: "function";
1920
+ readonly name: "removeGlobalBlacklist";
1921
+ readonly inputs: readonly [{
1922
+ readonly name: "destination";
1923
+ readonly type: "address";
1924
+ readonly internalType: "address";
1925
+ }];
1926
+ readonly outputs: readonly [];
1927
+ readonly stateMutability: "nonpayable";
1928
+ }, {
1929
+ readonly type: "function";
1930
+ readonly name: "removeGlobalDestination";
1931
+ readonly inputs: readonly [{
1932
+ readonly name: "destination";
1933
+ readonly type: "address";
1934
+ readonly internalType: "address";
1935
+ }];
1936
+ readonly outputs: readonly [];
1937
+ readonly stateMutability: "nonpayable";
1938
+ }, {
1939
+ readonly type: "function";
1940
+ readonly name: "removeProtocol";
1941
+ readonly inputs: readonly [{
1942
+ readonly name: "protocol";
1943
+ readonly type: "address";
1944
+ readonly internalType: "address";
1945
+ }];
1946
+ readonly outputs: readonly [];
1947
+ readonly stateMutability: "nonpayable";
1948
+ }, {
1949
+ readonly type: "function";
1950
+ readonly name: "removeRebalanceTokens";
1951
+ readonly inputs: readonly [{
1952
+ readonly name: "tokens";
1953
+ readonly type: "address[]";
1954
+ readonly internalType: "address[]";
1955
+ }];
1956
+ readonly outputs: readonly [];
1957
+ readonly stateMutability: "nonpayable";
1958
+ }, {
1959
+ readonly type: "function";
1960
+ readonly name: "renounceOwnership";
1961
+ readonly inputs: readonly [];
1962
+ readonly outputs: readonly [];
1963
+ readonly stateMutability: "nonpayable";
1964
+ }, {
1965
+ readonly type: "function";
1966
+ readonly name: "setOperator";
1967
+ readonly inputs: readonly [{
1968
+ readonly name: "_operator";
1969
+ readonly type: "address";
1970
+ readonly internalType: "address";
1971
+ }];
1972
+ readonly outputs: readonly [];
1973
+ readonly stateMutability: "nonpayable";
1974
+ }, {
1975
+ readonly type: "function";
1976
+ readonly name: "setOperatorCeilings";
1977
+ readonly inputs: readonly [{
1978
+ readonly name: "ceilings";
1979
+ readonly type: "tuple";
1980
+ readonly internalType: "struct AxonVault.OperatorCeilings";
1981
+ readonly components: readonly [{
1982
+ readonly name: "maxPerTxAmount";
1983
+ readonly type: "uint256";
1984
+ readonly internalType: "uint256";
1985
+ }, {
1986
+ readonly name: "maxBotDailyLimit";
1987
+ readonly type: "uint256";
1988
+ readonly internalType: "uint256";
1989
+ }, {
1990
+ readonly name: "maxOperatorBots";
1991
+ readonly type: "uint256";
1992
+ readonly internalType: "uint256";
1993
+ }, {
1994
+ readonly name: "vaultDailyAggregate";
1995
+ readonly type: "uint256";
1996
+ readonly internalType: "uint256";
1997
+ }, {
1998
+ readonly name: "minAiTriggerFloor";
1999
+ readonly type: "uint256";
2000
+ readonly internalType: "uint256";
2001
+ }];
2002
+ }];
2003
+ readonly outputs: readonly [];
2004
+ readonly stateMutability: "nonpayable";
2005
+ }, {
2006
+ readonly type: "function";
2007
+ readonly name: "transferOwnership";
2008
+ readonly inputs: readonly [{
2009
+ readonly name: "newOwner";
2010
+ readonly type: "address";
2011
+ readonly internalType: "address";
2012
+ }];
2013
+ readonly outputs: readonly [];
2014
+ readonly stateMutability: "nonpayable";
2015
+ }, {
2016
+ readonly type: "function";
2017
+ readonly name: "unpause";
2018
+ readonly inputs: readonly [];
2019
+ readonly outputs: readonly [];
2020
+ readonly stateMutability: "nonpayable";
2021
+ }, {
2022
+ readonly type: "function";
2023
+ readonly name: "updateBotConfig";
2024
+ readonly inputs: readonly [{
2025
+ readonly name: "bot";
2026
+ readonly type: "address";
2027
+ readonly internalType: "address";
2028
+ }, {
2029
+ readonly name: "params";
2030
+ readonly type: "tuple";
2031
+ readonly internalType: "struct AxonVault.BotConfigParams";
2032
+ readonly components: readonly [{
2033
+ readonly name: "maxPerTxAmount";
2034
+ readonly type: "uint256";
2035
+ readonly internalType: "uint256";
2036
+ }, {
2037
+ readonly name: "maxRebalanceAmount";
2038
+ readonly type: "uint256";
2039
+ readonly internalType: "uint256";
2040
+ }, {
2041
+ readonly name: "spendingLimits";
2042
+ readonly type: "tuple[]";
2043
+ readonly internalType: "struct AxonVault.SpendingLimit[]";
2044
+ readonly components: readonly [{
2045
+ readonly name: "amount";
2046
+ readonly type: "uint256";
2047
+ readonly internalType: "uint256";
2048
+ }, {
2049
+ readonly name: "maxCount";
2050
+ readonly type: "uint256";
2051
+ readonly internalType: "uint256";
2052
+ }, {
2053
+ readonly name: "windowSeconds";
2054
+ readonly type: "uint256";
2055
+ readonly internalType: "uint256";
2056
+ }];
2057
+ }, {
2058
+ readonly name: "aiTriggerThreshold";
2059
+ readonly type: "uint256";
2060
+ readonly internalType: "uint256";
2061
+ }, {
2062
+ readonly name: "requireAiVerification";
2063
+ readonly type: "bool";
2064
+ readonly internalType: "bool";
2065
+ }];
2066
+ }];
2067
+ readonly outputs: readonly [];
2068
+ readonly stateMutability: "nonpayable";
2069
+ }, {
2070
+ readonly type: "function";
2071
+ readonly name: "usedIntents";
2072
+ readonly inputs: readonly [{
2073
+ readonly name: "";
2074
+ readonly type: "bytes32";
2075
+ readonly internalType: "bytes32";
2076
+ }];
2077
+ readonly outputs: readonly [{
2078
+ readonly name: "";
2079
+ readonly type: "bool";
2080
+ readonly internalType: "bool";
2081
+ }];
2082
+ readonly stateMutability: "view";
2083
+ }, {
2084
+ readonly type: "function";
2085
+ readonly name: "withdraw";
2086
+ readonly inputs: readonly [{
2087
+ readonly name: "token";
2088
+ readonly type: "address";
2089
+ readonly internalType: "address";
2090
+ }, {
2091
+ readonly name: "amount";
2092
+ readonly type: "uint256";
2093
+ readonly internalType: "uint256";
2094
+ }, {
2095
+ readonly name: "to";
2096
+ readonly type: "address";
2097
+ readonly internalType: "address";
2098
+ }];
2099
+ readonly outputs: readonly [];
2100
+ readonly stateMutability: "nonpayable";
2101
+ }, {
2102
+ readonly type: "event";
2103
+ readonly name: "BotAdded";
2104
+ readonly inputs: readonly [{
2105
+ readonly name: "bot";
2106
+ readonly type: "address";
2107
+ readonly indexed: true;
2108
+ readonly internalType: "address";
2109
+ }, {
2110
+ readonly name: "addedBy";
2111
+ readonly type: "address";
2112
+ readonly indexed: true;
2113
+ readonly internalType: "address";
2114
+ }];
2115
+ readonly anonymous: false;
2116
+ }, {
2117
+ readonly type: "event";
2118
+ readonly name: "BotConfigUpdated";
2119
+ readonly inputs: readonly [{
2120
+ readonly name: "bot";
2121
+ readonly type: "address";
2122
+ readonly indexed: true;
2123
+ readonly internalType: "address";
2124
+ }, {
2125
+ readonly name: "updatedBy";
2126
+ readonly type: "address";
2127
+ readonly indexed: true;
2128
+ readonly internalType: "address";
2129
+ }];
2130
+ readonly anonymous: false;
2131
+ }, {
2132
+ readonly type: "event";
2133
+ readonly name: "BotDestinationAdded";
2134
+ readonly inputs: readonly [{
2135
+ readonly name: "bot";
2136
+ readonly type: "address";
2137
+ readonly indexed: true;
2138
+ readonly internalType: "address";
2139
+ }, {
2140
+ readonly name: "destination";
2141
+ readonly type: "address";
2142
+ readonly indexed: true;
2143
+ readonly internalType: "address";
2144
+ }];
2145
+ readonly anonymous: false;
2146
+ }, {
2147
+ readonly type: "event";
2148
+ readonly name: "BotDestinationRemoved";
2149
+ readonly inputs: readonly [{
2150
+ readonly name: "bot";
2151
+ readonly type: "address";
2152
+ readonly indexed: true;
2153
+ readonly internalType: "address";
2154
+ }, {
2155
+ readonly name: "destination";
2156
+ readonly type: "address";
2157
+ readonly indexed: true;
2158
+ readonly internalType: "address";
2159
+ }];
2160
+ readonly anonymous: false;
2161
+ }, {
2162
+ readonly type: "event";
2163
+ readonly name: "BotRemoved";
2164
+ readonly inputs: readonly [{
2165
+ readonly name: "bot";
2166
+ readonly type: "address";
2167
+ readonly indexed: true;
2168
+ readonly internalType: "address";
2169
+ }, {
2170
+ readonly name: "removedBy";
2171
+ readonly type: "address";
2172
+ readonly indexed: true;
2173
+ readonly internalType: "address";
2174
+ }];
2175
+ readonly anonymous: false;
2176
+ }, {
2177
+ readonly type: "event";
2178
+ readonly name: "Deposited";
2179
+ readonly inputs: readonly [{
2180
+ readonly name: "from";
2181
+ readonly type: "address";
2182
+ readonly indexed: true;
2183
+ readonly internalType: "address";
2184
+ }, {
2185
+ readonly name: "token";
2186
+ readonly type: "address";
2187
+ readonly indexed: true;
2188
+ readonly internalType: "address";
2189
+ }, {
2190
+ readonly name: "amount";
2191
+ readonly type: "uint256";
2192
+ readonly indexed: false;
2193
+ readonly internalType: "uint256";
2194
+ }, {
2195
+ readonly name: "ref";
2196
+ readonly type: "bytes32";
2197
+ readonly indexed: false;
2198
+ readonly internalType: "bytes32";
2199
+ }];
2200
+ readonly anonymous: false;
2201
+ }, {
2202
+ readonly type: "event";
2203
+ readonly name: "EIP712DomainChanged";
2204
+ readonly inputs: readonly [];
2205
+ readonly anonymous: false;
2206
+ }, {
2207
+ readonly type: "event";
2208
+ readonly name: "GlobalBlacklistAdded";
2209
+ readonly inputs: readonly [{
2210
+ readonly name: "destination";
2211
+ readonly type: "address";
2212
+ readonly indexed: true;
2213
+ readonly internalType: "address";
2214
+ }];
2215
+ readonly anonymous: false;
2216
+ }, {
2217
+ readonly type: "event";
2218
+ readonly name: "GlobalBlacklistRemoved";
2219
+ readonly inputs: readonly [{
2220
+ readonly name: "destination";
2221
+ readonly type: "address";
2222
+ readonly indexed: true;
2223
+ readonly internalType: "address";
2224
+ }];
2225
+ readonly anonymous: false;
2226
+ }, {
2227
+ readonly type: "event";
2228
+ readonly name: "GlobalDestinationAdded";
2229
+ readonly inputs: readonly [{
2230
+ readonly name: "destination";
2231
+ readonly type: "address";
2232
+ readonly indexed: true;
2233
+ readonly internalType: "address";
2234
+ }];
2235
+ readonly anonymous: false;
2236
+ }, {
2237
+ readonly type: "event";
2238
+ readonly name: "GlobalDestinationRemoved";
2239
+ readonly inputs: readonly [{
2240
+ readonly name: "destination";
2241
+ readonly type: "address";
2242
+ readonly indexed: true;
2243
+ readonly internalType: "address";
2244
+ }];
2245
+ readonly anonymous: false;
2246
+ }, {
2247
+ readonly type: "event";
2248
+ readonly name: "OperatorCeilingsUpdated";
2249
+ readonly inputs: readonly [{
2250
+ readonly name: "ceilings";
2251
+ readonly type: "tuple";
2252
+ readonly indexed: false;
2253
+ readonly internalType: "struct AxonVault.OperatorCeilings";
2254
+ readonly components: readonly [{
2255
+ readonly name: "maxPerTxAmount";
2256
+ readonly type: "uint256";
2257
+ readonly internalType: "uint256";
2258
+ }, {
2259
+ readonly name: "maxBotDailyLimit";
2260
+ readonly type: "uint256";
2261
+ readonly internalType: "uint256";
2262
+ }, {
2263
+ readonly name: "maxOperatorBots";
2264
+ readonly type: "uint256";
2265
+ readonly internalType: "uint256";
2266
+ }, {
2267
+ readonly name: "vaultDailyAggregate";
2268
+ readonly type: "uint256";
2269
+ readonly internalType: "uint256";
2270
+ }, {
2271
+ readonly name: "minAiTriggerFloor";
2272
+ readonly type: "uint256";
2273
+ readonly internalType: "uint256";
2274
+ }];
2275
+ }];
2276
+ readonly anonymous: false;
2277
+ }, {
2278
+ readonly type: "event";
2279
+ readonly name: "OperatorSet";
2280
+ readonly inputs: readonly [{
2281
+ readonly name: "oldOperator";
2282
+ readonly type: "address";
2283
+ readonly indexed: true;
2284
+ readonly internalType: "address";
2285
+ }, {
2286
+ readonly name: "newOperator";
2287
+ readonly type: "address";
2288
+ readonly indexed: true;
2289
+ readonly internalType: "address";
2290
+ }];
2291
+ readonly anonymous: false;
2292
+ }, {
2293
+ readonly type: "event";
2294
+ readonly name: "OwnershipTransferStarted";
2295
+ readonly inputs: readonly [{
2296
+ readonly name: "previousOwner";
2297
+ readonly type: "address";
2298
+ readonly indexed: true;
2299
+ readonly internalType: "address";
2300
+ }, {
2301
+ readonly name: "newOwner";
2302
+ readonly type: "address";
2303
+ readonly indexed: true;
2304
+ readonly internalType: "address";
2305
+ }];
2306
+ readonly anonymous: false;
2307
+ }, {
2308
+ readonly type: "event";
2309
+ readonly name: "OwnershipTransferred";
2310
+ readonly inputs: readonly [{
2311
+ readonly name: "previousOwner";
2312
+ readonly type: "address";
2313
+ readonly indexed: true;
2314
+ readonly internalType: "address";
2315
+ }, {
2316
+ readonly name: "newOwner";
2317
+ readonly type: "address";
2318
+ readonly indexed: true;
2319
+ readonly internalType: "address";
2320
+ }];
2321
+ readonly anonymous: false;
2322
+ }, {
2323
+ readonly type: "event";
2324
+ readonly name: "Paused";
2325
+ readonly inputs: readonly [{
2326
+ readonly name: "account";
2327
+ readonly type: "address";
2328
+ readonly indexed: false;
2329
+ readonly internalType: "address";
2330
+ }];
2331
+ readonly anonymous: false;
2332
+ }, {
2333
+ readonly type: "event";
2334
+ readonly name: "PaymentExecuted";
2335
+ readonly inputs: readonly [{
2336
+ readonly name: "bot";
2337
+ readonly type: "address";
2338
+ readonly indexed: true;
2339
+ readonly internalType: "address";
2340
+ }, {
2341
+ readonly name: "to";
2342
+ readonly type: "address";
2343
+ readonly indexed: true;
2344
+ readonly internalType: "address";
2345
+ }, {
2346
+ readonly name: "token";
2347
+ readonly type: "address";
2348
+ readonly indexed: true;
2349
+ readonly internalType: "address";
2350
+ }, {
2351
+ readonly name: "amount";
2352
+ readonly type: "uint256";
2353
+ readonly indexed: false;
2354
+ readonly internalType: "uint256";
2355
+ }, {
2356
+ readonly name: "ref";
2357
+ readonly type: "bytes32";
2358
+ readonly indexed: false;
2359
+ readonly internalType: "bytes32";
2360
+ }];
2361
+ readonly anonymous: false;
2362
+ }, {
2363
+ readonly type: "event";
2364
+ readonly name: "ProtocolAdded";
2365
+ readonly inputs: readonly [{
2366
+ readonly name: "protocol";
2367
+ readonly type: "address";
2368
+ readonly indexed: true;
2369
+ readonly internalType: "address";
2370
+ }];
2371
+ readonly anonymous: false;
2372
+ }, {
2373
+ readonly type: "event";
2374
+ readonly name: "ProtocolExecuted";
2375
+ readonly inputs: readonly [{
2376
+ readonly name: "bot";
2377
+ readonly type: "address";
2378
+ readonly indexed: true;
2379
+ readonly internalType: "address";
2380
+ }, {
2381
+ readonly name: "protocol";
2382
+ readonly type: "address";
2383
+ readonly indexed: true;
2384
+ readonly internalType: "address";
2385
+ }, {
2386
+ readonly name: "token";
2387
+ readonly type: "address";
2388
+ readonly indexed: false;
2389
+ readonly internalType: "address";
2390
+ }, {
2391
+ readonly name: "amount";
2392
+ readonly type: "uint256";
2393
+ readonly indexed: false;
2394
+ readonly internalType: "uint256";
2395
+ }, {
2396
+ readonly name: "ref";
2397
+ readonly type: "bytes32";
2398
+ readonly indexed: false;
2399
+ readonly internalType: "bytes32";
2400
+ }];
2401
+ readonly anonymous: false;
2402
+ }, {
2403
+ readonly type: "event";
2404
+ readonly name: "ProtocolRemoved";
2405
+ readonly inputs: readonly [{
2406
+ readonly name: "protocol";
2407
+ readonly type: "address";
2408
+ readonly indexed: true;
2409
+ readonly internalType: "address";
2410
+ }];
2411
+ readonly anonymous: false;
2412
+ }, {
2413
+ readonly type: "event";
2414
+ readonly name: "RebalanceTokenAdded";
2415
+ readonly inputs: readonly [{
2416
+ readonly name: "token";
2417
+ readonly type: "address";
2418
+ readonly indexed: true;
2419
+ readonly internalType: "address";
2420
+ }];
2421
+ readonly anonymous: false;
2422
+ }, {
2423
+ readonly type: "event";
2424
+ readonly name: "RebalanceTokenRemoved";
2425
+ readonly inputs: readonly [{
2426
+ readonly name: "token";
2427
+ readonly type: "address";
2428
+ readonly indexed: true;
2429
+ readonly internalType: "address";
2430
+ }];
2431
+ readonly anonymous: false;
2432
+ }, {
2433
+ readonly type: "event";
2434
+ readonly name: "SwapExecuted";
2435
+ readonly inputs: readonly [{
2436
+ readonly name: "bot";
2437
+ readonly type: "address";
2438
+ readonly indexed: true;
2439
+ readonly internalType: "address";
2440
+ }, {
2441
+ readonly name: "fromToken";
2442
+ readonly type: "address";
2443
+ readonly indexed: false;
2444
+ readonly internalType: "address";
2445
+ }, {
2446
+ readonly name: "toToken";
2447
+ readonly type: "address";
2448
+ readonly indexed: false;
2449
+ readonly internalType: "address";
2450
+ }, {
2451
+ readonly name: "fromAmount";
2452
+ readonly type: "uint256";
2453
+ readonly indexed: false;
2454
+ readonly internalType: "uint256";
2455
+ }, {
2456
+ readonly name: "toAmount";
2457
+ readonly type: "uint256";
2458
+ readonly indexed: false;
2459
+ readonly internalType: "uint256";
2460
+ }, {
2461
+ readonly name: "ref";
2462
+ readonly type: "bytes32";
2463
+ readonly indexed: false;
2464
+ readonly internalType: "bytes32";
2465
+ }];
2466
+ readonly anonymous: false;
2467
+ }, {
2468
+ readonly type: "event";
2469
+ readonly name: "SwapPaymentExecuted";
2470
+ readonly inputs: readonly [{
2471
+ readonly name: "bot";
2472
+ readonly type: "address";
2473
+ readonly indexed: true;
2474
+ readonly internalType: "address";
2475
+ }, {
2476
+ readonly name: "to";
2477
+ readonly type: "address";
2478
+ readonly indexed: true;
2479
+ readonly internalType: "address";
2480
+ }, {
2481
+ readonly name: "fromToken";
2482
+ readonly type: "address";
2483
+ readonly indexed: false;
2484
+ readonly internalType: "address";
2485
+ }, {
2486
+ readonly name: "toToken";
2487
+ readonly type: "address";
2488
+ readonly indexed: false;
2489
+ readonly internalType: "address";
2490
+ }, {
2491
+ readonly name: "fromAmount";
2492
+ readonly type: "uint256";
2493
+ readonly indexed: false;
2494
+ readonly internalType: "uint256";
2495
+ }, {
2496
+ readonly name: "toAmount";
2497
+ readonly type: "uint256";
2498
+ readonly indexed: false;
2499
+ readonly internalType: "uint256";
2500
+ }, {
2501
+ readonly name: "ref";
2502
+ readonly type: "bytes32";
2503
+ readonly indexed: false;
2504
+ readonly internalType: "bytes32";
2505
+ }];
2506
+ readonly anonymous: false;
2507
+ }, {
2508
+ readonly type: "event";
2509
+ readonly name: "Unpaused";
2510
+ readonly inputs: readonly [{
2511
+ readonly name: "account";
2512
+ readonly type: "address";
2513
+ readonly indexed: false;
2514
+ readonly internalType: "address";
2515
+ }];
2516
+ readonly anonymous: false;
2517
+ }, {
2518
+ readonly type: "event";
2519
+ readonly name: "Withdrawn";
2520
+ readonly inputs: readonly [{
2521
+ readonly name: "token";
2522
+ readonly type: "address";
2523
+ readonly indexed: true;
2524
+ readonly internalType: "address";
2525
+ }, {
2526
+ readonly name: "amount";
2527
+ readonly type: "uint256";
2528
+ readonly indexed: false;
2529
+ readonly internalType: "uint256";
2530
+ }, {
2531
+ readonly name: "to";
2532
+ readonly type: "address";
2533
+ readonly indexed: true;
2534
+ readonly internalType: "address";
2535
+ }];
2536
+ readonly anonymous: false;
2537
+ }, {
2538
+ readonly type: "error";
2539
+ readonly name: "AlreadyApprovedProtocol";
2540
+ readonly inputs: readonly [];
2541
+ }, {
2542
+ readonly type: "error";
2543
+ readonly name: "AmountMismatch";
2544
+ readonly inputs: readonly [];
2545
+ }, {
2546
+ readonly type: "error";
2547
+ readonly name: "BotAlreadyExists";
2548
+ readonly inputs: readonly [];
2549
+ }, {
2550
+ readonly type: "error";
2551
+ readonly name: "BotDoesNotExist";
2552
+ readonly inputs: readonly [];
2553
+ }, {
2554
+ readonly type: "error";
2555
+ readonly name: "BotNotActive";
2556
+ readonly inputs: readonly [];
2557
+ }, {
2558
+ readonly type: "error";
2559
+ readonly name: "CalldataHashMismatch";
2560
+ readonly inputs: readonly [];
2561
+ }, {
2562
+ readonly type: "error";
2563
+ readonly name: "DeadlineExpired";
2564
+ readonly inputs: readonly [];
2565
+ }, {
2566
+ readonly type: "error";
2567
+ readonly name: "DestinationBlacklisted";
2568
+ readonly inputs: readonly [];
2569
+ }, {
2570
+ readonly type: "error";
2571
+ readonly name: "DestinationNotWhitelisted";
2572
+ readonly inputs: readonly [];
2573
+ }, {
2574
+ readonly type: "error";
2575
+ readonly name: "ECDSAInvalidSignature";
2576
+ readonly inputs: readonly [];
2577
+ }, {
2578
+ readonly type: "error";
2579
+ readonly name: "ECDSAInvalidSignatureLength";
2580
+ readonly inputs: readonly [{
2581
+ readonly name: "length";
2582
+ readonly type: "uint256";
2583
+ readonly internalType: "uint256";
2584
+ }];
2585
+ }, {
2586
+ readonly type: "error";
2587
+ readonly name: "ECDSAInvalidSignatureS";
2588
+ readonly inputs: readonly [{
2589
+ readonly name: "s";
2590
+ readonly type: "bytes32";
2591
+ readonly internalType: "bytes32";
2592
+ }];
2593
+ }, {
2594
+ readonly type: "error";
2595
+ readonly name: "EnforcedPause";
2596
+ readonly inputs: readonly [];
2597
+ }, {
2598
+ readonly type: "error";
2599
+ readonly name: "ExceedsOperatorCeiling";
2600
+ readonly inputs: readonly [];
2601
+ }, {
2602
+ readonly type: "error";
2603
+ readonly name: "ExpectedPause";
2604
+ readonly inputs: readonly [];
2605
+ }, {
2606
+ readonly type: "error";
2607
+ readonly name: "InsufficientBalance";
2608
+ readonly inputs: readonly [];
2609
+ }, {
2610
+ readonly type: "error";
2611
+ readonly name: "IntentAlreadyUsed";
2612
+ readonly inputs: readonly [];
2613
+ }, {
2614
+ readonly type: "error";
2615
+ readonly name: "InvalidShortString";
2616
+ readonly inputs: readonly [];
2617
+ }, {
2618
+ readonly type: "error";
2619
+ readonly name: "InvalidSignature";
2620
+ readonly inputs: readonly [];
2621
+ }, {
2622
+ readonly type: "error";
2623
+ readonly name: "MaxPerTxExceeded";
2624
+ readonly inputs: readonly [];
2625
+ }, {
2626
+ readonly type: "error";
2627
+ readonly name: "MaxRebalanceAmountExceeded";
2628
+ readonly inputs: readonly [];
2629
+ }, {
2630
+ readonly type: "error";
2631
+ readonly name: "NativeTransferFailed";
2632
+ readonly inputs: readonly [];
2633
+ }, {
2634
+ readonly type: "error";
2635
+ readonly name: "NotAuthorized";
2636
+ readonly inputs: readonly [];
2637
+ }, {
2638
+ readonly type: "error";
2639
+ readonly name: "NotAuthorizedRelayer";
2640
+ readonly inputs: readonly [];
2641
+ }, {
2642
+ readonly type: "error";
2643
+ readonly name: "OperatorBotLimitReached";
2644
+ readonly inputs: readonly [];
2645
+ }, {
2646
+ readonly type: "error";
2647
+ readonly name: "OperatorCannotBeOwner";
2648
+ readonly inputs: readonly [];
2649
+ }, {
2650
+ readonly type: "error";
2651
+ readonly name: "OracleNotConfigured";
2652
+ readonly inputs: readonly [];
2653
+ }, {
2654
+ readonly type: "error";
2655
+ readonly name: "OracleUnavailable";
2656
+ readonly inputs: readonly [];
2657
+ }, {
2658
+ readonly type: "error";
2659
+ readonly name: "OwnableInvalidOwner";
2660
+ readonly inputs: readonly [{
2661
+ readonly name: "owner";
2662
+ readonly type: "address";
2663
+ readonly internalType: "address";
2664
+ }];
2665
+ }, {
2666
+ readonly type: "error";
2667
+ readonly name: "OwnableUnauthorizedAccount";
2668
+ readonly inputs: readonly [{
2669
+ readonly name: "account";
2670
+ readonly type: "address";
2671
+ readonly internalType: "address";
2672
+ }];
2673
+ }, {
2674
+ readonly type: "error";
2675
+ readonly name: "OwnerCannotBeBot";
2676
+ readonly inputs: readonly [];
2677
+ }, {
2678
+ readonly type: "error";
2679
+ readonly name: "PaymentToZeroAddress";
2680
+ readonly inputs: readonly [];
2681
+ }, {
2682
+ readonly type: "error";
2683
+ readonly name: "ProtocolCallFailed";
2684
+ readonly inputs: readonly [];
2685
+ }, {
2686
+ readonly type: "error";
2687
+ readonly name: "ProtocolNotApproved";
2688
+ readonly inputs: readonly [];
2689
+ }, {
2690
+ readonly type: "error";
2691
+ readonly name: "ProtocolNotInList";
2692
+ readonly inputs: readonly [];
2693
+ }, {
2694
+ readonly type: "error";
2695
+ readonly name: "RebalanceTokenNotAllowed";
2696
+ readonly inputs: readonly [];
2697
+ }, {
2698
+ readonly type: "error";
2699
+ readonly name: "ReentrancyGuardReentrantCall";
2700
+ readonly inputs: readonly [];
2701
+ }, {
2702
+ readonly type: "error";
2703
+ readonly name: "RouterNotApproved";
2704
+ readonly inputs: readonly [];
2705
+ }, {
2706
+ readonly type: "error";
2707
+ readonly name: "SafeERC20FailedOperation";
2708
+ readonly inputs: readonly [{
2709
+ readonly name: "token";
2710
+ readonly type: "address";
2711
+ readonly internalType: "address";
2712
+ }];
2713
+ }, {
2714
+ readonly type: "error";
2715
+ readonly name: "SameTokenSwap";
2716
+ readonly inputs: readonly [];
2717
+ }, {
2718
+ readonly type: "error";
2719
+ readonly name: "SelfPayment";
2720
+ readonly inputs: readonly [];
2721
+ }, {
2722
+ readonly type: "error";
2723
+ readonly name: "StringTooLong";
2724
+ readonly inputs: readonly [{
2725
+ readonly name: "str";
2726
+ readonly type: "string";
2727
+ readonly internalType: "string";
2728
+ }];
2729
+ }, {
2730
+ readonly type: "error";
2731
+ readonly name: "SwapFailed";
2732
+ readonly inputs: readonly [];
2733
+ }, {
2734
+ readonly type: "error";
2735
+ readonly name: "SwapOutputInsufficient";
2736
+ readonly inputs: readonly [];
2737
+ }, {
2738
+ readonly type: "error";
2739
+ readonly name: "TooManySpendingLimits";
2740
+ readonly inputs: readonly [];
2741
+ }, {
2742
+ readonly type: "error";
2743
+ readonly name: "UnexpectedETH";
2744
+ readonly inputs: readonly [];
2745
+ }, {
2746
+ readonly type: "error";
2747
+ readonly name: "ZeroAddress";
2748
+ readonly inputs: readonly [];
2749
+ }, {
2750
+ readonly type: "error";
2751
+ readonly name: "ZeroAmount";
2752
+ readonly inputs: readonly [];
2753
+ }];
2754
+
2755
+ declare const AxonVaultFactoryAbi: readonly [{
2756
+ readonly type: "constructor";
2757
+ readonly inputs: readonly [{
2758
+ readonly name: "_axonRegistry";
2759
+ readonly type: "address";
2760
+ readonly internalType: "address";
2761
+ }, {
2762
+ readonly name: "factoryOwner";
2763
+ readonly type: "address";
2764
+ readonly internalType: "address";
2765
+ }];
2766
+ readonly stateMutability: "nonpayable";
2767
+ }, {
2768
+ readonly type: "function";
2769
+ readonly name: "acceptOwnership";
2770
+ readonly inputs: readonly [];
2771
+ readonly outputs: readonly [];
2772
+ readonly stateMutability: "nonpayable";
2773
+ }, {
2774
+ readonly type: "function";
2775
+ readonly name: "allVaults";
2776
+ readonly inputs: readonly [{
2777
+ readonly name: "";
2778
+ readonly type: "uint256";
2779
+ readonly internalType: "uint256";
2780
+ }];
2781
+ readonly outputs: readonly [{
2782
+ readonly name: "";
2783
+ readonly type: "address";
2784
+ readonly internalType: "address";
2785
+ }];
2786
+ readonly stateMutability: "view";
2787
+ }, {
2788
+ readonly type: "function";
2789
+ readonly name: "axonRegistry";
2790
+ readonly inputs: readonly [];
2791
+ readonly outputs: readonly [{
2792
+ readonly name: "";
2793
+ readonly type: "address";
2794
+ readonly internalType: "address";
2795
+ }];
2796
+ readonly stateMutability: "view";
2797
+ }, {
2798
+ readonly type: "function";
2799
+ readonly name: "deployVault";
2800
+ readonly inputs: readonly [];
2801
+ readonly outputs: readonly [{
2802
+ readonly name: "vault";
2803
+ readonly type: "address";
2804
+ readonly internalType: "address";
2805
+ }];
2806
+ readonly stateMutability: "nonpayable";
2807
+ }, {
2808
+ readonly type: "function";
2809
+ readonly name: "owner";
2810
+ readonly inputs: readonly [];
2811
+ readonly outputs: readonly [{
2812
+ readonly name: "";
2813
+ readonly type: "address";
2814
+ readonly internalType: "address";
2815
+ }];
2816
+ readonly stateMutability: "view";
2817
+ }, {
2818
+ readonly type: "function";
2819
+ readonly name: "ownerVaultCount";
2820
+ readonly inputs: readonly [{
2821
+ readonly name: "owner";
2822
+ readonly type: "address";
2823
+ readonly internalType: "address";
2824
+ }];
2825
+ readonly outputs: readonly [{
2826
+ readonly name: "";
2827
+ readonly type: "uint256";
2828
+ readonly internalType: "uint256";
2829
+ }];
2830
+ readonly stateMutability: "view";
2831
+ }, {
2832
+ readonly type: "function";
2833
+ readonly name: "ownerVaults";
2834
+ readonly inputs: readonly [{
2835
+ readonly name: "";
2836
+ readonly type: "address";
2837
+ readonly internalType: "address";
2838
+ }, {
2839
+ readonly name: "";
2840
+ readonly type: "uint256";
2841
+ readonly internalType: "uint256";
2842
+ }];
2843
+ readonly outputs: readonly [{
2844
+ readonly name: "";
2845
+ readonly type: "address";
2846
+ readonly internalType: "address";
2847
+ }];
2848
+ readonly stateMutability: "view";
2849
+ }, {
2850
+ readonly type: "function";
2851
+ readonly name: "pendingOwner";
2852
+ readonly inputs: readonly [];
2853
+ readonly outputs: readonly [{
2854
+ readonly name: "";
2855
+ readonly type: "address";
2856
+ readonly internalType: "address";
2857
+ }];
2858
+ readonly stateMutability: "view";
2859
+ }, {
2860
+ readonly type: "function";
2861
+ readonly name: "renounceOwnership";
2862
+ readonly inputs: readonly [];
2863
+ readonly outputs: readonly [];
2864
+ readonly stateMutability: "nonpayable";
2865
+ }, {
2866
+ readonly type: "function";
2867
+ readonly name: "transferOwnership";
2868
+ readonly inputs: readonly [{
2869
+ readonly name: "newOwner";
2870
+ readonly type: "address";
2871
+ readonly internalType: "address";
2872
+ }];
2873
+ readonly outputs: readonly [];
2874
+ readonly stateMutability: "nonpayable";
2875
+ }, {
2876
+ readonly type: "function";
2877
+ readonly name: "vaultCount";
2878
+ readonly inputs: readonly [];
2879
+ readonly outputs: readonly [{
2880
+ readonly name: "";
2881
+ readonly type: "uint256";
2882
+ readonly internalType: "uint256";
2883
+ }];
2884
+ readonly stateMutability: "view";
2885
+ }, {
2886
+ readonly type: "event";
2887
+ readonly name: "OwnershipTransferStarted";
2888
+ readonly inputs: readonly [{
2889
+ readonly name: "previousOwner";
2890
+ readonly type: "address";
2891
+ readonly indexed: true;
2892
+ readonly internalType: "address";
2893
+ }, {
2894
+ readonly name: "newOwner";
2895
+ readonly type: "address";
2896
+ readonly indexed: true;
2897
+ readonly internalType: "address";
2898
+ }];
2899
+ readonly anonymous: false;
2900
+ }, {
2901
+ readonly type: "event";
2902
+ readonly name: "OwnershipTransferred";
2903
+ readonly inputs: readonly [{
2904
+ readonly name: "previousOwner";
2905
+ readonly type: "address";
2906
+ readonly indexed: true;
2907
+ readonly internalType: "address";
2908
+ }, {
2909
+ readonly name: "newOwner";
2910
+ readonly type: "address";
2911
+ readonly indexed: true;
2912
+ readonly internalType: "address";
2913
+ }];
2914
+ readonly anonymous: false;
2915
+ }, {
2916
+ readonly type: "event";
2917
+ readonly name: "VaultDeployed";
2918
+ readonly inputs: readonly [{
2919
+ readonly name: "owner";
2920
+ readonly type: "address";
2921
+ readonly indexed: true;
2922
+ readonly internalType: "address";
2923
+ }, {
2924
+ readonly name: "vault";
2925
+ readonly type: "address";
2926
+ readonly indexed: true;
2927
+ readonly internalType: "address";
2928
+ }, {
2929
+ readonly name: "version";
2930
+ readonly type: "uint16";
2931
+ readonly indexed: false;
2932
+ readonly internalType: "uint16";
2933
+ }, {
2934
+ readonly name: "axonRegistry";
2935
+ readonly type: "address";
2936
+ readonly indexed: false;
2937
+ readonly internalType: "address";
2938
+ }];
2939
+ readonly anonymous: false;
2940
+ }, {
2941
+ readonly type: "error";
2942
+ readonly name: "OwnableInvalidOwner";
2943
+ readonly inputs: readonly [{
2944
+ readonly name: "owner";
2945
+ readonly type: "address";
2946
+ readonly internalType: "address";
2947
+ }];
2948
+ }, {
2949
+ readonly type: "error";
2950
+ readonly name: "OwnableUnauthorizedAccount";
2951
+ readonly inputs: readonly [{
2952
+ readonly name: "account";
2953
+ readonly type: "address";
2954
+ readonly internalType: "address";
2955
+ }];
2956
+ }, {
2957
+ readonly type: "error";
2958
+ readonly name: "ZeroAddress";
2959
+ readonly inputs: readonly [];
2960
+ }];
2961
+
2962
+ declare const AxonRegistryAbi: readonly [{
2963
+ readonly type: "constructor";
2964
+ readonly inputs: readonly [{
2965
+ readonly name: "initialOwner";
2966
+ readonly type: "address";
2967
+ readonly internalType: "address";
2968
+ }];
2969
+ readonly stateMutability: "nonpayable";
2970
+ }, {
2971
+ readonly type: "function";
2972
+ readonly name: "acceptOwnership";
2973
+ readonly inputs: readonly [];
2974
+ readonly outputs: readonly [];
2975
+ readonly stateMutability: "nonpayable";
2976
+ }, {
2977
+ readonly type: "function";
2978
+ readonly name: "addRelayer";
2979
+ readonly inputs: readonly [{
2980
+ readonly name: "relayer";
2981
+ readonly type: "address";
2982
+ readonly internalType: "address";
2983
+ }];
2984
+ readonly outputs: readonly [];
2985
+ readonly stateMutability: "nonpayable";
2986
+ }, {
2987
+ readonly type: "function";
2988
+ readonly name: "addSwapRouter";
2989
+ readonly inputs: readonly [{
2990
+ readonly name: "router";
2991
+ readonly type: "address";
2992
+ readonly internalType: "address";
2993
+ }];
2994
+ readonly outputs: readonly [];
2995
+ readonly stateMutability: "nonpayable";
2996
+ }, {
2997
+ readonly type: "function";
2998
+ readonly name: "isApprovedSwapRouter";
2999
+ readonly inputs: readonly [{
3000
+ readonly name: "router";
3001
+ readonly type: "address";
3002
+ readonly internalType: "address";
3003
+ }];
3004
+ readonly outputs: readonly [{
3005
+ readonly name: "";
3006
+ readonly type: "bool";
3007
+ readonly internalType: "bool";
3008
+ }];
3009
+ readonly stateMutability: "view";
3010
+ }, {
3011
+ readonly type: "function";
3012
+ readonly name: "isAuthorized";
3013
+ readonly inputs: readonly [{
3014
+ readonly name: "relayer";
3015
+ readonly type: "address";
3016
+ readonly internalType: "address";
3017
+ }];
3018
+ readonly outputs: readonly [{
3019
+ readonly name: "";
3020
+ readonly type: "bool";
3021
+ readonly internalType: "bool";
3022
+ }];
3023
+ readonly stateMutability: "view";
3024
+ }, {
3025
+ readonly type: "function";
3026
+ readonly name: "owner";
3027
+ readonly inputs: readonly [];
3028
+ readonly outputs: readonly [{
3029
+ readonly name: "";
3030
+ readonly type: "address";
3031
+ readonly internalType: "address";
3032
+ }];
3033
+ readonly stateMutability: "view";
3034
+ }, {
3035
+ readonly type: "function";
3036
+ readonly name: "pendingOwner";
3037
+ readonly inputs: readonly [];
3038
+ readonly outputs: readonly [{
3039
+ readonly name: "";
3040
+ readonly type: "address";
3041
+ readonly internalType: "address";
3042
+ }];
3043
+ readonly stateMutability: "view";
3044
+ }, {
3045
+ readonly type: "function";
3046
+ readonly name: "removeRelayer";
3047
+ readonly inputs: readonly [{
3048
+ readonly name: "relayer";
3049
+ readonly type: "address";
3050
+ readonly internalType: "address";
3051
+ }];
3052
+ readonly outputs: readonly [];
3053
+ readonly stateMutability: "nonpayable";
3054
+ }, {
3055
+ readonly type: "function";
3056
+ readonly name: "removeSwapRouter";
3057
+ readonly inputs: readonly [{
3058
+ readonly name: "router";
3059
+ readonly type: "address";
3060
+ readonly internalType: "address";
3061
+ }];
3062
+ readonly outputs: readonly [];
3063
+ readonly stateMutability: "nonpayable";
3064
+ }, {
3065
+ readonly type: "function";
3066
+ readonly name: "renounceOwnership";
3067
+ readonly inputs: readonly [];
3068
+ readonly outputs: readonly [];
3069
+ readonly stateMutability: "nonpayable";
3070
+ }, {
3071
+ readonly type: "function";
3072
+ readonly name: "setOracleConfig";
3073
+ readonly inputs: readonly [{
3074
+ readonly name: "uniV3Factory";
3075
+ readonly type: "address";
3076
+ readonly internalType: "address";
3077
+ }, {
3078
+ readonly name: "usdc";
3079
+ readonly type: "address";
3080
+ readonly internalType: "address";
3081
+ }, {
3082
+ readonly name: "weth";
3083
+ readonly type: "address";
3084
+ readonly internalType: "address";
3085
+ }];
3086
+ readonly outputs: readonly [];
3087
+ readonly stateMutability: "nonpayable";
3088
+ }, {
3089
+ readonly type: "function";
3090
+ readonly name: "transferOwnership";
3091
+ readonly inputs: readonly [{
3092
+ readonly name: "newOwner";
3093
+ readonly type: "address";
3094
+ readonly internalType: "address";
3095
+ }];
3096
+ readonly outputs: readonly [];
3097
+ readonly stateMutability: "nonpayable";
3098
+ }, {
3099
+ readonly type: "function";
3100
+ readonly name: "uniswapV3Factory";
3101
+ readonly inputs: readonly [];
3102
+ readonly outputs: readonly [{
3103
+ readonly name: "";
3104
+ readonly type: "address";
3105
+ readonly internalType: "address";
3106
+ }];
3107
+ readonly stateMutability: "view";
3108
+ }, {
3109
+ readonly type: "function";
3110
+ readonly name: "usdcAddress";
3111
+ readonly inputs: readonly [];
3112
+ readonly outputs: readonly [{
3113
+ readonly name: "";
3114
+ readonly type: "address";
3115
+ readonly internalType: "address";
3116
+ }];
3117
+ readonly stateMutability: "view";
3118
+ }, {
3119
+ readonly type: "function";
3120
+ readonly name: "wethAddress";
3121
+ readonly inputs: readonly [];
3122
+ readonly outputs: readonly [{
3123
+ readonly name: "";
3124
+ readonly type: "address";
3125
+ readonly internalType: "address";
3126
+ }];
3127
+ readonly stateMutability: "view";
3128
+ }, {
3129
+ readonly type: "event";
3130
+ readonly name: "OracleConfigUpdated";
3131
+ readonly inputs: readonly [{
3132
+ readonly name: "uniswapV3Factory";
3133
+ readonly type: "address";
3134
+ readonly indexed: false;
3135
+ readonly internalType: "address";
3136
+ }, {
3137
+ readonly name: "usdc";
3138
+ readonly type: "address";
3139
+ readonly indexed: false;
3140
+ readonly internalType: "address";
3141
+ }, {
3142
+ readonly name: "weth";
3143
+ readonly type: "address";
3144
+ readonly indexed: false;
3145
+ readonly internalType: "address";
3146
+ }];
3147
+ readonly anonymous: false;
3148
+ }, {
3149
+ readonly type: "event";
3150
+ readonly name: "OwnershipTransferStarted";
3151
+ readonly inputs: readonly [{
3152
+ readonly name: "previousOwner";
3153
+ readonly type: "address";
3154
+ readonly indexed: true;
3155
+ readonly internalType: "address";
3156
+ }, {
3157
+ readonly name: "newOwner";
3158
+ readonly type: "address";
3159
+ readonly indexed: true;
3160
+ readonly internalType: "address";
3161
+ }];
3162
+ readonly anonymous: false;
3163
+ }, {
3164
+ readonly type: "event";
3165
+ readonly name: "OwnershipTransferred";
3166
+ readonly inputs: readonly [{
3167
+ readonly name: "previousOwner";
3168
+ readonly type: "address";
3169
+ readonly indexed: true;
3170
+ readonly internalType: "address";
3171
+ }, {
3172
+ readonly name: "newOwner";
3173
+ readonly type: "address";
3174
+ readonly indexed: true;
3175
+ readonly internalType: "address";
3176
+ }];
3177
+ readonly anonymous: false;
3178
+ }, {
3179
+ readonly type: "event";
3180
+ readonly name: "RelayerAdded";
3181
+ readonly inputs: readonly [{
3182
+ readonly name: "relayer";
3183
+ readonly type: "address";
3184
+ readonly indexed: true;
3185
+ readonly internalType: "address";
3186
+ }];
3187
+ readonly anonymous: false;
3188
+ }, {
3189
+ readonly type: "event";
3190
+ readonly name: "RelayerRemoved";
3191
+ readonly inputs: readonly [{
3192
+ readonly name: "relayer";
3193
+ readonly type: "address";
3194
+ readonly indexed: true;
3195
+ readonly internalType: "address";
3196
+ }];
3197
+ readonly anonymous: false;
3198
+ }, {
3199
+ readonly type: "event";
3200
+ readonly name: "SwapRouterAdded";
3201
+ readonly inputs: readonly [{
3202
+ readonly name: "router";
3203
+ readonly type: "address";
3204
+ readonly indexed: true;
3205
+ readonly internalType: "address";
3206
+ }];
3207
+ readonly anonymous: false;
3208
+ }, {
3209
+ readonly type: "event";
3210
+ readonly name: "SwapRouterRemoved";
3211
+ readonly inputs: readonly [{
3212
+ readonly name: "router";
3213
+ readonly type: "address";
3214
+ readonly indexed: true;
3215
+ readonly internalType: "address";
3216
+ }];
3217
+ readonly anonymous: false;
3218
+ }, {
3219
+ readonly type: "error";
3220
+ readonly name: "AlreadyApproved";
3221
+ readonly inputs: readonly [];
3222
+ }, {
3223
+ readonly type: "error";
3224
+ readonly name: "AlreadyAuthorized";
3225
+ readonly inputs: readonly [];
3226
+ }, {
3227
+ readonly type: "error";
3228
+ readonly name: "NotApproved";
3229
+ readonly inputs: readonly [];
3230
+ }, {
3231
+ readonly type: "error";
3232
+ readonly name: "NotAuthorized";
3233
+ readonly inputs: readonly [];
3234
+ }, {
3235
+ readonly type: "error";
3236
+ readonly name: "OwnableInvalidOwner";
3237
+ readonly inputs: readonly [{
3238
+ readonly name: "owner";
3239
+ readonly type: "address";
3240
+ readonly internalType: "address";
3241
+ }];
3242
+ }, {
3243
+ readonly type: "error";
3244
+ readonly name: "OwnableUnauthorizedAccount";
3245
+ readonly inputs: readonly [{
3246
+ readonly name: "account";
3247
+ readonly type: "address";
3248
+ readonly internalType: "address";
3249
+ }];
3250
+ }, {
3251
+ readonly type: "error";
3252
+ readonly name: "ZeroAddress";
3253
+ readonly inputs: readonly [];
3254
+ }];
3255
+
3256
+ 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, PERMIT2_ADDRESS, type PayInput, PaymentErrorCode, type PaymentIntent, type PaymentResult, type PaymentStatus, type Permit2Authorization, RELAYER_API, type RebalanceTokensResult, SUPPORTED_CHAIN_IDS, SWAP_INTENT_TYPEHASH, type SpendingLimit, type SupportedChainId, type SwapInput, type SwapIntent, Token, type TokenInput, type TosStatus, type TransferAuthorization, USDC, USDC_EIP712_DOMAIN, type VaultInfo, WINDOW, WITNESS_TYPE_STRING, type X402HandleResult, type X402PaymentOption, type X402PaymentRequired, type X402Resource, X402_PROXY_ADDRESS, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, encodeRef, encryptKeystore, extractX402Metadata, findMatchingOption, formatPaymentSignature, getBotConfig, getChain, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, parseChainId, parsePaymentRequired, randomNonce, randomPermit2Nonce, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signPermit2WitnessTransfer, signSwapIntent, signTransferWithAuthorization };