You will be able to communicate with any web3 address with Mailchain. That means you can send and receive messages to and from blockchain addresses (aka accounts or wallets).
It’s just like email but we’re convinced it’s better, it’s built for web3 but with a frenly user experience. You get a familiar inbox with:
- End-to-end encryption
- Decentralised object storage (IPFS, etc.)
- Name registries (ENS, etc)
- Is multi-protocol
- And... much more 🚀
We'd ❤️ for you to join our growing community on Discord. It's the best place to reach us and get involved.
Follow @mailchain_xyz on Twitter to hear about new releases and updates.
If Discord isn’t right for you, contact us via traditional email.
This repository contains the Mailchain Web Application that is powered by https://github.com/mailchain/mailchain, built to the Mailchain specification.
Extract from the Mailchain specification:
Mailchain enables blockchain-based email-like messaging with plain or rich text and attachment capabilities. Using blockchain protocols and decentralized storage, Mailchain delivers a simple, secure, messaging experience.
Account holders or owners of a public address often need to communicate in the context of the account or public address. Communication may relate to transactions, account actions or some type of notification.
Examples of use cases for blockchain messaging include invoicing, receipts, contacting users of a service or application developers.
The majority of blockchain protocols provide no standard way to handle messaging. Some account holders have sent messages as an encrypted or unencrypted string included in transaction data. Some applications work around the problem by asking users to link another method of contact (e.g. email address, phone number etc.) to an application. This compromises anonymity by asking users to link or reveal an identity. It also increases exposure to security risks, and relies on additional centralized services.
This proposal outlines how Mailchain gives users the ability to send and receive rich-media HTML messages between public addresses through a simple, email-like interface. All message contents and attachments are encrypted so only the intended recipient of the message can decrypt and view messages.
Mailchain is a simple, secure and practical standard which can be implemented across different blockchains. It uses underlying native blockchain protocol capabilities including addressing, immutability, data transmission, and cryptography.
The basic message flow is as follows:
-
A user sends a message. The message is encrypted and stored using the recipient’s public key so that only the recipient can locate and decrypt the message contents. The encrypted location of the message is sent by the sender to the recipient in the data field of a transaction.
-
To read a message, a recipient uses a corresponding private key to decrypt the location of the message from the data field of a transaction and decrypt the message contents.
-
To use the Mailchain Web Application, you need to be running the mailchain application which contains the api and configuration for messaging.
-
Then to use the mailchain web interface, either:
- download the files in
/dist
, or - go to https://inbox.mailchain.xyz
- download the files in
The following address formats are referenced:
Address Format | Example | Notes |
---|---|---|
Ethereum | 0xd5ab4ce3605cd590db609b6b5c8901fdb2ef7fe6 |
Case insensitive |
Mailchain | <[email protected]> |
Case insensitive |
By default, the Mailchain web interface expects to communicate with the Mailchain application running on the localhost using port 8080.
To change this:
- Click 'Settings' on the Inbox page
- Make any updates
- Click 'save'
It is possible to change the settings programatically using a url with params. For example, http://localhost:4200/#/?web-protocol=http&host=localhost&port=8080
will configure the Inbox to use: http
to contact localhost
on port 8080
. The Inbox will set the values, then refresh the page.
Query Parameter | Description |
---|---|
web-protocol |
The Internet protocol e.g. http or https |
host |
The host e.g. localhost , 127.0.0.1 or another host |
port |
The port e.g. 8080 |
The following values are cached in the browser session storage:
Key | Value |
---|---|
currentNetwork: | The current selected network (e.g. ropsten , mainnet ) |
currentAccount: | The current selected account for this network |
currentProtocol: | The current selected blockchain protocol |
currentWebProtocol: | The current selected web protocol (e.g. https or http ) for contacting the mailchain application |
currentPort: | The current selected port (e.g. 8080 ) for contacting the mailchain application |
currentHost: | The current selected host (e.g. 127.0.0.1 , localhost , etc.) for contacting the mailchain application |
The Mailchain web application does not store message contents.
node_js version 13
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
The code in this repository has not been audited.