Checking Trust Line Information Linked to an Issuer | XRPL Development in JavaScript Level 1
In the previous chapter, even though Rippling
was enabled, the token transfer from Alice to Bob failed.
To identify why this happened, let’s check the trust line information linked to Charlie.
To retrieve trust line account information, use the account_lines command, a public method of rippled.
Prerequisites
This guide proceeds with the following characters:
- Charlie (Token Issuer)
- Alice (Token Recipient)
Create the Script
To check the list of trust lines, use the account_lines command.
-
Create a new file named
check_account_lines.js
in your project directory. -
Paste the following code into
check_account_lines.js
.Please enter the testnet address of
Charlie in charlie_wallet_address_here
.
Run the Script
-
Run the following command in the command line to execute the script.
-
If successful, the console will display the following.
From the Charlie’s perspective, the issuer, the trust lines linked to the accounts are shown as
no_ripple: true
.Additionally, the
-1000
indicates that from Charlie’s perspective, there is a debt of 1000 DOJ tokens to Alice. This concept is similar to a government bond held by citizens.
About Rippling and Trust Line Relationships
Alice and Bob have set up trust lines and have the right to receive tokens from Charlie, but the NoRipple flag
was enabled.
This was caused because the trust line was set before enabling the Rippling flag
on Charlie’s account, the issuer of the DOJ token.
To generally allow token transfers between users, you need to enable the issuer’s account Rippling
first, and then have users set up their trust lines.
In the next chapter, we will explain how to disable the NoRipple flag using the TrustSet
transaction.