Skip to main content

Class: OvercastCurator

Defined in: packages/overcast-core/src/curation/curator.ts:59

Everything needed to turn raw protocol records into curated (display, wire) shapes and back: the per-domain address boundaries (OvercastUtilsRegistry) and the per-domain asset metadata (AssetRegistry).

The two were always used as a pair — every call site in the codebase spelled registry.getOrDefault(utils.get(details.domain).formatAddress(slot)) — and every store took them as two positional constructor arguments that had to agree, with nothing enforcing it. This is that pair as one object.

What it buys beyond tidiness: the caller no longer chooses the boundary. The free functions in ./curate take one OvercastUtils, so a caller curating a multi-domain page could hand a Solana row an EVM boundary — which either throws or, on Solana, silently mislabels the address, since any 32 bytes are a valid base58 pubkey. Every method here reads the domain off the record's own terms (OptionDetails.domain) and resolves both halves against it, so that mistake is no longer expressible. A domain with no layer registered curates through hex, which is lossless and always valid (see OvercastUtilsRegistry).

const curator = new OvercastCurator(
new OvercastUtilsRegistry([
[1, solanaFactory.utils],
[8453, baseFactory.utils],
]),
new AssetRegistry(await backend.listAssets()),
);
new MemoryStore(curator); // same argument on `PostgresStore`

Constructors​

Constructor​

new OvercastCurator(utils?, assets?): OvercastCurator;

Defined in: packages/overcast-core/src/curation/curator.ts:60

Parameters​

ParameterTypeDescription
utilsOvercastUtilsRegistryThe address boundary per domain; unknown domains fall back to hex.
assetsAssetRegistryThe asset metadata per (domain, address) pair.

Returns​

OvercastCurator

Properties​

assets​

readonly assets: AssetRegistry;

Defined in: packages/overcast-core/src/curation/curator.ts:64

The asset metadata per (domain, address) pair.


utils​

readonly utils: OvercastUtilsRegistry;

Defined in: packages/overcast-core/src/curation/curator.ts:62

The address boundary per domain; unknown domains fall back to hex.

Methods​

asset()​

asset(domain, slot): object;

Defined in: packages/overcast-core/src/curation/curator.ts:73

The Asset a canonical slot names on domain, defaulted to a bare asset carrying just the address when it has no curated metadata.

Parameters​

ParameterType
domainnumber
slotBytes32

Returns​

address​
address: string;

The on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.

cashLike?​
optional cashLike?: boolean;

Whether or not the asset can be treated similar to cash

chain?​
optional chain?: string;

The 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.

coinGeckoId?​
optional coinGeckoId?: string;

CoinGecko id for price lookups, e.g. usd-coin.

decimals?​
optional decimals?: number;

Number of decimal places in the asset's native units.

domain?​
optional domain?: number;

The 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.

lastKnownPriceUsd?​
optional lastKnownPriceUsd?: number;

Last 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.

logoUrl?​
optional logoUrl?: string;

Logo of the coin

name?​
optional name?: string;

Human name of the asset.

rwa?​
optional rwa?: boolean;

Whether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.

symbol?​
optional symbol?: string;

Human ticker, e.g. USDC.

volatility?​
optional volatility?: number;

Volatility of the asset


completeOptionDetails()​

completeOptionDetails(details, premium): OptionDetails | null;

Defined in: packages/overcast-core/src/curation/curator.ts:147

completeOptionDetails — an RFQ's partial curated terms plus a quoted premium, as canonical signable details. null when the RFQ left out a term the option needs, including its domain (without which there is no boundary to resolve the legs through).

Parameters​

ParameterType
detailsPartial<CuratedOptionDetails>
premium{ premiumAmount: bigint; premiumAsset: Bytes32; }
premium.premiumAmountbigint
premium.premiumAssetBytes32

Returns​

OptionDetails | null


forDomain()​

forDomain(domain): OvercastAssets;

Defined in: packages/overcast-core/src/curation/curator.ts:85

The (assets, boundary) pair for one domain, as the pinned view a single-chain consumer wants — curator.forDomain(8453).get(slot) instead of threading a registry and a boundary through every call.

Parameters​

ParameterType
domainnumber

Returns​

OvercastAssets


marketOption()​

marketOption(
option,
totals,
creation,
now?): CuratedMarketOption;

Defined in: packages/overcast-core/src/curation/curator.ts:108

curateMarketOption, through the boundary the option's terms name.

Parameters​

ParameterType
optionMarketOption
totalsOptionTotals
creationOptionCreation
now?number

Returns​

CuratedMarketOption


offer()​

offer(
offer,
closure?,
now?): CuratedOffer;

Defined in: packages/overcast-core/src/curation/curator.ts:97

curateOffer, through the boundary the offer's terms name.

Parameters​

ParameterType
offerOffer
closureOfferClosure
now?number

Returns​

