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

Drawdowns

The drawdown workflow creates a durable credit request and then prepares the borrower transaction only after Qiro validation succeeds.

High-level SDK

Use requestDrawdown(...) for the normal partner flow. The SDK guide includes a complete input example.

The SDK:

  1. retrieves the facility;

  2. verifies the supplied wallet is the active designated wallet;

  3. creates the drawdown with an idempotency key;

  4. polls until the drawdown is READY_FOR_SUBMISSION;

  5. requests the unsigned borrower transaction;

  6. verifies chain ID, LOC address, function, amount, duration, and zero native value;

  7. asks the wallet to sign and broadcast;

  8. waits for the receipt and verifies DrawdownRequested.

The SDK returns after DrawdownRequested is confirmed. That does not mean the drawdown is funded. Qiro admin approval and funding happen asynchronously. Use GET /v1/drawdowns/{drawdown_id} and webhooks for the later status.

REST workflow

POST /v1/facilities/{facility_id}/drawdowns
GET  /v1/drawdowns/{drawdown_id}
POST /v1/drawdowns/{drawdown_id}/prepare
GET  /v1/drawdowns/{drawdown_id}

Creation returns 202 VALIDATING. Qiro then validates facility policy, available credit, tenor, wallet, contract state, and simulation. When the resource becomes READY_FOR_SUBMISSION, preparation returns short-lived unsigned requestDrawdown(amount, duration) calldata.

Repeated preparation during the validity window returns the same stored transaction. After expiry, Qiro prepares a fresh transaction only if contract state is still safe.

Cancellation

Drawdown cancellation is not enabled in the current partner API. If a drawdown has not been prepared yet, coordinate cancellation operationally with Qiro. Once transaction preparation begins, the borrower transaction may already have been broadcast.

Main statuses

AWAITING_APPROVAL means Qiro verified the borrower request on-chain. FUNDED means the Qiro admin approval/funding transaction was verified. REPAID means Qiro has verified a full repayment of the funded drawdown.