Skip to content

API ReferenceLOC lifecycleInterface

OutstandingLetterOfCredit

A LOC’s live position, read from the LetterOfCredit contract: who it is between, what it still promises, when it expires, and what backs it. Creation history is on LetterOfCredit; current prices and risk terms are separate reads.

Properties

backing

backing:
| {
claimableCollateral: bigint;
collateral: TokenAmount;
kind: "reserved";
reservation: CollateralReservationReference;
}
| {
amount: bigint;
kind: "converted";
};

What backs the LOC: collateral reserved in a vault (kind: 'reserved'), or credited tokens the contract holds after a full conversion (kind: 'converted').

Union Members

Type Literal
{
claimableCollateral: bigint;
collateral: TokenAmount;
kind: 'reserved';
reservation: CollateralReservationReference;
}
claimableCollateral
claimableCollateral: bigint;

Collateral the LetterOfCredit contract can currently claim, in smallest units of the collateral token.

collateral
collateral: TokenAmount;

Total collateral currently reserved; claimableCollateral is the part the contract can claim.

kind
kind: 'reserved';

Collateral reserved in a Collateral Vault backs the LOC.

reservation
reservation: CollateralReservationReference;

The vault reservation holding the collateral, including which vault it is in.


Type Literal
{
amount: bigint;
kind: 'converted';
}
amount
amount: bigint;

Credited tokens held, in the remainingCredited token. Any shortfall from the conversion is recorded on the LOC’s lifecycle.

kind
kind: 'converted';

The LOC was fully converted; the contract holds credited tokens.


beneficiary

beneficiary: `0x${string}`;

Beneficiary address stored by the LOC contract.


creationKind

creationKind: 'static' | 'dynamic';

'static' or 'dynamic' as created; a fully converted Dynamic LOC stays 'dynamic'.


creator

creator: `0x${string}`;

Creator address stored by the LOC contract.


expirationTimestamp

expirationTimestamp: bigint;

Current expiration in Unix seconds. An expired LOC keeps its position until someone cancels it.


reference

reference: LetterOfCreditReference;

The LOC’s chain, contract, and id.


remainingCredited

remainingCredited: TokenAmount;

Amount the Beneficiary can still redeem. Full conversion resets it to the amount the conversion actually received.