Files
xrpl-dev-portal/content/_code-samples/get-started/js/base.js
mDuo13 b08f4334ea Refactor Send XRP: reliable sub, folders by language
- Use reliable transaction submission methods where available
- Update text to describe the functions (esp. xrpl.js 2.0 stuff)
- Move Send XRP code samples to subfolders by language for consistency
  with other tutorials
2021-10-14 19:41:23 -07:00

18 lines
462 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("https://s.altnet.rippletest.net:51234/")
await client.connect()
// ... custom code goes here
// Disconnect when done (If you omit this, Node.js won't end the process)
client.disconnect()
}
main()