import LTO from "@ltonetwork/lto/raw/LTO";
import Transfer from "@ltonetwork/lto/raw/transactions/Transfer";
import {PublicNode} from "@ltonetwork/lto/raw/PublicNode";
import {Event} from "@ltonetwork/lto/raw/events";
const lto = new LTO('T'); // 'T' for testnet, 'L' for mainnet
const account = lto.account();
const node = new PublicNode('https://testnet.lto.network');
const recipient = "3JmEPiCpfL4p5WswT21ZpWKND5apPs2hTMB";
const transaction = new Transfer(recipient, amount);
transaction.signWith(account);
node.broadcast(transaction).then(resp => console.log(resp));
const chain = account.createEventChain();
"$schema": "http://specs.livecontracts.io/01-draft/12-comment/schema.json#",
"$schema": "http://specs.livecontracts.io/01-draft/02-identity/schema.json#",
"id": "1bb5a451-d496-42b9-97c3-e57404d2984f"
"content_media_type": "text/plain",
"content": "Hello world!"
chain.addEvent(new Event(body).signWith(account));