13
13
* [ generateAddress] ( _account_.md#const-generateaddress )
14
14
* [ generateAddress2] ( _account_.md#const-generateaddress2 )
15
15
* [ importPublic] ( _account_.md#const-importpublic )
16
- * [ isPrecompiled] ( _account_.md#const-isprecompiled )
17
16
* [ isValidAddress] ( _account_.md#const-isvalidaddress )
18
17
* [ isValidChecksumAddress] ( _account_.md#const-isvalidchecksumaddress )
19
18
* [ isValidPrivate] ( _account_.md#const-isvalidprivate )
31
30
32
31
• ** publicToAddress** : * pubToAddress* = pubToAddress
33
32
34
- * Defined in [ account.ts:163 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L163 ) *
33
+ * Defined in [ account.ts:160 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L160 ) *
35
34
36
35
## Functions
37
36
38
37
### ` Const ` generateAddress
39
38
40
39
▸ ** generateAddress** (` from ` : Buffer, ` nonce ` : Buffer): * Buffer*
41
40
42
- * Defined in [ account.ts:75 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L75 ) *
41
+ * Defined in [ account.ts:82 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L82 ) *
43
42
44
43
Generates an address of a newly created contract.
45
44
56
55
57
56
### ` Const ` generateAddress2
58
57
59
- ▸ ** generateAddress2** (` from ` : Buffer | string , ` salt ` : Buffer | string , ` initCode ` : Buffer | string ): * Buffer*
58
+ ▸ ** generateAddress2** (` from ` : Buffer, ` salt ` : Buffer, ` initCode ` : Buffer): * Buffer*
60
59
61
- * Defined in [ account.ts:95 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L95 ) *
60
+ * Defined in [ account.ts:103 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L103 ) *
62
61
63
62
Generates an address for a contract created using CREATE2.
64
63
65
64
** Parameters:**
66
65
67
66
Name | Type | Description |
68
67
------ | ------ | ------ |
69
- ` from ` | Buffer &# 124 ; string | The address which is creating this new address |
70
- ` salt ` | Buffer &# 124 ; string | A salt |
71
- ` initCode ` | Buffer &# 124 ; string | The init code of the contract being created |
68
+ ` from ` | Buffer | The address which is creating this new address |
69
+ ` salt ` | Buffer | A salt |
70
+ ` initCode ` | Buffer | The init code of the contract being created |
72
71
73
72
** Returns:** * Buffer*
74
73
78
77
79
78
▸ ** importPublic** (` publicKey ` : Buffer): * Buffer*
80
79
81
- * Defined in [ account.ts:186 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L186 ) *
80
+ * Defined in [ account.ts:183 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L183 ) *
82
81
83
82
Converts a public key to the Ethereum format.
84
83
@@ -92,47 +91,29 @@ Name | Type |
92
91
93
92
___
94
93
95
- ### ` Const ` isPrecompiled
96
-
97
- ▸ ** isPrecompiled** (` address ` : Buffer | string): * boolean*
98
-
99
- * Defined in [ account.ts:117] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L117 ) *
100
-
101
- Returns true if the supplied address belongs to a precompiled account (Byzantium).
102
-
103
- ** Parameters:**
104
-
105
- Name | Type |
106
- ------ | ------ |
107
- ` address ` | Buffer | ; string |
108
-
109
- ** Returns:** * boolean*
110
-
111
- ___
112
-
113
94
### ` Const ` isValidAddress
114
95
115
- ▸ ** isValidAddress** (` address ` : string): * boolean*
96
+ ▸ ** isValidAddress** (` hexAddress ` : string): * boolean*
116
97
117
- * Defined in [ account.ts:20 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L20 ) *
98
+ * Defined in [ account.ts:21 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L21 ) *
118
99
119
100
Checks if the address is a valid. Accepts checksummed addresses too.
120
101
121
102
** Parameters:**
122
103
123
104
Name | Type |
124
105
------ | ------ |
125
- ` address ` | string |
106
+ ` hexAddress ` | string |
126
107
127
108
** Returns:** * boolean*
128
109
129
110
___
130
111
131
112
### ` Const ` isValidChecksumAddress
132
113
133
- ▸ ** isValidChecksumAddress** (` address ` : string, ` eip1191ChainId? ` : undefined | number): * boolean*
114
+ ▸ ** isValidChecksumAddress** (` hexAddress ` : string, ` eip1191ChainId? ` : undefined | number): * boolean*
134
115
135
- * Defined in [ account.ts:66 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L66 ) *
116
+ * Defined in [ account.ts:70 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L70 ) *
136
117
137
118
Checks if the address is a valid checksummed address.
138
119
@@ -142,7 +123,7 @@ See toChecksumAddress' documentation for details about the eip1191ChainId parame
142
123
143
124
Name | Type |
144
125
------ | ------ |
145
- ` address ` | string |
126
+ ` hexAddress ` | string |
146
127
` eip1191ChainId? ` | undefined | ; number |
147
128
148
129
** Returns:** * boolean*
153
134
154
135
▸ ** isValidPrivate** (` privateKey ` : Buffer): * boolean*
155
136
156
- * Defined in [ account.ts:125 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L125 ) *
137
+ * Defined in [ account.ts:121 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L121 ) *
157
138
158
139
Checks if the private key satisfies the rules of the curve secp256k1.
159
140
171
152
172
153
▸ ** isValidPublic** (` publicKey ` : Buffer, ` sanitize ` : boolean): * boolean*
173
154
174
- * Defined in [ account.ts:135 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L135 ) *
155
+ * Defined in [ account.ts:131 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L131 ) *
175
156
176
157
Checks if the public key satisfies the rules of the curve secp256k1
177
158
and the requirements of Ethereum.
@@ -189,17 +170,17 @@ ___
189
170
190
171
### ` Const ` isZeroAddress
191
172
192
- ▸ ** isZeroAddress** (` address ` : string): * boolean*
173
+ ▸ ** isZeroAddress** (` hexAddress ` : string): * boolean*
193
174
194
- * Defined in [ account.ts:27 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L27 ) *
175
+ * Defined in [ account.ts:29 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L29 ) *
195
176
196
177
Checks if a given address is a zero address.
197
178
198
179
** Parameters:**
199
180
200
181
Name | Type |
201
182
------ | ------ |
202
- ` address ` | string |
183
+ ` hexAddress ` | string |
203
184
204
185
** Returns:** * boolean*
205
186
209
190
210
191
▸ ** privateToAddress** (` privateKey ` : Buffer): * Buffer*
211
192
212
- * Defined in [ account.ts:169 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L169 ) *
193
+ * Defined in [ account.ts:166 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L166 ) *
213
194
214
195
Returns the ethereum address of a given private key.
215
196
227
208
228
209
▸ ** privateToPublic** (` privateKey ` : Buffer): * Buffer*
229
210
230
- * Defined in [ account.ts:177 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L177 ) *
211
+ * Defined in [ account.ts:174 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L174 ) *
231
212
232
213
Returns the ethereum public key of a given private key.
233
214
245
226
246
227
▸ ** pubToAddress** (` pubKey ` : Buffer, ` sanitize ` : boolean): * Buffer*
247
228
248
- * Defined in [ account.ts:154 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L154 ) *
229
+ * Defined in [ account.ts:151 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L151 ) *
249
230
250
231
Returns the ethereum address of a given public key.
251
232
Accepts "Ethereum public keys" and SEC1 encoded keys.
263
244
264
245
### ` Const ` toChecksumAddress
265
246
266
- ▸ ** toChecksumAddress** (` address ` : string, ` eip1191ChainId? ` : undefined | number): * string*
247
+ ▸ ** toChecksumAddress** (` hexAddress ` : string, ` eip1191ChainId? ` : undefined | number): * string*
267
248
268
- * Defined in [ account.ts:42 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L42 ) *
249
+ * Defined in [ account.ts:45 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L45 ) *
269
250
270
251
Returns a checksummed address.
271
252
@@ -280,7 +261,7 @@ used variation in Ethereum was without the chainId. This may change in the futur
280
261
281
262
Name | Type |
282
263
------ | ------ |
283
- ` address ` | string |
264
+ ` hexAddress ` | string |
284
265
` eip1191ChainId? ` | undefined | ; number |
285
266
286
267
** Returns:** * string*
291
272
292
273
▸ ** zeroAddress** (): * string*
293
274
294
- * Defined in [ account.ts:11 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L11 ) *
275
+ * Defined in [ account.ts:12 ] ( https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L12 ) *
295
276
296
277
Returns a zero address.
297
278
0 commit comments