mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
convert the rest of the helper files to ts
This commit is contained in:
16
test/integration/broadcast-test.ts
Normal file
16
test/integration/broadcast-test.ts
Normal 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();
|
||||
Reference in New Issue
Block a user