Skip to content

API ReferenceLOC lifecycleVariable

ConvertLOCErrorType

const ConvertLOCErrorType: object;

Field-scoped errors returned when a conversion is built or executed. sdk.loc.validateConvert instead returns ValidationIssue objects whose code comes from ValidationErrorCode.

Type Declaration

CollateralValueZero

readonly CollateralValueZero: "CollateralValueZero" = 'CollateralValueZero';

The LOC’s claimable collateral has zero value at the selected price.

ConversionFundsReceivedMismatch

readonly ConversionFundsReceivedMismatch: "ConversionFundsReceivedMismatch" = 'ConversionFundsReceivedMismatch';

The external liquidator returned a different credited-token amount.

FieldInvalid

readonly FieldInvalid: "FieldInvalid" = 'FieldInvalid';

The builder rejected the field’s runtime shape or field combination.

InsufficientFee

readonly InsufficientFee: "InsufficientFee" = 'InsufficientFee';

The value attached to a non-empty Pyth update did not cover its fee.

LiquidationAmountTooSmall

readonly LiquidationAmountTooSmall: "LiquidationAmountTooSmall" = 'LiquidationAmountTooSmall';

Integer flooring reduced a conversion-side amount to zero.

LOCAlreadyConverted

readonly LOCAlreadyConverted: "LOCAlreadyConverted" = 'LOCAlreadyConverted';

The LOC is static or its collateral was already converted.

LOCExpired

readonly LOCExpired: "LOCExpired" = 'LOCExpired';

The LOC expired before conversion was executed.

LOCHealthy

readonly LOCHealthy: "LOCHealthy" = 'LOCHealthy';

The LOC has not reached its current pair’s liquidation threshold.

LOCNotFound

readonly LOCNotFound: "LOCNotFound" = 'LOCNotFound';

No live LOC exists for the requested ID.

PriceUpdateTooOld

readonly PriceUpdateTooOld: "PriceUpdateTooOld" = 'PriceUpdateTooOld';

The contract rejected the Pyth update as stale.