One Click Delegated
One Click lets the server submit transactions via an authorized proxy wallet. Required before calling any /send endpoint.
For user-facing safety copy, signer checks, and delegation UX, read one-click-security-ux.md.
Query status
GET /api/v1/1ct/statusstatus
string
/send requires enable.
delegatee
string
Proxy wallet address.
Prepare EIP-712 payload
POST /api/v1/1ct/preparedeadline
number
Yes
Signature deadline (Unix seconds).
Response data:
delegatee
string
Proxy address.
signPayload
object
EIP-712 typed data.
nonce
number
Delegate nonce.
deadline
number
Same as request.
Example signPayload:
{
"domain": {
"name": "OneClickRouter",
"version": "1",
"chainId": 10143,
"verifyingContract": "0x..."
},
"types": {
"Delegate": [
{ "name": "user", "type": "address" },
{ "name": "delegatee", "type": "address" },
{ "name": "nonce", "type": "uint64" },
{ "name": "deadline", "type": "uint32" }
]
},
"primaryType": "Delegate",
"message": {
"user": "0x...",
"delegatee": "0x...",
"nonce": 0,
"deadline": 1893456000
}
}The live
signPayload.typesalso contains anEIP712Domainentry (omitted above for brevity). ethers ignores it — pass only{ Delegate: ... }as shown below. viem derives the domain itself and throws ifEIP712Domainis present intypes, so strip it first (see guides/demo-code.md).
Enable
signature
string
Yes
65-byte hex EIP-712 signature (0x prefix).
deadline
number
Yes
Must match /prepare response.
ethers v6 signing
Disable
No body. Use empty string for HMAC RAW_BODY.
Send endpoints after enable
Place order
/api/v1/orders/send
POST
Place order with deposit
/api/v1/orders/with-deposit/send
POST
Cancel order
/api/v1/orders/{orderId}/send
DELETE
Cash deposit
/api/v1/cash/deposits/send
POST
Cash withdrawal
/api/v1/cash/withdrawals/send
POST
Stock deposit
/api/v1/stock/deposits/send
POST
Stock withdrawal
/api/v1/stock/withdrawals/send
POST
Flow: build calldata internally → submit via One Click → auto-record tx on success.
Last updated

