Skip to content

Solana Chain Support

Extension Type: Chain Adaptation
Status: Draft
Version: 0.1.0
Authors: 8004scan Team

Overview

This extension defines how ERC-8004 standards apply to the Solana blockchain. Solana uses different address formats, signature algorithms, and NFT standards compared to EVM chains. This document covers the necessary adaptations for agent registration, feedback submission, and authentication on Solana.

1. Chain Identifiers

CAIP-2: Blockchain ID

Solana networks use the solana namespace with the first 32 bytes of the genesis block hash (base58-encoded) as the CAIP-2 reference:

text
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp   → Solana Mainnet
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1   → Solana Devnet

Note: Solana Testnet is not used in production.

CAIP-10: Account Address

Solana addresses are base58-encoded Ed25519 public keys (32 bytes, 32-44 characters):

text
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:Aqq2ZKnzXpsR4S18biMnJVEXVecgqU4Szi6rduszF8Sn
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1:2KmHw8VbShuz9xfj3ecEjBM5nPKR5BcYHRDSFfK1286t

CAIP-10 for Program Addresses

Solana programs (equivalent to smart contracts) are referenced by their Program ID:

text
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:8oo48pya1SZD23ZhzoNMhxR2UGb8BRa41Su4qP9EuaWm

2. Agent Identity on Solana

NFT Standard: Metaplex Core

On Solana, ERC-8004 agents are represented as Metaplex Core assets instead of ERC-721 NFTs.

ConceptEVM (ERC-721)Solana (Metaplex Core)
Token standardERC-721Metaplex Core Asset
Canonical identifiertokenId (uint256)asset pubkey (base58)
Numeric identifiertokenId (sequential)globalId (sequential, indexer-assigned)
Contract/ProgramRegistry contract addressProgram ID
OwnerownerOf(tokenId)Asset owner field
Metadata pointertokenURI(tokenId)agentURI on-chain field
CollectionN/AMetaplex Collection

Agent Registry Reference

text
# EVM format
eip155:84532:0x8004C269D0A5647E51E121FeB226200ECE932d55

# Solana format
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:8oo48pya1SZD23ZhzoNMhxR2UGb8BRa41Su4qP9EuaWm

The agent metadata file (Registration File) follows the same JSON schema as EVM agents. Only the registrations array entry differs.

Solana Agent Identifier Strategy

Solana agents have two identifiers that serve different purposes:

IdentifierTypeSourcePurpose
Asset pubkey (base58)string (32-44 chars)On-chain Metaplex Core assetCanonical, immutable, globally unique
Global ID (numeric)bigint (sequential)Indexer DB sequence triggerDisplay-compatible, EVM-compatible

Key points:

  1. Asset pubkey is the canonical Solana agent identifier — it is the on-chain NFT address and is immutable once created.
  2. Global ID (globalId / agentid in the indexer GraphQL) is a sequential auto-increment number assigned by the indexer's PostgreSQL trigger on agent creation. It provides EVM-compatible numeric addressing (e.g., #001, #042) for display and URL compatibility.
  3. Global ID is stable once assigned (no shifting when new agents register), but not guaranteed consistent across independent indexer instances — re-indexing from scratch may re-assign numbers.
  4. API endpoints and URLs SHOULD accept both formats and auto-detect:
    • Numeric string → lookup by globalId / token_id
    • Non-numeric string → lookup by asset pubkey / agent_id
  5. Frontend URLs and display SHOULD prefer the base58 asset pubkey for Solana agents, truncating to 7-8 characters when space is limited (e.g., 84bgovN...).

GraphQL field mapping (indexer → backend):

Indexer GraphQLBackend DBDescription
agentidtoken_idSequential global ID (bigint)
agentidFormattedDisplay format: #001, #042
solana.assetPubkeyagent_idBase58 asset pubkey (canonical)
agentIdLegacy hash-derived uint64 (deprecated)

Note: The indexer also exposes agentId (camelCase), a hash-derived uint64 from the first 8 bytes of the asset pubkey. This field is deprecated — use agentid (lowercase) for numeric identifiers.

3. Address and Transaction Formats

Comparison Table

PropertyEVMSolana
Address encodingHex with 0x prefixBase58 (no prefix)
Address length42 chars (0x + 40 hex)32-44 chars (base58)
Raw address size20 bytes32 bytes
Case sensitivityCase-insensitive (EIP-55 checksum optional)Case-sensitive
Transaction hash66 chars (0x + 64 hex)87-88 chars (base58 signature)
Block identifierBlock number (uint64)Slot number (uint64)

Validation Rules

Solana Address:

  • Base58-encoded string (alphabet: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz)
  • Decodes to exactly 32 bytes
  • Case-sensitive — do NOT apply .toLowerCase() or .toUpperCase()

Solana Transaction Signature:

  • Base58-encoded Ed25519 signature
  • 87-88 characters
  • Decodes to 64 bytes

4. Content Hashing

Hash Algorithm Differences

PropertyEVM (ERC-8004 v1)Solana (SEAL v1)
AlgorithmKeccak-256SHA-256
Output format0x + 64 hex chars64 hex chars (no prefix)
Output length66 chars64 chars
Hash chainSimple content hashRunning digest chain

