@liskhq/lisk-genesis is a package which contains genesis block creation functions in accordance with the Lisk protocol.


npm install @liskhq/lisk-genesis


To perform an upgrade, execute the following command:

npm update @liskhq/lisk-genesis


const { TokenModule, DPoSModule, genesis, configDevnet } = require('lisk-sdk');

// Get account schemas of the modules which are registered with the application
const token = new TokenModule(configDevnet.genesisConfig).accountSchema;
const dpos = new DPoSModule(configDevnet.genesisConfig).accountSchema;
// Add fieldNumber starting from 2. Field number 1 is assigned to address of the account
token.fieldNumber = 2;
dpos.fieldNumber = 3;

// Pack all account schemas in one big object
const accountAssetSchemas = {

const delegates = [
        address: Buffer.from('25d4c1ed2da24ba856b894c209188f70e0caab6e', 'hex'),
		token: { balance: BigInt(2874239947) },
		dpos: { delegate: { username: 'ef374a2e8fb9934ad1db0fd5346eb7' } }

const accounts = [
        address: Buffer.from('dedfbd4c6a1ad1ef0d7a95cd6907114548d8c6d8', 'hex'),
        token: { balance: BigInt(653021139) }

const genesisBlockParams = {
	initDelegates: => a.address),
	accounts: [...accounts, ...delegates],

const genesisBlock = genesis.createGenesisBlock(genesisBlockParams);




Generates a genesis block based on the provided block parameters.




  • params(object): The block parameters that shall be used to generate the genesis block.

The following parameters are available:


Required. The genesis block needs to contain all account asset schemas for all modules which are registered with the respective blockchain application. The different account asset schemas are all grouped together in one big object and added as accountAssetSchemas to the genesis block params. accountAssetSchemas is one of the most important parameters for generating a valid genesis block, so make sure it includes all required account asset schemas.


Required. List of initial accounts in the network. The minimum required here is the address, but it can have other properties like balance. Addresses are expected to be in Buffer format.


Required. List of initial delegate addresses used during the bootstrap period to forge blocks. Addresses are expected to be in Buffer format.


Optional. Number of rounds for the bootstrap period, the default is 3.


Optional. Height of the genesis block.


Optional. Timestamp of the genesis block.


Optional. Previous block ID. For example, this can be used in case of regenesis.

Return value

The generated genesis block object.

  header: {
    generatorPublicKey: <Buffer >,
    height: 0,
    previousBlockID: <Buffer >,
    reward: 0n,
    signature: <Buffer >,
    timestamp: 1619688502,
    transactionRoot: <Buffer e3 b0 c4 42 98 fc 1c 14 9a fb f4 c8 99 6f b9 24 27 ae 41 e4 64 9b 93 4c a4 95 99 1b 78 52 b8 55>,
    version: 0,
    asset: { initRounds: 3, initDelegates: [Array], accounts: [Array] },
    id: <Buffer 3d 2a f6 c2 32 7b 63 65 21 06 4b 9e a6 3e af 21 c5 99 18 88 4d 3f 82 11 42 d9 5d 65 08 d8 a4 85>
  payload: []