CuratedOffer


optionDetails()​

optionDetails(details): object;

Defined in: packages/overcast-core/src/curation/curator.ts:92

curateOptionDetails, through the boundary details.domain names.

Parameters​

ParameterType
detailsOptionDetails

Returns​

object

borrowAllowed​
borrowAllowed: boolean;
collateralAmount​
collateralAmount: string;
collateralAsset​
collateralAsset: object = assetSchema;
collateralAsset.address​
address: string;

The on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.

collateralAsset.cashLike?​
optional cashLike?: boolean;

Whether or not the asset can be treated similar to cash

collateralAsset.chain?​
optional chain?: string;

The 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.

collateralAsset.coinGeckoId?​
optional coinGeckoId?: string;

CoinGecko id for price lookups, e.g. usd-coin.

collateralAsset.decimals?​
optional decimals?: number;

Number of decimal places in the asset's native units.

collateralAsset.domain?​
optional domain?: number;

The 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.

collateralAsset.lastKnownPriceUsd?​
optional lastKnownPriceUsd?: number;

Last 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.

collateralAsset.logoUrl?​
optional logoUrl?: string;

Logo of the coin

collateralAsset.name?​
optional name?: string;

Human name of the asset.

collateralAsset.rwa?​
optional rwa?: boolean;

Whether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.

collateralAsset.symbol?​
optional symbol?: string;

Human ticker, e.g. USDC.

collateralAsset.volatility?​
optional volatility?: number;

Volatility of the asset

domain​
domain: number;
endTimestamp​
endTimestamp: number;
premiumAmount​
premiumAmount: string;
premiumAsset​
premiumAsset: object = assetSchema;
premiumAsset.address​
address: string;

The on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.

premiumAsset.cashLike?​
optional cashLike?: boolean;

Whether or not the asset can be treated similar to cash

premiumAsset.chain?​
optional chain?: string;

The 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.

premiumAsset.coinGeckoId?​
optional coinGeckoId?: string;

CoinGecko id for price lookups, e.g. usd-coin.

premiumAsset.decimals?​
optional decimals?: number;

Number of decimal places in the asset's native units.

premiumAsset.domain?​
optional domain?: number;

The 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.

premiumAsset.lastKnownPriceUsd?​
optional lastKnownPriceUsd?: number;

Last 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.

premiumAsset.logoUrl?​
optional logoUrl?: string;

Logo of the coin

premiumAsset.name?​
optional name?: string;

Human name of the asset.

premiumAsset.rwa?​
optional rwa?: boolean;

Whether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.

premiumAsset.symbol?​
optional symbol?: string;

Human ticker, e.g. USDC.

premiumAsset.volatility?​
optional volatility?: number;

Volatility of the asset

settlementAmount​
settlementAmount: string;
settlementAsset​
settlementAsset: object = assetSchema;
settlementAsset.address​
address: string;

The on-chain address (mint) identifying the asset, in the layer's own encoding (base58 on Solana, 0x… on an EVM chain) — see Address.

settlementAsset.cashLike?​
optional cashLike?: boolean;

Whether or not the asset can be treated similar to cash

settlementAsset.chain?​
optional chain?: string;

The 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.

settlementAsset.coinGeckoId?​
optional coinGeckoId?: string;

CoinGecko id for price lookups, e.g. usd-coin.

settlementAsset.decimals?​
optional decimals?: number;

Number of decimal places in the asset's native units.

settlementAsset.domain?​
optional domain?: number;

The 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.

settlementAsset.lastKnownPriceUsd?​
optional lastKnownPriceUsd?: number;

Last 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.

settlementAsset.logoUrl?​
optional logoUrl?: string;

Logo of the coin

settlementAsset.name?​
optional name?: string;

Human name of the asset.

settlementAsset.rwa?​
optional rwa?: boolean;

Whether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset.

settlementAsset.symbol?​
optional symbol?: string;

Human ticker, e.g. USDC.

settlementAsset.volatility?​
optional volatility?: number;

Volatility of the asset

settlementLayer​
settlementLayer: string;
startTimestamp​
startTimestamp: number;

rawMarketOption()​

rawMarketOption(option): MarketOption;

Defined in: packages/overcast-core/src/curation/curator.ts:137

uncurateMarketOption — back to the canonical MarketOption.

Parameters​

ParameterType
optionCuratedMarketOption

Returns​

MarketOption


rawOffer()​

rawOffer(offer): Offer;

Defined in: packages/overcast-core/src/curation/curator.ts:132

uncurateOffer — back to the canonical, signable Offer.

Parameters​

ParameterType
offerCuratedOffer

Returns​

Offer


rawOptionDetails()​

rawOptionDetails(details): OptionDetails;

Defined in: packages/overcast-core/src/curation/curator.ts:127

uncurateOptionDetails, through the boundary details.domain names.

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-

Returns​

OptionDetails