アカウント情報の取得
account_info
コマンドを使用することでアカウントの情報(AccountRoot
オブジェクト)を取得することができます。
このコマンドにより、アカウントの残高や、アカウントの設定、アカウントの準備金のベースとなるオブジェクト数などのを取得することができます。
Loading...
Result:
Example
const { Client } = require('xrpl')
const client = new Client('wss://testnet.xrpl-labs.com')
client.connect().then(() => {
client
.request({
command: 'account_info',
account: 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59',
validated: true,
})
.then((response) => {
console.log(response)
})
})