Skip to content
This repository was archived by the owner on Jun 17, 2021. It is now read-only.

Commit a91eaf3

Browse files
committed
Regenerate docs
1 parent cdf0b3c commit a91eaf3

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

docs/README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ ___
165165

166166
**● publicToAddress**: *[pubToAddress]()* = pubToAddress
167167

168-
*Defined in [account.ts:151](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L151)*
168+
*Defined in [account.ts:160](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L160)*
169169

170170
___
171171
<a id="setlength"></a>
@@ -225,7 +225,7 @@ Converts a `Buffer` or `Array` to JSON.
225225
| ba | `any` | (Buffer\|Array) |
226226

227227
**Returns:** `any`
228-
(Array|String|null)
228+
(Array\|String\|null)
229229

230230
___
231231
<a id="buffertohex"></a>
@@ -236,7 +236,7 @@ ___
236236

237237
*Defined in [bytes.ts:111](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/bytes.ts#L111)*
238238

239-
Converts a `Buffer` into a hex `String`.
239+
Converts a `Buffer` into a `0x`\-prefixed hex `String`.
240240

241241
**Parameters:**
242242

@@ -376,7 +376,7 @@ ___
376376

377377
**generateAddress**(from: *`Buffer`*, nonce: *`Buffer`*): `Buffer`
378378

379-
*Defined in [account.ts:63](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L63)*
379+
*Defined in [account.ts:72](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L72)*
380380

381381
Generates an address of a newly created contract.
382382

@@ -396,7 +396,7 @@ ___
396396

397397
**generateAddress2**(from: *`Buffer` \| `string`*, salt: *`Buffer` \| `string`*, initCode: *`Buffer` \| `string`*): `Buffer`
398398

399-
*Defined in [account.ts:83](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L83)*
399+
*Defined in [account.ts:92](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L92)*
400400

401401
Generates an address for a contract created using CREATE2.
402402

@@ -436,7 +436,7 @@ ___
436436

437437
**importPublic**(publicKey: *`Buffer`*): `Buffer`
438438

439-
*Defined in [account.ts:174](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L174)*
439+
*Defined in [account.ts:183](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L183)*
440440

441441
Converts a public key to the Ethereum format.
442442

@@ -455,7 +455,7 @@ ___
455455

456456
**isPrecompiled**(address: *`Buffer` \| `string`*): `boolean`
457457

458-
*Defined in [account.ts:105](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L105)*
458+
*Defined in [account.ts:114](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L114)*
459459

460460
Returns true if the supplied address belongs to a precompiled account (Byzantium).
461461

@@ -491,17 +491,20 @@ ___
491491

492492
### `<Const>` isValidChecksumAddress
493493

494-
**isValidChecksumAddress**(address: *`string`*): `boolean`
494+
**isValidChecksumAddress**(address: *`string`*, chainId?: *`undefined` \| `number`*): `boolean`
495495

496-
*Defined in [account.ts:54](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L54)*
496+
*Defined in [account.ts:63](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L63)*
497497

498498
Checks if the address is a valid checksummed address.
499499

500+
If a chainId is provided, the address is compared to an EIP-1191 checksum. Otherwise, it will be compared to an EIP-55 checksum.
501+
500502
**Parameters:**
501503

502504
| Name | Type |
503505
| ------ | ------ |
504506
| address | `string` |
507+
| `Optional` chainId | `undefined` \| `number` |
505508

506509
**Returns:** `boolean`
507510

@@ -512,7 +515,7 @@ ___
512515

513516
**isValidPrivate**(privateKey: *`Buffer`*): `boolean`
514517

515-
*Defined in [account.ts:113](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L113)*
518+
*Defined in [account.ts:122](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L122)*
516519

517520
Checks if the private key satisfies the rules of the curve secp256k1.
518521

@@ -531,7 +534,7 @@ ___
531534

532535
**isValidPublic**(publicKey: *`Buffer`*, sanitize?: *`boolean`*): `boolean`
533536

534-
*Defined in [account.ts:123](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L123)*
537+
*Defined in [account.ts:132](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L132)*
535538

536539
Checks if the public key satisfies the rules of the curve secp256k1 and the requirements of Ethereum.
537540

@@ -632,7 +635,7 @@ ___
632635

633636
**privateToAddress**(privateKey: *`Buffer`*): `Buffer`
634637

635-
*Defined in [account.ts:157](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L157)*
638+
*Defined in [account.ts:166](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L166)*
636639

637640
Returns the ethereum address of a given private key.
638641

@@ -651,7 +654,7 @@ ___
651654

652655
**privateToPublic**(privateKey: *`Buffer`*): `Buffer`
653656

654-
*Defined in [account.ts:165](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L165)*
657+
*Defined in [account.ts:174](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L174)*
655658

656659
Returns the ethereum public key of a given private key.
657660

@@ -670,7 +673,7 @@ ___
670673

671674
**pubToAddress**(pubKey: *`Buffer`*, sanitize?: *`boolean`*): `Buffer`
672675

673-
*Defined in [account.ts:142](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L142)*
676+
*Defined in [account.ts:151](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L151)*
674677

675678
Returns the ethereum address of a given public key. Accepts "Ethereum public keys" and SEC1 encoded keys.
676679

@@ -742,7 +745,7 @@ Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
742745
| `Default value` right | `boolean` | false | whether to start padding form the left or right |
743746

744747
**Returns:** `any`
745-
(Buffer|Array)
748+
(Buffer\|Array)
746749

747750
___
748751
<a id="setlengthright"></a>
@@ -763,7 +766,7 @@ Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
763766
| length | `number` | the number of bytes the output should be |
764767

765768
**Returns:** `any`
766-
(Buffer|Array)
769+
(Buffer\|Array)
767770

768771
___
769772
<a id="sha256"></a>
@@ -808,17 +811,20 @@ ___
808811

809812
### `<Const>` toChecksumAddress
810813

811-
**toChecksumAddress**(address: *`string`*): `string`
814+
**toChecksumAddress**(address: *`string`*, chainId?: *`undefined` \| `number`*): `string`
812815

813-
*Defined in [account.ts:35](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L35)*
816+
*Defined in [account.ts:38](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/account.ts#L38)*
814817

815818
Returns a checksummed address.
816819

820+
If a chainId is provided, the result will be an EIP-1191 checksum. Otherwise, it will be an EIP-55 checksum.
821+
817822
**Parameters:**
818823

819824
| Name | Type |
820825
| ------ | ------ |
821826
| address | `string` |
827+
| `Optional` chainId | `undefined` \| `number` |
822828

823829
**Returns:** `string`
824830

@@ -882,7 +888,7 @@ Trims leading zeros from a `Buffer` or an `Array`.
882888
| a | `any` | (Buffer\|Array\|String) |
883889

884890
**Returns:** `any`
885-
(Buffer|Array|String)
891+
(Buffer\|Array\|String)
886892

887893
___
888894
<a id="zeroaddress"></a>

0 commit comments

Comments
 (0)