emj
shrx

Reference · Glossary

Indexer API & Status Reference

Quick lookup for lending-indexer. Swagger at /swagger-ui/ when API is running.

Offer statuses

StatusMeaning
pendingCollateral locked; waiting for lender
activeLender funded principal; loan running
repaidBorrower repaid; lender vault awaiting claim
claimedLender withdrew from repayment vault
liquidatedTerm expired; lender took collateral
cancelledBorrower cancelled pending offer

Tracked UTXO types

TypeWhen created
pending_offerOffer creation tx
active_offerLender acceptance tx (output 0)
borrower_principalAcceptance tx (output 1) — principal locked for borrower
repaymentFull repayment tx — lender vault
cancellationCancel tx (audit trail)
liquidationLiquidation tx (audit trail)
claimLender vault claim tx

Key endpoints

MethodPathUse
GET/offersBrowse offers (filter by status, assets, factory)
GET/offers/{id}Full detail: NFT ids, participant UTXOs, unspent offer UTXOs
GET/offers/by-scriptOffer IDs for wallet holding participant NFT
GET/borrowers/offersOffers where script_pubkey is borrower
GET/lenders/offersOffers where script_pubkey is lender
GET/factories/by-scriptFactories owned by wallet
GET/factories/{id}Factory detail + auth/program UTXOs

Response fields (short offer)

  • interest_rate — basis points (1000 = 10%)
  • loan_expiration_height — block height
  • collateral_amount, principal_amount — decimal satoshi strings
  • issuance_factory_id — links offer to borrower factory
  • participants — latest borrower/lender script pubkeys