open-index/open-npm huggingface dataset:
npm package: @mailchain/addressing
Description: Mailchain addressing
Author: Mailchain
Latest version: 0.31.0

# Mailchain Addressing

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/addressing
```

Using yarn:

```bash
$ yarn add @mailchain/addressing
```

## Purpose

The addressing package is used by `@mailchain/sdk` to support securely sending and resolving blockchain addresses for the Mailchain protocol.
npm package: @mailchain/api
Description: Mailchain api tools
Author: Mailchain
Latest version: 0.31.0

# Mailchain API

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/api
```

Using yarn:

```bash
$ yarn add @mailchain/api
```

## Purpose

The signatures package is used by `@mailchain/sdk` to communicate to Mailchain's protocol and services.

**Note: The API package is not intended to be used directly. Instead it should be used via the SDK as the majority of Mailchain's API's are authenticated. Requests need to be encrypted and signed before sending to across the wire. Response need to be decrypted and or verified before being used.**
npm package: @mailchain/crypto
Description: Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.
Latest version: 0.31.0

# Mailchain Crypto

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/crypto
```

Using yarn:

```bash
$ yarn add @mailchain/crypto
```

## Purpose

The crypto package is used by `@mailchain/sdk` to support securely registering blockchain addresses and sending messages via Mailchain.
npm package: @mailchain/encoding
Description: Mailchain encoding tools
Author: Mailchain
Latest version: 0.31.0

# Mailchain Encoding

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/encoding
```

Using yarn:

```bash
$ yarn add @mailchain/encoding
```

## Purpose

The encoding package is used by `@mailchain/sdk` to support encoding across different blockchain protocols.
npm package: @mailchain/internal
Description: Mailchain internal library
Author: Mailchain
Latest version: 0.31.0

# Mailchain Internal Library

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/internal
```

Using yarn:

```bash
$ yarn add @mailchain/internal
```

## Purpose

The internal package is used by `@mailchain/sdk` to support it's operations. It's available to developers to use however the interface is not yet stable so expect changes. Stable interfaces will be exposed to their own packages.
npm package: @mailchain/keyring
Description: Mailchain keyring
Author: Mailchain
Latest version: 0.31.0

# Mailchain Keyring

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/keyring
```

Using yarn:

```bash
$ yarn add @mailchain/keyring
```

## Purpose

The keyring package is used by `@mailchain/sdk` to support securely access messaging and account keys.
npm package: @mailchain/message-composer
Description: Mailchain MIME message composer. RFC-5322 compliant
Author: Mailchain
Latest version: 0.31.0

# Mailchain Message Composer

> **Warning** `@mailchain/message-composer` library is in development and may not cover all cases yet. Use with caution.

RFC-5322 compliant MIME message composer for Node and for the browser. Just add the content you want and let the library take care of formatting it according to the specification.

## Usage

```ts
const msg = createMessageComposer(messageComposerContext)
	// .id('47bdaf40-c3da-49f7-bfc7-66337f35c6c1@mailchain.com') // Optional
	.subject('Subject can contain UTF-8 chars including emojis 😉')
	// .date(new Date('08/28/2022')) // Optional
	.from({ name: 'Bob', address: 'bob@mailchain.com' })
	.recipients('To', { name: 'Alice', address: 'alice@mailchain.com' })
	.recipients('Cc', { name: 'Joe Doe', address: 'joe@mailchain.com' })
	.recipients(
		'Bcc',
		{ name: 'Jane Doe', address: 'jane@mailchain.com' },
		{ name: 'Bob', address: 'bob@mailchain.com' },
	)
	.message('plain', Buffer.from('Plaintext content. Can also contain UTF-8 and emojis 🤐.'))
	.message('html', Buffer.from('This is ✨rich-text✨ HTML <b>content</b>.'))
	.attachment({
		cid: 'bfcd3a31-646b-4dcd-a1ea-06d37baf7d2e',
		contentType: 'image/png',
		filename: 'mailchain-logo.png',
		content: readFileSync('mailchain-logo.png'),
	});

const { forSender, forVisibleRecipients, forBlindedRecipients } = await msg.build();
```

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/message-composer
```

Using yarn:

```bash
$ yarn add @mailchain/message-composer
```
npm package: @mailchain/sdk
Description: Mailchain sdk for sending messages to web3 addresses
Author: Mailchain
Latest version: 0.31.0

# Mailchain SDK

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/sdk
```

Using yarn:

```bash
$ yarn add @mailchain/sdk
```

## Example

Send your first message

Try sending your first message a message to `0xbb56FbD7A2caC3e4C17936027102344127b7a112@ethereum.mailchain.com`, that's us at Mailchain, we own the private key for `0xbb56FbD7A2caC3e4C17936027102344127b7a112`.

```ts
import { Mailchain } from '@mailchain/sdk';

const secretRecoveryPhrase = process.env.SECRET_RECOVERY_PHRASE!; // 24 word mnemonicPhrase

const mailchain = Mailchain.fromSecretRecoveryPhrase(secretRecoveryPhrase);

const { data, error } = await mailchain.sendMail({
	from: `yoursername@mailchain.com`, // sender address
	to: [`0xbb56FbD7A2caC3e4C17936027102344127b7a112@ethereum.mailchain.com`], // list of recipients (blockchain or mailchain addresses)
	subject: 'My first message', // subject line
	content: {
		text: 'Hello Mailchain 👋', // plain text body
		html: '<p>Hello Mailchain 👋</p>', // html body
	},
});

if (error) {
	// handle error
	console.warn('Mailchain error', error);
	return;
}
// handle success send mail result
console.log(data);
```

_You can send a message to yourself your `username@mailchain` if you've registered an ethereum address you can send a message to it `0x.....@mailchain.com`, or try sending a message to `0xbb56FbD7A2caC3e4C17936027102344127b7a112@ethereum.mailchain.com`, that's us at Mailchain, we own the private key for `0xbb56FbD7A2caC3e4C17936027102344127b7a112`._
npm package: @mailchain/signatures
Description: Mailchain signatures
Author: Mailchain
Latest version: 0.31.0

# Mailchain Signatures

Mailchain is a messaging protocol that lets users communicate across protocols. Using Mailchain you can send messages to any blockchain address on different protocols.

For full usage examples view the [developer docs](https://docs.mailchain.com).

## Installing

Using npm:

```bash
$ npm install @mailchain/signatures
```

Using yarn:

```bash
$ yarn add @mailchain/signatures
```

## Purpose

The signatures package is used by `@mailchain/sdk` to support creating and verifying proofs.