Skip to content

Keystore

Debendra Oli edited this page Mar 17, 2024 · 14 revisions

The relay features built-in keystore functionality. This allows the relay to sign transactions and messages without the need for an external keystore. The relay keystore is encrypted using a password and stored in a file.

The passowrd is stored and encrypted using AWS KMS.

The KMS guide can be found on KMS section.

Usage

centralized-relay keystore [command] [flags]

The more detailed documentation for the commands can be found here.

centralized-relay keystore --help

Create a Keystore

This is assuming that the KMS is configured correctly.

List all available chains

centralized-relay chains list

1: 0xa869.fuji          -> type(evm)
2: 0x2.icon             -> type(icon)
centralized-relay keystore new --chain 0xa869.fuji  --password test

This command will create a keystore for the chain 0xa869.fuji and store it in the default keystore directory. The default keystore directory is ~/.centralized-relay/keystore/<chain-id>.

Import a keystore

centralized-relay keystore import --chain 0x2.icon --keystore <keystore-file-path-to-import> --password <password for existing keystore>

This command will import the keystore from the file and store it in the default keystore directory. The default keystore directory is ~/.centralized-relay/keystore/<chain-id>.

List all available keystores

centralized-relay keystore list --chain 0xa869.fuji

This command will list all the available keystores for the chain 0xa869.fuji.

Wallet Balance
0x7CE64B2479F39cA57705F328aa62Ba2be95461DE 0.000000eth
0xB89596d95b2183722F16d4C30B347dadbf8C941a 2.061747eth
0xC8eC79EB45eD273F99E0f11ed9C4A6fee456c36F 0.000000eth
0x0B958dd815195F73d6B9B91bFDF1639457678FEb 0.000000eth
0x3B4fB81FF8EdEbb163EFaBEB4A35d0E586253d87 0.000000eth

Use a keystore

centralized-relay keystore use --chain 0xa869.fuji --address 0xB89596d95b2183722F16d4C30B347dadbf8C941a

This command will use the keystore 0x7CE64B2479F39cA57705F328aa62Ba2be95461DE for the chain 0xa869.fuji. This command will also set the default keystore for the chain 0xa869.fuji.

The trust wallet address which relay will use will be also set to the centralised contract connection for the specified chain. The available chains can be listed using the command centralized-relay chains list.

Clone this wiki locally