SEAL v1 (Solana Event Authenticity Layer)

Solana feedback uses SEAL v1 for tamper-proof hash chains:

text
feedback_hash = SHA-256(feedback_content)
running_digest = SHA-256(previous_digest + feedback_hash)

This creates an append-only, verifiable chain of feedback events per agent+client pair.

5. Authentication

Signature Algorithm

PropertyEVMSolana
AlgorithmECDSA (secp256k1)Ed25519
Signature format0x + hex (130 chars)Base58 (~88 chars)
Message signingEIP-191 personal_signsignMessage (raw bytes)
Smart walletERC-1271 / ERC-6492N/A (no smart wallets)

Sign-In with Solana (SIWS)

Message format for wallet authentication:

text
8004scan wants you to sign in with your Solana account:
Aqq2ZKnzXpsR4S18biMnJVEXVecgqU4Szi6rduszF8Sn

Sign this message to authenticate with 8004scan.

Nonce: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

Verification uses Ed25519 VerifyKey from the wallet's public key.

6. Feedback on Solana

SEAL v1 Fields

Solana feedback includes additional fields from the SEAL v1 protocol:

FieldTypeDescription
valueint64Raw metric value
valueDecimalsuint8 (0-6)Decimal places for value
scoreuint8 (0-100)ATOM trust-weighted score (optional)
feedbackHashhex stringSHA-256 hash (64 chars, no 0x)
runningDigestbytesHash chain digest
isRevokedbooleanRevocation status

ATOM Trust Metrics

The ATOM engine computes on-chain trust scores for agents:

MetricRangeDescription
trustTier0-4Overall trust level
qualityScore0-10000Feedback quality aggregate
confidence0-10000Statistical confidence
riskScore0-100Sybil/manipulation risk
diversityRatio0-255Unique reviewer diversity

These metrics are computed on-chain and available through the Solana indexer's GraphQL API as the solana extension on Agent and Feedback types.

7. Payment Proof Format

SOL Payment

json
{
  "proofOfPayment": {
    "fromAddress": "D9bMDMbJungXQrE8n6ZsM3r6ZQLFTzygmsQL7yzGMDHw",
    "toAddress": "2KmHw8VbShuz9xfj3ecEjBM5nPKR5BcYHRDSFfK1286t",
    "chainId": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "txSignature": "5piJm888s7beTTrB9JuCR5WFvNxXHN78C9ifGEokTucoQy5mb6bKg3e6Fkiv8RznZG2NmzENBWUru5yUGbqMiTMp",
    "amount": "1000000000",
    "currency": "SOL",
    "decimals": 9
  }
}

Note: Solana uses txSignature (base58, 87-88 chars) instead of txHash (hex, 66 chars). The amount is in lamports (1 SOL = 10^9 lamports).

SPL Token Payment

json
{
  "proofOfPayment": {
    "fromAddress": "D9bMDMbJungXQrE8n6ZsM3r6ZQLFTzygmsQL7yzGMDHw",
    "toAddress": "2KmHw8VbShuz9xfj3ecEjBM5nPKR5BcYHRDSFfK1286t",
    "chainId": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
    "txSignature": "53i5Ymuosn6RduaxLw8Bx1P8XMrnzBRj7EJKdmNLnMtmN9WL45gjzq3jRQupTfhBP7MEghM9TUkhTq3zWz8gkB74",
    "amount": "1000000",
    "currency": "USDC",
    "tokenMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "decimals": 6
  }
}

8. Cross-Chain Agent Registration

Agents can be registered on both EVM and Solana chains simultaneously. The registration file's registrations array includes entries for each chain:

json
{
  "name": "My Cross-Chain Agent",
  "registrations": [
    {
      "agentId": 42,
      "agentRegistry": "eip155:84532:0x8004C269D0A5647E51E121FeB226200ECE932d55"
    },
    {
      "agentId": 7,
      "agentRegistry": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:8oo48pya1SZD23ZhzoNMhxR2UGb8BRa41Su4qP9EuaWm"
    }
  ]
}

The registrations array uses a uniform schema across all chains: agentId + agentRegistry (CAIP-10 string). On EVM, agentId is a sequential uint256 token ID. On Solana, the agentId in the registration file SHOULD be the numeric globalId (sequential auto-increment from the indexer) for cross-chain consistency. Implementations MUST also support resolving agents by base58 asset pubkey for native Solana addressing.

9. Implementation Notes

Address Normalization

python
# EVM: case-insensitive, normalize to lowercase
address = evm_address.lower()

# Solana: case-sensitive, DO NOT normalize
address = solana_address  # Keep as-is

Storage Considerations

FieldEVM SizingSolana SizingRecommended
Address42 chars44 charsString(50)
Transaction hash66 chars88 charsString(100)
Content hash66 chars64 charsString(66) — fits both
Feedback ID~40 chars91 chars (composite)String(150)

Validation Helper

python
import base58

def is_valid_solana_address(address: str) -> bool:
    """Validate Solana address: base58-encoded, decodes to 32 bytes."""
    try:
        decoded = base58.b58decode(address)
        return len(decoded) == 32
    except Exception:
        return False

10. References