Skip to main content

Function: completeOptionDetails()

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

Defined in: packages/overcast-core/src/curation/curate.ts:193

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: Bytes32; }
premium.premiumAmountbigint
premium.premiumAssetBytes32
utilsOvercastUtils

Returns

OptionDetails | null