Skip to content

Sign Endpoint

POST /agent/sign

The sign endpoint lets you create cryptographic signatures with your agent’s wallet. It supports three signing types, each suited to a different use case.

Use case: Prove wallet ownership, sign a message for off-chain verification.

Sign a message
curl -X POST https://api.bankr.bot/agent/sign \
-H "X-API-Key: bk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "personal_sign",
"message": "Hello from my agent!"
}'
Response
{ "signature": "0x..." }

2. eth_signTypedData_v4 — EIP-712 Typed Data

Section titled “2. eth_signTypedData_v4 — EIP-712 Typed Data”

Use case: Sign permits, gasless approvals, order book entries, and any structured data that follows the EIP-712 standard.

Sign typed data
curl -X POST https://api.bankr.bot/agent/sign \
-H "X-API-Key: bk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "eth_signTypedData_v4",
"typedData": {
"domain": { "name": "MyProtocol", "version": "1", "chainId": 8453 },
"types": { "Message": [{ "name": "content", "type": "string" }] },
"primaryType": "Message",
"message": { "content": "Authorize action" }
}
}'
Response
{ "signature": "0x..." }

3. eth_signTransaction — Sign Without Broadcasting

Section titled “3. eth_signTransaction — Sign Without Broadcasting”

Use case: Pre-sign transactions for later submission, multi-sig workflows, or offline signing.

Sign a transaction
curl -X POST https://api.bankr.bot/agent/sign \
-H "X-API-Key: bk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "eth_signTransaction",
"transaction": {
"to": "0xRecipientAddress",
"value": "0x0",
"data": "0x...",
"chainId": 8453
}
}'
Response
{ "signedTransaction": "0x..." }