viem 0.0.1-alpha.10 → 0.0.1-alpha.11

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.
@@ -0,0 +1,148 @@
1
+ import {
2
+ boolToBytes,
3
+ boolToHex,
4
+ buildRequest,
5
+ bytesToBigint,
6
+ bytesToBool,
7
+ bytesToHex,
8
+ bytesToNumber,
9
+ bytesToString,
10
+ decodeAbi,
11
+ decodeBytes,
12
+ decodeErrorResult,
13
+ decodeFunctionData,
14
+ decodeFunctionResult,
15
+ decodeHex,
16
+ decodeRlp,
17
+ encodeAbi,
18
+ encodeBytes,
19
+ encodeDeployData,
20
+ encodeErrorResult,
21
+ encodeEventTopics,
22
+ encodeFunctionData,
23
+ encodeFunctionResult,
24
+ encodeHex,
25
+ encodeRlp,
26
+ extractFunctionName,
27
+ extractFunctionParams,
28
+ extractFunctionParts,
29
+ extractFunctionType,
30
+ format,
31
+ formatAbiItemWithArgs,
32
+ formatAbiItemWithParams,
33
+ formatBlock,
34
+ formatEther,
35
+ formatGwei,
36
+ formatTransaction,
37
+ formatTransactionRequest,
38
+ formatUnit,
39
+ getAbiItem,
40
+ getAddress,
41
+ getContractAddress,
42
+ getContractError,
43
+ getCreate2Address,
44
+ getCreateAddress,
45
+ getEventSignature,
46
+ getFunctionSignature,
47
+ hexToBigInt,
48
+ hexToBool,
49
+ hexToBytes,
50
+ hexToNumber,
51
+ hexToString,
52
+ isAddress,
53
+ isAddressEqual,
54
+ isBytes,
55
+ isHex,
56
+ keccak256,
57
+ numberToBytes,
58
+ numberToHex,
59
+ pad,
60
+ padBytes,
61
+ padHex,
62
+ parseEther,
63
+ parseGwei,
64
+ parseUnit,
65
+ rpc,
66
+ size,
67
+ slice,
68
+ sliceBytes,
69
+ sliceHex,
70
+ stringToBytes,
71
+ stringToHex,
72
+ stringify,
73
+ trim
74
+ } from "../chunk-DY4MSK2M.mjs";
75
+ export {
76
+ boolToBytes,
77
+ boolToHex,
78
+ buildRequest,
79
+ bytesToBigint,
80
+ bytesToBool,
81
+ bytesToHex,
82
+ bytesToNumber,
83
+ bytesToString,
84
+ decodeAbi,
85
+ decodeBytes,
86
+ decodeErrorResult,
87
+ decodeFunctionData,
88
+ decodeFunctionResult,
89
+ decodeHex,
90
+ decodeRlp,
91
+ encodeAbi,
92
+ encodeBytes,
93
+ encodeDeployData,
94
+ encodeErrorResult,
95
+ encodeEventTopics,
96
+ encodeFunctionData,
97
+ encodeFunctionResult,
98
+ encodeHex,
99
+ encodeRlp,
100
+ extractFunctionName,
101
+ extractFunctionParams,
102
+ extractFunctionParts,
103
+ extractFunctionType,
104
+ format,
105
+ formatAbiItemWithArgs,
106
+ formatAbiItemWithParams,
107
+ formatBlock,
108
+ formatEther,
109
+ formatGwei,
110
+ formatTransaction,
111
+ formatTransactionRequest,
112
+ formatUnit,
113
+ getAbiItem,
114
+ getAddress,
115
+ getContractAddress,
116
+ getContractError,
117
+ getCreate2Address,
118
+ getCreateAddress,
119
+ getEventSignature,
120
+ getFunctionSignature,
121
+ hexToBigInt,
122
+ hexToBool,
123
+ hexToBytes,
124
+ hexToNumber,
125
+ hexToString,
126
+ isAddress,
127
+ isAddressEqual,
128
+ isBytes,
129
+ isHex,
130
+ keccak256,
131
+ numberToBytes,
132
+ numberToHex,
133
+ pad,
134
+ padBytes,
135
+ padHex,
136
+ parseEther,
137
+ parseGwei,
138
+ parseUnit,
139
+ rpc,
140
+ size,
141
+ slice,
142
+ sliceBytes,
143
+ sliceHex,
144
+ stringToBytes,
145
+ stringToHex,
146
+ stringify,
147
+ trim
148
+ };
@@ -2,8 +2,8 @@ import { Abi } from 'abitype';
2
2
  import { Chain, Formatter } from './chains.js';
3
3
  import { H as Hex, A as Address, b as BlockTag, M as MergeIntersectionProperties, v as TransactionRequest, K as EstimateGasParameters, a as Hash, F as FeeHistory, L as Log, r as RpcTransactionReceipt, T as TransactionReceipt, N as TransactionType, D as Transaction, q as RpcTransaction, Q as Quantity, B as ByteArray } from './rpc-b77c5aee.js';
4
4
  import { T as TransactionRequestFormatter, e as Formatted, E as ExtractFunctionNameFromAbi, G as GetValue, g as ExtractArgsFromAbi, h as ExtractResultFromAbi, F as FormattedBlock, B as BlockFormatter, a as FormattedTransaction, i as TransactionFormatter, j as FormattedTransactionReceipt, k as TransactionReceiptFormatter, l as ExtractFormatter } from './transactionRequest-08d30731.js';
5
- import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-d612fe08.js';
6
- import { W as WalletPermission, a as WatchAssetParams } from './eip1193-020a6f13.js';
5
+ import { P as PublicClient, T as TestClient, W as WalletClient } from './createWalletClient-3f9fa8b6.js';
6
+ import { W as WalletPermission, a as WatchAssetParams } from './eip1193-c001fcd5.js';
7
7
 
8
8
  type FilterType = 'transaction' | 'block' | 'event';
