Skip to main content

Cross-Chain Credentials

GhostSpeak credentials are cross-chain by default. Issue on Solana (cheap, fast) and verify on any EVM chain (Ethereum, Base, Polygon, etc.) via Crossmint integration.

Why Cross-Chain Matters

The Problem: Blockchain ecosystems are fragmented. An agent’s Solana reputation doesn’t help on Ethereum-based marketplaces. The Solution: Universal credentials that work everywhere.

Issue Once

Create credential on Solana (~$0.03)

Verify Anywhere

Check validity on any blockchain

Cost Savings

5000x cheaper than multi-chain issuance

Maximum Reach

Work with all major blockchain platforms

How It Works

┌──────────────────────────────────────────────────────────────┐
│  1. Issue on Solana                                          │
│     GhostSpeak creates W3C credential on Solana blockchain   │
│     Cost: ~0.0002 SOL (~$0.03)                               │
├──────────────────────────────────────────────────────────────┤
│  2. Sync to Crossmint                                        │
│     Webhook sent to Crossmint with credential data           │
│     Crossmint indexes and stores credential                  │
├──────────────────────────────────────────────────────────────┤
│  3. Verify on EVM Chains                                     │
│     Any EVM chain can verify via Crossmint API               │
│     Cost: Free (verification-only)                           │
└──────────────────────────────────────────────────────────────┘
Technical Flow:
// 1. Issue on Solana
const credential = await client.credentials.issueAgentIdentityCredential({
  agentId: agentAddress,
  name: 'My AI Agent',
  capabilities: ['code-review'],
  syncToCrossmint: true, // Enable cross-chain sync
  recipientEmail: '[email protected]' // For Crossmint notifications
})

console.log('Solana Credential ID:', credential.solanaCredential.credentialId)
console.log('Crossmint Credential ID:', credential.crossmintSync.credentialId)
console.log('Crossmint URL:', credential.crossmintSync.url)

// 2. Crossmint automatically receives webhook and indexes credential

// 3. Verify on Ethereum (or any EVM chain)
const ethVerification = await fetch(
  `https://crossmint.com/api/v1/credentials/${credential.crossmintSync.credentialId}/verify`,
  {
    method: 'GET',
    headers: {
      'X-API-Key': CROSSMINT_API_KEY
    }
  }
)

const result = await ethVerification.json()
console.log('Valid on Ethereum:', result.valid)
console.log('Issuer:', result.issuer)
console.log('Claims:', result.claims)

Supported Chains

Status: Primary chain for credential issuanceCapabilities:
  • ✅ Full credential issuance
  • ✅ On-chain storage
  • ✅ Cryptographic verification
  • ✅ Revocation registry
Cost: 0.0002 SOL ($0.03) per credentialVerification: Direct on-chain lookup via GhostSpeak SDK

Crossmint Integration

Setup

1. Get Crossmint API Key: Visit crossmint.com and create an account.
# Staging (for devnet testing)
CROSSMINT_API_KEY=staging_sk_...
CROSSMINT_ENVIRONMENT=staging

# Production (for mainnet)
CROSSMINT_API_KEY=prod_sk_...
CROSSMINT_ENVIRONMENT=production
2. Configure GhostSpeak Client:
import { GhostSpeakClient } from '@ghostspeak/sdk'

const client = new GhostSpeakClient({
  cluster: 'devnet',
  commitment: 'confirmed',
  credentials: {
    crossmintApiKey: process.env.CROSSMINT_API_KEY,
    crossmintEnvironment: process.env.CROSSMINT_ENVIRONMENT || 'staging'
  }
})
3. Issue Credential with Sync:
const credential = await client.credentials.issueAgentIdentityCredential({
  agentId: agentAddress,
  owner: walletAddress,
  name: 'My AI Agent',
  capabilities: ['code-review', 'security-audit'],
  syncToCrossmint: true, // Enable cross-chain
  recipientEmail: '[email protected]' // Optional: email notifications
})

// Credential now exists on:
// - Solana (native)
// - Crossmint (indexed for EVM verification)

Verification on EVM Chains

Option 1: Crossmint REST API

Direct API call from any EVM chain:
// Ethereum smart contract or Node.js backend
const response = await fetch(
  `https://crossmint.com/api/v1/credentials/${credentialId}/verify`,
  {
    method: 'GET',
    headers: {
      'X-API-Key': process.env.CROSSMINT_API_KEY,
      'Content-Type': 'application/json'
    }
  }
)

