Implement PaymentAddress encoding and decoding

This commit is contained in:
Jack Grigg
2018-10-17 10:06:13 +01:00
parent 81b2b1b554
commit 17f60a0354
6 changed files with 206 additions and 0 deletions

View File

@@ -2,3 +2,11 @@
///
/// [SLIP 44]: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
pub const COIN_TYPE: u32 = 133;
/// The HRP for a Bech32-encoded mainnet [`PaymentAddress`].
///
/// Defined in section 5.6.4 of the [Zcash Protocol Specification].
///
/// [`PaymentAddress`]: sapling_crypto::primitives::PaymentAddress
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zs";