Skip to content
A web application for mailchain
TypeScript HTML CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
e2e
src
.coveralls.yml
.gitignore
.travis.yml
LICENSE
README.md
angular.json
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

MailchainWeb Readme

FOSSA Status Build Status Coverage Status Join the chat at https://gitter.im/Mailchain/community

Welcome to Mailchain

This repository contains the Mailchain Web Application that is powered by https://github.com/mailchain/mailchain, built to the Mailchain specification.


About Mailchain

Extract from the Mailchain specification:

Introduction

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.


Getting Started

  1. To use the Mailchain Web Application, you need to be running the mailchain application which contains the api and configuration for messaging.

  2. Then to use the mailchain web interface, either:

Address Formats

The following address formats are referenced:

Address Format Example Notes
Ethereum 0xd5ab4ce3605cd590db609b6b5c8901fdb2ef7fe6 Case insensitive
Mailchain <0xd5ab4ce3605cd590db609b6b5c8901fdb2ef7fe6@ropsten.ethereum> Case insensitive

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

  1. Click 'Settings' on the Inbox page
  2. Make any updates
  3. 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.

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

Browser Storage

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 mailchian application
currentPort: The current selected port (e.g. 8080) for contacting the mailchian application
currentHost: The current selected host (e.g. 127.0.0.1, localhost, etc.) for contacting the mailchian application

Message Storage

The Mailchain web application does not store message contents.

Development Info

Development server

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.

Build

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.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

License

FOSSA Status

You can’t perform that action at this time.