- MailchainWeb Readme
Welcome to Mailchain
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 Message Lifecycle
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
- go to https://mailchain.xyz/inbox
- download the files in
The following address formats are referenced:
URL and Port Settings
By default, the Mailchain web interface expects to communicate with the Mailchain application running on the localhost using port 8080.
To change this:
Change server settings on the Inbox page
- Click 'Settings' on the Inbox page
- Make any updates
- Click 'save'
Change server settings using url query parameters
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.
||The Internet protocol e.g.
||The host e.g.
||The port e.g.
The following values are cached in the browser session storage:
|currentNetwork:||The current selected network (e.g.
|currentAccount:||The current selected account for this network|
|currentProtocol:||The current selected blockchain protocol|
|currentWebProtocol:||The current selected web protocol (e.g.
|currentPort:||The current selected port (e.g.
|currentHost:||The current selected host (e.g.
The Mailchain web application does not store message contents.
node_js version 13
ng serve for a dev server. Navigate to
http://localhost:4200/. The app will automatically reload if you change any of the source files.
ng build to build the project. The build artifacts will be stored in the
dist/ directory. Use the
--prod flag for a production build.
Running unit tests
ng test to execute the unit tests via Karma.
Security Review Status: pre-audit
The code in this repository has not been audited.