New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@mailchain/sdk

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mailchain/sdk

Mailchain sdk for sending messages to web3 addresses

latest
Source
npmnpm
Version
0.31.0
Version published
Maintainers
2
Created
Source

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.

Installing

Using npm:

$ npm install @mailchain/sdk

Using yarn:

$ 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.

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.

FAQs

Package last updated on 16 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts