Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

Solana policy examples for controlling transaction signing, sending, and message signing.
Operations: signEndUserSolTransaction, sendEndUserSolTransaction, signEndUserSolMessage

Address allowlist

{
  "scope": "project",
  "description": "Allow end-user SOL transfers only to trusted addresses",
  "rules": [
    {
      "action": "accept",
      "operation": "signEndUserSolTransaction",
      "criteria": [
        {
          "type": "solAddress",
          "addresses": ["9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM", "HpabPRRCFbBKSuJr5PdkVvQc85FyxyTWkFM2obBRSvHT"],
          "operator": "in"
        }
      ]
    }
  ]
}

SOL value limit

{
  "scope": "project",
  "description": "Limit end-user SOL transfers to 2 SOL",
  "rules": [
    {
      "action": "accept",
      "operation": "signEndUserSolTransaction",
      "criteria": [
        { "type": "solValue", "solValue": "2000000000", "operator": "<=" }
      ]
    }
  ]
}

SPL token mint restriction

{
  "scope": "project",
  "description": "Allow only USDC and USDT transfers",
  "rules": [
    {
      "action": "accept",
      "operation": "signEndUserSolTransaction",
      "criteria": [
        {
          "type": "mintAddress",
          "addresses": ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"],
          "operator": "in"
        }
      ]
    }
  ]
}

Network restriction

{
  "scope": "project",
  "description": "Restrict end-user Solana sends to mainnet only",
  "rules": [
    {
      "action": "accept",
      "operation": "sendEndUserSolTransaction",
      "criteria": [
        { "type": "solNetwork", "networks": ["solana"], "operator": "in" }
      ]
    }
  ]
}

Program allowlist

{
  "scope": "project",
  "description": "Allow interactions with System and Token programs only",
  "rules": [
    {
      "action": "accept",
      "operation": "signEndUserSolTransaction",
      "criteria": [
        {
          "type": "programId",
          "programIds": ["11111111111111111111111111111111", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
          "operator": "in"
        }
      ]
    }
  ]
}

Message signing restriction

{
  "scope": "project",
  "description": "Only allow signing messages with app prefix",
  "rules": [
    {
      "action": "accept",
      "operation": "signEndUserSolMessage",
      "criteria": [{ "type": "solMessage", "match": "^MyApp:.*" }]
    }
  ]
}

Token decimals reference

  • SOL: 9 decimals (1 SOL = 1,000,000,000 lamports)
  • USDC: 6 decimals (1 USDC = 1,000,000 base units)
  • USDT: 6 decimals (1 USDT = 1,000,000 base units)

Common addresses

TokenMint address
USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
USDTEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
Wrapped SOLSo11111111111111111111111111111111111111112
System Program11111111111111111111111111111111
Token ProgramTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA