Skip to main content
Signing APIs let you build a transaction in your application and have Circle sign it. You then broadcast the signed transaction using your own node provider. Use this flow when Circle doesn’t provide full blockchain infrastructure for your blockchain, or when you prefer to manage broadcasting yourself. For an overview, see How signing APIs work.

Prerequisites

Before you begin, make sure you have:
Only EOA wallets are supported for this signing flow.

Step 1. Set up your project

1.1. Create the project and install dependencies

1.2. Configure TypeScript (optional)

This step is optional. It helps prevent missing types in your IDE or editor.
Create a tsconfig.json file:
Then, update the tsconfig.json file:

1.3. Set environment variables

Create a .env file in the project directory:
.env
  • CIRCLE_API_KEY is your Circle Developer API key.
  • CIRCLE_ENTITY_SECRET is your registered entity secret.
Open .env in your editor rather than writing values with shell commands, and add .env to your .gitignore. This prevents credentials from leaking into your shell history or version control.
The npm run start command loads variables from .env using Node.js native env-file support.

Step 2. Create a signing wallet

Use count to create up to 200 wallets per request.
If you already created a native wallet on Ethereum, Polygon, Avalanche, Arbitrum, or another EVM-compatible chain, a generic EVM wallet under the same wallet set maps to the same address. Do not use the generic EVM wallet in place of the native wallet on those chains, or transactions may become stuck.

Step 3. Build and sign a transaction

sign-evm.ts
The transaction object must match the Ethereum JSON-RPC transaction shape. Use your own tooling to prepare it before calling signTransaction(). Include the correct chainId for your network. For supported EVM-TESTNET chains, see Chain IDs for Signing Transactions. When building EIP-1559 transactions, include both maxFeePerGas and maxPriorityFeePerGas.

Step 4. Review the response

The signing response includes:
  • signature
  • signedTransaction
  • txHash
You can use signedTransaction with your own broadcast flow or chain tooling.