Orama
  • Orama Platform Overview
  • Features
    • Orama Risk Assessment Methodology
    • Orama Risk Score Assessment
    • Token Analysis
    • Token Price Formatting
    • Twitter CA Finder
    • Twitter Analysis
    • Twitter Scan for Token Addresses
    • GitHub Repository Analysis
  • API
    • Orama API Documentation
  • Extension
    • Chrome Extension
  • Socials
    • Twitter
  • Web
Powered by GitBook
On this page
  • Overview
  • Purpose
  • How It Works
  • Technical Implementation
  • User Experience
  • Use Cases
  • Technical Notes
  • Common Issues and Solutions
  • Best Practices
  • Limitations
  • Future Enhancements
  • FAQs
  • Key Capabilities
  • How It Works
  • Key Components
  • Implementation Details
  • Use Cases
  • Limitations
  • Best Practices
  • Technical Architecture
  • Future Enhancements
  • Frequently Asked Questions
  • User Interface
  • Usage Example
  • API Usage
  • Security and Privacy
  1. Features

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:

  1. Discover token addresses mentioned by project developers or influencers

  2. Verify token addresses claimed to be associated with a project

  3. Find new or upcoming token launches before they're widely known

  4. Research token connections to specific Twitter accounts

  5. Identify potential investment opportunities through social discovery

How It Works

When a user initiates a Twitter scan for a specific username, Orama:

  1. Retrieves the user's Twitter bio history and recent tweets through the Toto API

  2. Scans the content for strings matching Solana token address patterns

  3. Validates each potential address to ensure it's a legitimate token

  4. Consolidates results to show unique addresses with their sources

  5. 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

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_bio",
  "username": "twitter_username"
}

Check Tweets

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_tweets",
  "username": "twitter_username"
}

Check Latest Tweets

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_latest_tweets",
  "username": "twitter_username"
}

Validate Address

POST /check_tweets.php
Content-Type: application/json

{
  "action": "validate_address",
  "address": "potential_solana_address"
}

3. Response Format

Each API endpoint returns a JSON response with the following structure:

{
  "success": true,
  "data": {
    // Endpoint-specific data
  }
}

Or in case of an error:

{
  "success": false,
  "error": "Error message"
}

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:

  1. Viewing a token profile that has an associated Twitter account

  2. Clicking the "Find Token Addresses on Twitter" button in the Links Card

  3. 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

  1. Input Validation: All Twitter usernames are sanitized before use

  2. Error Handling: Comprehensive error capture prevents exposure of sensitive information

  3. Rate Limiting: Implementation respects API rate limits to prevent service disruption

  4. 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:

  1. Extended Social Media Support: Scanning additional platforms (Discord, Telegram, etc.)

  2. Enhanced Token Information: Providing basic token details alongside discovered addresses

  3. Historical Analysis: Track when tokens were first mentioned by influential accounts

  4. Network Analysis: Map relationships between accounts mentioning the same tokens

  5. Sentiment Analysis: Determine the context and sentiment of token mentions

  6. 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

  1. Token Address Detection - Finds Solana token addresses mentioned in Twitter bios and tweets

  2. Address Validation - Validates detected addresses against the Solana blockchain

  3. Historical Analysis - Examines past usernames and bio changes for suspicious patterns

  4. Cross-Reference - Links Twitter accounts to token projects for better risk assessment

How It Works

The Twitter Analysis process involves:

  1. Profile Identification: The system identifies a Twitter username associated with a project.

  2. 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

  3. Address Extraction: Sophisticated pattern matching extracts potential Solana addresses from text.

  4. Validation: Each extracted address is verified against the Solana blockchain to confirm it's a valid token.

  5. 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:

function extractSolanaAddresses(text) {
    // Regular expression matches potential Solana addresses (32-44 characters)
    const addressPattern = /\b([1-9A-HJ-NP-Za-km-z]{32,44})\b/g;
    
    // Additional patterns for contextual mentions and URLs
    const urlPatterns = [
        /https?:\/\/(pump|dev)\.fun\/coin\/([1-9A-HJ-NP-Za-km-z]{32,44})/g,
        /ca:\s*([1-9A-HJ-NP-Za-km-z]{32,44})/gi,
        /contract:?\s*([1-9A-HJ-NP-Za-km-z]{32,44})/gi,
        /address:?\s*([1-9A-HJ-NP-Za-km-z]{32,44})/gi
    ];
    
    // Implementation collects all matches and removes duplicates
}

Address Validation Function

Each discovered address is validated through the Solscan API:

async function validateSolanaAddress(address) {
    // Makes request to check_tweets.php endpoint with 'validate_address' action
    // Returns true only if the address is confirmed valid by Solscan
}

Use Cases

The Twitter Analysis feature serves multiple use cases:

  1. Token Discovery: Identifying other tokens mentioned by project creators

  2. Supply Lock Verification: Finding references to token lock mechanisms

  3. Project Relationship Mapping: Understanding connections between projects

  4. Token Ecosystem Analysis: Discovering related tokens in a project's ecosystem

  5. Risk Assessment: Identifying patterns of suspicious token promotions

Limitations

Users should be aware of the following limitations:

  1. API Rate Limits: Analysis depends on Twitter API access through Toto

  2. Historical Coverage: May not capture all historical tweets for older accounts

  3. Pattern Matching Limits: Some unconventional address mentions might be missed

  4. Validation Precision: Validation confirms existence but not token legitimacy

  5. Private Accounts: Cannot analyze private Twitter accounts

Best Practices

For optimal use of the Twitter Analysis feature:

  1. Use with Context: Combine findings with other research methods

  2. Check Dates: Note when addresses were mentioned relative to token launches

  3. Verify Relationships: Confirm connections between identified tokens

  4. Follow Up: Use discovered addresses as starting points for deeper research

  5. Regular Rescans: Periodically recheck accounts for new address mentions

Technical Architecture

The feature comprises three main components:

  1. Frontend JavaScript: Handles user interaction, display, and address processing

  2. PHP Endpoint: Manages API communication and caching

  3. 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:

  1. Enhanced OCR: Better extraction of addresses from images

  2. Sentiment Analysis: Understanding the context of address mentions

  3. Timeline Correlation: Mapping address mentions to token price movements

  4. Multi-Platform Support: Extending to other social platforms beyond Twitter

  5. 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:

  1. Enter the token address or project information in the main search

  2. On the token page, look for the "Find Token Addresses on Twitter" button

  3. Click the button to begin scanning the associated Twitter account

  4. View the resulting list of token addresses found in the Twitter profile

API Usage

To check Twitter for token addresses programmatically:

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_bio",
  "username": "twitterUsername"
}

OR

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_tweets",
  "username": "twitterUsername"
}

OR

POST /check_tweets.php
Content-Type: application/json

{
  "action": "check_latest_tweets",
  "username": "twitterUsername"
}

Response Format:

{
  "success": true,
  "data": [
    {
      "address": "SolanaTokenAddress123...",
      "source": "Twitter Bio (Date)"
    },
    {
      "address": "AnotherSolanaAddress456...",
      "source": "Tweet (Date)"
    }
  ]
}

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

PreviousTwitter AnalysisNextGitHub Repository Analysis

Last updated 27 days ago