mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-12 00:35:47 +00:00
* Expose parseAccountFlags() and add docs * Add example snippet * Default to node v10 for nvm * Maintain existing behavior for getSettings * Increase max line length from 80 to 120 (ter-max-len)
12 lines
432 B
JavaScript
12 lines
432 B
JavaScript
const RippleAPI = require('../dist/npm').RippleAPI
|
|
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
|
|
|
|
parseAccountFlags()
|
|
|
|
async function parseAccountFlags() {
|
|
await api.connect()
|
|
const account_info = await api.request('account_info', {account: 'rKsdkGhyZH6b2Zzd5hNnEqSv2wpznn4n6N'})
|
|
const flags = api.parseAccountFlags(account_info.account_data.Flags)
|
|
console.log(JSON.stringify(flags, null, 2))
|
|
}
|