feat(ows-signer): add Cardano chain support (CIP-1852, Ed25519-BIP32, bech32)#186
Open
adacapo21 wants to merge 2 commits intoopen-wallet-standard:mainfrom
Open
feat(ows-signer): add Cardano chain support (CIP-1852, Ed25519-BIP32, bech32)#186adacapo21 wants to merge 2 commits intoopen-wallet-standard:mainfrom
adacapo21 wants to merge 2 commits intoopen-wallet-standard:mainfrom
Conversation
… 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 is attempting to deploy a commit to the MoonPay Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ChainType::Cardanotoows-corewith CAIP-2 identifierscardano:mainnet,cardano:preprod,cardano:previewCardanoSignerusing CIP-1852 HD derivation (m/1852'/1815'/account'/0/index) viaed25519-bip32addr/addr_testHRP and blake2b-224 payment key hashciboriumCurve::Ed25519Bip32variant (64-byte extended keys) and updatesKeyPairinows-libm/1852'/1815'/0'/0/0Known 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-core—test_parse_chain_cardano,test_serde_all_variants,test_all_chain_typespasscargo test -p ows-lib— all import/sign tests pass including Cardanocargo test --workspace— 540 tests pass, 0 failurescargo clippy --workspace -- -D warnings— no warningscargo fmt --all --check— no formatting issues