Ethereumjs-Webserver

@ethereumjs/client / Config

Class: Config

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Config(options?)

Parameters

Name Type
options ConfigOptions

Defined in

config.ts:316

Properties

accounts

Readonly accounts: [address: Address, privKey: Buffer][]

Defined in

config.ts:295


bootnodes

Optional Readonly bootnodes: Multiaddr[]

Defined in

config.ts:280


chainCommon

Readonly chainCommon: Common

Defined in

config.ts:311


datadir

Readonly datadir: string

Defined in

config.ts:277


debugCode

Readonly debugCode: boolean

Defined in

config.ts:291


disableBeaconSync

Readonly disableBeaconSync: boolean

Defined in

config.ts:301


disableSnapSync

Readonly disableSnapSync: boolean = false

Defined in

config.ts:304


discDns

Readonly discDns: boolean

Defined in

config.ts:292


discV4

Readonly discV4: boolean

Defined in

config.ts:293


dnsAddr

Readonly dnsAddr: string

Defined in

config.ts:290


events

Readonly events: EventBusType

Central event bus for events emitted by the different components of the client

Defined in

config.ts:255


execCommon

Readonly execCommon: Common

Defined in

config.ts:312


extIP

Optional Readonly extIP: string

Defined in

config.ts:282


forceSnapSync

Readonly forceSnapSync: boolean

Defined in

config.ts:302


key

Readonly key: Buffer

Defined in

config.ts:278


lastSyncDate

lastSyncDate: number

Defined in

config.ts:307


lightserv

Readonly lightserv: boolean

Defined in

config.ts:276


logger

Readonly logger: Logger

Defined in

config.ts:273


maxFetcherJobs

Readonly maxFetcherJobs: number

Defined in

config.ts:287


maxPeers

Readonly maxPeers: number

Defined in

config.ts:289


maxPerRequest

Readonly maxPerRequest: number

Defined in

config.ts:286


minPeers

Readonly minPeers: number

Defined in

config.ts:288


mine

Readonly mine: boolean

Defined in

config.ts:294


minerCoinbase

Optional Readonly minerCoinbase: Address

Defined in

config.ts:296


multiaddrs

Optional Readonly multiaddrs: Multiaddr[]

Defined in

config.ts:283


port

Optional Readonly port: number

Defined in

config.ts:281


safeReorgDistance

Readonly safeReorgDistance: number

Defined in

config.ts:298


saveReceipts

Readonly saveReceipts: boolean

Defined in

config.ts:284


servers

Readonly servers: (Libp2pServer | RlpxServer)[] = []

Defined in

config.ts:314


skeletonFillCanonicalBackStep

Readonly skeletonFillCanonicalBackStep: number

Defined in

config.ts:299


skeletonSubchainMergeMinimum

Readonly skeletonSubchainMergeMinimum: number

Defined in

config.ts:300


syncTargetHeight

Optional syncTargetHeight: bigint

Best known block height

Defined in

config.ts:309


synchronized

synchronized: boolean

Defined in

config.ts:306


syncmode

Readonly syncmode: SyncMode

Defined in

config.ts:274


transports

Readonly transports: string[]

Defined in

config.ts:279


txLookupLimit

Readonly txLookupLimit: number

Defined in

config.ts:285


vm

Optional Readonly vm: VM

Defined in

config.ts:275


CHAIN_DEFAULT

Static Readonly CHAIN_DEFAULT: "mainnet"

Defined in

config.ts:257


DATADIR_DEFAULT

Static Readonly DATADIR_DEFAULT: "./datadir"

Defined in

config.ts:260


DEBUGCODE_DEFAULT

Static Readonly DEBUGCODE_DEFAULT: false

Defined in

config.ts:268


DNSADDR_DEFAULT

Static Readonly DNSADDR_DEFAULT: "8.8.8.8"

Defined in

config.ts:267


LIGHTSERV_DEFAULT

Static Readonly LIGHTSERV_DEFAULT: false

Defined in

config.ts:259


MAXFETCHERJOBS_DEFAULT

Static Readonly MAXFETCHERJOBS_DEFAULT: 100

Defined in

config.ts:264


MAXPEERS_DEFAULT

Static Readonly MAXPEERS_DEFAULT: 25

Defined in

config.ts:266


MAXPERREQUEST_DEFAULT

Static Readonly MAXPERREQUEST_DEFAULT: 50

Defined in

config.ts:263


MINPEERS_DEFAULT

Static Readonly MINPEERS_DEFAULT: 1

Defined in

config.ts:265


PORT_DEFAULT

Static Readonly PORT_DEFAULT: 30303

Defined in

config.ts:262


SAFE_REORG_DISTANCE

Static Readonly SAFE_REORG_DISTANCE: 100

Defined in

config.ts:269


SKELETON_FILL_CANONICAL_BACKSTEP

Static Readonly SKELETON_FILL_CANONICAL_BACKSTEP: 100

Defined in

config.ts:270


SKELETON_SUBCHAIN_MERGE_MINIMUM

Static Readonly SKELETON_SUBCHAIN_MERGE_MINIMUM: 1000

Defined in

config.ts:271


SYNCMODE_DEFAULT

Static Readonly SYNCMODE_DEFAULT: Full = SyncMode.Full

Defined in

config.ts:258


TRANSPORTS_DEFAULT

Static Readonly TRANSPORTS_DEFAULT: string[]

Defined in

config.ts:261

Methods

getDataDirectory

getDataDirectory(dir): string

Returns the location for each DataDirectory

Parameters

Name Type
dir DataDirectory

Returns

string

Defined in

config.ts:398


getDnsDiscovery

getDnsDiscovery(option): boolean

Returns specified option or the default setting for whether DNS-based peer discovery is enabled based on chainName. true for goerli

Parameters

Name Type
option undefined | boolean

Returns

boolean

Defined in

config.ts:444


getNetworkDirectory

getNetworkDirectory(): string

Returns the network directory for the chain.

Returns

string

Defined in

config.ts:390


getV4Discovery

getV4Discovery(option): boolean

Returns specified option or the default setting for whether v4 peer discovery is enabled based on chainName. true for mainnet

Parameters

Name Type
option undefined | boolean

Returns

boolean

Defined in

config.ts:454


getClientKey

Static getClientKey(datadir, common): Promise<undefined | Buffer>

Gets the client private key from the config db.

Parameters

Name Type
datadir string
common Common

Returns

Promise<undefined | Buffer>

Defined in

config.ts:422


getConfigDB

Static getConfigDB(networkDir): Level<string | Buffer, Buffer>

Returns the config level db.

Parameters

Name Type
networkDir string

Returns

Level<string | Buffer, Buffer>

Defined in

config.ts:415