Twitter Scan for Token Addresses
Overview
The Twitter Scan feature in Orama enables users to discover potential token addresses mentioned in a Twitter user's profile and tweets. This feature helps investors and researchers find tokens associated with specific creators, projects, or influencers by extracting Solana token addresses from their Twitter content.
Purpose
Twitter Scan serves several key purposes:
Discover token addresses mentioned by project developers or influencers
Verify token addresses claimed to be associated with a project
Find new or upcoming token launches before they're widely known
Research token connections to specific Twitter accounts
Identify potential investment opportunities through social discovery
How It Works
When a user initiates a Twitter scan for a specific username, Orama:
Retrieves the user's Twitter bio history and recent tweets through the Toto API
Scans the content for strings matching Solana token address patterns
Validates each potential address to ensure it's a legitimate token
Consolidates results to show unique addresses with their sources
Provides tools to research each discovered token
The scan works by examining three key sources:
Current and historical Twitter bio information
Recent tweets from the user's timeline
Latest tweets for real-time discoveries
Technical Implementation
1. User Interface
The Twitter Scan feature appears as a button labeled "Find Token Addresses on Twitter" in the Links Card section of the token analysis page when a Twitter username is available. When clicked, the button initiates the scanning process and displays a loading indicator while the backend processes the request.
2. API Endpoints
The feature utilizes a dedicated PHP endpoint (check_tweets.php
) that serves as an intermediary between the frontend and the Toto API. This endpoint supports several actions:
Check Bio History
Check Tweets
Check Latest Tweets
Validate Address
3. Response Format
Each API endpoint returns a JSON response with the following structure:
Or in case of an error:
4. Address Detection
The feature identifies potential Solana addresses using pattern matching with the following characteristics:
Base58 encoded strings
32-44 characters in length
May appear in plaintext or within URLs
Common URL patterns (like solscan.io, explorer.solana.com, etc.)
5. Address Validation
Each potential address undergoes validation to ensure it represents a real token:
Checks if the address corresponds to a valid Solana account
Verifies the account is a token mint
Ensures the token has the expected metadata structure
6. JavaScript Functions
The frontend implementation includes several key functions:
checkTokenAddresses()
The main function that orchestrates the entire scan process, handling the UI updates and coordinating the different scan types.
checkBioForAddresses(username)
Fetches and processes the user's Twitter bio history to find token addresses.
checkTweetsForAddresses(username)
Retrieves and analyzes the user's tweets to extract token addresses.
checkLatestTweetsForAddresses(username)
Fetches the most recent tweets from the user to find the latest mentioned tokens.
extractSolanaAddresses(text)
A utility function that identifies potential Solana addresses from text content using regex pattern matching.
validateSolanaAddress(address)
Validates whether a potential address is a legitimate Solana token.
User Experience
1. Initiating a Scan
Users can scan for token addresses by:
Viewing a token profile that has an associated Twitter account
Clicking the "Find Token Addresses on Twitter" button in the Links Card
Waiting for the scan to complete (typically 5-15 seconds)
2. Viewing Results
The scan results are displayed in a structured format that includes:
Total number of unique token addresses found
For each address:
The token address in monospace font for easy reading
Source information (Twitter Bio or Tweet with date)
A copy button to easily copy the address
A Solscan link button to view the token on Solscan.io
3. Error Handling
If the scan encounters issues, users are shown informative error messages explaining:
Connection problems to the Twitter API
Rate limiting or access restrictions
Other technical errors that might occur
Use Cases
For Investors
Discover new tokens mentioned by trusted influencers
Verify that a promoted token is actually associated with a claimed Twitter account
Track token mentions by specific projects or developers
Find tokens before they're widely known or listed on tracking sites
For Researchers
Map connections between Twitter accounts and token projects
Track token creation and promotion patterns
Identify networks of related tokens and accounts
Gather data on token promotion strategies
For Projects
Monitor mentions of their tokens across Twitter
Track when influencers or partners mention their token
Verify that their token is correctly associated with their Twitter presence
Technical Notes
API Integration
The Twitter Scan feature integrates with the Toto API from OZ.xyz, which provides:
Bio history retrieval
Tweet history access
Latest tweets functionality
Performance Considerations
The scan process is optimized to:
Minimize API calls by batching requests
Cache results where appropriate
Process text efficiently using regex pattern matching
Validate addresses in parallel where possible
Security Considerations
Input Validation: All Twitter usernames are sanitized before use
Error Handling: Comprehensive error capture prevents exposure of sensitive information
Rate Limiting: Implementation respects API rate limits to prevent service disruption
SSL Certificate Handling: Special handling for SSL certificates in different environments
Common Issues and Solutions
SSL Certificate Errors
In some environments, particularly development setups, SSL certificate validation might cause connection errors. The implementation handles this by:
Providing options to disable strict SSL verification in development
Maintaining proper verification in production environments
Logging detailed error information for debugging
Rate Limiting
Twitter API access is subject to rate limits. The implementation:
Implements exponential backoff for retries
Provides clear error messages when limits are reached
Caches results when possible to reduce API calls
Address Validation Failures
Some patterns may match the Solana address format but not be valid tokens. The implementation:
Validates each address before including it in results
Tracks and reports the number of invalid addresses found
Provides detailed logging for debugging validation issues
Best Practices
For Users
Scan Twitter accounts directly linked to projects for most reliable results
Remember that token mentions don't guarantee legitimacy
Always conduct further research on discovered tokens
Consider the context of token mentions (promotional, informational, etc.)
For Developers
Implement caching for API responses to improve performance
Handle rate limiting gracefully with backoff strategies
Provide clear feedback to users during the scanning process
Validate addresses thoroughly before presenting them as results
Limitations
Limited to tokens mentioned explicitly in Twitter content
Depends on Twitter API availability and rate limits
Cannot detect tokens mentioned in images or videos
May miss addresses if they're deliberately obfuscated
Historical retrieval is limited by Twitter API constraints
Future Enhancements
Planned improvements to the Twitter Scan feature include:
Extended Social Media Support: Scanning additional platforms (Discord, Telegram, etc.)
Enhanced Token Information: Providing basic token details alongside discovered addresses
Historical Analysis: Track when tokens were first mentioned by influential accounts
Network Analysis: Map relationships between accounts mentioning the same tokens
Sentiment Analysis: Determine the context and sentiment of token mentions
Automated Monitoring: Subscribe to alerts when specific accounts mention new tokens
FAQs
Q: How far back does the Twitter scan look?
A: The scan examines the account's bio history and up to 100 of their most recent tweets, plus the latest tweets at the time of scanning.
Q: Can I scan any Twitter account?
A: Yes, you can scan any public Twitter account by entering their username.
Q: How accurate is the token address detection?
A: The detection is highly accurate for explicitly mentioned addresses. It uses pattern matching to identify potential addresses and validation to confirm they are legitimate tokens.
Q: Why might some addresses be marked as invalid?
A: Some strings may match the Solana address pattern but not correspond to actual token accounts. The validation process filters these out to ensure only legitimate tokens are displayed.
Q: How often should I rescan an account?
A: For active accounts that frequently mention tokens, scanning every few days is recommended. For less active accounts, scanning monthly may be sufficient.
Q: Can I export the discovered addresses?
A: Currently, you can copy individual addresses from the results. A batch export feature is planned for a future update.
Q: Does the scan show which tokens are created by the account owner?
A: The scan shows tokens mentioned in the account's content but doesn't specifically identify creator relationships. You can use Orama's token analysis feature to investigate creator information further.
Q: How does the system handle deleted tweets or bio changes?
A: The scan works with available data at the time of scanning. If tweets are deleted or bios changed, subsequent scans will reflect the current state of the account's content.
Orama's Twitter Analysis is a powerful feature that scans Twitter profiles and tweets to discover and validate Solana token addresses. This tool helps users identify token mentions and validate them against blockchain data, providing valuable context for cryptocurrency research and analysis.
Key Capabilities
Token Address Detection - Finds Solana token addresses mentioned in Twitter bios and tweets
Address Validation - Validates detected addresses against the Solana blockchain
Historical Analysis - Examines past usernames and bio changes for suspicious patterns
Cross-Reference - Links Twitter accounts to token projects for better risk assessment
How It Works
The Twitter Analysis process involves:
Profile Identification: The system identifies a Twitter username associated with a project.
Data Collection: Orama retrieves data through multiple sources:
Bio History: Historical changes to a user's Twitter bio
Tweets: Content from the user's Twitter timeline
Latest Tweets: Most recent posts from the user
Address Extraction: Sophisticated pattern matching extracts potential Solana addresses from text.
Validation: Each extracted address is verified against the Solana blockchain to confirm it's a valid token.
Results Display: Validated addresses are presented with context and action options.
Key Components
1. Address Discovery
The system uses multiple methods to identify potential Solana addresses:
Direct Address Matching: Identifies standalone base58-encoded strings (32-44 characters)
URL Extraction: Parses addresses from common Solana-related URLs, including:
Solscan links (
solscan.io/token/[address]
)Explorer links (
explorer.solana.com/address/[address]
)Trading platform links (
pump.fun/coin/[address]
,dev.fun/coin/[address]
)
Context-Based Extraction: Recognizes addresses labeled with common identifiers:
"ca:" or "contract:" prefixes
"address:" prefix
Other contextual indicators that signify token addresses
2. Multi-Source Scanning
The analysis scans multiple Twitter data sources:
Bio History:
Retrieves historical bio changes via the Toto API
Useful for finding addresses previously mentioned but later removed
Provides timestamp context for when addresses were mentioned
Tweet Timeline:
Analyzes the user's regular tweet timeline
Captures addresses mentioned in content, images (via OCR), or linked content
Provides date and engagement context for each mention
Latest Tweets:
Focuses on the most recent posts for time-sensitive information
Prioritizes fresh content for newly launched or trending tokens
3. Address Validation
Each extracted address undergoes validation to ensure authenticity:
Format Validation: Confirms the string conforms to Solana address format
Blockchain Validation: Verifies the address exists on the Solana blockchain
Token Verification: Determines if the address is a legitimate SPL token
Filtering: Removes duplicate addresses and the current token address being viewed
4. Results Presentation
Results are displayed in a user-friendly format:
Address List: Clean presentation of validated addresses
Source Context: Indication of where each address was found (Bio or Tweet)
Date Information: When available, shows when the address was mentioned
Action Buttons:
Copy button for quick clipboard access
Solscan link for detailed blockchain exploration
Invalid Address Handling: Notification about addresses that were filtered out
Implementation Details
Address Extraction Function
The system uses a specialized function to extract Solana addresses from text:
Address Validation Function
Each discovered address is validated through the Solscan API:
Use Cases
The Twitter Analysis feature serves multiple use cases:
Token Discovery: Identifying other tokens mentioned by project creators
Supply Lock Verification: Finding references to token lock mechanisms
Project Relationship Mapping: Understanding connections between projects
Token Ecosystem Analysis: Discovering related tokens in a project's ecosystem
Risk Assessment: Identifying patterns of suspicious token promotions
Limitations
Users should be aware of the following limitations:
API Rate Limits: Analysis depends on Twitter API access through Toto
Historical Coverage: May not capture all historical tweets for older accounts
Pattern Matching Limits: Some unconventional address mentions might be missed
Validation Precision: Validation confirms existence but not token legitimacy
Private Accounts: Cannot analyze private Twitter accounts
Best Practices
For optimal use of the Twitter Analysis feature:
Use with Context: Combine findings with other research methods
Check Dates: Note when addresses were mentioned relative to token launches
Verify Relationships: Confirm connections between identified tokens
Follow Up: Use discovered addresses as starting points for deeper research
Regular Rescans: Periodically recheck accounts for new address mentions
Technical Architecture
The feature comprises three main components:
Frontend JavaScript: Handles user interaction, display, and address processing
PHP Endpoint: Manages API communication and caching
External APIs: Toto API for Twitter data and Solscan API for validation
API Endpoints
The system interacts with several API endpoints:
check_tweets.php
: Main controller endpoint that:Routes requests to appropriate APIs
Manages caching to reduce API load
Handles error conditions
External endpoints:
https://toto.oz.xyz/api/metadata/get_bio_history
https://toto.oz.xyz/api/metadata/get_tweets
https://toto.oz.xyz/api/metadata/get_latest_tweets
https://pro-api.solscan.io/v2.0/account/detail
Future Enhancements
Planned improvements to the Twitter Analysis feature:
Enhanced OCR: Better extraction of addresses from images
Sentiment Analysis: Understanding the context of address mentions
Timeline Correlation: Mapping address mentions to token price movements
Multi-Platform Support: Extending to other social platforms beyond Twitter
Relationship Visualization: Graphical representation of token connections
Frequently Asked Questions
Q: Why might some addresses be filtered out as invalid? A: Addresses may be invalid if they don't exist on Solana, aren't actual token addresses, or don't pass blockchain validation.
Q: How far back does the Twitter analysis go? A: The analysis covers the available bio history and recent tweets as provided by the Toto API, typically up to several hundred recent tweets.
Q: Can I analyze any Twitter account? A: Yes, as long as the account is public and accessible through the API.
Q: How accurate is the address detection? A: The system employs multiple pattern-matching techniques to achieve high accuracy, but may occasionally miss unconventional mentions or extract text that happens to match Solana address format but isn't actually an address.
Q: Are the results cached? A: Yes, results are cached to improve performance and reduce API load, with cache durations set appropriately for each data type.
User Interface
The Twitter analysis interface provides:
A search button to find token addresses associated with Twitter accounts
A loading indicator during the scanning process
A formatted list of discovered token addresses
Source information for each address (bio or tweet with date)
Options to copy addresses or view them on Solscan
Usage Example
To scan a Twitter account:
Enter the token address or project information in the main search
On the token page, look for the "Find Token Addresses on Twitter" button
Click the button to begin scanning the associated Twitter account
View the resulting list of token addresses found in the Twitter profile
API Usage
To check Twitter for token addresses programmatically:
OR
OR
Response Format:
Security and Privacy
No private Twitter data is stored permanently
All analysis is performed through public API endpoints
Results are cached temporarily to improve performance
User authorization is not required as only public data is accessed
Last updated