Skip to content

Send encrypted messages through the XRP Ledger using Ed25519/X25519 cryptography.

Notifications You must be signed in to change notification settings

gamween/XRPL-Encrypted-Messaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XRPL Encrypted Messaging

Send encrypted messages through the XRP Ledger using Ed25519/X25519 cryptography.

How it works

  1. Your message is encrypted using the recipient's public key
  2. The encrypted message is attached to an XRPL transaction as a Memo
  3. Only the recipient can decrypt it using their private key

Setup

  1. Install dependencies:

    npm install
  2. Get a testnet wallet (public address and seed) from the XRPL Faucets.

  3. Copy .env.example to .env and fill in your values:

    cp .env.example .env
  4. Edit .env with:

    • MY_SEED: Your XRPL wallet seed
    • RECIPIENT_PUBLIC_KEY: The recipient's Ed25519 public key (starts with ED)
    • MESSAGE: The message you want to send

Finding the recipient's public key

  1. Go to XRPL Testnet Explorer
  2. Search for the recipient's address
  3. Look at any transaction they've sent
  4. Copy the SigningPubKey field (must start with ED for Ed25519)

Sending a message

Run the script to send an encrypted message:

node index.js

Note: By default, the transaction also sends 10 XRP to the recipient. You can adjust this amount in index.js at line 64 by changing Amount: "10000000" (value is in drops, 1 XRP = 1,000,000 drops).

Decrypting a message

  1. Edit .env with:

    • MY_SEED: Your XRPL wallet seed
    • SENDER_PUBLIC_KEY: The sender's Ed25519 public key (from SigningPubKey in the transaction)
    • MEMO_DATA: The MemoData field from the received transaction
  2. Run:

    node decypher.js

About

Send encrypted messages through the XRP Ledger using Ed25519/X25519 cryptography.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors