Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created July 23, 2018 15:09
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/b8879a123b432485f68a3e4a1139af23 to your computer and use it in GitHub Desktop.
Save WietseWind/b8879a123b432485f68a3e4a1139af23 to your computer and use it in GitHub Desktop.
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