Register a signer key
Changed onRegister a signer (session) key for an account. The account authorises the signer and the signer proves consent, so this requires two EIP-712 signatures.
Prerequisites:
- GET /v1/auth/eip712-domain — EIP-712 domain (name, version, chainId, verifyingContract = Authorization contract). Both signatures use this same domain.
- GET /v1/nonce-state/{account} — nonce_anchor and current_bitmap_index. Send them back as nonce_anchor / nonce_bitmap_index and sign the exact same values.
1. Account signs RegisterSigner:
RegisterSigner(address account,address signer,string message,uint32 expiration,uint48 nonceAnchor,uint8 nonceBitmap)
Struct hash: keccak256(abi.encode(TYPEHASH, account, signer, keccak256(bytes(message)), expiration, nonceAnchor, nonceBitmap))
2. Signer signs VerifySigner:
VerifySigner(address account,uint48 nonceAnchor,uint8 nonceBitmap)
Struct hash: keccak256(abi.encode(TYPEHASH, account, nonceAnchor, nonceBitmap))
Signature encoding: account_signature and signer_signature are 0x-prefixed hex strings. This differs from permit.signature on the trading endpoints, which is a protobuf bytes field and is therefore base64 in JSON.
Idempotent: if the signer is already active, the call is a no-op and returns success: true with an empty transaction_hash.
Failure modes: a wrong struct or field order fails signature recovery. A nonceAnchor other than the current anchor or the current anchor + 1 reverts with InvalidNonceAnchor, which looks like a nonce bug but is usually a mismatch between the signed and submitted values.
Request
- Base URLhttps://api.testnet.rise.trade
- Authnone required
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"account": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"signer": "0x1234567890123456789012345678901234567890",
"message": "Register signer for market making",
"nonce_anchor": "0",
"expiration": "1735689600",
"account_signature": "0x1234...",
"signer_signature": "0x5678...",
"label": "My Trading Bot"
}Response
A successful response.
Example response
{
"transaction_hash": "0xabcd1234...",
"block_number": "12345678"
}Changes
- info
endpoint added
- info