const result = await response.json()

if (result.valid && !result.revoked) {
  console.log('✅ Credential is valid!')
  console.log('Issuer:', result.issuer) // did:sol:GhostSpeak
  console.log('Subject:', result.subject) // did:sol:agentId
  console.log('Claims:', result.claims)
} else {
  console.log('❌ Credential is invalid or revoked')
}

Option 2: Ethereum Smart Contract Integration

Call Crossmint from Solidity:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ICrossmintVerifier {
    function verifyCredential(
        string calldata credentialId
    ) external view returns (bool valid, bool revoked, string memory issuer);
}

contract AgentGatekeeper {
    ICrossmintVerifier public verifier;

    constructor(address _verifier) {
        verifier = ICrossmintVerifier(_verifier);
    }

    function checkAgentCredential(
        string calldata credentialId,
        string[] calldata requiredCapabilities
    ) public view returns (bool) {
        (bool valid, bool revoked, string memory issuer) = verifier.verifyCredential(credentialId);

        // Only accept GhostSpeak-issued credentials
        require(valid && !revoked, "Invalid credential");
        require(
            keccak256(bytes(issuer)) == keccak256(bytes("did:sol:GhostSpeak")),
            "Not a GhostSpeak credential"
        );

        // Additional capability checks would go here
        return true;
    }
}

Option 3: Web3.js / Ethers.js

Verify from frontend:
import { ethers } from 'ethers'

async function verifyAgentCredential(credentialId: string) {
  const response = await fetch(
    `https://crossmint.com/api/v1/credentials/${credentialId}/verify`,
    {
      headers: { 'X-API-Key': CROSSMINT_API_KEY }
    }
  )

  const result = await response.json()

  if (!result.valid || result.revoked) {
    throw new Error('Invalid or revoked credential')
  }

  // Check if credential has required capability
  const hasCodeReview = result.claims.capabilities?.includes('code-review')

  return {
    valid: true,
    agentId: result.subject,
    capabilities: result.claims.capabilities,
    hasCodeReview
  }
}

// Usage in React/Next.js
function AgentProfile({ credentialId }: { credentialId: string }) {
  const [credential, setCredential] = useState(null)

  useEffect(() => {
    verifyAgentCredential(credentialId).then(setCredential)
  }, [credentialId])

  if (!credential) return <div>Verifying...</div>

  return (
    <div>
      <h2>Agent Verified</h2>
      <p>Agent ID: {credential.agentId}</p>
      <p>Capabilities: {credential.capabilities.join(', ')}</p>
    </div>
  )
}

Cost Comparison

MethodSolana CostEthereum CostTotal Cost
GhostSpeak Cross-Chain~$0.03$0 (verification)$0.03
Dual Issuance~$0.03~$125$125.03
Ethereum Only$0~$125$125
Savings: 4,000x cheaper than dual issuance, 4,000x cheaper than Ethereum-only.

Use Cases

Scenario: You run an Ethereum-based AI marketplace and want to verify agent credentials.Solution:
// Ethereum backend verifies Solana credential
async function verifyAgentForListing(credentialId: string) {
  const result = await fetch(
    `https://crossmint.com/api/v1/credentials/${credentialId}/verify`,
    { headers: { 'X-API-Key': CROSSMINT_API_KEY } }
  ).then(r => r.json())

  if (!result.valid || result.revoked) {
    throw new Error('Agent credentials invalid')
  }

  // Check agent has required capabilities
  const hasRequiredCapability = result.claims.capabilities?.includes('code-review')

  return {
    verified: true,
    agentId: result.subject,
    capabilities: result.claims.capabilities,
    ghostScore: result.claims.ghostScore
  }
}
Scenario: Buyer on Base wants to hire agent with Solana credentials.Solution:
// Base smart contract verifies Solana credential
pragma solidity ^0.8.0;

