viem 0.2.0-main.20230401T004104 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounts/package.json +4 -0
- package/dist/abi.d.ts +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/accounts/index.d.ts +81 -0
- package/dist/accounts/index.js +142 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/index.mjs +142 -0
- package/dist/accounts/index.mjs.map +1 -0
- package/dist/{chain-1b53ef88.d.ts → chain-5507c6f0.d.ts} +212 -148
- package/dist/{chain-ec8c485d.d.ts → chain-fe47467d.d.ts} +1 -1
- package/dist/chains.d.ts +867 -99
- package/dist/chains.js +115 -63
- package/dist/chains.js.map +1 -1
- package/dist/chains.mjs +58 -6
- package/dist/chains.mjs.map +1 -1
- package/dist/chunk-63WKWOMO.js +31 -0
- package/dist/chunk-63WKWOMO.js.map +1 -0
- package/dist/{chunk-U5Z7JOWV.mjs → chunk-FSIBCQFR.mjs} +1886 -261
- package/dist/chunk-FSIBCQFR.mjs.map +1 -0
- package/dist/chunk-KON3DHPC.mjs +31 -0
- package/dist/chunk-KON3DHPC.mjs.map +1 -0
- package/dist/{chunk-HBDMIBEO.js → chunk-YDNKDSST.js} +1942 -317
- package/dist/chunk-YDNKDSST.js.map +1 -0
- package/dist/contract.d.ts +9 -7
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createTransport-e3eba9f7.d.ts → createTransport-21a0d2b3.d.ts} +24 -10
- package/dist/{eip1193-4f4e240c.d.ts → eip1193-2f3a9cd2.d.ts} +1 -1
- package/dist/{encodeFunctionResult-1f324375.d.ts → encodeFunctionResult-c5185b98.d.ts} +15 -15
- package/dist/{encodePacked-d5d5264a.d.ts → encodePacked-98f67d09.d.ts} +1 -1
- package/dist/ens.d.ts +6 -4
- package/dist/ens.js +8 -3
- package/dist/ens.js.map +1 -1
- package/dist/ens.mjs +7 -2
- package/dist/ens.mjs.map +1 -1
- package/dist/ethers.d.ts +5 -6
- package/dist/ethers.js +7 -5
- package/dist/ethers.js.map +1 -1
- package/dist/ethers.mjs +7 -5
- package/dist/ethers.mjs.map +1 -1
- package/dist/{formatAbiItem-15e8817d.d.ts → formatAbiItem-56dff508.d.ts} +1 -1
- package/dist/{getAbiItem-3e809ff9.d.ts → getAbiItem-bfba73d1.d.ts} +3 -3
- package/dist/getEnsResolver-9e26c596.d.ts +876 -0
- package/dist/index.d.ts +132 -15
- package/dist/index.js +150 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -49
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-361e8a12.d.ts → parseGwei-d2147f8b.d.ts} +95 -15
- package/dist/public.d.ts +6 -4
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/publicKeyToAddress-623eb398.d.ts +16 -0
- package/dist/test-b67569fe.d.ts +198 -0
- package/dist/test.d.ts +11 -11
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/typedData-46b4d81f.d.ts +93 -0
- package/dist/utils/index.d.ts +22 -30
- package/dist/utils/index.js +28 -2
- package/dist/utils/index.mjs +31 -5
- package/dist/wallet.d.ts +6 -4
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +13 -4
- package/dist/chunk-HBDMIBEO.js.map +0 -1
- package/dist/chunk-I5QGTPHV.mjs +0 -186
- package/dist/chunk-I5QGTPHV.mjs.map +0 -1
- package/dist/chunk-LWNOZI6J.js +0 -186
- package/dist/chunk-LWNOZI6J.js.map +0 -1
- package/dist/chunk-U5Z7JOWV.mjs.map +0 -1
- package/dist/createPublicClient-31d44569.d.ts +0 -841
- package/dist/test-67630299.d.ts +0 -205
package/dist/utils/index.mjs
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
import {
|
2
2
|
arrayRegex,
|
3
3
|
assertRequest,
|
4
|
+
assertTransactionEIP1559,
|
5
|
+
assertTransactionEIP2930,
|
6
|
+
assertTransactionLegacy,
|
4
7
|
boolToBytes,
|
5
8
|
boolToHex,
|
6
9
|
buildRequest,
|
@@ -50,7 +53,6 @@ import {
|
|
50
53
|
fromHex,
|
51
54
|
fromRlp,
|
52
55
|
getAbiItem,
|
53
|
-
getAccount,
|
54
56
|
getAddress,
|
55
57
|
getCallError,
|
56
58
|
getChainContractAddress,
|
@@ -62,9 +64,12 @@ import {
|
|
62
64
|
getEventSelector,
|
63
65
|
getFunctionSelector,
|
64
66
|
getNodeError,
|
67
|
+
getSerializedTransactionType,
|
65
68
|
getSocket,
|
66
69
|
getTransactionError,
|
70
|
+
getTransactionType,
|
67
71
|
hashMessage,
|
72
|
+
hashTypedData,
|
68
73
|
hexToBigInt,
|
69
74
|
hexToBool,
|
70
75
|
hexToBytes,
|
@@ -74,6 +79,7 @@ import {
|
|
74
79
|
isAddress,
|
75
80
|
isAddressEqual,
|
76
81
|
isBytes,
|
82
|
+
isHash,
|
77
83
|
isHex,
|
78
84
|
keccak256,
|
79
85
|
numberToBytes,
|
@@ -85,13 +91,18 @@ import {
|
|
85
91
|
parseAbiItem,
|
86
92
|
parseAbiParameter,
|
87
93
|
parseAbiParameters,
|
94
|
+
parseAccount,
|
88
95
|
parseEther,
|
89
96
|
parseGwei,
|
97
|
+
parseTransaction,
|
90
98
|
parseUnits,
|
91
99
|
prepareRequest,
|
100
|
+
publicKeyToAddress,
|
92
101
|
recoverAddress,
|
93
102
|
recoverMessageAddress,
|
103
|
+
recoverTypedDataAddress,
|
94
104
|
rpc,
|
105
|
+
serializeTransaction,
|
95
106
|
size,
|
96
107
|
slice,
|
97
108
|
sliceBytes,
|
@@ -104,11 +115,16 @@ import {
|
|
104
115
|
toRlp,
|
105
116
|
transactionType,
|
106
117
|
trim,
|
107
|
-
|
108
|
-
|
118
|
+
validateTypedData,
|
119
|
+
verifyMessage,
|
120
|
+
verifyTypedData
|
121
|
+
} from "../chunk-FSIBCQFR.mjs";
|
109
122
|
export {
|
110
123
|
arrayRegex,
|
111
124
|
assertRequest,
|
125
|
+
assertTransactionEIP1559,
|
126
|
+
assertTransactionEIP2930,
|
127
|
+
assertTransactionLegacy,
|
112
128
|
boolToBytes,
|
113
129
|
boolToHex,
|
114
130
|
buildRequest,
|
@@ -158,7 +174,6 @@ export {
|
|
158
174
|
fromHex,
|
159
175
|
fromRlp,
|
160
176
|
getAbiItem,
|
161
|
-
getAccount,
|
162
177
|
getAddress,
|
163
178
|
getCallError,
|
164
179
|
getChainContractAddress,
|
@@ -170,9 +185,12 @@ export {
|
|
170
185
|
getEventSelector,
|
171
186
|
getFunctionSelector,
|
172
187
|
getNodeError,
|
188
|
+
getSerializedTransactionType,
|
173
189
|
getSocket,
|
174
190
|
getTransactionError,
|
191
|
+
getTransactionType,
|
175
192
|
hashMessage,
|
193
|
+
hashTypedData,
|
176
194
|
hexToBigInt,
|
177
195
|
hexToBool,
|
178
196
|
hexToBytes,
|
@@ -182,6 +200,7 @@ export {
|
|
182
200
|
isAddress,
|
183
201
|
isAddressEqual,
|
184
202
|
isBytes,
|
203
|
+
isHash,
|
185
204
|
isHex,
|
186
205
|
keccak256,
|
187
206
|
numberToBytes,
|
@@ -193,13 +212,18 @@ export {
|
|
193
212
|
parseAbiItem,
|
194
213
|
parseAbiParameter,
|
195
214
|
parseAbiParameters,
|
215
|
+
parseAccount,
|
196
216
|
parseEther,
|
197
217
|
parseGwei,
|
218
|
+
parseTransaction,
|
198
219
|
parseUnits,
|
199
220
|
prepareRequest,
|
221
|
+
publicKeyToAddress,
|
200
222
|
recoverAddress,
|
201
223
|
recoverMessageAddress,
|
224
|
+
recoverTypedDataAddress,
|
202
225
|
rpc,
|
226
|
+
serializeTransaction,
|
203
227
|
size,
|
204
228
|
slice,
|
205
229
|
sliceBytes,
|
@@ -212,6 +236,8 @@ export {
|
|
212
236
|
toRlp,
|
213
237
|
transactionType,
|
214
238
|
trim,
|
215
|
-
|
239
|
+
validateTypedData,
|
240
|
+
verifyMessage,
|
241
|
+
verifyTypedData
|
216
242
|
};
|
217
243
|
//# sourceMappingURL=index.mjs.map
|
package/dist/wallet.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
export {
|
2
|
-
import './
|
1
|
+
export { A as AddChainParameters, bX as FormattedTransactionRequest, G as GetAddressesReturnType, _ as GetPermissionsReturnType, al as RequestAddressesReturnType, am as RequestPermissionsReturnType, ao as SendTransactionParameters, ap as SendTransactionReturnType, aq as SignMessageParameters, ar as SignMessageReturnType, as as SignTypedDataParameters, at as SignTypedDataReturnType, au as SwitchChainParameters, az as WatchAssetParameters, aA as WatchAssetReturnType, bN as addChain, bO as getAddresses, bP as getPermissions, bQ as requestAddresses, bR as requestPermissions, bS as sendTransaction, bT as signMessage, bU as signTypedData, bV as switchChain, bW as watchAsset } from './getEnsResolver-9e26c596.js';
|
2
|
+
import './createTransport-21a0d2b3.js';
|
3
|
+
import './eip1193-2f3a9cd2.js';
|
3
4
|
import 'abitype';
|
4
|
-
import './chain-
|
5
|
+
import './chain-5507c6f0.js';
|
5
6
|
import '@wagmi/chains';
|
6
|
-
import './
|
7
|
+
import './typedData-46b4d81f.js';
|
8
|
+
import '@scure/bip32';
|
package/dist/wallet.js
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
var
|
12
|
+
var _chunkYDNKDSSTjs = require('./chunk-YDNKDSST.js');
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -21,5 +21,5 @@ var _chunkHBDMIBEOjs = require('./chunk-HBDMIBEO.js');
|
|
21
21
|
|
22
22
|
|
23
23
|
|
24
|
-
exports.addChain =
|
24
|
+
exports.addChain = _chunkYDNKDSSTjs.addChain; exports.getAddresses = _chunkYDNKDSSTjs.getAddresses; exports.getPermissions = _chunkYDNKDSSTjs.getPermissions; exports.requestAddresses = _chunkYDNKDSSTjs.requestAddresses; exports.requestPermissions = _chunkYDNKDSSTjs.requestPermissions; exports.sendTransaction = _chunkYDNKDSSTjs.sendTransaction; exports.signMessage = _chunkYDNKDSSTjs.signMessage; exports.signTypedData = _chunkYDNKDSSTjs.signTypedData; exports.switchChain = _chunkYDNKDSSTjs.switchChain; exports.watchAsset = _chunkYDNKDSSTjs.watchAsset;
|
25
25
|
//# sourceMappingURL=wallet.js.map
|
package/dist/wallet.mjs
CHANGED
package/dist/window.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { R as Requests, E as Events } from './eip1193-
|
1
|
+
import { R as Requests, E as Events } from './eip1193-2f3a9cd2.js';
|
2
2
|
import 'abitype';
|
3
|
-
import './chain-
|
3
|
+
import './chain-5507c6f0.js';
|
4
4
|
import '@wagmi/chains';
|
5
5
|
|
6
6
|
type WindowProvider = Requests & Events;
|
package/package.json
CHANGED
@@ -2,17 +2,21 @@
|
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
4
|
"dependencies": {
|
5
|
+
"@ensdomains/address-encoder": "^0.2.21",
|
6
|
+
"@noble/curves": "^0.9.0",
|
5
7
|
"@noble/hashes": "^1.1.2",
|
6
|
-
"@
|
7
|
-
"@
|
8
|
+
"@scure/bip32": "^1.2.0",
|
9
|
+
"@scure/bip39": "^1.1.1",
|
10
|
+
"@wagmi/chains": "~0.2.15",
|
8
11
|
"abitype": "~0.7.1",
|
9
12
|
"idna-uts46-hx": "^4.1.2",
|
10
13
|
"isomorphic-ws": "^5.0.0",
|
11
14
|
"ws": "^8.12.0"
|
12
15
|
},
|
13
|
-
"version": "0.2.0
|
16
|
+
"version": "0.2.0",
|
14
17
|
"files": [
|
15
18
|
"/abi",
|
19
|
+
"/accounts",
|
16
20
|
"/dist",
|
17
21
|
"/chains",
|
18
22
|
"/contract",
|
@@ -35,6 +39,11 @@
|
|
35
39
|
"module": "./dist/abi.mjs",
|
36
40
|
"default": "./dist/abi.js"
|
37
41
|
},
|
42
|
+
"./accounts": {
|
43
|
+
"types": "./dist/accounts/index.d.ts",
|
44
|
+
"module": "./dist/accounts/index.mjs",
|
45
|
+
"default": "./dist/accounts/index.js"
|
46
|
+
},
|
38
47
|
"./chains": {
|
39
48
|
"types": "./dist/chains.d.ts",
|
40
49
|
"module": "./dist/chains.mjs",
|
@@ -99,4 +108,4 @@
|
|
99
108
|
"wallet",
|
100
109
|
"web3"
|
101
110
|
]
|
102
|
-
}
|
111
|
+
}
|