Utilities

Verify Ethereum address

Validate an Ethereum address and detect its type.

POST
/api/v2/verify-address

Validates an Ethereum address and provides information about its type.

Checks Performed

  • Address format validation (EIP-55 checksum; all-lowercase addresses are accepted)
  • Contract detection (checks if address has deployed code on Base)
  • Safe wallet identification (checks if it's a Safe multisig on Base)

Use Cases

  • Validate customer wallet addresses before saving
  • Detect if a recipient is a smart contract
  • Identify Safe wallets for display purposes

Authorization

bearerAuth
AuthorizationBearer <token>

Organization API key obtained on Settings > API Keys page in Compose UI.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST 'https://compose.finance/api/v2/verify-address' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -H 'Content-Type: application/json' \  -d '{    "address": "0x1234567890abcdef1234567890abcdef12345678"  }'

{
  "isValid": true,
  "isContract": false,
  "isSafeWallet": false,
  "warnings": [],
  "errors": []
}

{
  "message": "Invalid request body.",
  "errors": [
    {
      "code": "too_small",
      "minimum": 1,
      "type": "string",
      "inclusive": true,
      "exact": false,
      "message": "Address is required",
      "path": [
        "address"
      ]
    }
  ]
}

{
  "error": "Unauthorized - Invalid or missing API key or session"
}
{
  "error": "Customers feature is not enabled for your organization"
}
{
  "message": "Invalid media type."
}
{
  "error": "Rate limit exceeded. Please try again later."
}

{
  "error": "Internal server error"
}