Mailchain
Search…
Mailchain Settings: Viewing and Updating
By default, Mailchain comes preconfigured with some default values to make it easier to get started.
To configure your own values, for example, adding your API Key for Etherscan to retrieve your messages, you can edit the config (by default located in ~/.mailchain/.mailchain.yaml )
By default, mailchain.yaml only has a few lines of config, e.g.
1
server:
2
cors:
3
disabled: false
4
port: 8080
5
version: 0.0.65
Copied!
Each value you add to the config overrides the default value. To view the current values, run the following command:
1
mailchain settings view
Copied!
It will show the default values with # in front.
Mailchain default settings
To edit the values, for example, adding an Etherscan.io API Key (available here) to be able to poll their API and check for new messages on Ethereum Mainnet, add the following to you config file:
1
server:
2
cors:
3
disabled: false
4
port: 8080
5
protocols:
6
ethereum:
7
networks:
8
mainnet:
9
public-key-finder: "etherscan"
10
receiver: "etherscan"
11
public-key-finders:
12
etherscan:
13
api-key: "<YOUR-ETHERSCAN_API_KEY>"
14
receivers:
15
etherscan:
16
api-key: "<YOUR-ETHERSCAN_API_KEY>"
Copied!
Now if you run the mailchain settings view command again, you will see that the config shows in the output without the # before the line:
Now, when you run mailchain serve, the Mailchain API client will be using the values you configured.
To revert to defaults, simply remove the value from the config file.
Last modified 1yr ago
Copy link