Technical description of the platform

Generators

Generators is a set of utilities included in the supply package of the Waves Enterprise blockchain platform. Generators are developed as a package file generator-x.x.x.jar, where x.x.x is a blockchain platform release version.

Generators for each version of the blockchain platform are available in the official GitHub repository of Waves Enterprise.

In order to work with the generators, you have to install the Java Runtime Environment for your operating system. All components of the generator set are operated in the terminal or command line.

The generator set includes following utilities:

  • AccountsGeneratorApp - node account generator;

  • GenesisBlockGenerator - genesis block signer;

  • ApiKeyHash - a generator for hash coding of an API key string required for node API authorization;

AccountsGeneratorApp

The AccountsGeneratorApp is used for configuration of a node account in a private network - a set of data about a blockchain network participant. In order to generate an account, you have to set up the accounts.conf file in the node directory.

Running of the AccountsGeneratorApp:

java -jar generators-x.x.x.jar AccountsGeneratorApp YourNode/accounts.conf

The generator creates a node public key (account) and stores it in the keystore.dat file in the directory of your node. If necessary, you can set a keypair password.

Hint

If you have set the password for your keypair, you have to state it in the password field while creating queries and transactions.

Learn more about node account generating in the section Creation of the node account.

GenesisBlockGenerator

The GenesisBlockGenerator is used for signing of a private network genesis block - a first block of a new network which contains transactions that define initial balances and permissions. To sign a genesis block, the generator uses the blockchain.genesis block of the node.conf node configuration file.

Running of the GenesisBlockGenerator:

java -jar generators-x.x.x.jar GenesisBlockGenerator YourNode/node.conf

The generator fills the fields genesis-public-key-base-58 (a public key of a genesis block) and signature (genesis block signature) of a node configuration file.

Learn more about genesis block signing in the section Signing of a genesis block and start of the platform.

ApiKeyHash

The ApiKeyHash utility is used for authorization of the node API methods (gRPC and REST API interfaces for data exchange). For generation of a JWT token (in case of oAuth authorization) or a token based on an api-key string, the generator uses the api-key-hash.conf configuration file in the node directory.

Running of the ApiKeyHash:

java -jar generators-x.x.x.jar ApiKeyHash YourNode/api-key-hash.conf

The utility generates a JWT token or a hash of an entered api-key string, that are stated in the auth section of the node configuration file.

Пример файла api-key-hash.conf:

apikeyhash-generator {
  waves-crypto = yes
  api-key = "some string for api-key"
}

Learn more about gRPC and REST API authorization in the section Additional configuration of the platform: configuration of the gRPC and REST API authorization.