beginner 45 min

Payments: XRP Transfers

Hands-on coding: connect to the XRP Ledger testnet, create funded wallets, and transfer XRP between accounts using xrpl.js. Includes a "print money" utility for testing.

Overview

Hands-on coding: connect to the XRP Ledger testnet, create funded wallets, and transfer XRP between accounts using xrpl.js. Includes a "print money" utility for testing.

Resources

Assignments

1. Create & Fund Wallets

Write a script that connects to testnet, creates two wallets with fundWallet(), and logs their addresses and balances.

2. Send 13 XRP

Build a Payment transaction sending 13 XRP from wallet1 to wallet2. Verify the result shows tesSUCCESS and check both balances after.

3. Print Money Helper

Implement the printMoney utility function that creates a new funded wallet and forwards 90 XRP to a destination. Test it by topping up an account multiple times.

Prerequisites

Complete these before starting this module:

Assignments

1

Create & Fund Wallets

Write a script that connects to testnet, creates two wallets with fundWallet(), and logs their addresses and balances.

2

Send 13 XRP

Build a Payment transaction sending 13 XRP from wallet1 to wallet2. Verify the result shows tesSUCCESS and check both balances after.

3

Print Money Helper

Implement the printMoney utility function that creates a new funded wallet and forwards 90 XRP to a destination. Test it by topping up an account multiple times.