Up and running in 3 steps
Install the Python SDK, create an escrow with a condition, and settle it when the condition is met. That's the full loop.
Install the SDK
Create an escrow
Settle when ready
API Reference
Create Escrow
Request body fields
Settle Escrow
Request body fields
Free Trial Escrow
Request body fields
Get Escrow State
Path parameters
Discover Open Escrows
Query parameters
Protocol Stats
No parameters
Client libraries
All SDKs are thin wrappers around the HTTP API. They handle authentication, retries, and typed responses. The MCP Bridge exposes LogicNodes as a tool in any MCP-compatible agent environment.
Python quick example
Condition type reference
Each condition_type determines how the evaluator oracle verifies the proof field supplied during /escrow/settle. The condition_value field set at creation time defines the expected state.
| Condition Type | condition_value format | proof format |
|---|---|---|
| hash_match | SHA-256 hex string: sha256:e3b0c44... |
SHA-256 hex string of the artifact to compare. |
| api_response_match | JSON string of expected response fields: {"status":"ok"} |
URL of the API endpoint to query. Evaluator fetches it live. |
| schema_validate | JSON Schema object or Avro schema string. | JSON object to validate against the schema. |
| sig_valid | Expected signer public key (hex) + message hash. | ECDSA or Ed25519 signature as hex string. |
| gas_below | Threshold in Gwei: 5 |
Not required. Evaluator reads Base gas price directly. |
| peg_held | JSON: {"asset":"USDC","peg":1.00,"tolerance":0.005} |
Not required. Evaluator reads Chainlink price feed. |
| block_after | Target block number: 18500000 |
Not required. Evaluator reads current block number. |
| multi | JSON array of sub-condition objects with type, value, required fields. |
JSON array of proof objects, one per sub-condition. |
Authentication
All authenticated endpoints require a X-API-Key header. API keys are scoped to a wallet address and can be rotated from the dashboard at any time.
x402 auto-payment
LogicNodes also supports x402 HTTP 402 Payment Required flows for fully autonomous machine-to-machine payments. When your agent receives a 402 response with an X-LogicNodes-Escrow header, it can automatically create and settle an escrow using the MCP Bridge or SDK without human interaction. See the Payment Rails section for the full header protocol.