Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit f87e78a

Browse files
committed
Add types for Chain params
1 parent c87a662 commit f87e78a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/types.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,41 @@ export interface chainsType {
1111
}
1212
[key: string]: {}
1313
}
14+
15+
export interface Chain {
16+
name: string
17+
chainId: number
18+
networkId: number
19+
comment: string
20+
url: string
21+
genesis: GenesisBlock
22+
hardforks: Hardfork[]
23+
bootstrapNodes: BootstrapNode[]
24+
}
25+
26+
export interface GenesisBlock {
27+
hash: string
28+
timestamp: string | null
29+
gasLimit: number
30+
difficulty: number
31+
nonce: string
32+
extraData: string
33+
stateRoot: string
34+
}
35+
36+
export interface Hardfork {
37+
name: string
38+
block: number | null
39+
consensus: string
40+
finality: any
41+
}
42+
43+
export interface BootstrapNode {
44+
ip: string
45+
port: number | string
46+
network?: string
47+
chainId?: number
48+
id: string
49+
location: string
50+
comment: string
51+
}

0 commit comments

Comments
 (0)