src/assets/index.ts
v0.3.0 · 1.6 KB
// Public API of the assets module: asset ids, coin naming, validated meta registry, US-equity session model.
export type {
AssetInfo,
AssetLookup,
AssetRegistryEvent,
MarketKind,
SpotTokenInfo,
UnknownReason,
UnlistedReason,
} from './types.js';
export {
SPOT_ASSET_OFFSET,
HIP3_ASSET_OFFSET,
HIP3_DEX_BLOCK,
perpAssetId,
spotAssetId,
hip3AssetId,
decodeAssetId,
type DecodedAssetId,
} from './assetId.js';
export {
MAX_COIN_NAME_LENGTH,
isSpotCoin,
parseCoin,
qualifyCoin,
dexOfCoin,
stripDexPrefix,
isValidDexName,
type ParsedCoin,
} from './names.js';
export {
MAX_PERP_SZ_DECIMALS,
MAX_LEVERAGE_BOUND,
MAX_UNIVERSE_LENGTH,
MetaValidationError,
parsePerpUniverse,
parseMetaAndAssetCtxs,
crossCheckUniverses,
checkRegistryCoverage,
checkAppendOnly,
parsePerpDexs,
parseSpotMeta,
type PerpAssetMeta,
type PerpDexInfo,
type PerpDexTopology,
type SpotPairMeta,
type ParsedSpotMeta,
} from './parse.js';
export {
DEFAULT_META_TTL_MS,
DEFAULT_FAIL_COOLDOWN_MS,
META_REQUEST_WEIGHT,
AssetRegistryError,
createAssetRegistry,
type AssetRegistry,
type AssetRegistryOptions,
type MarketCheck,
type MarketSpec,
type RegistrySourceStatus,
} from './registry.js';
export { leverageParams, type LeverageParams } from './leverage.js';
export {
XYZ_ALWAYS_ON_COINS,
NYSE_CALENDAR,
SESSION_OPEN_MIN,
SESSION_CLOSE_MIN,
HALF_DAY_CLOSE_MIN,
easternTimeParts,
getMarketSession,
isMarketOpen,
type EasternTimeParts,
type MarketHoursOptions,
type MarketSession,
type MarketSessionReason,
type TradingCalendar,
} from './marketHours.js';