API Reference

API Reference

Process Transaction

Simulates and analyzes a submitted transaction, comparing the actual execution with the provided reason (intent) β€” what the transaction is expected to do.

Based on the analysis, the system determines whether the transaction should be approved or rejected, and flags any risks or mismatches with the original intent

Base URL

http://apib.baibysitter.xyz

Endpoint

POST /api/transaction

Swagger

http://apib.baibysitter.xyz/docs#tag/default/post/api/transaction

Request

Headers

Content-Type: application/json

Body Parameters

Field
Type
Required
Description

chainId

Integer

βœ… Yes

Blockchain network ID

from_address

String

βœ… Yes

Sender wallet address

to_address

String

βœ… Yes

Recipient wallet address

data

String

βœ… Yes

Encoded transaction data

value

String

No (default "0")

ETH or native token value sent

reason

String

Optional

Declared intent for the transaction (e.g., "swap 1 ETH for USDC")


Example Request

Shell / cURL


Responses

200 OK

422 Validation Error


Example Use Cases

  • ERC-20 transfer: Validate that the declared recipient matches the simulated execution.

  • Swap: Detect mismatches between expected and actual tokens received.

  • Approval: Detect infinite approvals or approvals to malicious addresses.

Last updated