Blockchain

constructor(chainSelector: ChainSelector, name: String, net: CnxnMgr, genesisBlockHash: Hash256, checkpointPriorBlockId: Hash256, checkpointId: Hash256, checkpointHeight: Long, checkpointWork: BigInteger, dbPrefix: String = "blkhdr_", fullSync: Boolean = true)

Parameters

chainSelector

Specify which blockchain to track.

name

You may give this blockchain a name, for logging.

net

Provide an object that manages connections to blockchain data providers (full and electrum nodes).

genesisBlockHash

Specify the genesis block hash for this blockchain

checkpointPriorBlockId

Specify the block hash of the parent of your chosen checkpoint. Use Hash256() if you are using the genesis block as your checkpoint.

checkpointId

Specify the block hash for your chosen checkpoint. A checkpoint is a block that is known to be on the main chain. The blockchain will start headers sync from this point. Some blockchain implementations (BCH) cannot rewind prior to this point to access wallet data. You may use the genesis block as your checkpoint.

checkpointHeight

Specify the block height of this checkpoint?

checkpointWork

Specify the cumulative work (NOT THE BLOCK WORK) of all prior blocks including the checkpoint block. This information is available in block explorers, or via the full node getblock RPC call.

dbPrefix

Block headers are stored in a database. Specify a prefix for DB name here (default is "blkhdr_"). The full name will be dbPrefix_name.db.