mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
18 lines
459 B
JavaScript
18 lines
459 B
JavaScript
// In browsers, use a <script> tag. In Node.js, uncomment the following line:
|
|
// const xrpl = require('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()
|
|
|
|
// ... custom code goes here
|
|
|
|
// Disconnect when done (If you omit this, Node.js won't end the process)
|
|
client.disconnect()
|
|
}
|
|
|
|
main()
|