-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from str4d/address-encodings
Sapling address encodings
- Loading branch information
Showing
25 changed files
with
397 additions
and
334 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "zcash_client_backend" | ||
version = "0.0.0" | ||
authors = [ | ||
"Jack Grigg <jack@z.cash>", | ||
] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
bech32 = "0.6" | ||
pairing = { path = "../pairing" } | ||
sapling-crypto = { path = "../sapling-crypto" } | ||
zcash_primitives = { path = "../zcash_primitives" } | ||
|
||
[dev-dependencies] | ||
rand = "0.4" |
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//! Zcash global and per-network constants. | ||
|
||
pub mod mainnet; | ||
pub mod testnet; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/// The mainnet coin type for ZEC, as defined by [SLIP 44]. | ||
/// | ||
/// [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 [`ExtendedSpendingKey`]. | ||
/// | ||
/// Defined in [ZIP 32]. | ||
/// | ||
/// [`ExtendedSpendingKey`]: zcash_primitives::zip32::ExtendedSpendingKey | ||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst | ||
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main"; | ||
|
||
/// The HRP for a Bech32-encoded mainnet [`ExtendedFullViewingKey`]. | ||
/// | ||
/// Defined in [ZIP 32]. | ||
/// | ||
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey | ||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst | ||
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews"; | ||
|
||
/// 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"; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/// The testnet coin type for ZEC, as defined by [SLIP 44]. | ||
/// | ||
/// [SLIP 44]: https://github.com/satoshilabs/slips/blob/master/slip-0044.md | ||
pub const COIN_TYPE: u32 = 1; | ||
|
||
/// The HRP for a Bech32-encoded testnet [`ExtendedSpendingKey`]. | ||
/// | ||
/// Defined in [ZIP 32]. | ||
/// | ||
/// [`ExtendedSpendingKey`]: zcash_primitives::zip32::ExtendedSpendingKey | ||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst | ||
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test"; | ||
|
||
/// The HRP for a Bech32-encoded testnet [`ExtendedFullViewingKey`]. | ||
/// | ||
/// Defined in [ZIP 32]. | ||
/// | ||
/// [`ExtendedFullViewingKey`]: zcash_primitives::zip32::ExtendedFullViewingKey | ||
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst | ||
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling"; | ||
|
||
/// The HRP for a Bech32-encoded testnet [`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 = "ztestsapling"; |
Oops, something went wrong.