@kinetiq-research/asset-metadata 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CLAUDE.md +38 -0
  2. package/package.json +1 -1
package/CLAUDE.md ADDED
@@ -0,0 +1,38 @@
1
+ ## Purpose
2
+
3
+ Provides per-asset metadata (oracle URLs, localized descriptions) for tradeable assets on Kinetiq Markets.
4
+
5
+ ## Public API
6
+
7
+ - `get-asset-metadata` — `getAssetMetadata({ symbol })` returns oracle URL for a given asset symbol
8
+ - `get-asset-metadata-with-locale` — `getAssetMetadataWithLocale({ locale, symbol })` returns oracle URL plus localized short/medium descriptions and oracle name
9
+
10
+ ## Internal Structure
11
+
12
+ ```
13
+ src/
14
+ _/
15
+ asset-metadata.ts # Static metadata map (symbol -> oracleUrl)
16
+ types.ts # LocaleMessages type
17
+ get-asset-metadata.ts
18
+ get-asset-metadata-with-locale.ts
19
+ messages/
20
+ {locale}.json # 12 locale files with per-asset descriptions
21
+ ```
22
+
23
+ ## Patterns
24
+
25
+ - Pure data package — no React, no hooks, no side effects
26
+ - Symbol lookups are case-insensitive (lowercased before map access)
27
+ - Missing symbols return `undefined` fields rather than throwing
28
+ - Locale messages are statically imported (not loaded at runtime)
29
+
30
+ ## Adding New Exports
31
+
32
+ 1. Create source file in `src/`
33
+ 2. Add subpath export to `package.json` under `"exports"`
34
+
35
+ ## Adding a New Asset
36
+
37
+ 1. Add entry in `src/_/asset-metadata.ts` keyed by lowercase symbol
38
+ 2. Add `description_short`, `description_medium`, and `oracle` to each locale JSON under `messages/`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinetiq-research/asset-metadata",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Asset metadata (descriptions, oracle references) for Kinetiq markets",
5
5
  "sideEffects": false,
6
6
  "type": "module",