Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Last active December 6, 2018 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/51af86636f4b6473334970339c671911 to your computer and use it in GitHub Desktop.
Save WietseWind/51af86636f4b6473334970339c671911 to your computer and use it in GitHub Desktop.
Send raw TX (XRPL)
const RippledWsClient = require('rippled-ws-client')
new RippledWsClient('wss://s1.ripple.com').then(Connection => {
console.log('<< Connected >>')
Connection.send({
command: 'submit',
tx_blob: 'AABBCCDDEEFF00112233445566778899...'
}).then(r => {
console.log('Done!', r)
}).catch(e => {
console.log('Err', e)
}).finally(() => {
Connection.close()
})
}).catch(r => {
// E.g.: when WebSocket URI is faulty
console.log('Couldn\'t connect', r)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment