This repository has been archived by the owner on Apr 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from ethereumjs/ts-migration
Typescript migration
- Loading branch information
Showing
52 changed files
with
2,716 additions
and
1,411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
.vscode | ||
package.json | ||
dist | ||
test-build | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# ethereumjs-block | ||
|
||
## Index | ||
|
||
### Classes | ||
|
||
- [Block](classes/block.md) | ||
- [BlockHeader](classes/blockheader.md) | ||
|
||
### Interfaces | ||
|
||
- [BlockData](interfaces/blockdata.md) | ||
- [BlockHeaderData](interfaces/blockheaderdata.md) | ||
- [Blockchain](interfaces/blockchain.md) | ||
- [ChainOptions](interfaces/chainoptions.md) | ||
- [TransformableToBuffer](interfaces/transformabletobuffer.md) | ||
|
||
### Type aliases | ||
|
||
- [BufferLike](#bufferlike) | ||
- [PrefixedHexString](#prefixedhexstring) | ||
|
||
### Functions | ||
|
||
- [blockFromRpc](#blockfromrpc) | ||
- [blockHeaderFromRpc](#blockheaderfromrpc) | ||
|
||
--- | ||
|
||
## Type aliases | ||
|
||
<a id="bufferlike"></a> | ||
|
||
### BufferLike | ||
|
||
**Ƭ BufferLike**: _`Buffer` \| [TransformableToBuffer](interfaces/transformabletobuffer.md) \| [PrefixedHexString](#prefixedhexstring) \| `number`_ | ||
|
||
_Defined in [types.ts:42](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/types.ts#L42)_ | ||
|
||
A Buffer, hex string prefixed with `0x`, Number, or an object with a toBuffer method such as BN. | ||
|
||
--- | ||
|
||
<a id="prefixedhexstring"></a> | ||
|
||
### PrefixedHexString | ||
|
||
**Ƭ PrefixedHexString**: _`string`_ | ||
|
||
_Defined in [types.ts:37](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/types.ts#L37)_ | ||
|
||
A hex string prefixed with `0x`. | ||
|
||
--- | ||
|
||
## Functions | ||
|
||
<a id="blockfromrpc"></a> | ||
|
||
### blockFromRpc | ||
|
||
▸ **blockFromRpc**(blockParams: _`any`_, uncles?: _`any`[]_, chainOptions?: _[ChainOptions](interfaces/chainoptions.md)_): [Block](classes/block.md) | ||
|
||
_Defined in [from-rpc.ts:14](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/from-rpc.ts#L14)_ | ||
|
||
Creates a new block object from Ethereum JSON RPC. | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
| ----------------------- | ------------------------------------------ | ------------------------------------------------------------------------------ | | ||
| blockParams | `any` | Ethereum JSON RPC of block (eth_getBlockByNumber) | | ||
| `Optional` uncles | `any`[] | Optional list of Ethereum JSON RPC of uncles (eth_getUncleByBlockHashAndIndex) | | ||
| `Optional` chainOptions | [ChainOptions](interfaces/chainoptions.md) | An object describing the blockchain | | ||
|
||
**Returns:** [Block](classes/block.md) | ||
|
||
--- | ||
|
||
<a id="blockheaderfromrpc"></a> | ||
|
||
### blockHeaderFromRpc | ||
|
||
▸ **blockHeaderFromRpc**(blockParams: _`any`_, chainOptions?: _[ChainOptions](interfaces/chainoptions.md)_): [BlockHeader](classes/blockheader.md) | ||
|
||
_Defined in [header-from-rpc.ts:11](https://github.com/ethereumjs/ethereumjs-block/blob/6adbfae/src/header-from-rpc.ts#L11)_ | ||
|
||
Creates a new block header object from Ethereum JSON RPC. | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
| ----------------------- | ------------------------------------------ | ------------------------------------------------- | | ||
| blockParams | `any` | Ethereum JSON RPC of block (eth_getBlockByNumber) | | ||
| `Optional` chainOptions | [ChainOptions](interfaces/chainoptions.md) | An object describing the blockchain | | ||
|
||
**Returns:** [BlockHeader](classes/blockheader.md) | ||
|
||
--- |
Oops, something went wrong.