Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Browserified, Babelified rippled-ws-client-pool
<script src="https://rygrfwx.dlvr.cloud/rippled-ws-client-pool.js"></script>
<script>
var RippledWsClientPool = require('rippled-ws-client-pool')
var connectionPool = new RippledWsClientPool()
var isReady = false
function launchApp () {
connectionPool.getTransactions('rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY', {})
.then(function (transactions) {
console.log(transactions)
})
}
connectionPool.addServer('wss://s1.ripple.com')
connectionPool.on('ledger', function (l) {
console.log('Ledger closed: ' + l)
if (!isReady) {
isReady = true
launchApp()
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment