This repository contains scripts in both JavaScript and Python to interact with the XRP Ledger (XRPL). These scripts allow testing functionalities such as wallet generation, trustline approval, transactions, and Automated Market Maker (AMM) operations.
The scripts are divided into two main folders:
js/
β Contains JavaScript scripts for XRPL interactions.python/
β Contains Python scripts for XRPL interactions.
generate.js
β Generates a new XRPL wallet (address & seed) πgenerate_and_trustline.js
β Generates a wallet and establishes a trustline π€trustline.js
β Creates a trustline for the RLUSD token πxrp_transaction.js
β Handles XRP transactions πΈrlusd_transaction.js
β Manages RLUSD token transactions π°amm_create_RLUSD_XRP.js
β Creates an AMM pool for RLUSD/XRP pair π¦amm_deposit_RLUSD_XRP.js
β Deposits assets into an existing AMM pool π₯
generate.py
β Generates a new XRPL wallet (address & seed) πgenerate_and_trustline.py
β Generates a wallet and establishes a trustline π€trustline.py
β Creates a trustline for the RLUSD token πxrp_transaction.py
β Handles XRP transactions πΈrlusd_transaction.py
β Manages RLUSD token transactions π°amm_create_RLUSD_XRP.py
β Creates an AMM pool for RLUSD/XRP pair π¦amm_deposit_RLUSD_XRP.py
β Deposits assets into an existing AMM pool π₯
- Clone this repo and navigate to the
js/
folder. - Run
npm install
to install dependencies.
- Navigate to the
python/
folder. - Install required packages:
pip install -r requirements.txt
or:
# Create a virtual env
python3 -m venv myenv
# Activate env
source myenv/bin/activate # On macOS/Linux
# myenv\Scripts\activate # On Windows
# Install xrpl-py in the virtual env
pip install xrpl-py```
- All scripts are designed for the XRPL Testnet.
- Keep your wallet seed secure and never share it.
- Ensure you have sufficient XRP for fees and reserves.
- RLUSD operations require an established trustline first.