Skip to content

curl ​

Send a transaction using cURL from the command line.

Basic Request ​

bash
curl -X POST 'https://fra.blocksprint.io' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [
      "YOUR_BASE64_TRANSACTION",
      {
        "encoding": "base64",
        "skipPreflight": true,
        "maxRetries": 0
      }
    ]
  }'

Response ​

Success ​

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
}

Error ​

json
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32600,
    "message": "Invalid API key"
  },
  "id": null
}

With Variables ​

bash
API_KEY="YOUR_API_KEY"
ENDPOINT="https://fra.blocksprint.io"
TRANSACTION="YOUR_BASE64_TRANSACTION"

curl -X POST "${ENDPOINT}" \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: ${API_KEY}" \
  -d "{
    \"jsonrpc\": \"2.0\",
    \"id\": 1,
    \"method\": \"sendTransaction\",
    \"params\": [
      \"${TRANSACTION}\",
      {
        \"encoding\": \"base64\",
        \"skipPreflight\": true,
        \"maxRetries\": 0
      }
    ]
  }"

From File ​

Save your transaction to a file (transaction.json) and send:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendTransaction",
  "params": [
    "YOUR_BASE64_TRANSACTION",
    {
      "encoding": "base64",
      "skipPreflight": true,
      "maxRetries": 0
    }
  ]
}
bash
curl -X POST 'https://fra.blocksprint.io' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d @transaction.json

Parse Response with jq ​

bash
# Get signature only
curl -s -X POST 'https://fra.blocksprint.io' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{...}' | jq -r '.result'

# Check for errors
curl -s -X POST 'https://fra.blocksprint.io' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{...}' | jq '.error // .result'

Health Check ​

bash
curl -X POST 'https://fra.blocksprint.io' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getHealth"
  }'