howardwu / wagyu

A Rust library for generating cryptocurrency wallets
https://wagyu.dev
Apache License 2.0
612 stars 106 forks source link

Bitcoin CLI bip49 derivation error #84

Closed raychu86 closed 5 years ago

raychu86 commented 5 years ago

Bip49 keys are not generated properly: Prefix is xprv and xpub instead of yprv and ypub. Address format is p2pkh instead of p2sh_p2wpkh.

raychu86 commented 5 years ago

Hard coded to P2PKH: https://github.com/ArgusHQ/wagyu/blob/94b1b47847e0a82ca7b76e4d3d1de096bdaf79c8/bitcoin/src/mnemonic.rs#L39-L42

Incorrect path for bip49: https://github.com/ArgusHQ/wagyu/blob/94b1b47847e0a82ca7b76e4d3d1de096bdaf79c8/wagyu/cli/bitcoin.rs#L513

howardwu commented 5 years ago

107 resolves this