PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo-express/node_modules/ripple-lib/test/integration
Просмотр файла: broadcast-test.js
'use strict';
const {RippleAPIBroadcast} = require('../../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();
Выполнить команду
Для локальной разработки. Не используйте в интернете!