Installation
This guide covers the complete installation process for XRP Transaction Risk AI, including Python dependencies, Streamlit setup, Redis configuration, and environment setup.System requirements
- Python 3.8 or higher
- pip package manager
- Redis server 5.0 or higher
- 2GB RAM minimum
- Internet connection for API access
Installation steps
Clone or download the source code
Get the project files into your working directory:Ensure you have the following files:
ripple_challange.py- Main applicationcrawl_util.py- Web crawling utilitiesLogoLeaf.png- Application icon
Install Python dependencies
The application requires several Python packages. Install them using pip:OpenAI
For AI assistants and vector storage integrationxrpl-py
Official Python library for XRP Ledgerrequests
HTTP library for XRPScan API callsBeautifulSoup4
HTML parsing for web crawlingredis
Redis client for caching crawled data
Core dependencies
Streamlit Web application framework for the interactive UIInstall and configure Redis
Redis is used to cache crawled website data, preventing duplicate crawls.On macOS (using Homebrew):On Ubuntu/Debian:On Windows:Download and install Redis from the official releases or use WSL.Expected output:
Verify Redis installation
PONGThe application expects Redis on
localhost:6379 as configured in crawl_util.py:11Set up OpenAI API and assistants
Get your OpenAI API key
- Sign up at platform.openai.com
- Navigate to API keys section
- Create a new API key
- Save it securely
Create a vector storage
Create three assistants
1. Summary AssistantGet XRP Testnet credentials
The application needs testnet wallet credentials for sending test transactions.
Using XRP Testnet Faucet
- Visit XRP Testnet Faucet
- Click “Generate Testnet credentials”
- Save the address and secret
Configure application secrets
Create the Streamlit secrets file with all required credentials:Create
.streamlit/secrets.toml:.streamlit/secrets.toml
Configuration reference
Fromripple_challange.py:12-13 and ripple_challange.py:73-77:Add
.streamlit/secrets.toml to your .gitignore to prevent accidentally committing sensitive credentials.Verify installation
Test that everything is configured correctly:The application should:Test XRP Testnet connectivity:
- Open in your browser at
http://localhost:8501 - Display the title “Regulation risk AI by Sweephy on XRP Ledger”
- Show the input form for wallet address and amount
- Have no error messages in the terminal or browser
Quick connectivity test
Check Redis connection:Configuration details
XRP Ledger connection
The application connects to XRP Testnet at:XRPScan API
Account information is fetched from:Redis caching strategy
TheCrawlUtil class caches crawled websites to avoid redundant crawls:
- Crawled HTML content stored in OpenAI vector storage
- URL to file ID mappings
- Timestamp-based sorted sets for cache management
Environment variables (alternative to secrets.toml)
If you prefer environment variables over Streamlit secrets:ripple_challange.py to read from os.environ instead of st.secrets.
Troubleshooting
Redis connection refused
Error:redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.
Solution: Start Redis server:
OpenAI API errors
Error:openai.AuthenticationError: Incorrect API key provided
Solution: Verify your API key in .streamlit/secrets.toml is correct and has proper permissions.
XRP Testnet connection issues
Error: Connection timeouts tos.altnet.rippletest.net
Solution: Check your internet connection and firewall settings. The testnet may occasionally be unavailable.
Missing dependencies
Error:ModuleNotFoundError: No module named 'xrpl'
Solution: Install missing packages:
Next steps
Quickstart guide
Run your first risk assessment now that installation is complete
Introduction
Learn more about the system architecture and capabilities