Skip to content

LTO Network | Private layer communication service

Notifications You must be signed in to change notification settings

ltonetwork/relay

Folders and files

NameName
Last commit message
Last commit date
Jul 6, 2023
Feb 8, 2024
Feb 11, 2025
Feb 2, 2024
Feb 8, 2024
Jun 21, 2023
Mar 29, 2024
Jun 21, 2023
Mar 26, 2024
May 27, 2024
Feb 9, 2024
Aug 1, 2024
Sep 26, 2024
Sep 27, 2024
Sep 27, 2024
Jun 21, 2023
Jun 21, 2023
Feb 11, 2025

Repository files navigation

LTO github readme

Relay

Build Status

Communication service for the LTO Network private layer. Relays encrypted messages between accounts.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

# test all
$ npm run test:all

Client usage

import LTO from '@ltonetwork/lto';
import { Relay, Message } from '@ltonetwork/lto/messages';

const lto = new LTO('T');
lto.relay = new Relay('http://localhost:3000'); // Connect to your local relay service

const account = lto.account({ seed: "My seed phrase" });

const message = new Message('hello')
  .to('3MsAuZ59xHHa5vmoPG45fBGC7PxLCYQZnbM')
  .signWith(account);

await lto.anchor(account, message.hash);
await lto.relay.send(message);

See documentation for more information.

About

LTO Network | Private layer communication service

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages