API ReferenceLOC lifecycleInterface
LetterOfCredit
The full record of one LOC, read from the subgraph: how it was created, everything that has happened to it since, and its position at the indexed block. Redeemed and canceled LOCs keep their record. It does not depend on the connected wallet or on current prices.
Properties
creationContext
creationContext: LetterOfCreditCreationContext;For a Dynamic LOC, the pair’s risk terms at creation (collateral factors, liquidator incentive,
redeem buffer); kind: 'notApplicable' for a Static LOC. They are history, not the terms that
decide current health.
indexedAt
indexedAt: SubgraphIndexPosition;The subgraph block this record was read at, which can trail the latest block.
lifecycle
lifecycle: LetterOfCreditLifecycle;What has happened since creation: redemption (count and total redeemed), liquidation (count,
collateral converted, liquidator fees, and any full conversion with its shortfall), and resolution
(how and when the LOC was redeemed or canceled, or null while open).
origin
origin: LetterOfCreditOrigin;Facts fixed at creation: creator, beneficiary, creationKind ('static' or 'dynamic'), the
Collateral Vault, originalCollateral, credited (the amount promised),
initialExpirationTimestamp, the creation transaction (createdIn), and tag.
outstanding
outstanding: | LetterOfCreditHistoricalSnapshot & Pick<OutstandingLetterOfCredit, "beneficiary" | "creator" | "creationKind" | "reference"> | null;The LOC’s position at the indexed block (remainingCredited, expirationTimestamp, backing, and
its parties), or null once it has been redeemed or canceled. For some of the oldest LOCs,
backing.reservation can be null;
LOCModule.getOutstandingLetterOfCredit always returns
it.
reference
reference: LetterOfCreditReference;The LOC’s chain, LetterOfCredit contract address, and numeric id. Store all three to identify a LOC.