Skip to content

Commit 17d3f69

Browse files
ScottyPoiholgerd77
andauthored
docs: @links to class constructor methods (#4041)
* typedoc: don't ignore evm * Add @links to constructor methods for class objects --------- Co-authored-by: Holger Drewes <[email protected]>
1 parent 9e461f5 commit 17d3f69

File tree

8 files changed

+36
-8
lines changed

8 files changed

+36
-8
lines changed

packages/binarytree/src/binaryTree.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ interface Path {
3030

3131
/**
3232
* The basic binary tree interface, use with `import { BinaryTree } from '@ethereumjs/binarytree'`.
33+
*
34+
* A BinaryTree object can be created with the constructor method:
35+
*
36+
* - {@link createBinaryTree}
3337
*/
3438
export class BinaryTree {
3539
/** The options for instantiating the binary tree */

packages/blockchain/src/blockchain.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ import type {
5151
* Proof-of-Stake consensus is validated by the Ethereum consensus layer.
5252
* If consensus validation is desired for Ethash or Clique blockchains the
5353
* optional `consensusDict` option can be used to pass in validation objects.
54+
*
55+
* A Blockchain object can be created with the constructor method:
56+
*
57+
* - {@link createBlockchain}
5458
*/
5559
export class Blockchain implements BlockchainInterface {
5660
db: DB<Uint8Array | string, Uint8Array | string | DBObject>

packages/common/src/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ import type {
3838
* Common class to access chain and hardfork parameters and to provide
3939
* a unified and shared view on the network and hardfork state.
4040
*
41-
* Use the {@link Common.custom} static constructor for creating simple
41+
* Use the {@link createCustomCommon} constructor for creating simple
4242
* custom chain {@link Common} objects (more complete custom chain setups
4343
* can be created via the main constructor).
44+
*
45+
* Use the {@link createCommonFromGethGenesis} constructor for creating
46+
* a Common object from a Geth genesis file.
4447
*/
4548
export class Common {
4649
readonly DEFAULT_HARDFORK: string | Hardfork

packages/evm/src/evm.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ export function defaultBlock(): Block {
124124
}
125125

126126
/**
127-
* EVM is responsible for executing an EVM message fully
128-
* (including any nested calls and creates), processing the results
129-
* and storing them to state (or discarding changes in case of exceptions).
130-
* @ignore
127+
* The EVM (Ethereum Virtual Machine) is responsible for executing EVM bytecode, processing transactions, and managing state changes. It handles both contract calls and contract creation operations.
128+
*
129+
* An EVM instance can be created with the constructor method:
130+
*
131+
* - {@link createEVM}
131132
*/
132133
export class EVM implements EVMInterface {
133134
protected static supportedHardforks = [

packages/evm/typedoc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export default {
22
extends: '../../config/typedoc.mjs',
33
entryPoints: ['src'],
44
out: 'docs',
5-
exclude: ['test/**/*.ts', 'src/evm/**'],
5+
exclude: ['test/**/*.ts'],
66
}

packages/mpt/src/mpt.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ import type { OnFound } from './util/asyncWalk.ts'
5151

5252
/**
5353
* The basic trie interface, use with `import { MerklePatriciaTrie } from '@ethereumjs/mpt'`.
54+
*
55+
* A MerklePatriciaTrie object can be created with the constructor method:
56+
*
57+
* - {@link createMPT}
58+
*
59+
* A sparse MerklePatriciaTrie object can be created from a merkle proof:
60+
*
61+
* - {@link createMPTFromProof}
5462
*/
5563
export class MerklePatriciaTrie {
5664
protected readonly _opts: MPTOptsWithDefaults = {

packages/verkle/src/verkleTree.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ interface Path {
2727

2828
/**
2929
* The basic verkle tree interface, use with `import { VerkleTree } from '@ethereumjs/verkle'`.
30+
*
31+
* A VerkleTree object can be created with the constructor method:
32+
*
33+
* - {@link createVerkleTree}
3034
*/
3135
export class VerkleTree {
3236
_opts: VerkleTreeOpts

packages/vm/src/vm.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ import type { BigIntLike } from '@ethereumjs/util'
1010
import type { VMEvent, VMOpts } from './types.ts'
1111

1212
/**
13-
* Execution engine which can be used to run a blockchain, individual
14-
* blocks, individual transactions, or snippets of EVM bytecode.
13+
* The VM is a state transition machine that executes EVM bytecode and updates the state.
14+
* It can be used to execute transactions, blocks, individual transactions, or snippets of EVM bytecode.
15+
*
16+
* A VM can be created with the constructor method:
17+
*
18+
* - {@link createVM}
1519
*/
1620
export class VM {
1721
/**

0 commit comments

Comments
 (0)