Development is done using the Go Programming Language. The version of go is specified in the project's go.mod file. This document assumes that you have a functioning environment setup. If you need assistance setting up an environment please visit the official Go documentation website.
Fork the repository and clone it to your local environment (see contributing guidelines).
To compile and run the package locally, you need to run the following command in place of mailchain command found in the docs:
go run cmd/mailchain/main.go
+ COMMAND
e.g. serve
, account list
etc..
To add account
to your development version
- Navigate into the directory of the repository
- Run:
go run cmd/mailchain/main.go account add --protocol=ethereum --network=mainnet --key-type="secp256k1" --private-key=YOUR_PRIVATE_KEY
To serve
your development version
- Navigate into the directory of the repository
- Run:
go run cmd/mailchain/main.go serve
Mailchain requires contracts module installed to run. Edgeware has this module installed by default. Mailchain runs against mainnet, beresheet and local networks:
- Run the command corresponding to the network you want to send message on
make edgeware-mainnet
,make edgeware-beresheet
, ormake edgeware-local
. Note: pull lastest version, if there has been a release it will ask you to continue with new image. Confirm with "y" - Add keys and start Mailchain client.
- Set protocol to
substrate
and network to the desired option in Mailchain settings. - Open Mailchain inbox.
- Send from an SR25519 address to any SR25519 address.
From time to time, there may be pending breaking changes that have not been released. This means that if you use the web inbox, it may not work as desired.
We track this and patch the https://inbox-staging.mailchain.xyz to address these teething issues. If you think something may be broken using the regular inbox, try this. If still broken, please raise an issue.