@ethereumjs/client / Config
• new Config(options?
)
Name | Type |
---|---|
options |
ConfigOptions |
• Readonly
accounts: [address: Address, privKey: Buffer][]
• Optional
Readonly
bootnodes: Multiaddr
[]
• Readonly
chainCommon: Common
• Readonly
datadir: string
• Readonly
debugCode: boolean
• Readonly
disableBeaconSync: boolean
• Readonly
disableSnapSync: boolean
= false
• Readonly
discDns: boolean
• Readonly
discV4: boolean
• Readonly
dnsAddr: string
• Readonly
events: EventBusType
Central event bus for events emitted by the different components of the client
• Readonly
execCommon: Common
• Optional
Readonly
extIP: string
• Readonly
forceSnapSync: boolean
• Readonly
key: Buffer
• lastSyncDate: number
• Readonly
lightserv: boolean
• Readonly
logger: Logger
• Readonly
maxFetcherJobs: number
• Readonly
maxPeers: number
• Readonly
maxPerRequest: number
• Readonly
minPeers: number
• Readonly
mine: boolean
• Optional
Readonly
minerCoinbase: Address
• Optional
Readonly
multiaddrs: Multiaddr
[]
• Optional
Readonly
port: number
• Readonly
safeReorgDistance: number
• Readonly
saveReceipts: boolean
• Readonly
servers: (Libp2pServer
| RlpxServer
)[] = []
• Readonly
skeletonFillCanonicalBackStep: number
• Readonly
skeletonSubchainMergeMinimum: number
• Optional
syncTargetHeight: bigint
Best known block height
• synchronized: boolean
• Readonly
syncmode: SyncMode
• Readonly
transports: string
[]
• Readonly
txLookupLimit: number
• Optional
Readonly
vm: VM
▪ Static
Readonly
CHAIN_DEFAULT: "mainnet"
▪ Static
Readonly
DATADIR_DEFAULT: "./datadir"
▪ Static
Readonly
DEBUGCODE_DEFAULT: false
▪ Static
Readonly
DNSADDR_DEFAULT: "8.8.8.8"
▪ Static
Readonly
LIGHTSERV_DEFAULT: false
▪ Static
Readonly
MAXFETCHERJOBS_DEFAULT: 100
▪ Static
Readonly
MAXPEERS_DEFAULT: 25
▪ Static
Readonly
MAXPERREQUEST_DEFAULT: 50
▪ Static
Readonly
MINPEERS_DEFAULT: 1
▪ Static
Readonly
PORT_DEFAULT: 30303
▪ Static
Readonly
SAFE_REORG_DISTANCE: 100
▪ Static
Readonly
SKELETON_FILL_CANONICAL_BACKSTEP: 100
▪ Static
Readonly
SKELETON_SUBCHAIN_MERGE_MINIMUM: 1000
▪ Static
Readonly
SYNCMODE_DEFAULT: Full
= SyncMode.Full
▪ Static
Readonly
TRANSPORTS_DEFAULT: string
[]
▸ getDataDirectory(dir
): string
Returns the location for each DataDirectory
Name | Type |
---|---|
dir |
DataDirectory |
string
▸ getDnsDiscovery(option
): boolean
Returns specified option or the default setting for whether DNS-based peer discovery
is enabled based on chainName. true
for goerli
Name | Type |
---|---|
option |
undefined | boolean |
boolean
▸ getNetworkDirectory(): string
Returns the network directory for the chain.
string
▸ getV4Discovery(option
): boolean
Returns specified option or the default setting for whether v4 peer discovery
is enabled based on chainName. true
for mainnet
Name | Type |
---|---|
option |
undefined | boolean |
boolean
▸ Static
getClientKey(datadir
, common
): Promise
<undefined
| Buffer
>
Gets the client private key from the config db.
Name | Type |
---|---|
datadir |
string |
common |
Common |
Promise
<undefined
| Buffer
>
▸ Static
getConfigDB(networkDir
): Level
<string
| Buffer
, Buffer
>
Returns the config level db.
Name | Type |
---|---|
networkDir |
string |
Level
<string
| Buffer
, Buffer
>