// You may not use this file except in accordance with one or both of these
// licenses.
+//! Utilities for creating and parsing short channel ids.
+
/// Maximum block height that can be used in a `short_channel_id`. This
/// value is based on the 3-bytes available for block height.
pub const MAX_SCID_BLOCK: u64 = 0x00ffffff;
/// A `short_channel_id` construction error
#[derive(Debug, PartialEq, Eq)]
pub enum ShortChannelIdError {
+ /// Block height too high
BlockOverflow,
+ /// Tx index too high
TxIndexOverflow,
+ /// Vout index too high
VoutIndexOverflow,
}
use bitcoin::blockdata::constants::ChainHash;
use bitcoin::network::constants::Network;
use crate::sign::EntropySource;
- use crate::util::chacha20::ChaCha20;
+ use crate::crypto::chacha20::ChaCha20;
use crate::util::scid_utils;
use core::convert::TryInto;
/// into the fake scid.
#[derive(Copy, Clone)]
pub(crate) enum Namespace {
+ /// Phantom nodes namespace
Phantom,
+ /// SCID aliases for outbound private channels
OutboundAlias,
+ /// Payment interception namespace
Intercept
}