@axonfi/sdk 0.7.0 → 0.8.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 +61 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -31
- package/dist/index.d.ts +51 -31
- package/dist/index.js +61 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ var PAYMENT_INTENT_TYPEHASH = viem.keccak256(
|
|
|
18
18
|
);
|
|
19
19
|
var EXECUTE_INTENT_TYPEHASH = viem.keccak256(
|
|
20
20
|
viem.stringToBytes(
|
|
21
|
-
"ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 value,uint256 deadline,bytes32 ref)"
|
|
21
|
+
"ExecuteIntent(address bot,address protocol,bytes32 calldataHash,address token,uint256 amount,uint256 value,address[] extraTokens,uint256[] extraAmounts,uint256 deadline,bytes32 ref)"
|
|
22
22
|
)
|
|
23
23
|
);
|
|
24
24
|
var SWAP_INTENT_TYPEHASH = viem.keccak256(
|
|
@@ -156,6 +156,8 @@ var EXECUTE_INTENT_TYPES = {
|
|
|
156
156
|
{ name: "token", type: "address" },
|
|
157
157
|
{ name: "amount", type: "uint256" },
|
|
158
158
|
{ name: "value", type: "uint256" },
|
|
159
|
+
{ name: "extraTokens", type: "address[]" },
|
|
160
|
+
{ name: "extraAmounts", type: "uint256[]" },
|
|
159
161
|
{ name: "deadline", type: "uint256" },
|
|
160
162
|
{ name: "ref", type: "bytes32" }
|
|
161
163
|
]
|
|
@@ -212,6 +214,8 @@ async function signExecuteIntent(walletClient, vaultAddress, chainId, intent) {
|
|
|
212
214
|
token: intent.token,
|
|
213
215
|
amount: intent.amount,
|
|
214
216
|
value: intent.value,
|
|
217
|
+
extraTokens: intent.extraTokens,
|
|
218
|
+
extraAmounts: intent.extraAmounts,
|
|
215
219
|
deadline: intent.deadline,
|
|
216
220
|
ref: intent.ref
|
|
217
221
|
}
|
|
@@ -614,6 +618,19 @@ var AxonVaultAbi = [
|
|
|
614
618
|
],
|
|
615
619
|
"stateMutability": "view"
|
|
616
620
|
},
|
|
621
|
+
{
|
|
622
|
+
"type": "function",
|
|
623
|
+
"name": "erc1271BotsEnabled",
|
|
624
|
+
"inputs": [],
|
|
625
|
+
"outputs": [
|
|
626
|
+
{
|
|
627
|
+
"name": "",
|
|
628
|
+
"type": "bool",
|
|
629
|
+
"internalType": "bool"
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"stateMutability": "view"
|
|
633
|
+
},
|
|
617
634
|
{
|
|
618
635
|
"type": "function",
|
|
619
636
|
"name": "executePayment",
|
|
@@ -723,6 +740,16 @@ var AxonVaultAbi = [
|
|
|
723
740
|
"type": "uint256",
|
|
724
741
|
"internalType": "uint256"
|
|
725
742
|
},
|
|
743
|
+
{
|
|
744
|
+
"name": "extraTokens",
|
|
745
|
+
"type": "address[]",
|
|
746
|
+
"internalType": "address[]"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "extraAmounts",
|
|
750
|
+
"type": "uint256[]",
|
|
751
|
+
"internalType": "uint256[]"
|
|
752
|
+
},
|
|
726
753
|
{
|
|
727
754
|
"name": "deadline",
|
|
728
755
|
"type": "uint256",
|
|
@@ -1057,32 +1084,6 @@ var AxonVaultAbi = [
|
|
|
1057
1084
|
],
|
|
1058
1085
|
"stateMutability": "view"
|
|
1059
1086
|
},
|
|
1060
|
-
{
|
|
1061
|
-
"type": "function",
|
|
1062
|
-
"name": "erc1271BotsEnabled",
|
|
1063
|
-
"inputs": [],
|
|
1064
|
-
"outputs": [
|
|
1065
|
-
{
|
|
1066
|
-
"name": "",
|
|
1067
|
-
"type": "bool",
|
|
1068
|
-
"internalType": "bool"
|
|
1069
|
-
}
|
|
1070
|
-
],
|
|
1071
|
-
"stateMutability": "view"
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"type": "function",
|
|
1075
|
-
"name": "setErc1271Bots",
|
|
1076
|
-
"inputs": [
|
|
1077
|
-
{
|
|
1078
|
-
"name": "enabled",
|
|
1079
|
-
"type": "bool",
|
|
1080
|
-
"internalType": "bool"
|
|
1081
|
-
}
|
|
1082
|
-
],
|
|
1083
|
-
"outputs": [],
|
|
1084
|
-
"stateMutability": "nonpayable"
|
|
1085
|
-
},
|
|
1086
1087
|
{
|
|
1087
1088
|
"type": "function",
|
|
1088
1089
|
"name": "onERC1155BatchReceived",
|
|
@@ -1435,6 +1436,19 @@ var AxonVaultAbi = [
|
|
|
1435
1436
|
"outputs": [],
|
|
1436
1437
|
"stateMutability": "nonpayable"
|
|
1437
1438
|
},
|
|
1439
|
+
{
|
|
1440
|
+
"type": "function",
|
|
1441
|
+
"name": "setErc1271Bots",
|
|
1442
|
+
"inputs": [
|
|
1443
|
+
{
|
|
1444
|
+
"name": "enabled",
|
|
1445
|
+
"type": "bool",
|
|
1446
|
+
"internalType": "bool"
|
|
1447
|
+
}
|
|
1448
|
+
],
|
|
1449
|
+
"outputs": [],
|
|
1450
|
+
"stateMutability": "nonpayable"
|
|
1451
|
+
},
|
|
1438
1452
|
{
|
|
1439
1453
|
"type": "function",
|
|
1440
1454
|
"name": "setOperator",
|
|
@@ -1682,19 +1696,6 @@ var AxonVaultAbi = [
|
|
|
1682
1696
|
"outputs": [],
|
|
1683
1697
|
"stateMutability": "nonpayable"
|
|
1684
1698
|
},
|
|
1685
|
-
{
|
|
1686
|
-
"type": "event",
|
|
1687
|
-
"name": "ERC1271BotsToggled",
|
|
1688
|
-
"inputs": [
|
|
1689
|
-
{
|
|
1690
|
-
"name": "enabled",
|
|
1691
|
-
"type": "bool",
|
|
1692
|
-
"indexed": false,
|
|
1693
|
-
"internalType": "bool"
|
|
1694
|
-
}
|
|
1695
|
-
],
|
|
1696
|
-
"anonymous": false
|
|
1697
|
-
},
|
|
1698
1699
|
{
|
|
1699
1700
|
"type": "event",
|
|
1700
1701
|
"name": "BotAdded",
|
|
@@ -1858,6 +1859,19 @@ var AxonVaultAbi = [
|
|
|
1858
1859
|
],
|
|
1859
1860
|
"anonymous": false
|
|
1860
1861
|
},
|
|
1862
|
+
{
|
|
1863
|
+
"type": "event",
|
|
1864
|
+
"name": "ERC1271BotsToggled",
|
|
1865
|
+
"inputs": [
|
|
1866
|
+
{
|
|
1867
|
+
"name": "enabled",
|
|
1868
|
+
"type": "bool",
|
|
1869
|
+
"indexed": false,
|
|
1870
|
+
"internalType": "bool"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
"anonymous": false
|
|
1874
|
+
},
|
|
1861
1875
|
{
|
|
1862
1876
|
"type": "event",
|
|
1863
1877
|
"name": "ERC721Withdrawn",
|
|
@@ -2330,6 +2344,11 @@ var AxonVaultAbi = [
|
|
|
2330
2344
|
"name": "AmountMismatch",
|
|
2331
2345
|
"inputs": []
|
|
2332
2346
|
},
|
|
2347
|
+
{
|
|
2348
|
+
"type": "error",
|
|
2349
|
+
"name": "ArrayLengthMismatch",
|
|
2350
|
+
"inputs": []
|
|
2351
|
+
},
|
|
2333
2352
|
{
|
|
2334
2353
|
"type": "error",
|
|
2335
2354
|
"name": "BotAlreadyExists",
|
|
@@ -4212,6 +4231,8 @@ Timestamp: ${timestamp}`;
|
|
|
4212
4231
|
token: resolveToken(input.token, this.chainId),
|
|
4213
4232
|
amount: parseAmount(input.amount, input.token, this.chainId),
|
|
4214
4233
|
value: input.value ?? 0n,
|
|
4234
|
+
extraTokens: input.extraTokens ?? [],
|
|
4235
|
+
extraAmounts: input.extraAmounts ?? [],
|
|
4215
4236
|
deadline: input.deadline ?? this._defaultDeadline(),
|
|
4216
4237
|
ref: this._resolveRef(input.memo, input.ref)
|
|
4217
4238
|
};
|