Skip to content

feat(ows-signer): add Cardano chain support (CIP-1852, Ed25519-BIP32, bech32)#186

Open
adacapo21 wants to merge 2 commits intoopen-wallet-standard:mainfrom
adacapo21:feat/cardano-chain-support
Open

feat(ows-signer): add Cardano chain support (CIP-1852, Ed25519-BIP32, bech32)#186
adacapo21 wants to merge 2 commits intoopen-wallet-standard:mainfrom
adacapo21:feat/cardano-chain-support

Conversation

@adacapo21
Copy link
Copy Markdown

Summary

  • Adds ChainType::Cardano to ows-core with CAIP-2 identifiers cardano:mainnet, cardano:preprod, cardano:preview
  • Implements CardanoSigner using CIP-1852 HD derivation (m/1852'/1815'/account'/0/index) via ed25519-bip32
  • Enterprise address encoding: bech32 with addr/addr_test HRP and blake2b-224 payment key hash
  • Transaction signing: blake2b-256 of CBOR-encoded tx body, signed with Ed25519-BIP32; witness set injected via ciborium
  • Adds Curve::Ed25519Bip32 variant (64-byte extended keys) and updates KeyPair in ows-lib
  • Coin type 1815, derivation path m/1852'/1815'/0'/0/0

Known limitations

Root key derivation uses the BIP-39 seed (PBKDF2 output) via HMAC-SHA512, not Icarus-style entropy-based derivation. Derived addresses are internally consistent and deterministic but will not match addresses generated by Lucid Evolution / Eternl (which use the Byron/Icarus root key from raw entropy).

Test plan

  • cargo test -p ows-signer — all Cardano unit tests pass (address format, signing roundtrip, CBOR tx sign, blake2b vectors, staking path)
  • cargo test -p ows-coretest_parse_chain_cardano, test_serde_all_variants, test_all_chain_types pass
  • cargo test -p ows-lib — all import/sign tests pass including Cardano
  • cargo test --workspace — 540 tests pass, 0 failures
  • cargo clippy --workspace -- -D warnings — no warnings
  • cargo fmt --all --check — no formatting issues

… bech32)

- Add Cardano variant to ChainType enum in ows-core
- Implement CardanoSigner with CIP-1852 HD derivation (m/1852'/1815'/0'/0/0)
- Enterprise address encoding: bech32 with blake2b-224 payment key hash
- Transaction signing: blake2b-256(tx_body) signed with ed25519-bip32
- CBOR witness set injection via ciborium
- Support cardano:mainnet, cardano:preprod, cardano:preview CAIP-2 identifiers
- Tests: address derivation from known vectors, message signing, tx signing
@adacapo21 adacapo21 requested a review from njdawn as a code owner April 4, 2026 11:11
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

@adacapo21 is attempting to deploy a commit to the MoonPay Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 4, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​ciborium@​0.2.210010093100100
Addedcargo/​ed25519-bip32@​0.4.110010093100100

View full report

- Implement broadcast_cardano() using Koios submittx endpoint
  (POST /submittx, Content-Type: application/cbor, no API key required)
- Add default RPC endpoints for cardano:mainnet, cardano:preprod, cardano:preview
- Wire Cardano into the broadcast() dispatcher
- ows sign send-tx --chain cardano now works end-to-end
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