mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 13:15:49 +00:00
* Add *.tsbuildinfo to .gitignore * Bump versions of dependencies, nyc and yargs * Drop support for node 9 (EOL 2018-06-30) https://github.com/nodejs/Release * Add getTransaction snippet
14 lines
441 B
TypeScript
14 lines
441 B
TypeScript
import {RippleAPI} from '../../dist/npm'
|
|
|
|
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))
|
|
process.exit(0)
|
|
}
|