A minimal implementation of a Post Fiat Token (PFT) node that monitors and responds to PFT transactions on the XRPL network. When it receives a PFT transaction with a memo, it analyzes the memo using GPT and sends back a response.
- Python 3.11+
- OpenAI API key
- XRPL wallet seed (funded with XRP and trust line set up for PFT)
- 15+ XRP for wallet activation and trust line
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file with the following configuration:
OPENAI_API_KEY=your_openai_api_key_here
RIPPLED_URL=wss://s2.ripple.com # Optional, defaults to public node if not specified
NODE_WALLET_SEED=your_wallet_seed_here # Your funded XRPL wallet seed
-
XRPL Connectivity
- Automatic connection to XRPL network (local node, specified node, or public node)
- Fallback mechanism for reliable connectivity
-
Transaction Monitoring
- Real-time monitoring of incoming PFT transactions
- Memo parsing and analysis
- Automatic response generation using GPT
-
Response System
- Automated responses to PFT transactions
- GPT-powered memo analysis
- Transaction deduplication to prevent double responses
Run the monitoring script:
python monitor.py
The node will:
- Connect to the XRPL network
- Start monitoring for incoming PFT transactions
- When a PFT transaction with a memo is received:
- Parse and analyze the memo using GPT
- Send back 1 PFT with the analysis as a response memo
To interact with the node:
- Send 1 PFT to the node's address
- Include a memo with your message
- Wait for the response transaction with GPT's analysis
-
Wallet Requirements:
- Your wallet must be funded with XRP (minimum 15 XRP for reserve)
- A trust line must be set up for PFT
- The wallet seed in .env must be the base58-encoded seed string (starts with 's')
-
API Keys:
- OpenAI API key must have sufficient credits
- Store API keys securely and never commit them to version control
- Never share your wallet seed
- Keep your .env file secure and never commit it to version control
- Maintain sufficient XRP balance for operations
- Monitor your OpenAI API usage
-
Connection Issues:
- The node will automatically try local RippleD first
- Then attempt to use the specified RIPPLED_URL
- Finally fall back to public node if needed
-
Wallet Issues:
- Ensure wallet seed is properly formatted (base58-encoded)
- Verify wallet is funded and trust line is set up
- Check for sufficient XRP balance
MIT License - See LICENSE file for details.