mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
* 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
19 lines
578 B
TypeScript
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)
|
|
}
|