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

Facility activation

Use activateFacility(...) for an imported LOC that is pending its processing fee. The SDK creates a durable activation, handles bounded token approvals if needed, signs payProcessingFee(), verifies the receipt events, and polls Qiro until the activation is reconciled.

REST callers use one unsigned action at a time:

POST /v1/facilities/{facility_id}/activations
GET  /v1/facility-activations/{activation_id}
POST /v1/facility-activations/{activation_id}/prepare
POST /v1/facility-activations/{activation_id}/submission

Creation accepts no body, requires X-Idempotency-Key, and treats X-Correlation-ID as optional. Qiro reads the exact processing fee from the trusted Viewer at a pinned block. The partner cannot supply fee, wallet, token, chain, LOC address, or spender.

The submission endpoint accepts only:

{ "transaction_hash": "0x..." }

It requires activations:write, is partner-isolated, persists the hash durably, treats same-hash retries as idempotent, and returns 409 ACTIVATION_TRANSACTION_CONFLICT for a different hash. The high-level SDK calls this endpoint internally after wallet broadcast; Settle applications using activateFacility() must not call it manually.

Lifecycle:

READY_FOR_SUBMISSION → SUBMITTING → CONFIRMING → ACTIVATED

FAILED is terminal. Token approval does not move the resource out of READY_FOR_SUBMISSION.

More precisely, FACILITY_ACTIVATION preparation still leaves the resource READY_FOR_SUBMISSION. SUBMITTING starts only after the broadcast hash is submitted. CONFIRMING is reached only after Qiro has a confirmed successful receipt whose sender, target, calldata, and fee events match the stored preparation. ACTIVATED is final only after Qiro verifies final LOC state and trusted bindings through RPC.

GET /v1/facilities/{facility_id} returns PENDING_ACTIVATION while the trusted LOC is PendingProcessingFee. Drawdowns remain ineligible with FACILITY_NOT_ACTIVE until activation is reconciled.