Last active
December 6, 2018 06:17
-
-
Save WietseWind/51af86636f4b6473334970339c671911 to your computer and use it in GitHub Desktop.
Send raw TX (XRPL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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