Sending message

You can send simple messages (with plain text and no subject) using this simplified approach:

await ylide.core.sendSimpleMessage(
   '0x15a33D60283e3D20751D6740162D1212c1ad2a2d', // recipient
   'Hello world! :)' // content

Or, you can make it a little bit more advanced:

const content = MessageContentV5.simple(
	'Test subject',
	'Hello Ylide world :)'

const msgId = await ylide.sendMessage({
	sender: account,
	recipients: ['0x15a33D60283e3D20751D6740162D1212c1ad2a2d'],

Here we go. Message sent.

Isn't it truly amazing? You've just sent a cross-chain message with two lines of code!

Last updated