9
9
  type Filter<TFilterType extends FilterType = 'event'> = {
@@ -1,4 +1,4 @@
1
- import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-d612fe08.js';
1
+ import { e as TransportConfig, d as Transport, B as BaseRpcRequests } from './createWalletClient-3f9fa8b6.js';
2
2
  import { a as Hash } from './rpc-b77c5aee.js';
3
3
  import { R as RpcResponse } from './rpc-26932bae.js';
4
4
 
package/dist/window.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { R as Requests, E as Events } from './eip1193-020a6f13.js';
1
+ import { R as Requests, E as Events } from './eip1193-c001fcd5.js';
2
2
  import './rpc-b77c5aee.js';
3
3
 
4
4
  type WindowProvider = Requests & Events;
package/dist/window.js CHANGED
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
- "description": "TypeScript (& JavaScript) Interface for Ethereum",
4
- "version": "0.0.1-alpha.10",
3
+ "description": "TypeScript Interface for Ethereum",
4
+ "version": "0.0.1-alpha.11",
5
5
  "files": [
6
6
  "/actions",
7
7
  "/chains",
@@ -14,67 +14,39 @@
14
14
  "exports": {
15
15
  ".": {
16
16
  "types": "./dist/index.d.ts",
17
+ "module": "./dist/index.mjs",
17
18
  "default": "./dist/index.js"
18
19
  },
19
20
  "./actions": {
20
21
  "types": "./dist/actions/index.d.ts",
22
+ "module": "./dist/actions/index.mjs",
21
23
  "default": "./dist/actions/index.js"
22
24
  },
23
25
  "./chains": {
24
26
  "types": "./dist/chains.d.ts",
27
+ "module": "./dist/chains.mjs",
25
28
  "default": "./dist/chains.js"
26
29
  },
27
30
  "./clients": {
28
31
  "types": "./dist/clients/index.d.ts",
32
+ "module": "./dist/clients/index.mjs",
29
33
  "default": "./dist/clients/index.js"
30
34
  },
31
35
  "./utils": {
32
36
  "types": "./dist/utils/index.d.ts",
37
+ "module": "./dist/utils/index.mjs",
33
38
  "default": "./dist/utils/index.js"
34
39
  },
35
40
  "./window": {
36
41
  "types": "./dist/window.d.ts",
42
+ "module": "./dist/window.mjs",
37
43
  "default": "./dist/window.js"
38
44
  },
39
45
  "./package.json": "./package.json"
40
46
  },
41
- "type": "module",
42
47
  "main": "dist/index.js",
43
48
  "types": "dist/index.d.ts",
44
49
  "sideEffects": false,
45
- "dependencies": {
46
- "@noble/hashes": "^1.1.2",
47
- "@wagmi/chains": "^0.1.0",
48
- "abitype": "^0.2.5"
49
- },
50
- "devDependencies": {
51
- "@actions/core": "^1.10.0",
52
- "@actions/github": "^5.1.1",
53
- "@changesets/changelog-github": "^0.4.5",
54
- "@changesets/cli": "^2.23.2",
55
- "@testing-library/jest-dom": "^5.16.5",
56
- "@types/dedent": "^0.7.0",
57
- "@types/fs-extra": "^9.0.13",
58
- "@types/node": "^17.0.45",
59
- "@vitest/coverage-c8": "^0.24.3",
60
- "@vitest/ui": "^0.19.1",
61
- "bundlewatch": "^0.3.3",
62
- "dedent": "^0.7.0",
63
- "esbuild": "^0.16.12",
64
- "esbuild-register": "^3.4.2",
65
- "essential-eth": "^0.6.2",
66
- "ethers": "^5.7.2",
67
- "execa": "^6.1.0",
68
- "fs-extra": "^10.1.0",
69
- "jsdom": "^20.0.0",
70
- "rome": "^11.0.0",
71
- "simple-git-hooks": "^2.8.1",
72
- "tsup": "^6.5.0",
73
- "typescript": "^4.9.3",
74
- "vite": "^3.0.4",
75
- "vitest": "^0.25.2",
76
- "web3": "^1.8.1"
77
- },
78
50
  "license": "MIT",
79
51
  "repository": "wagmi-dev/viem",
80
52
  "authors": [
@@ -87,33 +59,5 @@
87
59
  "dapps",
88
60
  "wallet",
89
61
  "web3"
90
- ],
91
- "engines": {
92
- "node": ">=18"
93
- },
94
- "simple-git-hooks": {
95
- "pre-commit": "pnpm format & pnpm lint:fix"
96
- },
97
- "scripts": {
98
- "anvil": "source .env && anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
99
- "bench": "vitest bench --no-threads",
100
- "bench:ci": "CI=true vitest bench --no-threads",
101
- "build": "tsup",
102
- "changeset": "changeset",
103
- "changeset:release": "pnpm build && changeset publish",
104
- "changeset:version": "changeset version && pnpm install --lockfile-only",
105
- "dev": "DEV=true tsup",
106
- "dev:docs": "pnpm -r --filter site dev",
107
- "format": "rome format src/ test/ --write",
108
- "lint": "rome check .",
109
- "lint:fix": "pnpm lint --apply-suggested",
110
- "playground": "pnpm --filter playground-dev dev",
111
- "playground:benchmark": "pnpm --filter playground-benchmark dev",
112
- "postinstall": "pnpm dev",
113
- "preinstall": "npx only-allow pnpm",
114
- "test": "vitest dev --coverage --no-threads",
115
- "test:ci": "CI=true vitest --coverage --no-threads",
116
- "test:ui": "vitest dev --ui --no-threads",
117
- "typecheck": "tsc --noEmit"
118
- }
62
+ ]
119
63
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "type": "module",
2
+ "module": "../dist/utils/index.mjs",
3
3
  "main": "../dist/utils/index.js"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "type": "module",
2
+ "module": "../dist/window.mjs",
3
3
  "main": "../dist/window.js"
4
4
  }