Skip to content

feat(channels): add cash channels for Eastern Asian markets - #48

Open
altradits wants to merge 18 commits into
minmoto:mainfrom
altradits:feat/cash-channels-eastern-asia
Open

altradits wants to merge 18 commits into
minmoto:mainfrom
altradits:feat/cash-channels-eastern-asia

Conversation

@altradits

Copy link
Copy Markdown
Contributor

Summary

Toward #29.

Adds built-in cash channels for Eastern Asia (UN M49: 030), covering all 8 sovereign markets and administrative territories across the region:

Eastern Asian Markets

  1. China (CN / CNY): cash_cn_cny — Chinese Yuan / Renminbi (People's Bank of China / Law of the People's Republic of China on the People's Bank of China, Order of the President No. 12; Regulations of the PRC on the Administration of Renminbi, State Council Decree No. 280)
  2. Hong Kong SAR (HK / HKD): cash_hk_hkd — Hong Kong Dollar (Hong Kong Monetary Authority / Legal Tender Notes Issue Ordinance Cap. 65; Coinage Ordinance Cap. 67; Basic Law of HKSAR Art. 111)
  3. Japan (JP / JPY): cash_jp_jpy — Japanese Yen (Bank of Japan / Bank of Japan Act, Act No. 89 of 1997, Art. 46; Currency Units and Issuance Act, Act No. 42 of 1987)
  4. Democratic People's Republic of Korea (KP / KPW): cash_kp_kpw — North Korean Won (Central Bank of the DPRK / Law of the DPRK on the Central Bank; Decision of the Standing Committee of the Supreme People's Assembly)
  5. Republic of Korea (KR / KRW): cash_kr_krw — South Korean Won (Bank of Korea / Bank of Korea Act, Act No. 13822, Arts. 47, 48)
  6. Mongolia (MN / MNT): cash_mn_mnt — Mongolian Tögrög (Bank of Mongolia / Law of Mongolia on the Central Bank, Arts. 7, 8, 9)
  7. Macao SAR (MO / MOP): cash_mo_mop — Macanese Pataca (Monetary Authority of Macao / Decree-Law no. 7/95/M; Basic Law of Macao SAR Art. 108)
  8. Taiwan (TW / TWD): cash_tw_twd — New Taiwan Dollar (Central Bank of the Republic of China (Taiwan) / Central Bank Act Art. 13; Regulations for the Issuance of the New Taiwan Dollar Notes and Coins)

Implementation Details

  • Uses canonical createCashPaymentChannel factory (schemaVersion: 2, automation: PaymentChannelAutomation.None, no collection fields, standard copy/display detail rows).
  • Source layout follows src/channels/<country>/cash.ts per channel conventions.
  • Registered in src/channels/index.ts and re-exported from src/index.ts.
  • Included in builtinPaymentChannels and validated against completeness checks in test/payment-channels.test.mjs.
  • Added market discovery and regression test suite registry exposes built-in cash channels for Eastern Asian markets.
  • Refreshed generated documentation and JSON registry via npm run docs:generate.

Authoritative Documentation & Primary Sources

  • China: People's Bank of China (中国人民银行) http://www.pbc.gov.cn/ (Law of the People's Republic of China on the People's Bank of China; Regulations of the PRC on the Administration of Renminbi).
  • Hong Kong SAR: Hong Kong Monetary Authority (香港金融管理局) https://www.hkma.gov.hk/ (Legal Tender Notes Issue Ordinance Cap. 65; Coinage Ordinance Cap. 67; Basic Law of HKSAR Art. 111).
  • Japan: Bank of Japan (日本銀行) https://www.boj.or.jp/ (Bank of Japan Act, Act No. 89 of 1997, Art. 46; Currency Units and Issuance Act, Act No. 42 of 1987).
  • Democratic People's Republic of Korea: Central Bank of the Democratic People's Republic of Korea (조선민주주의인민공화국 중앙은행) (Law of the DPRK on the Central Bank; Decision of the Standing Committee of the SPA).
  • Republic of Korea: Bank of Korea (한국은행) https://www.bok.or.kr/ (Bank of Korea Act, Act No. 13822, Arts. 47, 48).
  • Mongolia: Bank of Mongolia (Монголбанк) https://www.mongolbank.mn/ (Law of Mongolia on the Central Bank, Arts. 7, 8, 9).
  • Macao SAR: Monetary Authority of Macao (Autoridade Monetária de Macau / 澳門金融管理局) https://www.amcm.gov.mo/ (Decree-Law no. 7/95/M; Basic Law of Macao SAR Art. 108).
  • Taiwan: Central Bank of the Republic of China (Taiwan) (中央銀行) https://www.cbc.gov.tw/ (Central Bank of the Republic of China (Taiwan) Act Art. 13; Regulations for the Issuance of the New Taiwan Dollar Notes and Coins).

Verification

  • npm run check (formatter, TypeScript typecheck, docs check, examples check, and 57/57 tests pass)
  • npm pack --dry-run (clean tarball with runtime artifacts only)
  • npm run verify:pack (verified on isolated ESM and CommonJS consumers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant