Skip to main content

Function: completeOptionDetails()

function completeOptionDetails(details, premium): OptionDetails | null;

Defined in: packages/overcast-core/src/assets/index.ts:381

Complete an RFQ's (partial, curated) option terms with a market maker's quoted premium to produce the canonical, signable OptionDetails a quote is submitted over. Asset fields are resolved back to their addresses and the decimal-string amounts to native bigints.

Returns null when the RFQ omits a term the option needs — an RFQ only specifies part of the option (everything but the premium), so a caller must handle the incomplete case rather than quote on missing legs.

Parameters

ParameterType
detailsPartial<CuratedOptionDetails>
premium{ premiumAmount: bigint; premiumAsset: string; }
premium.premiumAmountbigint
premium.premiumAssetstring

Returns

OptionDetails | null