Files
xahau.js/snippets/src/parseAccountFlags.ts
Mayukha Vadari 7696fb957e Removes methods that were just rippled wrappers (#1550)
* remove getAccountInfo

* remove getAccountObjects

* remove getBalanceSheet (gateway_balances)

* remove getLedger

* remove getOrders (account_orders)

* remove getPaymentChannel (ledger_entry)

* remove getTransaction(s) (tx/account_tx)

* remove getSettings (account_info)

* remove getServerInfo (server_info)

* fix integ tests

* remove submit (also deprecated)

* fix integ tests

* add TODO
2021-09-14 16:56:36 -04:00

19 lines
578 B
TypeScript

import {Client} from '../../dist/npm'
import { AccountFlags } from '../../dist/npm/common/constants'
const client = new Client('wss://s.altnet.rippletest.net:51233')
parseAccountFlags()
async function parseAccountFlags() {
await client.connect()
const account_info = await client.request({command: 'account_info', account: 'rKsdkGhyZH6b2Zzd5hNnEqSv2wpznn4n6N'})
const flags = account_info.result.account_data.Flags
for (const flagName in AccountFlags) {
if (flags & AccountFlags[flagName]) {
console.log(`${flagName} enabled`)
}
}
process.exit(0)
}