Sign Endpoint
Endpoint
Section titled “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.
1. personal_sign — Plain Text Messages
Section titled “1. personal_sign — Plain Text Messages”Use case: Prove wallet ownership, sign a message for off-chain verification.
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!" }'{ "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.
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" } } }'{ "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.
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 } }'{ "signedTransaction": "0x..." }