mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
Use TypeScript project reference (#1002)
* 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
This commit is contained in:
13
snippets/src/parseAccountFlags.ts
Normal file
13
snippets/src/parseAccountFlags.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user