Blockchain API

Programmatic access to on-chain operations

The Blockchain API is your gateway to LinqProtocol's smart contracts. Create escrows, query providers, fund deployments - all via REST endpoints.

Overview

What the API does

The Blockchain API is a RESTful service that abstracts the complexity of interacting with LinqProtocol's smart contracts. The API constructs transactions and handles the formatting heavy lifting, while you still sign before submission.

Use cases:

  • Automate deployment creation and funding
  • Query provider capacity and pricing
  • Build custom dashboards and integrations
  • Integrate LinqProtocol into your CI/CD pipeline

Base URL:

https://blockchain-api.linqprotocol.com/api/v1/
Authentication

API access

Endpoints that read data are publicly accessible. Endpoints that modify state (create escrows, fund deployments) require authentication.

Authentication Method:

Bearer token in the Authorization header

Authorization: Bearer YOUR_API_KEY
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://blockchain-api.linqprotocol.com/api/v1/registry/providers
_

Getting an API key

Contact [email protected] to request API access.

Escrow

Escrow operations

POST/api/v1/escrow/offers/verify

Verifies an EIP-712 signature on an offer payload

POST/api/v1/escrow/create

Creates and funds a new escrow from a signed offer

POST/api/v1/escrow/{id}/fund

Adds additional funds to an existing escrow

GET/api/v1/escrow/{id}/fund/preview

Returns the allowance and remaining balance without changing state

POST/api/v1/escrow/{id}/provider/update

Changes the assigned provider before a job starts

POST/api/v1/escrow/{id}/start

Signals that the provider has begun work

POST/api/v1/escrow/{id}/withdraw

Allows providers to withdraw earned funds

POST/api/v1/escrow/{id}/finalize

Releases remaining funds and marks the escrow as complete

Registry

Provider operations

Query Endpoints

GET/api/v1/registry/providers

Returns addresses of registered providers. Add ?full=true for complete data

GET/api/v1/registry/providers/{address}

Returns the full on-chain record for a provider

GET/api/v1/registry/providers/{address}/used

Returns current resource utilization for a provider

GET/api/v1/registry/providers/{address}/gpu-classes/{classId}

Returns pricing for a specific GPU class

GET/api/v1/registry/providers/all/capacity

Returns total and used capacity across all providers

Mutation Endpoints

POST/api/v1/registry/providers/register

Registers a new provider with capacity, pricing, and metadata

PATCH/api/v1/registry/providers/base

Updates per-unit price ranges for CPU, memory, and storage

PATCH/api/v1/registry/providers/gpu-class

Adds or updates GPU class pricing

PATCH/api/v1/registry/providers/meta

Updates the provider's metadata hash

PATCH/api/v1/registry/providers/capacity

Adjusts declared resource capacity

DELETE/api/v1/registry/providers/{address}

Removes a provider from the registry (owner only)

Notes

Best practices

Versioning

All routes are under /api/v1. Breaking changes will use a new version path.

Rate Limiting

The API has rate limits. Contact us if you need higher limits.

Error Handling

Standard HTTP status codes:

400 - Bad request (check your payload)
401 - Unauthorized (check your API key)
403 - Forbidden (you don't own this resource)
404 - Not found (resource doesn't exist)
500 - Server error (retry or contact support)

Swagger UI

Explore and test endpoints at: https://blockchain-api.linqprotocol.com/api/v1/docs