viem 2.51.3 → 2.52.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/CHANGELOG.md +12 -0
- package/_cjs/errors/version.js +1 -1
- package/_cjs/tempo/Abis.js +189 -1
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Account.js +27 -20
- package/_cjs/tempo/Account.js.map +1 -1
- package/_cjs/tempo/Addresses.js +3 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js +23 -0
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/Hardfork.js +3 -0
- package/_cjs/tempo/Hardfork.js.map +1 -1
- package/_cjs/tempo/actions/accessKey.js +238 -72
- package/_cjs/tempo/actions/accessKey.js.map +1 -1
- package/_cjs/tempo/actions/index.js +2 -1
- package/_cjs/tempo/actions/index.js.map +1 -1
- package/_cjs/tempo/actions/receivePolicy.js +363 -0
- package/_cjs/tempo/actions/receivePolicy.js.map +1 -0
- package/_cjs/tempo/index.js +2 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/tempo/Abis.js +188 -0
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Account.js +35 -20
- package/_esm/tempo/Account.js.map +1 -1
- package/_esm/tempo/Addresses.js +2 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js +23 -0
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/Hardfork.js +3 -0
- package/_esm/tempo/Hardfork.js.map +1 -1
- package/_esm/tempo/actions/accessKey.js +562 -128
- package/_esm/tempo/actions/accessKey.js.map +1 -1
- package/_esm/tempo/actions/index.js +1 -0
- package/_esm/tempo/actions/index.js.map +1 -1
- package/_esm/tempo/actions/receivePolicy.js +753 -0
- package/_esm/tempo/actions/receivePolicy.js.map +1 -0
- package/_esm/tempo/index.js +1 -1
- package/_esm/tempo/index.js.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/tempo/Abis.d.ts +671 -4
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Account.d.ts +13 -2
- package/_types/tempo/Account.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +2 -0
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +501 -0
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/Hardfork.d.ts +1 -1
- package/_types/tempo/Hardfork.d.ts.map +1 -1
- package/_types/tempo/actions/accessKey.d.ts +1520 -304
- package/_types/tempo/actions/accessKey.d.ts.map +1 -1
- package/_types/tempo/actions/dex.d.ts +75 -0
- package/_types/tempo/actions/dex.d.ts.map +1 -1
- package/_types/tempo/actions/index.d.ts +1 -0
- package/_types/tempo/actions/index.d.ts.map +1 -1
- package/_types/tempo/actions/policy.d.ts +352 -0
- package/_types/tempo/actions/policy.d.ts.map +1 -1
- package/_types/tempo/actions/receivePolicy.d.ts +1511 -0
- package/_types/tempo/actions/receivePolicy.d.ts.map +1 -0
- package/_types/tempo/index.d.ts +1 -1
- package/_types/tempo/index.d.ts.map +1 -1
- package/errors/version.ts +1 -1
- package/package.json +2 -2
- package/tempo/Abis.ts +189 -0
- package/tempo/Account.ts +56 -27
- package/tempo/Addresses.ts +2 -0
- package/tempo/Decorator.ts +578 -0
- package/tempo/Hardfork.ts +3 -0
- package/tempo/actions/accessKey.ts +1002 -279
- package/tempo/actions/index.ts +1 -0
- package/tempo/actions/receivePolicy.ts +1266 -0
- package/tempo/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# viem
|
|
2
2
|
|
|
3
|
+
## 2.52.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#4689](https://github.com/wevm/viem/pull/4689) [`fb032ee43ace76bbe72170c1b3ed48880033b763`](https://github.com/wevm/viem/commit/fb032ee43ace76bbe72170c1b3ed48880033b763) Thanks [@jxom](https://github.com/jxom)! - **`viem/tempo`:** Added admin access key actions, and an `accessKey.verifyHash` action.
|
|
8
|
+
|
|
9
|
+
- [#4688](https://github.com/wevm/viem/pull/4688) [`19a26084eb448632883602b401516e17cc9f7e0d`](https://github.com/wevm/viem/commit/19a26084eb448632883602b401516e17cc9f7e0d) Thanks [@jxom](https://github.com/jxom)! - **`viem/tempo`:** Added access-key witness actions.
|
|
10
|
+
|
|
11
|
+
- [#4683](https://github.com/wevm/viem/pull/4683) [`42d54ef89a85aa9ef8658a89b67271331b5a31d4`](https://github.com/wevm/viem/commit/42d54ef89a85aa9ef8658a89b67271331b5a31d4) Thanks [@jxom](https://github.com/jxom)! - **`viem/tempo`:** Updated precompile ABIs and added the `receivePolicyGuard` and `signatureVerifier` precompile addresses to `Addresses`, plus the `t4`/`t5`/`t6` hardforks to `Hardfork`.
|
|
12
|
+
|
|
13
|
+
- [#4687](https://github.com/wevm/viem/pull/4687) [`0e826149964a6e76d8079b368ca6f034bde7f482`](https://github.com/wevm/viem/commit/0e826149964a6e76d8079b368ca6f034bde7f482) Thanks [@jxom](https://github.com/jxom)! - **`viem/tempo`:** Added `receivePolicy` actions.
|
|
14
|
+
|
|
3
15
|
## 2.51.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/_cjs/errors/version.js
CHANGED
package/_cjs/tempo/Abis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.abis = exports.validatorConfig = exports.tip403Registry = exports.tip20Factory = exports.nonce = exports.accountKeychain = exports.feeAmm = exports.feeManager = exports.addressRegistry = exports.stablecoinDex = exports.signatureVerifier = exports.validatorConfigV2 = exports.tip20 = exports.tip20ChannelReserve = void 0;
|
|
3
|
+
exports.abis = exports.validatorConfig = exports.tip403Registry = exports.tip20Factory = exports.nonce = exports.accountKeychain = exports.receivePolicyGuard = exports.feeAmm = exports.feeManager = exports.addressRegistry = exports.stablecoinDex = exports.signatureVerifier = exports.validatorConfigV2 = exports.tip20 = exports.tip20ChannelReserve = void 0;
|
|
4
4
|
exports.tip20ChannelReserve = [
|
|
5
5
|
{
|
|
6
6
|
name: 'CLOSE_GRACE_PERIOD',
|
|
@@ -1292,6 +1292,28 @@ exports.signatureVerifier = [
|
|
|
1292
1292
|
],
|
|
1293
1293
|
outputs: [{ type: 'bool' }],
|
|
1294
1294
|
},
|
|
1295
|
+
{
|
|
1296
|
+
name: 'verifyKeychain',
|
|
1297
|
+
type: 'function',
|
|
1298
|
+
stateMutability: 'view',
|
|
1299
|
+
inputs: [
|
|
1300
|
+
{ type: 'address', name: 'account' },
|
|
1301
|
+
{ type: 'bytes32', name: 'hash' },
|
|
1302
|
+
{ type: 'bytes', name: 'signature' },
|
|
1303
|
+
],
|
|
1304
|
+
outputs: [{ type: 'bool' }],
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
name: 'verifyKeychainAdmin',
|
|
1308
|
+
type: 'function',
|
|
1309
|
+
stateMutability: 'view',
|
|
1310
|
+
inputs: [
|
|
1311
|
+
{ type: 'address', name: 'account' },
|
|
1312
|
+
{ type: 'bytes32', name: 'hash' },
|
|
1313
|
+
{ type: 'bytes', name: 'signature' },
|
|
1314
|
+
],
|
|
1315
|
+
outputs: [{ type: 'bool' }],
|
|
1316
|
+
},
|
|
1295
1317
|
{ name: 'InvalidFormat', type: 'error', inputs: [] },
|
|
1296
1318
|
{ name: 'InvalidSignature', type: 'error', inputs: [] },
|
|
1297
1319
|
];
|
|
@@ -1591,6 +1613,15 @@ exports.stablecoinDex = [
|
|
|
1591
1613
|
{ type: 'int16', name: 'flipTick' },
|
|
1592
1614
|
],
|
|
1593
1615
|
},
|
|
1616
|
+
{
|
|
1617
|
+
name: 'FlipFailed',
|
|
1618
|
+
type: 'event',
|
|
1619
|
+
inputs: [
|
|
1620
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
1621
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
1622
|
+
{ type: 'bytes4', name: 'reason' },
|
|
1623
|
+
],
|
|
1624
|
+
},
|
|
1594
1625
|
{
|
|
1595
1626
|
name: 'OrderCancelled',
|
|
1596
1627
|
type: 'event',
|
|
@@ -1942,6 +1973,81 @@ exports.feeAmm = [
|
|
|
1942
1973
|
{ name: 'DivisionByZero', type: 'error', inputs: [] },
|
|
1943
1974
|
{ name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
|
|
1944
1975
|
];
|
|
1976
|
+
exports.receivePolicyGuard = [
|
|
1977
|
+
{
|
|
1978
|
+
name: 'balanceOf',
|
|
1979
|
+
type: 'function',
|
|
1980
|
+
stateMutability: 'view',
|
|
1981
|
+
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
1982
|
+
outputs: [{ type: 'uint256', name: 'amount' }],
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
name: 'claim',
|
|
1986
|
+
type: 'function',
|
|
1987
|
+
stateMutability: 'nonpayable',
|
|
1988
|
+
inputs: [
|
|
1989
|
+
{ type: 'address', name: 'to' },
|
|
1990
|
+
{ type: 'bytes', name: 'receipt' },
|
|
1991
|
+
],
|
|
1992
|
+
outputs: [],
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
name: 'burnBlockedReceipt',
|
|
1996
|
+
type: 'function',
|
|
1997
|
+
stateMutability: 'nonpayable',
|
|
1998
|
+
inputs: [{ type: 'bytes', name: 'receipt' }],
|
|
1999
|
+
outputs: [],
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
name: 'TransferBlocked',
|
|
2003
|
+
type: 'event',
|
|
2004
|
+
inputs: [
|
|
2005
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
2006
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
2007
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2008
|
+
{ type: 'uint256', name: 'amount' },
|
|
2009
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
2010
|
+
{ type: 'bytes', name: 'receipt' },
|
|
2011
|
+
],
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
name: 'ReceiptClaimed',
|
|
2015
|
+
type: 'event',
|
|
2016
|
+
inputs: [
|
|
2017
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
2018
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
2019
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2020
|
+
{ type: 'uint64', name: 'blockedAt' },
|
|
2021
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
2022
|
+
{ type: 'address', name: 'originator' },
|
|
2023
|
+
{ type: 'address', name: 'recipient' },
|
|
2024
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2025
|
+
{ type: 'address', name: 'caller' },
|
|
2026
|
+
{ type: 'address', name: 'to' },
|
|
2027
|
+
{ type: 'uint256', name: 'amount' },
|
|
2028
|
+
],
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
name: 'ReceiptBurned',
|
|
2032
|
+
type: 'event',
|
|
2033
|
+
inputs: [
|
|
2034
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
2035
|
+
{ type: 'address', name: 'receiver', indexed: true },
|
|
2036
|
+
{ type: 'uint64', name: 'blockedNonce', indexed: true },
|
|
2037
|
+
{ type: 'uint64', name: 'blockedAt' },
|
|
2038
|
+
{ type: 'uint8', name: 'receiptVersion' },
|
|
2039
|
+
{ type: 'address', name: 'originator' },
|
|
2040
|
+
{ type: 'address', name: 'recipient' },
|
|
2041
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2042
|
+
{ type: 'address', name: 'caller' },
|
|
2043
|
+
{ type: 'uint256', name: 'amount' },
|
|
2044
|
+
],
|
|
2045
|
+
},
|
|
2046
|
+
{ name: 'InvalidReceipt', type: 'error', inputs: [] },
|
|
2047
|
+
{ name: 'InvalidClaimAddress', type: 'error', inputs: [] },
|
|
2048
|
+
{ name: 'UnauthorizedClaimer', type: 'error', inputs: [] },
|
|
2049
|
+
{ name: 'AddressReserved', type: 'error', inputs: [] },
|
|
2050
|
+
];
|
|
1945
2051
|
exports.accountKeychain = [
|
|
1946
2052
|
{
|
|
1947
2053
|
name: 'authorizeKey',
|
|
@@ -2050,6 +2156,17 @@ exports.accountKeychain = [
|
|
|
2050
2156
|
],
|
|
2051
2157
|
outputs: [],
|
|
2052
2158
|
},
|
|
2159
|
+
{
|
|
2160
|
+
name: 'authorizeAdminKey',
|
|
2161
|
+
type: 'function',
|
|
2162
|
+
stateMutability: 'nonpayable',
|
|
2163
|
+
inputs: [
|
|
2164
|
+
{ type: 'address', name: 'keyId' },
|
|
2165
|
+
{ type: 'uint8', name: 'signatureType' },
|
|
2166
|
+
{ type: 'bytes32', name: 'witness' },
|
|
2167
|
+
],
|
|
2168
|
+
outputs: [],
|
|
2169
|
+
},
|
|
2053
2170
|
{
|
|
2054
2171
|
name: 'burnKeyAuthorizationWitness',
|
|
2055
2172
|
type: 'function',
|
|
@@ -2192,6 +2309,16 @@ exports.accountKeychain = [
|
|
|
2192
2309
|
],
|
|
2193
2310
|
outputs: [{ type: 'bool' }],
|
|
2194
2311
|
},
|
|
2312
|
+
{
|
|
2313
|
+
name: 'isAdminKey',
|
|
2314
|
+
type: 'function',
|
|
2315
|
+
stateMutability: 'view',
|
|
2316
|
+
inputs: [
|
|
2317
|
+
{ type: 'address', name: 'account' },
|
|
2318
|
+
{ type: 'address', name: 'keyId' },
|
|
2319
|
+
],
|
|
2320
|
+
outputs: [{ type: 'bool' }],
|
|
2321
|
+
},
|
|
2195
2322
|
{
|
|
2196
2323
|
name: 'getTransactionKey',
|
|
2197
2324
|
type: 'function',
|
|
@@ -2209,6 +2336,14 @@ exports.accountKeychain = [
|
|
|
2209
2336
|
{ type: 'uint64', name: 'expiry' },
|
|
2210
2337
|
],
|
|
2211
2338
|
},
|
|
2339
|
+
{
|
|
2340
|
+
name: 'AdminKeyAuthorized',
|
|
2341
|
+
type: 'event',
|
|
2342
|
+
inputs: [
|
|
2343
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
2344
|
+
{ type: 'address', name: 'publicKey', indexed: true },
|
|
2345
|
+
],
|
|
2346
|
+
},
|
|
2212
2347
|
{
|
|
2213
2348
|
name: 'KeyRevoked',
|
|
2214
2349
|
type: 'event',
|
|
@@ -2274,6 +2409,7 @@ exports.accountKeychain = [
|
|
|
2274
2409
|
},
|
|
2275
2410
|
{ name: 'CallNotAllowed', type: 'error', inputs: [] },
|
|
2276
2411
|
{ name: 'InvalidCallScope', type: 'error', inputs: [] },
|
|
2412
|
+
{ name: 'InvalidKeyId', type: 'error', inputs: [] },
|
|
2277
2413
|
{ name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },
|
|
2278
2414
|
{ name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },
|
|
2279
2415
|
{
|
|
@@ -2454,6 +2590,34 @@ exports.tip403Registry = [
|
|
|
2454
2590
|
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2455
2591
|
],
|
|
2456
2592
|
},
|
|
2593
|
+
{
|
|
2594
|
+
name: 'receivePolicy',
|
|
2595
|
+
type: 'function',
|
|
2596
|
+
stateMutability: 'view',
|
|
2597
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
2598
|
+
outputs: [
|
|
2599
|
+
{ type: 'bool', name: 'hasReceivePolicy' },
|
|
2600
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2601
|
+
{ type: 'uint8', name: 'senderPolicyType' },
|
|
2602
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2603
|
+
{ type: 'uint8', name: 'tokenFilterType' },
|
|
2604
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2605
|
+
],
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
name: 'validateReceivePolicy',
|
|
2609
|
+
type: 'function',
|
|
2610
|
+
stateMutability: 'view',
|
|
2611
|
+
inputs: [
|
|
2612
|
+
{ type: 'address', name: 'token' },
|
|
2613
|
+
{ type: 'address', name: 'sender' },
|
|
2614
|
+
{ type: 'address', name: 'receiver' },
|
|
2615
|
+
],
|
|
2616
|
+
outputs: [
|
|
2617
|
+
{ type: 'bool', name: 'authorized' },
|
|
2618
|
+
{ type: 'uint8', name: 'blockedReason' },
|
|
2619
|
+
],
|
|
2620
|
+
},
|
|
2457
2621
|
{
|
|
2458
2622
|
name: 'createPolicy',
|
|
2459
2623
|
type: 'function',
|
|
@@ -2518,6 +2682,17 @@ exports.tip403Registry = [
|
|
|
2518
2682
|
],
|
|
2519
2683
|
outputs: [{ type: 'uint64' }],
|
|
2520
2684
|
},
|
|
2685
|
+
{
|
|
2686
|
+
name: 'setReceivePolicy',
|
|
2687
|
+
type: 'function',
|
|
2688
|
+
stateMutability: 'nonpayable',
|
|
2689
|
+
inputs: [
|
|
2690
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2691
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2692
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2693
|
+
],
|
|
2694
|
+
outputs: [],
|
|
2695
|
+
},
|
|
2521
2696
|
{
|
|
2522
2697
|
name: 'PolicyAdminUpdated',
|
|
2523
2698
|
type: 'event',
|
|
@@ -2567,12 +2742,24 @@ exports.tip403Registry = [
|
|
|
2567
2742
|
{ type: 'uint64', name: 'mintRecipientPolicyId' },
|
|
2568
2743
|
],
|
|
2569
2744
|
},
|
|
2745
|
+
{
|
|
2746
|
+
name: 'ReceivePolicyUpdated',
|
|
2747
|
+
type: 'event',
|
|
2748
|
+
inputs: [
|
|
2749
|
+
{ type: 'address', name: 'account', indexed: true },
|
|
2750
|
+
{ type: 'uint64', name: 'senderPolicyId' },
|
|
2751
|
+
{ type: 'uint64', name: 'tokenFilterId' },
|
|
2752
|
+
{ type: 'address', name: 'recoveryAuthority' },
|
|
2753
|
+
],
|
|
2754
|
+
},
|
|
2570
2755
|
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
2571
2756
|
{ name: 'PolicyNotFound', type: 'error', inputs: [] },
|
|
2572
2757
|
{ name: 'PolicyNotSimple', type: 'error', inputs: [] },
|
|
2573
2758
|
{ name: 'InvalidPolicyType', type: 'error', inputs: [] },
|
|
2574
2759
|
{ name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
|
|
2575
2760
|
{ name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },
|
|
2761
|
+
{ name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },
|
|
2762
|
+
{ name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },
|
|
2576
2763
|
];
|
|
2577
2764
|
exports.validatorConfig = [
|
|
2578
2765
|
{
|
|
@@ -2733,6 +2920,7 @@ exports.abis = [
|
|
|
2733
2920
|
...exports.addressRegistry,
|
|
2734
2921
|
...exports.feeManager,
|
|
2735
2922
|
...exports.feeAmm,
|
|
2923
|
+
...exports.receivePolicyGuard,
|
|
2736
2924
|
...exports.accountKeychain,
|
|
2737
2925
|
...exports.nonce,
|
|
2738
2926
|
...exports.tip20Factory,
|