Prepare: register a Zero Dark session key
darkroom_session_registerRegister a session key for an agent, with caps: USDG notional per order and per UTC day (counted at each batch's price), the markets it may trade (symbols, comma separated, or all) and an expiry. The key consents by signing: without key_sig this returns the EIP-712 typed data for the session key to sign (its expiry fixed); call again with key_sig and that expiry, or with the Zero Dark kit's whole registration, for the owner's unsigned transaction, simulated from the wallet. The key can commit and cancel within its caps; it can never withdraw or change keys.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"wallet": "<wallet>"
},
"name": "darkroom_session_register"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | The session key's address (0x...) | |
| expiry | No | With key_sig: the expiry (unix seconds) the earlier call fixed and the key signed | |
| wallet | Yes | The wallet's address (0x...): the transactions are built for it to sign | |
| key_sig | No | The session key's signature over sign_this (0x + 130 hex) | |
| markets | No | Comma separated symbols, or all | |
| expiry_days | No | Without key_sig: days until it expires (1 to 365, default 30) | |
| max_day_usdg | No | Most notional per UTC day, USDG | |
| registration | No | Instead of the fields above: the registration the Zero Dark kit printed ({ darkroomAgent, owner, key, maxOrderUsdg, maxDayUsdg, markets, expiry, keySig }) | |
| max_order_usdg | No | Most notional per order, USDG |