For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/status
Field
Type
Description

status

string

/send requires enable.

delegatee

string

Proxy wallet address.

Prepare EIP-712 payload

POST /api/v1/1ct/prepare
Field
Type
Required
Description

deadline

number

Yes

Signature deadline (Unix seconds).

Response data:

Field
Type
Description

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.types also contains an EIP712Domain entry (omitted above for brevity). ethers ignores it — pass only { Delegate: ... } as shown below. viem derives the domain itself and throws if EIP712Domain is present in types, so strip it first (see guides/demo-code.md).

Enable

Field
Type
Required
Description

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

Operation
Endpoint
Method

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.

See guides/one-click-flow.md.

Last updated