Fix broken intra-doc links after `zcash_protocol` crate extraction.

This commit is contained in:
Kris Nuttycombe 2024-02-02 11:09:56 -07:00
parent 85d1ca251a
commit a35ccfc10b
6 changed files with 18 additions and 18 deletions

View File

@ -485,7 +485,7 @@ pub const ZIP212_GRACE_PERIOD: u32 = 32256;
/// ///
/// See [ZIP 200](https://zips.z.cash/zip-0200) for more details. /// See [ZIP 200](https://zips.z.cash/zip-0200) for more details.
/// ///
/// [`signature_hash`]: crate::transaction::sighash::signature_hash /// [`signature_hash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/transaction/sighash/fn.signature_hash.html
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BranchId { pub enum BranchId {
/// The consensus rules at the launch of Zcash. /// The consensus rules at the launch of Zcash.

View File

@ -9,7 +9,7 @@ pub const COIN_TYPE: u32 = 133;
/// ///
/// Defined in [ZIP 32]. /// Defined in [ZIP 32].
/// ///
/// [`ExtendedSpendingKey`]: crate::sapling::zip32::ExtendedSpendingKey /// [`ExtendedSpendingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedSpendingKey.html
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst /// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main"; pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main";
@ -17,7 +17,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-main";
/// ///
/// Defined in [ZIP 32]. /// Defined in [ZIP 32].
/// ///
/// [`ExtendedFullViewingKey`]: crate::sapling::zip32::ExtendedFullViewingKey /// [`ExtendedFullViewingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedFullViewingKey.html#
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst /// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews"; pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews";
@ -25,16 +25,16 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviews";
/// ///
/// Defined in section 5.6.4 of the [Zcash Protocol Specification]. /// Defined in section 5.6.4 of the [Zcash Protocol Specification].
/// ///
/// [`PaymentAddress`]: crate::sapling::PaymentAddress /// [`PaymentAddress`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/struct.PaymentAddress.html
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf /// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zs"; pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zs";
/// The prefix for a Base58Check-encoded mainnet [`PublicKeyHash`]. /// The prefix for a Base58Check-encoded mainnet [`PublicKeyHash`].
/// ///
/// [`PublicKeyHash`]: crate::legacy::TransparentAddress::PublicKeyHash /// [`PublicKeyHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xb8]; pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xb8];
/// The prefix for a Base58Check-encoded mainnet [`ScriptHash`]. /// The prefix for a Base58Check-encoded mainnet [`ScriptHash`].
/// ///
/// [`ScriptHash`]: crate::legacy::TransparentAddress::ScriptHash /// [`ScriptHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xbd]; pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xbd];

View File

@ -13,7 +13,7 @@ pub const COIN_TYPE: u32 = 1;
/// ///
/// It is defined in [the `zcashd` codebase]. /// It is defined in [the `zcashd` codebase].
/// ///
/// [`ExtendedSpendingKey`]: crate::sapling::zip32::ExtendedSpendingKey /// [`ExtendedSpendingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedSpendingKey.html
/// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L496> /// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L496>
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest"; pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest";
@ -21,7 +21,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-regtest
/// ///
/// It is defined in [the `zcashd` codebase]. /// It is defined in [the `zcashd` codebase].
/// ///
/// [`ExtendedFullViewingKey`]: crate::sapling::zip32::ExtendedFullViewingKey /// [`ExtendedFullViewingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedFullViewingKey.html#
/// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L494> /// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L494>
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling"; pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling";
@ -29,18 +29,18 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewregtestsapling";
/// ///
/// It is defined in [the `zcashd` codebase]. /// It is defined in [the `zcashd` codebase].
/// ///
/// [`PaymentAddress`]: crate::sapling::PaymentAddress /// [`PaymentAddress`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/struct.PaymentAddress.html
/// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L493> /// [the `zcashd` codebase]: <https://github.com/zcash/zcash/blob/128d863fb8be39ee294fda397c1ce3ba3b889cb2/src/chainparams.cpp#L493>
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zregtestsapling"; pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "zregtestsapling";
/// The prefix for a Base58Check-encoded regtest transparent [`PublicKeyHash`]. /// The prefix for a Base58Check-encoded regtest transparent [`PublicKeyHash`].
/// Same as the testnet prefix. /// Same as the testnet prefix.
/// ///
/// [`PublicKeyHash`]: crate::legacy::TransparentAddress::PublicKeyHash /// [`PublicKeyHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25]; pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
/// The prefix for a Base58Check-encoded regtest transparent [`ScriptHash`]. /// The prefix for a Base58Check-encoded regtest transparent [`ScriptHash`].
/// Same as the testnet prefix. /// Same as the testnet prefix.
/// ///
/// [`ScriptHash`]: crate::legacy::TransparentAddress::ScriptHash /// [`ScriptHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba]; pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];

View File

@ -9,7 +9,7 @@ pub const COIN_TYPE: u32 = 1;
/// ///
/// Defined in [ZIP 32]. /// Defined in [ZIP 32].
/// ///
/// [`ExtendedSpendingKey`]: crate::sapling::zip32::ExtendedSpendingKey /// [`ExtendedSpendingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedSpendingKey.html
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst /// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test"; pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test";
@ -17,7 +17,7 @@ pub const HRP_SAPLING_EXTENDED_SPENDING_KEY: &str = "secret-extended-key-test";
/// ///
/// Defined in [ZIP 32]. /// Defined in [ZIP 32].
/// ///
/// [`ExtendedFullViewingKey`]: crate::sapling::zip32::ExtendedFullViewingKey /// [`ExtendedFullViewingKey`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/zip32/struct.ExtendedFullViewingKey.html#
/// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst /// [ZIP 32]: https://github.com/zcash/zips/blob/master/zip-0032.rst
pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling"; pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling";
@ -25,16 +25,16 @@ pub const HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY: &str = "zxviewtestsapling";
/// ///
/// Defined in section 5.6.4 of the [Zcash Protocol Specification]. /// Defined in section 5.6.4 of the [Zcash Protocol Specification].
/// ///
/// [`PaymentAddress`]: crate::sapling::PaymentAddress /// [`PaymentAddress`]: https://docs.rs/sapling-crypto/latest/sapling_crypto/struct.PaymentAddress.html
/// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf /// [Zcash Protocol Specification]: https://github.com/zcash/zips/blob/master/protocol/protocol.pdf
pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "ztestsapling"; pub const HRP_SAPLING_PAYMENT_ADDRESS: &str = "ztestsapling";
/// The prefix for a Base58Check-encoded testnet transparent [`PublicKeyHash`]. /// The prefix for a Base58Check-encoded testnet transparent [`PublicKeyHash`].
/// ///
/// [`PublicKeyHash`]: crate::legacy::TransparentAddress::PublicKeyHash /// [`PublicKeyHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25]; pub const B58_PUBKEY_ADDRESS_PREFIX: [u8; 2] = [0x1d, 0x25];
/// The prefix for a Base58Check-encoded testnet transparent [`ScriptHash`]. /// The prefix for a Base58Check-encoded testnet transparent [`ScriptHash`].
/// ///
/// [`ScriptHash`]: crate::legacy::TransparentAddress::ScriptHash /// [`ScriptHash`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/legacy/enum.TransparentAddress.html
pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba]; pub const B58_SCRIPT_ADDRESS_PREFIX: [u8; 2] = [0x1c, 0xba];

View File

@ -19,7 +19,7 @@ pub const MAX_BALANCE: i64 = MAX_MONEY as i64;
/// particular, a [`Transaction`] containing serialized invalid ZatBalances will be rejected /// particular, a [`Transaction`] containing serialized invalid ZatBalances will be rejected
/// by the network consensus rules. /// by the network consensus rules.
/// ///
/// [`Transaction`]: crate::transaction::Transaction /// [`Transaction`]: https://docs.rs/zcash_primitives/latest/zcash_primitives/transaction/struct.Transaction.html
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)] #[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)]
pub struct ZatBalance(i64); pub struct ZatBalance(i64);

View File

@ -410,7 +410,7 @@ mod render {
format!("address{}={}", param_index(idx), addr.encode(params)) format!("address{}={}", param_index(idx), addr.encode(params))
} }
/// Converts an [`Amount`] value to a correctly formatted decimal ZEC /// Converts an [`NonNegativeAmount`] value to a correctly formatted decimal ZEC
/// value for inclusion in a ZIP 321 URI. /// value for inclusion in a ZIP 321 URI.
pub fn amount_str(amount: NonNegativeAmount) -> Option<String> { pub fn amount_str(amount: NonNegativeAmount) -> Option<String> {
if amount.is_positive() { if amount.is_positive() {