Skip to content

Private Keys

You can use existing private keys if you wish, rrelayer will import them on startup and create relayers for you automatically, if you got many networks, it creates a relayer for each pk on every network for you.

Usage

To enable private keys signing, you need to add its config in the YAML under the private_keys key:

rrelayer.yaml
name: first-rrelayer
description: "my first rrelayer"
api_config:
  port: 3000
  authentication_username: "${RRELAYER_AUTH_USERNAME}"
  authentication_password: "${RRELAYER_AUTH_PASSWORD}"
signing_provider: 
  private_keys: 
    - raw: "${PK_1}"
    - raw: "${PK_2}"

You can have as many PKs as you want and map them in the .env file.

Using with another signing provider

As private keys only import and don't allow you to create new ones, you can use private key signers with any other signing provider you wish.

Example below of having private key signers as well as aws secret manager.

rrelayer.yaml
name: first-rrelayer
description: "my first rrelayer"
api_config:
  port: 3000
  authentication_username: ${RRELAYER_AUTH_USERNAME}
  authentication_password: ${RRELAYER_AUTH_PASSWORD}
signing_provider: 
  aws_secret_manager: 
    id: "testing-josh-relayer"
    key: "seed"
    region: "eu-west-1"
  private_keys: 
    - raw: "${PK_1}"
    - raw: "${PK_2}"