@hairy/ether-lib 1.49.0 → 1.50.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.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025-PRESENT Hairyf <https://github.com/antfu>
3
+ Copyright (c) 2025-PRESENT Hairyf <https://github.com/hairyf>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,36 +1,229 @@
1
1
  # @hairy/ether-lib
2
2
 
3
- [![npm version][npm-version-src]][npm-version-href]
4
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
- [![bundle][bundle-src]][bundle-href]
6
- [![JSDocs][jsdocs-src]][jsdocs-href]
7
- [![License][license-src]][license-href]
3
+ <!-- automd:badges name="@hairy/ether-lib" github="hairyf/hairylib" license bundlephobia -->
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@hairy/ether-lib)](https://npmjs.com/package/@hairy/ether-lib)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@hairy/ether-lib)](https://npm.chart.dev/@hairy/ether-lib)
7
+ [![bundle size](https://img.shields.io/bundlephobia/minzip/@hairy/ether-lib)](https://bundlephobia.com/package/@hairy/ether-lib)
8
+ [![license](https://img.shields.io/github/license/hairyf/hairylib)](https://github.com/hairyf/hairylib/blob/main/LICENSE)
9
+
10
+ <!-- /automd -->
11
+
12
+ Utilities and helpers around `ethers` v6.
8
13
 
9
14
  ## Install
10
15
 
16
+ <!-- automd:pm-install name="@hairy/ether-lib" -->
17
+
18
+ ```sh
19
+ # ✨ Auto-detect
20
+ npx nypm install @hairy/ether-lib
21
+
22
+ # npm
23
+ npm install @hairy/ether-lib
24
+
25
+ # yarn
26
+ yarn add @hairy/ether-lib
27
+
28
+ # pnpm
29
+ pnpm add @hairy/ether-lib
30
+
31
+ # bun
32
+ bun install @hairy/ether-lib
33
+
34
+ # deno
35
+ deno install npm:@hairy/ether-lib
36
+ ```
37
+
38
+ <!-- /automd -->
39
+
40
+ ## API
41
+
42
+ <!-- automd:jsdocs src="./src/index.ts" -->
43
+
44
+ ### `Errors`
45
+
46
+ #### `ACTION_REJECTED`
47
+
48
+ - **Type**: `string`
49
+ - **Default**: `"ACTION_REJECTED"`
50
+
51
+ #### `BUFFER_OVERRUN`
52
+
53
+ - **Type**: `string`
54
+ - **Default**: `"BUFFER_OVERRUN"`
55
+
56
+ #### `CALL_EXCEPTION`
57
+
58
+ - **Type**: `string`
59
+ - **Default**: `"CALL_EXCEPTION"`
60
+
61
+ #### `INSUFFICIENT_FUNDS`
62
+
63
+ - **Type**: `string`
64
+ - **Default**: `"INSUFFICIENT_FUNDS"`
65
+
66
+ #### `INVALID_ARGUMENT`
67
+
68
+ - **Type**: `string`
69
+ - **Default**: `"INVALID_ARGUMENT"`
70
+
71
+ #### `MISSING_ARGUMENT`
72
+
73
+ - **Type**: `string`
74
+ - **Default**: `"MISSING_ARGUMENT"`
75
+
76
+ #### `MISSING_NEW`
77
+
78
+ - **Type**: `string`
79
+ - **Default**: `"MISSING_NEW"`
80
+
81
+ #### `NETWORK_ERROR`
82
+
83
+ - **Type**: `string`
84
+ - **Default**: `"NETWORK_ERROR"`
85
+
86
+ #### `NONCE_EXPIRED`
87
+
88
+ - **Type**: `string`
89
+ - **Default**: `"NONCE_EXPIRED"`
90
+
91
+ #### `NOT_IMPLEMENTED`
92
+
93
+ - **Type**: `string`
94
+ - **Default**: `"NOT_IMPLEMENTED"`
95
+
96
+ #### `NUMERIC_FAULT`
97
+
98
+ - **Type**: `string`
99
+ - **Default**: `"NUMERIC_FAULT"`
100
+
101
+ #### `REPLACEMENT_UNDERPRICED`
102
+
103
+ - **Type**: `string`
104
+ - **Default**: `"REPLACEMENT_UNDERPRICED"`
105
+
106
+ #### `SERVER_ERROR`
107
+
108
+ - **Type**: `string`
109
+ - **Default**: `"SERVER_ERROR"`
110
+
111
+ #### `TIMEOUT`
112
+
113
+ - **Type**: `string`
114
+ - **Default**: `"TIMEOUT"`
115
+
116
+ #### `TRANSACTION_REPLACED`
117
+
118
+ - **Type**: `string`
119
+ - **Default**: `"TRANSACTION_REPLACED"`
120
+
121
+ #### `UNEXPECTED_ARGUMENT`
122
+
123
+ - **Type**: `string`
124
+ - **Default**: `"UNEXPECTED_ARGUMENT"`
125
+
126
+ #### `UNKNOWN_ERROR`
127
+
128
+ - **Type**: `string`
129
+ - **Default**: `"UNKNOWN_ERROR"`
130
+
131
+ #### `UNPREDICTABLE_GAS_LIMIT`
132
+
133
+ - **Type**: `string`
134
+ - **Default**: `"UNPREDICTABLE_GAS_LIMIT"`
135
+
136
+ #### `UNSUPPORTED_OPERATION`
137
+
138
+ - **Type**: `string`
139
+ - **Default**: `"UNSUPPORTED_OPERATION"`
140
+
141
+ ### `formatEther(value, options)`
142
+
143
+ ### `idprefix(errorCallString)`
144
+
145
+ ### `wait(transaction)`
146
+
147
+ <!-- /automd -->
148
+
149
+ ## Directory structure
150
+
151
+ <!-- automd:dir-tree imports=""maxDepth=2 -->
152
+
11
153
  ```
12
- ni @hairy/ether-lib
154
+ ├── src/
155
+ │ ├── constants.ts
156
+ │ ├── hash.ts
157
+ │ ├── index.ts
158
+ │ ├── number.ts
159
+ │ └── wait.ts
160
+ ├── test/
161
+ │ └── index.test.ts
162
+ ├── package.json
163
+ ├── README.md
164
+ └── tsdown.config.ts
13
165
  ```
14
166
 
15
- ## CDN
167
+ <!-- /automd -->
168
+
169
+ ## Source
170
+
171
+ <!-- automd:file src="./src/index.ts" code lang="ts" -->
16
172
 
17
- ```html
18
- <script src="https://unpkg.com/@hairy/ether-lib"></script>
173
+ ```ts [index.ts]
174
+ export * from './constants'
175
+ export * from './hash'
176
+ export * from './number'
177
+ export * from './wait'
19
178
  ```
20
179
 
180
+ <!-- /automd -->
181
+
182
+ ## Contributors
183
+
184
+ <!-- automd:contributors github="hairyf/hairylib" author="Hairyf" license="MIT" -->
185
+
186
+ Published under the [MIT](https://github.com/hairyf/hairylib/blob/main/LICENSE) license.
187
+ Made by [@Hairyf](https://github.com/Hairyf) and [community](https://github.com/hairyf/hairylib/graphs/contributors) 💛
188
+ <br><br>
189
+ <a href="https://github.com/hairyf/hairylib/graphs/contributors">
190
+ <img src="https://contrib.rocks/image?repo=hairyf/hairylib" />
191
+ </a>
192
+
193
+ <!-- /automd -->
194
+
21
195
  ## License
22
196
 
23
- [MIT](./LICENSE) License © [Hairyf](https://github.com/hairyf)
197
+ <!-- automd:fetch url="gh:hairyf/hairylib/main/LICENSE" -->
198
+
199
+ MIT License
200
+
201
+ Copyright (c) 2025-PRESENT Hairyf <https://github.com/hairyf>
202
+
203
+ Permission is hereby granted, free of charge, to any person obtaining a copy
204
+ of this software and associated documentation files (the "Software"), to deal
205
+ in the Software without restriction, including without limitation the rights
206
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
207
+ copies of the Software, and to permit persons to whom the Software is
208
+ furnished to do so, subject to the following conditions:
209
+
210
+ The above copyright notice and this permission notice shall be included in all
211
+ copies or substantial portions of the Software.
212
+
213
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
214
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
215
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
216
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
217
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
218
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
219
+ SOFTWARE.
220
+
221
+ <!-- /automd -->
222
+
223
+ <!-- automd:with-automd -->
224
+
225
+ ---
24
226
 
25
- <!-- Badges -->
227
+ _🤖 auto updated with [automd](https://automd.unjs.io)_
26
228
 
27
- [npm-version-src]: https://img.shields.io/npm/v/@hairy/ether-lib?style=flat&colorA=080f12&colorB=1fa669
28
- [npm-version-href]: https://npmjs.com/package/@hairy/ether-lib
29
- [npm-downloads-src]: https://img.shields.io/npm/dm/@hairy/ether-lib?style=flat&colorA=080f12&colorB=1fa669
30
- [npm-downloads-href]: https://npmjs.com/package/@hairy/ether-lib
31
- [bundle-src]: https://img.shields.io/bundlephobia/minzip/@hairy/ether-lib?style=flat&colorA=080f12&colorB=1fa669&label=minzip
32
- [bundle-href]: https://bundlephobia.com/result?p=@hairy/ether-lib
33
- [license-src]: https://img.shields.io/github/license/hairyf/hairylib.svg?style=flat&colorA=080f12&colorB=1fa669
34
- [license-href]: https://github.com/hairyf/hairylib/blob/main/LICENSE
35
- [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
36
- [jsdocs-href]: https://www.jsdocs.io/package/@hairy/ether-lib
229
+ <!-- /automd -->
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hairy/ether-lib",
3
3
  "type": "module",
4
- "version": "1.49.0",
4
+ "version": "1.50.0",
5
5
  "description": "Library for ether",
6
6
  "author": "Hairyf <wwu710632@gmail.com>",
7
7
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "mitt": "^3.0.1",
38
- "@hairy/utils": "1.49.0"
38
+ "@hairy/utils": "1.50.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "ethers": "^6"