X_CURRENCY_UNKNOWN
Means
currency code not in the currency table
Typical cause
a lowercase code — the lookup is exact — or a currency the shipped rows do not carry. 53 ISO-4217 rows ship, at packages/money/src/currency.ts:21, and As of 2026-08 they are not the whole set: registerCurrency() adds a row for this process, and currencyCodes() answers with those registrations included. Also raised where there is no currency at all to infer — sum([]) over an empty array
Fix
assertCurrency('EUR') with a code currencyCodes() lists, uppercased; sum([], 'EUR') where nothing can be inferred — or declare the missing currency once at boot: registerCurrency({ code: 'XBT', exponent: 2, name: 'XBT' })