Class: AssetRegistry
Defined in: packages/overcast-core/src/assets/index.ts:73
An in-memory lookup from asset address to its curated Asset metadata.
The core package ships the class only — it is deliberately never populated here. Each deployment (e.g. the backend) constructs an instance from its own hard-coded allowlist, which doubles as the set of assets it will accept.
Constructors
Constructor
new AssetRegistry(assets?): AssetRegistry;
Defined in: packages/overcast-core/src/assets/index.ts:76
Parameters
| Parameter | Type | Default value |
|---|---|---|
assets | object[] | [] |
Returns
AssetRegistry
Methods
get()
get(address):
| {
address: string;
cashLike?: boolean;
chain?: string;
coinGeckoId?: string;
decimals?: number;
lastKnownPriceUsd?: number;
logoUrl?: string;
name?: string;
rwa?: boolean;
symbol?: string;
volatility?: number;
}
| undefined;
Defined in: packages/overcast-core/src/assets/index.ts:91
The asset for an address, or undefined if it isn't registered.
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
Type Literal
{
address: string;
cashLike?: boolean;
chain?: string;
coinGeckoId?: string;
decimals?: number;
lastKnownPriceUsd?: number;
logoUrl?: string;
name?: string;
rwa?: boolean;
symbol?: string;
volatility?: number;
}
address
address: string;
The on-chain address (mint) that uniquely identifies the asset.
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.
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.
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
undefined
getOrDefault()
getOrDefault(address): object;
Defined in: packages/overcast-core/src/assets/index.ts:108
Like get, but defaults the asset if not available
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
address
address: string;
The on-chain address (mint) that uniquely identifies the asset.
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.
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.
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
has()
has(address): boolean;
Defined in: packages/overcast-core/src/assets/index.ts:96
Whether an address is a registered (allowlisted) asset.
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
boolean
list()
list(): object[];
Defined in: packages/overcast-core/src/assets/index.ts:86
Every registered asset, in insertion order.
Returns
register()
register(asset): void;
Defined in: packages/overcast-core/src/assets/index.ts:81
Add (or overwrite) an asset, keyed by its address.
Parameters
| Parameter | Type | Description |
|---|---|---|
asset | { address: string; cashLike?: boolean; chain?: string; coinGeckoId?: string; decimals?: number; lastKnownPriceUsd?: number; logoUrl?: string; name?: string; rwa?: boolean; symbol?: string; volatility?: number; } | - |
asset.address | string | The on-chain address (mint) that uniquely identifies the asset. |
asset.cashLike? | boolean | Whether or not the asset can be treated similar to cash |
asset.chain? | string | The chain the asset lives on. |
asset.coinGeckoId? | string | CoinGecko id for price lookups, e.g. usd-coin. |
asset.decimals? | number | Number of decimal places in the asset's native units. |
asset.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. |
asset.logoUrl? | string | Logo of the coin |
asset.name? | string | Human name of the asset. |
asset.rwa? | boolean | Whether the asset is a real-world asset (RWA) — e.g. tokenized private equity — rather than a native crypto asset. |
asset.symbol? | string | Human ticker, e.g. USDC. |
asset.volatility? | number | Volatility of the asset |
Returns
void
require()
require(address): object;
Defined in: packages/overcast-core/src/assets/index.ts:101
Like get, but throws when the asset isn't registered.
Parameters
| Parameter | Type |
|---|---|
address | string |
Returns
address
address: string;
The on-chain address (mint) that uniquely identifies the asset.
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.
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.
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