-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconflux.d.ts
196 lines (194 loc) · 6.35 KB
/
conflux.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/* auto-generated by NAPI-RS */
/* eslint-disable */
export declare class ConfluxNode {
constructor()
startNode(config: ConfluxConfig, jsCallback: ((err: Error | null, arg: null) => any)): void
stopNode(jsCallback: ((err: Error | null, arg: null) => any)): void
}
export interface ConfluxConfig {
/**
* Set the node type to Full node, Archive node, or Light node.
* Possible values are "full", "archive",or"light".
* @default "full"
*/
nodeType?: string
/**
* If it's not set, blocks will only be generated after receiving a transaction.Otherwise,
* the blocks are automatically generated every
*/
devBlockIntervalMs?: number
/** mining_author is the address to receive mining rewards. */
miningAuthor?: string
/**
* Listen address for stratum
* @default "127.0.0.1"
*/
stratumListenAddress?: string
/**
* `mining_type` is the type of mining.
* stratum | cpu | disable
*/
miningType?: string
/** Port for stratum. */
stratumPort?: number
/** log_conf` the path of the log4rs configuration file. The configuration in the file will overwrite the value set by `log_level`. */
logConf?: string
/**
* `log_file` is the path of the log file"
* If not set, the log will only be printed to stdout, and not persisted to files.
*/
logFile?: string
/**
* log_level` is the printed log level.
* "error" | "warn" | "info" | "debug" | "trace" | "off"
*/
logLevel?: string
/**
* The port of the websocket JSON-RPC server(public_rpc_apis is user defined).
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcWsPort?: number
/**
* `tcp_port` is the TCP port that the process listens for P2P messages. The default is 32323.
* @default 32323
*/
tcpPort?: number
/**
* `udp_port` is the UDP port used for node discovery.
* @default 32323
*/
udpPort?: number
/**
* Possible Core space names are: all, safe, cfx, pos, debug, pubsub, test, trace, txpool.
* `safe` only includes `cfx` and `pubsub`, `txpool`.
* @default "all"
*/
publicRpcApis?: string
/**
* Possible eSpace names are: eth, ethpubsub, ethdebug.
* @default 'evm'
*/
publicEvmRpcApis?: string
/**
* The chain ID of the network.(core space)
* @default 1234
*/
chainId?: number
/**
* The chain ID of the network.( eSpace)
* @default 1235
*/
evmChainId?: number
/**
* The password used to encrypt the private key of the pos_private_key.
* @default "123456"
*/
devPosPrivateKeyEncryptionPassword?: string
/** The private key of the genesis (core space), every account will be receive 10000 CFX */
genesisSecrets?: Array<string>
/** The private key of the genesis (eSpace), every account will be receive 10000 CFX */
genesisEvmSecrets?: Array<string>
/**
* If it's `true`, `DEFERRED_STATE_EPOCH_COUNT` blocks are generated after
* receiving a new tx through RPC calling to pack and execute this
* transaction
*/
devPackTxImmediately?: boolean
/** @default:1 */
posReferenceEnableHeight?: number
/** @default:2 */
defaultTransitionTime?: number
/** @default:3 */
cip1559TransitionHeight?: number
/**
* Enable CIP43A, CIP64, CIP71, CIP78A, CIP92 after hydra_transition_number
* @default:1
*/
hydraTransitionNumber?: number
/**
* Enable cip76, cip86 after hydra_transition_height
* @default:1
*/
hydraTransitionHeight?: number
/** @default: temp dir */
confluxDataDir?: string
/** pos config path */
posConfigPath?: string
/** pos initial_nodes.json path */
posInitialNodesPath?: string
/** pos pos_key file path */
posPrivateKeyPath?: string
/**
* Database type to store block-related data.
* Supported: rocksdb, sqlite.
* @default sqlite
*/
blockDbType?: string
/** bootnodes is a list of nodes that a conflux node trusts, and will be used to sync the blockchain when a node starts. */
bootnodes?: string
/** Window size for PoW manager */
powProblemWindowSize?: number
/** # Secret key for stratum. The value is 64-digit hex string. If not set, the RPC subscription will not check the authorization. */
stratumSecret?: string
/** `public_address` is the address of this node used */
publicAddress?: string
/**
* `jsonrpc_http_keep_alive` is used to control whether to set KeepAlive for rpc HTTP connections.
* @default false
*/
jsonrpcHttpKeepAlive?: boolean
/** `print_memory_usage_period_s` is the period for printing memory usage. */
printMemoryUsagePeriodS?: number
/**
* The port of the http JSON-RPC server.public_rpc_apis is user defined).
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcHttpPort?: number
/**
* The port of the tcp JSON-RPC server. public_rpc_apis is user defined).
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcTcpPort?: number
/**
* The port of the http JSON-RPC server public_rpc_apis is user defined).
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcHttpEthPort?: number
/**
* The port of the websocket JSON-RPC serverpublic_rpc_apis is user defined).
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcWsEthPort?: number
/**
* The port of the tcp JSON-RPC server(public_rpc_apis is "all").
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcLocalTcpPort?: number
/**
* The port of the http JSON-RPC server(public_rpc_apis is "all").
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcLocalHttpPort?: number
/**
* The port of the websocket JSON-RPC server(public_rpc_apis is "all").
* if not set, the JSON-RPC server will not be started.
* @default null
*/
jsonrpcLocalWsPort?: number
/**
* `poll_lifetime_in_seconds` is the lifetime of the poll in seconds.
* If set, the following RPC methods will be enabled:
* - `cfx_newFilter` `cfx_newBlockFilter` `cfx_newPendingTransactionFilter` `cfx_getFilterChanges` `cfx_getFilterLogs` `cfx_uninstallFilter`.
* - `eth_newFilter` `eth_newBlockFilter` `eth_newPendingTransactionFilter` eth_getFilterChanges eth_getFilterLogs eth_uninstallFilter
*/
pollLifetimeInSeconds?: number
/** if `get_logs_filter_max_limit` is configured but the query would return more logs */
getLogsFilterMaxLimit?: number
}