convert the rest of the helper files to ts

This commit is contained in:
Fred K. Schott
2019-10-15 21:12:18 -07:00
parent 7ec128c2e4
commit 39f6a51794
16 changed files with 89 additions and 112 deletions

View File

@@ -0,0 +1,16 @@
import {RippleAPIBroadcast} from '../../src';
function main() {
const servers = ['wss://s1.ripple.com', 'wss://s2.ripple.com'];
const api = new RippleAPIBroadcast(servers);
api.connect().then(() => {
api.getServerInfo().then(info => {
console.log(JSON.stringify(info, null, 2));
});
api.on('ledger', ledger => {
console.log(JSON.stringify(ledger, null, 2));
});
});
}
main();