Skip to content

Transfers all NFTs from a specified issuer to another account.

Notifications You must be signed in to change notification settings

joshuahamsa/Transfer-XRPL-NFTs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Transfer-XRPL-NFTs

This script automates the transfer of NFTs on the XRP Ledger (XRPL) from one account to another. The script allows you to specify an NFT issuer address and taxon, find all matching NFTs in your wallet, and transfer them to a recipient address.

Features Connects to either XRPL Testnet or Mainnet. Uses xrpl-py to fetch NFTs from a specified issuer and taxon. Transfers all matching NFTs from the specified account to a recipient. Optionally allows testing with a single NFT before sending all. Validates all input data, including account addresses and taxon. Loads sensitive information like seed phrase from an environment file.

Prerequisites

  • Python 3.7 or higher
  • xrpl-py library
  • dotenv for loading environment variables

Installation

  1. Clone the repository:
git clone https://github.com/joshuahamsa/XRPL-NFT-Auto-Transfer.git
cd XRPL-NFT-Auto-Transfer
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure the .env file
  • Create a .env file in the root directory with the following line:
SEED=your_seed_here

Usage

  1. Run the script
python3 transfer.py
  1. Follow the prompts:
  • Select the network (1 for Testnet, 2 for Mainnet).
  • Enter the issuer address of the NFTs you'd like to send.
  • Enter the NFT taxon to filter NFTs by.
  • Enter the recipient address for the NFTs.
  • Choose whether to test by sending a single NFT first.
  1. Transfer Process:
  • The script will fetch NFTs that match the specified issuer and taxon.
  • If testing is enabled, it will transfer one NFT as a test.
  • After testing, it will transfer all remaining NFTs.

Example Run

Select the network to use (1 for Testnet, 2 for Mainnet): 1
Using Testnet
Enter the issuer address of the NFTs you'd like to send: rExampleIssuerAddress
Issuer address validated: rExampleIssuerAddress
Enter the Taxon of the NFT collection you'd like to send: 12345
NFT Taxon validated: 12345
Enter the address you'd like to send the NFTs to: rRecipientAddress
Recipient address validated: rRecipientAddress
Would you like to send 1 NFT as a test before sending all? (Y/N): y
Fetching NFTs for account rYourAddress...
Found 3 NFTs.
Creating offer to transfer NFT 000... to rRecipientAddress...
Offer created with index: 123456789
Sending one NFT as a test.
Starting transfer of remaining NFTs.
Sending NFT 001... to rRecipientAddress...
All NFTs have been sent.

Important Notes

  • Environment Variables: Ensure that SEED is securely set in the .env file to avoid exposing your wallet’s seed phrase.
  • Rate Limiting: Consider adding delays or rate-limiting if sending a large number of NFTs on the XRPL to avoid hitting rate limits on public nodes.
  • Use Testnet for Testing: For initial testing, it is recommended to use Testnet.

About

Transfers all NFTs from a specified issuer to another account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages