Add improvements to walkthrough

This commit is contained in:
Maria Shodunke
2025-08-19 13:04:46 +01:00
parent 06b3c80ac7
commit dff3298d60
6 changed files with 334 additions and 154 deletions

View File

@@ -1,17 +1,11 @@
// In browsers, use a <script> tag. In Node.js, uncomment the following line:
const xrpl = require('xrpl')
import xrpl from 'xrpl'
// Wrap code in an async function so we can use await
async function main() {
// Define the network client
const client = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await client.connect()
// Define the network client
const client = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await client.connect()
// ... custom code goes here
// ... custom code goes here
// Disconnect when done (If you omit this, Node.js won't end the process)
await client.disconnect()
}
main()
// Disconnect when done (If you omit this, Node.js won't end the process)
client.disconnect()