Setting Up a Trust Line (Bob's Edition) | XRPL Development in JavaScript Level 1
Next, let’s set up a trust line so that Bob can also receive DOJ
tokens.
Prerequisites
This guide proceeds with the following characters:
- Charlie (Token Issuer)
- Bob (Token Recipient)
Create the Script
The following is a script to set a trust line for Charlie’s tokens from Bob.
-
Modify the existing
trust_set.js
file in your project directory. -
Add the function call of
trust_set.js
as follows:- Enter Charlie’s testnet address in
charlie_wallet_address_here
. - Enter Charlie’s testnet address in
bob_wallet_secret_here
.
- Enter Charlie’s testnet address in
Run the Script
-
Run the following command in the command line to execute the script.
If successful, the console will display the following.
Now Bob can also receive the DOJ tokens issued by Charlie.
Using the payment_token.js created in the previous chapter, try sending tokens to Bob as well.