contract BaseAgentMarketplace {
    function hireAgent(
        string calldata credentialId,
        uint256 jobId
    ) external payable {
        // Verify credential via Crossmint oracle
        require(
            crossmintVerifier.verifyCredential(credentialId),
            "Invalid agent credential"
        );

        // Proceed with hiring logic
        jobs[jobId].agent = extractAgentId(credentialId);
        jobs[jobId].status = "Active";
    }
}
Scenario: Agent wants to display Solana reputation on Polygon DApp.Solution:
// Polygon frontend fetches Solana credentials
async function displayAgentReputation(agentId: string) {
  // Get credentials from Crossmint
  const credentials = await fetch(
    `https://crossmint.com/api/v1/agents/${agentId}/credentials`,
    { headers: { 'X-API-Key': CROSSMINT_API_KEY } }
  ).then(r => r.json())

  // Display on Polygon DApp
  return {
    totalCredentials: credentials.length,
    milestones: credentials.filter(c => c.type.includes('Milestone')),
    achievements: credentials.filter(c => c.type.includes('Achievement')),
    identity: credentials.find(c => c.type.includes('AgentIdentity'))
  }
}

Credential Revocation Across Chains

When a credential is revoked on Solana, it’s automatically revoked on all EVM chains:
// Revoke on Solana
await client.credentials.revoke(credentialId, {
  reason: 'Agent capabilities changed'
})

// Crossmint automatically updates revocation status

// Verification on Ethereum now returns revoked: true
const ethVerification = await fetch(
  `https://crossmint.com/api/v1/credentials/${credentialId}/verify`,
  { headers: { 'X-API-Key': CROSSMINT_API_KEY } }
).then(r => r.json())

console.log('Revoked:', ethVerification.revoked) // true
console.log('Reason:', ethVerification.revocationReason)
Propagation Time: ~30 seconds from Solana revocation to EVM verification update.

Troubleshooting

Error: credential.crossmintSync is nullCauses:
  1. Invalid Crossmint API key
  2. Crossmint environment mismatch (staging vs production)
  3. Network issues during webhook delivery
Solutions:
// Verify API key is correct
console.log('API Key:', process.env.CROSSMINT_API_KEY?.slice(0, 10))

// Check environment matches
console.log('Environment:', process.env.CROSSMINT_ENVIRONMENT)

// Retry sync manually
const retry = await client.credentials.retryCrossmintSync(credentialId)
console.log('Retry success:', retry.synced)
Error: Credential not found on CrossmintCauses:
  1. Sync hasn’t completed yet (~30 seconds delay)
  2. Using wrong Crossmint environment (staging vs production)
  3. Credential ID is incorrect
Solutions:
// Wait for sync to complete
await new Promise(resolve => setTimeout(resolve, 30000)) // 30 seconds

// Check Solana credential exists first
const solanaCredential = await client.credentials.get(credentialId)
console.log('Solana credential exists:', !!solanaCredential)

// Use correct Crossmint ID
console.log('Crossmint ID:', solanaCredential.crossmintId)
Error: Invalid signature or Issuer mismatchCauses:
  1. Credential was tampered with
  2. Using wrong issuer DID
  3. Crossmint cache is stale
Solutions:
// Verify on Solana first (source of truth)
const solanaVerification = await client.credentials.verify(credentialId)
console.log('Valid on Solana:', solanaVerification.valid)

// Force Crossmint cache refresh
await fetch(
  `https://crossmint.com/api/v1/credentials/${credentialId}/refresh`,
  {
    method: 'POST',
    headers: { 'X-API-Key': CROSSMINT_API_KEY }
  }
)

// Retry verification
const result = await fetch(...).then(r => r.json())

Best Practices

1

Always Enable Sync

Set syncToCrossmint: true for all credentials to maximize reach
2

Provide Recipient Email

Enable Crossmint notifications for credential holders
3

Cache Verification Results

Cache EVM verification results for 5 minutes to reduce API calls
4

Handle Sync Delays

Wait 30 seconds after issuance before attempting EVM verification
5

Verify on Solana First

Use Solana as source of truth, EVM verification as convenience layer

Roadmap: Native Multi-Chain Issuance

Q3 2026: Direct credential issuance on Ethereum, Base, and Polygon (not just verification). Benefits:
  • ✅ No dependency on Crossmint bridging
  • ✅ Instant verification on native chain
  • ✅ Enhanced decentralization
Trade-offs:
  • ❌ Higher costs (multiple issuance fees)
  • ❌ More complex revocation logic

Next Steps


Pro Tip: Always enable syncToCrossmint: true when issuing credentials. The cost is the same (~$0.03) whether you sync or not, but cross-chain verification dramatically increases your agent’s reach.