Installation and usage of the platform

Precise platform configuration: node gRPC and REST API configuration

The gRPC and REST API parameters for each node are in the api section of the configuration file:

api {
  rest {
    # Enable/disable REST API
    enable = yes

    # Network address to bind to
    bind-address = "0.0.0.0"

    # Port to listen to REST API requests
    port = 6862

    # Enable/disable TLS for REST
    tls = no

    # Enable/disable CORS support
    cors = yes

    # Max number of transactions
    # returned by /transactions/address/{address}/limit/{limit}
    transactions-by-address-limit = 10000

    distribution-address-limit = 1000
  }

  grpc {
    # Enable/disable gRPC API
    enable = yes

    # Network address to bind to
    bind-address = "0.0.0.0"

    # Port to listen to gRPC API requests
    port = 6865

    # Enable/disable TLS for GRPC
    tls = no
  }

rest { } block

The rest { } block is used for setting of the REST API interface. It includes following parameters:

  • enable - activation of the node REST API. Enabling - yes, disabling - no.

  • bind-address - network address of the node where the REST API interface will be available.

  • port - port for listening REST API requests.

  • tls - enable/disable TLS for REST API requests. Enable - yes, disable - no.

  • cors - support of cross-domain requests to REST API. Enable - yes, disable - no.

  • transactions-by-address-limit - maximum number of transactions returned by GET /transactions/address/{address}/limit/{limit} method.

  • distribution-address-limit - maximum number of addresses specified in the limit field and returned by GET /assets/{assetId}/distribution/{height}/limit/{limit} method.

grpc { } block

The grpc { } block is used to configure the gRPC toolkit of a node. It includes the following parameters:

  • enable - activation of the gRPC interface on the node.

  • bind-address - the network address of the node where the gRPC interface will be available.

  • port - the listening port of the gRPC requests.

  • tls - enable/disable TLS for gRPC requests. This option requires setting of the node TLS.