@axonfi/sdk 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +212 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -20
- package/dist/index.d.ts +169 -20
- package/dist/index.js +212 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -502,7 +502,7 @@ interface PayInput {
|
|
|
502
502
|
* executeProtocol() on-chain. The contract approves `token` to `protocol`,
|
|
503
503
|
* calls it with `callData`, then revokes the approval.
|
|
504
504
|
*
|
|
505
|
-
* TypeHash: keccak256("ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 deadline,bytes32 ref)")
|
|
505
|
+
* TypeHash: keccak256("ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 value,uint256 deadline,bytes32 ref)")
|
|
506
506
|
*/
|
|
507
507
|
interface ExecuteIntent {
|
|
508
508
|
/** Bot's own address. Must be registered in the vault. */
|
|
@@ -515,6 +515,8 @@ interface ExecuteIntent {
|
|
|
515
515
|
token: Address;
|
|
516
516
|
/** Amount to approve (in token base units). */
|
|
517
517
|
amount: bigint;
|
|
518
|
+
/** Native ETH to send with the protocol call (e.g. WETH.deposit, Lido.submit). 0 = no ETH. */
|
|
519
|
+
value: bigint;
|
|
518
520
|
/** Unix timestamp after which this intent is invalid. */
|
|
519
521
|
deadline: bigint;
|
|
520
522
|
/** keccak256 of the off-chain memo. Full memo text stored by relayer. */
|
|
@@ -553,6 +555,8 @@ interface ExecuteInput {
|
|
|
553
555
|
token: TokenInput;
|
|
554
556
|
/** Amount to approve: bigint (raw base units), number (human-readable), or string (human-readable). */
|
|
555
557
|
amount: AmountInput;
|
|
558
|
+
/** Native ETH to send with the call (wei). Optional, defaults to 0. Used for payable functions like WETH.deposit() or Lido.submit(). */
|
|
559
|
+
value?: bigint;
|
|
556
560
|
/** Human-readable description. Gets keccak256-hashed to ref. */
|
|
557
561
|
memo?: string;
|
|
558
562
|
/**
|
|
@@ -1028,6 +1032,19 @@ declare function isRebalanceTokenWhitelisted(publicClient: PublicClient, vaultAd
|
|
|
1028
1032
|
* @returns Address of the newly deployed vault.
|
|
1029
1033
|
*/
|
|
1030
1034
|
declare function deployVault(walletClient: WalletClient, publicClient: PublicClient, relayerUrl?: string): Promise<Address>;
|
|
1035
|
+
/**
|
|
1036
|
+
* Predict the deterministic address of a vault before deployment.
|
|
1037
|
+
*
|
|
1038
|
+
* Vault addresses are deterministic via CREATE2: same owner + same nonce = same
|
|
1039
|
+
* address across all chains (given the factory is at the same address).
|
|
1040
|
+
*
|
|
1041
|
+
* @param publicClient Public client for the target chain.
|
|
1042
|
+
* @param owner Address that will own the vault.
|
|
1043
|
+
* @param nonce Vault index for this owner (0 for first, 1 for second, etc.).
|
|
1044
|
+
* @param relayerUrl Override relayer URL (defaults to https://relay.axonfi.xyz).
|
|
1045
|
+
* @returns The deterministic vault address.
|
|
1046
|
+
*/
|
|
1047
|
+
declare function predictVaultAddress(publicClient: PublicClient, owner: Address, nonce: number, relayerUrl?: string): Promise<Address>;
|
|
1031
1048
|
/**
|
|
1032
1049
|
* Register a bot on the vault with its initial spending configuration.
|
|
1033
1050
|
*
|
|
@@ -1272,15 +1289,7 @@ declare function signPermit2WitnessTransfer(privateKey: Hex, chainId: number, pe
|
|
|
1272
1289
|
|
|
1273
1290
|
declare const AxonVaultAbi: readonly [{
|
|
1274
1291
|
readonly type: "constructor";
|
|
1275
|
-
readonly inputs: readonly [
|
|
1276
|
-
readonly name: "_owner";
|
|
1277
|
-
readonly type: "address";
|
|
1278
|
-
readonly internalType: "address";
|
|
1279
|
-
}, {
|
|
1280
|
-
readonly name: "_axonRegistry";
|
|
1281
|
-
readonly type: "address";
|
|
1282
|
-
readonly internalType: "address";
|
|
1283
|
-
}];
|
|
1292
|
+
readonly inputs: readonly [];
|
|
1284
1293
|
readonly stateMutability: "nonpayable";
|
|
1285
1294
|
}, {
|
|
1286
1295
|
readonly type: "receive";
|
|
@@ -1647,6 +1656,10 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1647
1656
|
readonly name: "amount";
|
|
1648
1657
|
readonly type: "uint256";
|
|
1649
1658
|
readonly internalType: "uint256";
|
|
1659
|
+
}, {
|
|
1660
|
+
readonly name: "value";
|
|
1661
|
+
readonly type: "uint256";
|
|
1662
|
+
readonly internalType: "uint256";
|
|
1650
1663
|
}, {
|
|
1651
1664
|
readonly name: "deadline";
|
|
1652
1665
|
readonly type: "uint256";
|
|
@@ -1842,6 +1855,20 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1842
1855
|
readonly internalType: "bool";
|
|
1843
1856
|
}];
|
|
1844
1857
|
readonly stateMutability: "view";
|
|
1858
|
+
}, {
|
|
1859
|
+
readonly type: "function";
|
|
1860
|
+
readonly name: "initialize";
|
|
1861
|
+
readonly inputs: readonly [{
|
|
1862
|
+
readonly name: "_owner";
|
|
1863
|
+
readonly type: "address";
|
|
1864
|
+
readonly internalType: "address";
|
|
1865
|
+
}, {
|
|
1866
|
+
readonly name: "_axonRegistry";
|
|
1867
|
+
readonly type: "address";
|
|
1868
|
+
readonly internalType: "address";
|
|
1869
|
+
}];
|
|
1870
|
+
readonly outputs: readonly [];
|
|
1871
|
+
readonly stateMutability: "nonpayable";
|
|
1845
1872
|
}, {
|
|
1846
1873
|
readonly type: "function";
|
|
1847
1874
|
readonly name: "isBotActive";
|
|
@@ -1870,6 +1897,24 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1870
1897
|
readonly internalType: "bool";
|
|
1871
1898
|
}];
|
|
1872
1899
|
readonly stateMutability: "view";
|
|
1900
|
+
}, {
|
|
1901
|
+
readonly type: "function";
|
|
1902
|
+
readonly name: "isValidSignature";
|
|
1903
|
+
readonly inputs: readonly [{
|
|
1904
|
+
readonly name: "hash";
|
|
1905
|
+
readonly type: "bytes32";
|
|
1906
|
+
readonly internalType: "bytes32";
|
|
1907
|
+
}, {
|
|
1908
|
+
readonly name: "signature";
|
|
1909
|
+
readonly type: "bytes";
|
|
1910
|
+
readonly internalType: "bytes";
|
|
1911
|
+
}];
|
|
1912
|
+
readonly outputs: readonly [{
|
|
1913
|
+
readonly name: "";
|
|
1914
|
+
readonly type: "bytes4";
|
|
1915
|
+
readonly internalType: "bytes4";
|
|
1916
|
+
}];
|
|
1917
|
+
readonly stateMutability: "view";
|
|
1873
1918
|
}, {
|
|
1874
1919
|
readonly type: "function";
|
|
1875
1920
|
readonly name: "onERC1155BatchReceived";
|
|
@@ -2523,6 +2568,16 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2523
2568
|
readonly internalType: "address";
|
|
2524
2569
|
}];
|
|
2525
2570
|
readonly anonymous: false;
|
|
2571
|
+
}, {
|
|
2572
|
+
readonly type: "event";
|
|
2573
|
+
readonly name: "Initialized";
|
|
2574
|
+
readonly inputs: readonly [{
|
|
2575
|
+
readonly name: "version";
|
|
2576
|
+
readonly type: "uint64";
|
|
2577
|
+
readonly indexed: false;
|
|
2578
|
+
readonly internalType: "uint64";
|
|
2579
|
+
}];
|
|
2580
|
+
readonly anonymous: false;
|
|
2526
2581
|
}, {
|
|
2527
2582
|
readonly type: "event";
|
|
2528
2583
|
readonly name: "OperatorCeilingsUpdated";
|
|
@@ -2900,7 +2955,7 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2900
2955
|
readonly inputs: readonly [];
|
|
2901
2956
|
}, {
|
|
2902
2957
|
readonly type: "error";
|
|
2903
|
-
readonly name: "
|
|
2958
|
+
readonly name: "InvalidInitialization";
|
|
2904
2959
|
readonly inputs: readonly [];
|
|
2905
2960
|
}, {
|
|
2906
2961
|
readonly type: "error";
|
|
@@ -2926,6 +2981,10 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2926
2981
|
readonly type: "error";
|
|
2927
2982
|
readonly name: "NotAuthorizedRelayer";
|
|
2928
2983
|
readonly inputs: readonly [];
|
|
2984
|
+
}, {
|
|
2985
|
+
readonly type: "error";
|
|
2986
|
+
readonly name: "NotInitializing";
|
|
2987
|
+
readonly inputs: readonly [];
|
|
2929
2988
|
}, {
|
|
2930
2989
|
readonly type: "error";
|
|
2931
2990
|
readonly name: "OperatorBotLimitReached";
|
|
@@ -3002,14 +3061,6 @@ declare const AxonVaultAbi: readonly [{
|
|
|
3002
3061
|
readonly type: "error";
|
|
3003
3062
|
readonly name: "SelfPayment";
|
|
3004
3063
|
readonly inputs: readonly [];
|
|
3005
|
-
}, {
|
|
3006
|
-
readonly type: "error";
|
|
3007
|
-
readonly name: "StringTooLong";
|
|
3008
|
-
readonly inputs: readonly [{
|
|
3009
|
-
readonly name: "str";
|
|
3010
|
-
readonly type: "string";
|
|
3011
|
-
readonly internalType: "string";
|
|
3012
|
-
}];
|
|
3013
3064
|
}, {
|
|
3014
3065
|
readonly type: "error";
|
|
3015
3066
|
readonly name: "SwapFailed";
|
|
@@ -3088,6 +3139,16 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3088
3139
|
readonly internalType: "address";
|
|
3089
3140
|
}];
|
|
3090
3141
|
readonly stateMutability: "nonpayable";
|
|
3142
|
+
}, {
|
|
3143
|
+
readonly type: "function";
|
|
3144
|
+
readonly name: "implementation";
|
|
3145
|
+
readonly inputs: readonly [];
|
|
3146
|
+
readonly outputs: readonly [{
|
|
3147
|
+
readonly name: "";
|
|
3148
|
+
readonly type: "address";
|
|
3149
|
+
readonly internalType: "address";
|
|
3150
|
+
}];
|
|
3151
|
+
readonly stateMutability: "view";
|
|
3091
3152
|
}, {
|
|
3092
3153
|
readonly type: "function";
|
|
3093
3154
|
readonly name: "owner";
|
|
@@ -3140,6 +3201,24 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3140
3201
|
readonly internalType: "address";
|
|
3141
3202
|
}];
|
|
3142
3203
|
readonly stateMutability: "view";
|
|
3204
|
+
}, {
|
|
3205
|
+
readonly type: "function";
|
|
3206
|
+
readonly name: "predictVaultAddress";
|
|
3207
|
+
readonly inputs: readonly [{
|
|
3208
|
+
readonly name: "owner";
|
|
3209
|
+
readonly type: "address";
|
|
3210
|
+
readonly internalType: "address";
|
|
3211
|
+
}, {
|
|
3212
|
+
readonly name: "nonce";
|
|
3213
|
+
readonly type: "uint256";
|
|
3214
|
+
readonly internalType: "uint256";
|
|
3215
|
+
}];
|
|
3216
|
+
readonly outputs: readonly [{
|
|
3217
|
+
readonly name: "";
|
|
3218
|
+
readonly type: "address";
|
|
3219
|
+
readonly internalType: "address";
|
|
3220
|
+
}];
|
|
3221
|
+
readonly stateMutability: "view";
|
|
3143
3222
|
}, {
|
|
3144
3223
|
readonly type: "function";
|
|
3145
3224
|
readonly name: "renounceOwnership";
|
|
@@ -3221,6 +3300,22 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3221
3300
|
readonly internalType: "address";
|
|
3222
3301
|
}];
|
|
3223
3302
|
readonly anonymous: false;
|
|
3303
|
+
}, {
|
|
3304
|
+
readonly type: "error";
|
|
3305
|
+
readonly name: "FailedDeployment";
|
|
3306
|
+
readonly inputs: readonly [];
|
|
3307
|
+
}, {
|
|
3308
|
+
readonly type: "error";
|
|
3309
|
+
readonly name: "InsufficientBalance";
|
|
3310
|
+
readonly inputs: readonly [{
|
|
3311
|
+
readonly name: "balance";
|
|
3312
|
+
readonly type: "uint256";
|
|
3313
|
+
readonly internalType: "uint256";
|
|
3314
|
+
}, {
|
|
3315
|
+
readonly name: "needed";
|
|
3316
|
+
readonly type: "uint256";
|
|
3317
|
+
readonly internalType: "uint256";
|
|
3318
|
+
}];
|
|
3224
3319
|
}, {
|
|
3225
3320
|
readonly type: "error";
|
|
3226
3321
|
readonly name: "OwnableInvalidOwner";
|
|
@@ -3297,6 +3392,30 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3297
3392
|
}];
|
|
3298
3393
|
readonly outputs: readonly [];
|
|
3299
3394
|
readonly stateMutability: "nonpayable";
|
|
3395
|
+
}, {
|
|
3396
|
+
readonly type: "function";
|
|
3397
|
+
readonly name: "approveProtocol";
|
|
3398
|
+
readonly inputs: readonly [{
|
|
3399
|
+
readonly name: "protocol";
|
|
3400
|
+
readonly type: "address";
|
|
3401
|
+
readonly internalType: "address";
|
|
3402
|
+
}];
|
|
3403
|
+
readonly outputs: readonly [];
|
|
3404
|
+
readonly stateMutability: "nonpayable";
|
|
3405
|
+
}, {
|
|
3406
|
+
readonly type: "function";
|
|
3407
|
+
readonly name: "isApprovedProtocol";
|
|
3408
|
+
readonly inputs: readonly [{
|
|
3409
|
+
readonly name: "protocol";
|
|
3410
|
+
readonly type: "address";
|
|
3411
|
+
readonly internalType: "address";
|
|
3412
|
+
}];
|
|
3413
|
+
readonly outputs: readonly [{
|
|
3414
|
+
readonly name: "";
|
|
3415
|
+
readonly type: "bool";
|
|
3416
|
+
readonly internalType: "bool";
|
|
3417
|
+
}];
|
|
3418
|
+
readonly stateMutability: "view";
|
|
3300
3419
|
}, {
|
|
3301
3420
|
readonly type: "function";
|
|
3302
3421
|
readonly name: "isApprovedSwapRouter";
|
|
@@ -3395,6 +3514,16 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3395
3514
|
}];
|
|
3396
3515
|
readonly outputs: readonly [];
|
|
3397
3516
|
readonly stateMutability: "nonpayable";
|
|
3517
|
+
}, {
|
|
3518
|
+
readonly type: "function";
|
|
3519
|
+
readonly name: "revokeProtocol";
|
|
3520
|
+
readonly inputs: readonly [{
|
|
3521
|
+
readonly name: "protocol";
|
|
3522
|
+
readonly type: "address";
|
|
3523
|
+
readonly internalType: "address";
|
|
3524
|
+
}];
|
|
3525
|
+
readonly outputs: readonly [];
|
|
3526
|
+
readonly stateMutability: "nonpayable";
|
|
3398
3527
|
}, {
|
|
3399
3528
|
readonly type: "function";
|
|
3400
3529
|
readonly name: "setOracleConfig";
|
|
@@ -3523,6 +3652,26 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3523
3652
|
readonly internalType: "address";
|
|
3524
3653
|
}];
|
|
3525
3654
|
readonly anonymous: false;
|
|
3655
|
+
}, {
|
|
3656
|
+
readonly type: "event";
|
|
3657
|
+
readonly name: "ProtocolApproved";
|
|
3658
|
+
readonly inputs: readonly [{
|
|
3659
|
+
readonly name: "protocol";
|
|
3660
|
+
readonly type: "address";
|
|
3661
|
+
readonly indexed: true;
|
|
3662
|
+
readonly internalType: "address";
|
|
3663
|
+
}];
|
|
3664
|
+
readonly anonymous: false;
|
|
3665
|
+
}, {
|
|
3666
|
+
readonly type: "event";
|
|
3667
|
+
readonly name: "ProtocolRevoked";
|
|
3668
|
+
readonly inputs: readonly [{
|
|
3669
|
+
readonly name: "protocol";
|
|
3670
|
+
readonly type: "address";
|
|
3671
|
+
readonly indexed: true;
|
|
3672
|
+
readonly internalType: "address";
|
|
3673
|
+
}];
|
|
3674
|
+
readonly anonymous: false;
|
|
3526
3675
|
}, {
|
|
3527
3676
|
readonly type: "event";
|
|
3528
3677
|
readonly name: "RelayerAdded";
|
|
@@ -3601,4 +3750,4 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3601
3750
|
readonly inputs: readonly [];
|
|
3602
3751
|
}];
|
|
3603
3752
|
|
|
3604
|
-
export { type AmountInput, AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigInput, type BotConfigParams, CHAIN_NAMES, Chain, DEFAULT_APPROVED_TOKENS, 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 SpendingLimitInput, 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, addBot, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, deposit, encodeRef, encryptKeystore, extractX402Metadata, findMatchingOption, formatPaymentSignature, getBotConfig, getChain, getDefaultApprovedTokens, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, parseChainId, parsePaymentRequired, randomNonce, randomPermit2Nonce, removeBot, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signPermit2WitnessTransfer, signSwapIntent, signTransferWithAuthorization, toBotConfigParams, updateBotConfig };
|
|
3753
|
+
export { type AmountInput, AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigInput, type BotConfigParams, CHAIN_NAMES, Chain, DEFAULT_APPROVED_TOKENS, 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 SpendingLimitInput, 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, addBot, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, deposit, encodeRef, encryptKeystore, extractX402Metadata, findMatchingOption, formatPaymentSignature, getBotConfig, getChain, getDefaultApprovedTokens, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, parseChainId, parsePaymentRequired, predictVaultAddress, randomNonce, randomPermit2Nonce, removeBot, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signPermit2WitnessTransfer, signSwapIntent, signTransferWithAuthorization, toBotConfigParams, updateBotConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -502,7 +502,7 @@ interface PayInput {
|
|
|
502
502
|
* executeProtocol() on-chain. The contract approves `token` to `protocol`,
|
|
503
503
|
* calls it with `callData`, then revokes the approval.
|
|
504
504
|
*
|
|
505
|
-
* TypeHash: keccak256("ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 deadline,bytes32 ref)")
|
|
505
|
+
* TypeHash: keccak256("ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 value,uint256 deadline,bytes32 ref)")
|
|
506
506
|
*/
|
|
507
507
|
interface ExecuteIntent {
|
|
508
508
|
/** Bot's own address. Must be registered in the vault. */
|
|
@@ -515,6 +515,8 @@ interface ExecuteIntent {
|
|
|
515
515
|
token: Address;
|
|
516
516
|
/** Amount to approve (in token base units). */
|
|
517
517
|
amount: bigint;
|
|
518
|
+
/** Native ETH to send with the protocol call (e.g. WETH.deposit, Lido.submit). 0 = no ETH. */
|
|
519
|
+
value: bigint;
|
|
518
520
|
/** Unix timestamp after which this intent is invalid. */
|
|
519
521
|
deadline: bigint;
|
|
520
522
|
/** keccak256 of the off-chain memo. Full memo text stored by relayer. */
|
|
@@ -553,6 +555,8 @@ interface ExecuteInput {
|
|
|
553
555
|
token: TokenInput;
|
|
554
556
|
/** Amount to approve: bigint (raw base units), number (human-readable), or string (human-readable). */
|
|
555
557
|
amount: AmountInput;
|
|
558
|
+
/** Native ETH to send with the call (wei). Optional, defaults to 0. Used for payable functions like WETH.deposit() or Lido.submit(). */
|
|
559
|
+
value?: bigint;
|
|
556
560
|
/** Human-readable description. Gets keccak256-hashed to ref. */
|
|
557
561
|
memo?: string;
|
|
558
562
|
/**
|
|
@@ -1028,6 +1032,19 @@ declare function isRebalanceTokenWhitelisted(publicClient: PublicClient, vaultAd
|
|
|
1028
1032
|
* @returns Address of the newly deployed vault.
|
|
1029
1033
|
*/
|
|
1030
1034
|
declare function deployVault(walletClient: WalletClient, publicClient: PublicClient, relayerUrl?: string): Promise<Address>;
|
|
1035
|
+
/**
|
|
1036
|
+
* Predict the deterministic address of a vault before deployment.
|
|
1037
|
+
*
|
|
1038
|
+
* Vault addresses are deterministic via CREATE2: same owner + same nonce = same
|
|
1039
|
+
* address across all chains (given the factory is at the same address).
|
|
1040
|
+
*
|
|
1041
|
+
* @param publicClient Public client for the target chain.
|
|
1042
|
+
* @param owner Address that will own the vault.
|
|
1043
|
+
* @param nonce Vault index for this owner (0 for first, 1 for second, etc.).
|
|
1044
|
+
* @param relayerUrl Override relayer URL (defaults to https://relay.axonfi.xyz).
|
|
1045
|
+
* @returns The deterministic vault address.
|
|
1046
|
+
*/
|
|
1047
|
+
declare function predictVaultAddress(publicClient: PublicClient, owner: Address, nonce: number, relayerUrl?: string): Promise<Address>;
|
|
1031
1048
|
/**
|
|
1032
1049
|
* Register a bot on the vault with its initial spending configuration.
|
|
1033
1050
|
*
|
|
@@ -1272,15 +1289,7 @@ declare function signPermit2WitnessTransfer(privateKey: Hex, chainId: number, pe
|
|
|
1272
1289
|
|
|
1273
1290
|
declare const AxonVaultAbi: readonly [{
|
|
1274
1291
|
readonly type: "constructor";
|
|
1275
|
-
readonly inputs: readonly [
|
|
1276
|
-
readonly name: "_owner";
|
|
1277
|
-
readonly type: "address";
|
|
1278
|
-
readonly internalType: "address";
|
|
1279
|
-
}, {
|
|
1280
|
-
readonly name: "_axonRegistry";
|
|
1281
|
-
readonly type: "address";
|
|
1282
|
-
readonly internalType: "address";
|
|
1283
|
-
}];
|
|
1292
|
+
readonly inputs: readonly [];
|
|
1284
1293
|
readonly stateMutability: "nonpayable";
|
|
1285
1294
|
}, {
|
|
1286
1295
|
readonly type: "receive";
|
|
@@ -1647,6 +1656,10 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1647
1656
|
readonly name: "amount";
|
|
1648
1657
|
readonly type: "uint256";
|
|
1649
1658
|
readonly internalType: "uint256";
|
|
1659
|
+
}, {
|
|
1660
|
+
readonly name: "value";
|
|
1661
|
+
readonly type: "uint256";
|
|
1662
|
+
readonly internalType: "uint256";
|
|
1650
1663
|
}, {
|
|
1651
1664
|
readonly name: "deadline";
|
|
1652
1665
|
readonly type: "uint256";
|
|
@@ -1842,6 +1855,20 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1842
1855
|
readonly internalType: "bool";
|
|
1843
1856
|
}];
|
|
1844
1857
|
readonly stateMutability: "view";
|
|
1858
|
+
}, {
|
|
1859
|
+
readonly type: "function";
|
|
1860
|
+
readonly name: "initialize";
|
|
1861
|
+
readonly inputs: readonly [{
|
|
1862
|
+
readonly name: "_owner";
|
|
1863
|
+
readonly type: "address";
|
|
1864
|
+
readonly internalType: "address";
|
|
1865
|
+
}, {
|
|
1866
|
+
readonly name: "_axonRegistry";
|
|
1867
|
+
readonly type: "address";
|
|
1868
|
+
readonly internalType: "address";
|
|
1869
|
+
}];
|
|
1870
|
+
readonly outputs: readonly [];
|
|
1871
|
+
readonly stateMutability: "nonpayable";
|
|
1845
1872
|
}, {
|
|
1846
1873
|
readonly type: "function";
|
|
1847
1874
|
readonly name: "isBotActive";
|
|
@@ -1870,6 +1897,24 @@ declare const AxonVaultAbi: readonly [{
|
|
|
1870
1897
|
readonly internalType: "bool";
|
|
1871
1898
|
}];
|
|
1872
1899
|
readonly stateMutability: "view";
|
|
1900
|
+
}, {
|
|
1901
|
+
readonly type: "function";
|
|
1902
|
+
readonly name: "isValidSignature";
|
|
1903
|
+
readonly inputs: readonly [{
|
|
1904
|
+
readonly name: "hash";
|
|
1905
|
+
readonly type: "bytes32";
|
|
1906
|
+
readonly internalType: "bytes32";
|
|
1907
|
+
}, {
|
|
1908
|
+
readonly name: "signature";
|
|
1909
|
+
readonly type: "bytes";
|
|
1910
|
+
readonly internalType: "bytes";
|
|
1911
|
+
}];
|
|
1912
|
+
readonly outputs: readonly [{
|
|
1913
|
+
readonly name: "";
|
|
1914
|
+
readonly type: "bytes4";
|
|
1915
|
+
readonly internalType: "bytes4";
|
|
1916
|
+
}];
|
|
1917
|
+
readonly stateMutability: "view";
|
|
1873
1918
|
}, {
|
|
1874
1919
|
readonly type: "function";
|
|
1875
1920
|
readonly name: "onERC1155BatchReceived";
|
|
@@ -2523,6 +2568,16 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2523
2568
|
readonly internalType: "address";
|
|
2524
2569
|
}];
|
|
2525
2570
|
readonly anonymous: false;
|
|
2571
|
+
}, {
|
|
2572
|
+
readonly type: "event";
|
|
2573
|
+
readonly name: "Initialized";
|
|
2574
|
+
readonly inputs: readonly [{
|
|
2575
|
+
readonly name: "version";
|
|
2576
|
+
readonly type: "uint64";
|
|
2577
|
+
readonly indexed: false;
|
|
2578
|
+
readonly internalType: "uint64";
|
|
2579
|
+
}];
|
|
2580
|
+
readonly anonymous: false;
|
|
2526
2581
|
}, {
|
|
2527
2582
|
readonly type: "event";
|
|
2528
2583
|
readonly name: "OperatorCeilingsUpdated";
|
|
@@ -2900,7 +2955,7 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2900
2955
|
readonly inputs: readonly [];
|
|
2901
2956
|
}, {
|
|
2902
2957
|
readonly type: "error";
|
|
2903
|
-
readonly name: "
|
|
2958
|
+
readonly name: "InvalidInitialization";
|
|
2904
2959
|
readonly inputs: readonly [];
|
|
2905
2960
|
}, {
|
|
2906
2961
|
readonly type: "error";
|
|
@@ -2926,6 +2981,10 @@ declare const AxonVaultAbi: readonly [{
|
|
|
2926
2981
|
readonly type: "error";
|
|
2927
2982
|
readonly name: "NotAuthorizedRelayer";
|
|
2928
2983
|
readonly inputs: readonly [];
|
|
2984
|
+
}, {
|
|
2985
|
+
readonly type: "error";
|
|
2986
|
+
readonly name: "NotInitializing";
|
|
2987
|
+
readonly inputs: readonly [];
|
|
2929
2988
|
}, {
|
|
2930
2989
|
readonly type: "error";
|
|
2931
2990
|
readonly name: "OperatorBotLimitReached";
|
|
@@ -3002,14 +3061,6 @@ declare const AxonVaultAbi: readonly [{
|
|
|
3002
3061
|
readonly type: "error";
|
|
3003
3062
|
readonly name: "SelfPayment";
|
|
3004
3063
|
readonly inputs: readonly [];
|
|
3005
|
-
}, {
|
|
3006
|
-
readonly type: "error";
|
|
3007
|
-
readonly name: "StringTooLong";
|
|
3008
|
-
readonly inputs: readonly [{
|
|
3009
|
-
readonly name: "str";
|
|
3010
|
-
readonly type: "string";
|
|
3011
|
-
readonly internalType: "string";
|
|
3012
|
-
}];
|
|
3013
3064
|
}, {
|
|
3014
3065
|
readonly type: "error";
|
|
3015
3066
|
readonly name: "SwapFailed";
|
|
@@ -3088,6 +3139,16 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3088
3139
|
readonly internalType: "address";
|
|
3089
3140
|
}];
|
|
3090
3141
|
readonly stateMutability: "nonpayable";
|
|
3142
|
+
}, {
|
|
3143
|
+
readonly type: "function";
|
|
3144
|
+
readonly name: "implementation";
|
|
3145
|
+
readonly inputs: readonly [];
|
|
3146
|
+
readonly outputs: readonly [{
|
|
3147
|
+
readonly name: "";
|
|
3148
|
+
readonly type: "address";
|
|
3149
|
+
readonly internalType: "address";
|
|
3150
|
+
}];
|
|
3151
|
+
readonly stateMutability: "view";
|
|
3091
3152
|
}, {
|
|
3092
3153
|
readonly type: "function";
|
|
3093
3154
|
readonly name: "owner";
|
|
@@ -3140,6 +3201,24 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3140
3201
|
readonly internalType: "address";
|
|
3141
3202
|
}];
|
|
3142
3203
|
readonly stateMutability: "view";
|
|
3204
|
+
}, {
|
|
3205
|
+
readonly type: "function";
|
|
3206
|
+
readonly name: "predictVaultAddress";
|
|
3207
|
+
readonly inputs: readonly [{
|
|
3208
|
+
readonly name: "owner";
|
|
3209
|
+
readonly type: "address";
|
|
3210
|
+
readonly internalType: "address";
|
|
3211
|
+
}, {
|
|
3212
|
+
readonly name: "nonce";
|
|
3213
|
+
readonly type: "uint256";
|
|
3214
|
+
readonly internalType: "uint256";
|
|
3215
|
+
}];
|
|
3216
|
+
readonly outputs: readonly [{
|
|
3217
|
+
readonly name: "";
|
|
3218
|
+
readonly type: "address";
|
|
3219
|
+
readonly internalType: "address";
|
|
3220
|
+
}];
|
|
3221
|
+
readonly stateMutability: "view";
|
|
3143
3222
|
}, {
|
|
3144
3223
|
readonly type: "function";
|
|
3145
3224
|
readonly name: "renounceOwnership";
|
|
@@ -3221,6 +3300,22 @@ declare const AxonVaultFactoryAbi: readonly [{
|
|
|
3221
3300
|
readonly internalType: "address";
|
|
3222
3301
|
}];
|
|
3223
3302
|
readonly anonymous: false;
|
|
3303
|
+
}, {
|
|
3304
|
+
readonly type: "error";
|
|
3305
|
+
readonly name: "FailedDeployment";
|
|
3306
|
+
readonly inputs: readonly [];
|
|
3307
|
+
}, {
|
|
3308
|
+
readonly type: "error";
|
|
3309
|
+
readonly name: "InsufficientBalance";
|
|
3310
|
+
readonly inputs: readonly [{
|
|
3311
|
+
readonly name: "balance";
|
|
3312
|
+
readonly type: "uint256";
|
|
3313
|
+
readonly internalType: "uint256";
|
|
3314
|
+
}, {
|
|
3315
|
+
readonly name: "needed";
|
|
3316
|
+
readonly type: "uint256";
|
|
3317
|
+
readonly internalType: "uint256";
|
|
3318
|
+
}];
|
|
3224
3319
|
}, {
|
|
3225
3320
|
readonly type: "error";
|
|
3226
3321
|
readonly name: "OwnableInvalidOwner";
|
|
@@ -3297,6 +3392,30 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3297
3392
|
}];
|
|
3298
3393
|
readonly outputs: readonly [];
|
|
3299
3394
|
readonly stateMutability: "nonpayable";
|
|
3395
|
+
}, {
|
|
3396
|
+
readonly type: "function";
|
|
3397
|
+
readonly name: "approveProtocol";
|
|
3398
|
+
readonly inputs: readonly [{
|
|
3399
|
+
readonly name: "protocol";
|
|
3400
|
+
readonly type: "address";
|
|
3401
|
+
readonly internalType: "address";
|
|
3402
|
+
}];
|
|
3403
|
+
readonly outputs: readonly [];
|
|
3404
|
+
readonly stateMutability: "nonpayable";
|
|
3405
|
+
}, {
|
|
3406
|
+
readonly type: "function";
|
|
3407
|
+
readonly name: "isApprovedProtocol";
|
|
3408
|
+
readonly inputs: readonly [{
|
|
3409
|
+
readonly name: "protocol";
|
|
3410
|
+
readonly type: "address";
|
|
3411
|
+
readonly internalType: "address";
|
|
3412
|
+
}];
|
|
3413
|
+
readonly outputs: readonly [{
|
|
3414
|
+
readonly name: "";
|
|
3415
|
+
readonly type: "bool";
|
|
3416
|
+
readonly internalType: "bool";
|
|
3417
|
+
}];
|
|
3418
|
+
readonly stateMutability: "view";
|
|
3300
3419
|
}, {
|
|
3301
3420
|
readonly type: "function";
|
|
3302
3421
|
readonly name: "isApprovedSwapRouter";
|
|
@@ -3395,6 +3514,16 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3395
3514
|
}];
|
|
3396
3515
|
readonly outputs: readonly [];
|
|
3397
3516
|
readonly stateMutability: "nonpayable";
|
|
3517
|
+
}, {
|
|
3518
|
+
readonly type: "function";
|
|
3519
|
+
readonly name: "revokeProtocol";
|
|
3520
|
+
readonly inputs: readonly [{
|
|
3521
|
+
readonly name: "protocol";
|
|
3522
|
+
readonly type: "address";
|
|
3523
|
+
readonly internalType: "address";
|
|
3524
|
+
}];
|
|
3525
|
+
readonly outputs: readonly [];
|
|
3526
|
+
readonly stateMutability: "nonpayable";
|
|
3398
3527
|
}, {
|
|
3399
3528
|
readonly type: "function";
|
|
3400
3529
|
readonly name: "setOracleConfig";
|
|
@@ -3523,6 +3652,26 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3523
3652
|
readonly internalType: "address";
|
|
3524
3653
|
}];
|
|
3525
3654
|
readonly anonymous: false;
|
|
3655
|
+
}, {
|
|
3656
|
+
readonly type: "event";
|
|
3657
|
+
readonly name: "ProtocolApproved";
|
|
3658
|
+
readonly inputs: readonly [{
|
|
3659
|
+
readonly name: "protocol";
|
|
3660
|
+
readonly type: "address";
|
|
3661
|
+
readonly indexed: true;
|
|
3662
|
+
readonly internalType: "address";
|
|
3663
|
+
}];
|
|
3664
|
+
readonly anonymous: false;
|
|
3665
|
+
}, {
|
|
3666
|
+
readonly type: "event";
|
|
3667
|
+
readonly name: "ProtocolRevoked";
|
|
3668
|
+
readonly inputs: readonly [{
|
|
3669
|
+
readonly name: "protocol";
|
|
3670
|
+
readonly type: "address";
|
|
3671
|
+
readonly indexed: true;
|
|
3672
|
+
readonly internalType: "address";
|
|
3673
|
+
}];
|
|
3674
|
+
readonly anonymous: false;
|
|
3526
3675
|
}, {
|
|
3527
3676
|
readonly type: "event";
|
|
3528
3677
|
readonly name: "RelayerAdded";
|
|
@@ -3601,4 +3750,4 @@ declare const AxonRegistryAbi: readonly [{
|
|
|
3601
3750
|
readonly inputs: readonly [];
|
|
3602
3751
|
}];
|
|
3603
3752
|
|
|
3604
|
-
export { type AmountInput, AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigInput, type BotConfigParams, CHAIN_NAMES, Chain, DEFAULT_APPROVED_TOKENS, 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 SpendingLimitInput, 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, addBot, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, deposit, encodeRef, encryptKeystore, extractX402Metadata, findMatchingOption, formatPaymentSignature, getBotConfig, getChain, getDefaultApprovedTokens, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, parseChainId, parsePaymentRequired, randomNonce, randomPermit2Nonce, removeBot, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signPermit2WitnessTransfer, signSwapIntent, signTransferWithAuthorization, toBotConfigParams, updateBotConfig };
|
|
3753
|
+
export { type AmountInput, AxonClient, type AxonClientConfig, AxonRegistryAbi, AxonVaultAbi, AxonVaultFactoryAbi, type BotConfig, type BotConfigInput, type BotConfigParams, CHAIN_NAMES, Chain, DEFAULT_APPROVED_TOKENS, 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 SpendingLimitInput, 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, addBot, createAxonPublicClient, createAxonWalletClient, decryptKeystore, deployVault, deposit, encodeRef, encryptKeystore, extractX402Metadata, findMatchingOption, formatPaymentSignature, getBotConfig, getChain, getDefaultApprovedTokens, getDomainSeparator, getKnownTokensForChain, getOperatorCeilings, getRebalanceTokenCount, getTokenSymbolByAddress, getVaultOperator, getVaultOwner, getVaultVersion, isBotActive, isDestinationAllowed, isRebalanceTokenWhitelisted, isVaultPaused, operatorMaxDrainPerDay, parseAmount, parseChainId, parsePaymentRequired, predictVaultAddress, randomNonce, randomPermit2Nonce, removeBot, resolveToken, resolveTokenDecimals, signExecuteIntent, signPayment, signPermit2WitnessTransfer, signSwapIntent, signTransferWithAuthorization, toBotConfigParams, updateBotConfig };
|