Skip to main content

Function: uncurateOptionDetails()

function uncurateOptionDetails(details, utils): OptionDetails;

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

Strip a CuratedOptionDetails back to the raw OptionDetails (asset fields → their addresses). Used by clients that receive a curated broadcast but need the canonical, signable details.

Parameters

ParameterTypeDescription
details{ borrowAllowed: boolean; collateralAmount: string; collateralAsset: { address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }; domain: number; endTimestamp: number; premiumAmount: string; premiumAsset: { address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }; settlementAmount: string; settlementAsset: { address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }; settlementLayer: string; startTimestamp: number; }-
details.borrowAllowedboolean-
details.collateralAmountstring-
details.collateralAsset{ address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }-
details.collateralAsset.addressstringThe on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.
details.collateralAsset.cashLike?booleanWhether or not the asset can be treated similar to cash
details.collateralAsset.chain?stringThe chain the asset lives on, e.g. "base". A display label only — it is a caller-chosen name (see ChainName), carried by no wire payload and never used to key or look up an asset. domain is the identity.
details.collateralAsset.coinGeckoId?stringCoinGecko id for price lookups, e.g. usd-coin.
details.collateralAsset.decimals?numberNumber of decimal places in the asset's native units.
details.collateralAsset.domain?numberThe protocol domain the asset lives on — the same separator OptionDetails.domain carries and every indexed event is tagged with, and the first half of the asset's key in an AssetRegistry. Optional because a single-domain deployment has nothing to disambiguate; such an asset registers as a wildcard, matching any domain that has no asset of its own at that address. Populate it as soon as one backend serves two domains — an address is only unique within a domain.
details.collateralAsset.lastKnownPriceUsd?numberLast known USD price, sourced best-effort from an external feed (CoinGecko). Untrusted — do not use for settlement, signing, valuation, or any value transfer. It is informational only (e.g. showing an approximate notional in a picker), may be stale, missing, or wrong, and is never part of the canonical, content-addressed asset identity. Present only once a price has actually been fetched for the asset.
details.collateralAsset.logoUrl?stringLogo of the coin
details.collateralAsset.name?stringHuman name of the asset.
details.collateralAsset.rwa?booleanWhether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.
details.collateralAsset.symbol?stringHuman ticker, e.g. USDC.
details.collateralAsset.volatility?numberVolatility of the asset
details.domainnumber-
details.endTimestampnumber-
details.premiumAmountstring-
details.premiumAsset{ address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }-
details.premiumAsset.addressstringThe on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.
details.premiumAsset.cashLike?booleanWhether or not the asset can be treated similar to cash
details.premiumAsset.chain?stringThe chain the asset lives on, e.g. "base". A display label only — it is a caller-chosen name (see ChainName), carried by no wire payload and never used to key or look up an asset. domain is the identity.
details.premiumAsset.coinGeckoId?stringCoinGecko id for price lookups, e.g. usd-coin.
details.premiumAsset.decimals?numberNumber of decimal places in the asset's native units.
details.premiumAsset.domain?numberThe protocol domain the asset lives on — the same separator OptionDetails.domain carries and every indexed event is tagged with, and the first half of the asset's key in an AssetRegistry. Optional because a single-domain deployment has nothing to disambiguate; such an asset registers as a wildcard, matching any domain that has no asset of its own at that address. Populate it as soon as one backend serves two domains — an address is only unique within a domain.
details.premiumAsset.lastKnownPriceUsd?numberLast known USD price, sourced best-effort from an external feed (CoinGecko). Untrusted — do not use for settlement, signing, valuation, or any value transfer. It is informational only (e.g. showing an approximate notional in a picker), may be stale, missing, or wrong, and is never part of the canonical, content-addressed asset identity. Present only once a price has actually been fetched for the asset.
details.premiumAsset.logoUrl?stringLogo of the coin
details.premiumAsset.name?stringHuman name of the asset.
details.premiumAsset.rwa?booleanWhether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.
details.premiumAsset.symbol?stringHuman ticker, e.g. USDC.
details.premiumAsset.volatility?numberVolatility of the asset
details.settlementAmountstring-
details.settlementAsset{ address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; domain?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; }-
details.settlementAsset.addressstringThe on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.
details.settlementAsset.cashLike?booleanWhether or not the asset can be treated similar to cash
details.settlementAsset.chain?stringThe chain the asset lives on, e.g. "base". A display label only — it is a caller-chosen name (see ChainName), carried by no wire payload and never used to key or look up an asset. domain is the identity.
details.settlementAsset.coinGeckoId?stringCoinGecko id for price lookups, e.g. usd-coin.
details.settlementAsset.decimals?numberNumber of decimal places in the asset's native units.
details.settlementAsset.domain?numberThe protocol domain the asset lives on — the same separator OptionDetails.domain carries and every indexed event is tagged with, and the first half of the asset's key in an AssetRegistry. Optional because a single-domain deployment has nothing to disambiguate; such an asset registers as a wildcard, matching any domain that has no asset of its own at that address. Populate it as soon as one backend serves two domains — an address is only unique within a domain.
details.settlementAsset.lastKnownPriceUsd?numberLast known USD price, sourced best-effort from an external feed (CoinGecko). Untrusted — do not use for settlement, signing, valuation, or any value transfer. It is informational only (e.g. showing an approximate notional in a picker), may be stale, missing, or wrong, and is never part of the canonical, content-addressed asset identity. Present only once a price has actually been fetched for the asset.
details.settlementAsset.logoUrl?stringLogo of the coin
details.settlementAsset.name?stringHuman name of the asset.
details.settlementAsset.rwa?booleanWhether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.
details.settlementAsset.symbol?stringHuman ticker, e.g. USDC.
details.settlementAsset.volatility?numberVolatility of the asset
details.settlementLayerstring-
details.startTimestampnumber-
utilsOvercastUtils-

Returns

OptionDetails