1

Wallet configuration

Before launching, a wallet configuration file must be created. This is a JavaScript file containing a JSON object that describes the wallets that the application can sign transactions for. The file is in the following format:

module.exports = [
  {
    portfolioId: '<fees vault account ID>',
    currency: 'ETH',
    walletFilename: 'eth-wallet.copper',
    walletPassword: process.env.ETH_WALLET_PASSWORD,
  },
  {
    portfolioId: '<fees vault account ID>',
    currency: 'TRX',
    walletFilename: 'trx-wallet.copper',
    walletPassword: process.env.TRX_WALLET_PASSWORD,
  },
];

Any number of wallets can be configured in this file, but each wallet must have the following properties:

  • portfolioId - the ID of the fees vault account that the wallet is associated with
  • currency - the currency that the wallet is associated with
  • walletFilename - the filename of the wallet backup file as used in the Copper Unlimited Online instance
  • walletPassword - the password used to encrypt the wallet backup file (in the example given above, this is an environment variable)
2

Start the app

Configure and run the Copper Unlimited Online instance with shards for the configured MPC wallets in your organization’s fees vault. See the examples in the Copper Unlimited Online guide.

To launch the server, use the command below:

docker run --rm -ti \
  -v ${PWD}/wallets-config.js:/app/wallets-config.js \
  -e APP_ENVIRONMENT='testnet' \
  -e APP_CUSTODY_DOCKER_URL='{url-of-cu-online}:3010' \
  -e APP_API_KEY='{copper-platform-api-key}' \
  -e APP_API_SECRET='{copper-platform-api-secret}' \
  -e APP_WITHDRAWAL_PASSWORD='{withdrawal-password}' \
  copperexchange/hot-wallet:latest

# ${PWD}/wallets-config.js is the wallet config file described above.
# The APP_ENVIRONMENT variable can be 'testnet', 'stage' or 'mainnet' (see details above).
# The APP_CUSTODY_DOCKER_URL variable is the URL of the CU Online instance that the application will connect to.
# The APP_API_KEY and APP_API_SECRET variables are the API key and secret that the application will use to connect to the Copper API.
# The APP_WITHDRAWAL_PASSWORD variable is the withdrawal password of the organization that the application will use to authenticate for withdrawals.

After starting the server, it should now be possible to send token transfers from proxy addresses paying the fees from the fees vault account. In this flow, orders will be created automatically to cover the fees amounts and the dockerized application will sign and broadcast the transactions to the blockchain.