pub struct NodeAnnouncement {
pub signature: Option<EcdsaSignature>,
pub features: FeatureVector,
pub timestamp: u64,
pub node_id: Pubkey,
pub version: String,
pub node_name: AnnouncedNodeName,
pub addresses: Vec<Multiaddr>,
pub chain_hash: Hash256,
pub auto_accept_min_ckb_funding_amount: u64,
pub udt_cfg_infos: UdtCfgInfos,
}Expand description
Announcement of a node’s presence and capabilities.
This message is broadcast to inform other nodes about this node’s addresses, features, and other metadata.
Fields§
§signature: Option<EcdsaSignature>Signature of this message
features: FeatureVectorFeatures supported by this node
timestamp: u64Timestamp for this announcement
node_id: PubkeyThe public key of the node
version: StringSoftware version string
node_name: AnnouncedNodeNameHuman-readable node name (up to 32 bytes)
addresses: Vec<Multiaddr>Reachable addresses for this node
chain_hash: Hash256The chain hash this node is on
auto_accept_min_ckb_funding_amount: u64Minimum CKB funding amount for auto-accept
udt_cfg_infos: UdtCfgInfosUDT configuration info
Implementations§
Source§impl NodeAnnouncement
impl NodeAnnouncement
Sourcepub fn new_unsigned(
node_name: AnnouncedNodeName,
features: FeatureVector,
addresses: Vec<Multiaddr>,
node_id: Pubkey,
chain_hash: Hash256,
timestamp: u64,
auto_accept_min_ckb_funding_amount: u64,
udt_cfg_infos: UdtCfgInfos,
version: String,
) -> Self
pub fn new_unsigned( node_name: AnnouncedNodeName, features: FeatureVector, addresses: Vec<Multiaddr>, node_id: Pubkey, chain_hash: Hash256, timestamp: u64, auto_accept_min_ckb_funding_amount: u64, udt_cfg_infos: UdtCfgInfos, version: String, ) -> Self
Create an unsigned node announcement with the given parameters.
The udt_cfg_infos and version are passed as parameters to avoid
depending on runtime/global state from the caller’s crate.
Sourcepub fn new_signed(
node_name: AnnouncedNodeName,
features: FeatureVector,
addresses: Vec<Multiaddr>,
private_key: &Privkey,
chain_hash: Hash256,
timestamp: u64,
auto_accept_min_ckb_funding_amount: u64,
udt_cfg_infos: UdtCfgInfos,
version: String,
) -> Self
pub fn new_signed( node_name: AnnouncedNodeName, features: FeatureVector, addresses: Vec<Multiaddr>, private_key: &Privkey, chain_hash: Hash256, timestamp: u64, auto_accept_min_ckb_funding_amount: u64, udt_cfg_infos: UdtCfgInfos, version: String, ) -> Self
Create a signed node announcement.
Builds an unsigned announcement, signs it with the given private key, and returns the signed announcement.
Sourcepub fn message_to_sign(&self) -> [u8; 32]
pub fn message_to_sign(&self) -> [u8; 32]
Get the message bytes to sign (hash of unsigned molecule serialization).
Trait Implementations§
Source§impl Clone for NodeAnnouncement
impl Clone for NodeAnnouncement
Source§fn clone(&self) -> NodeAnnouncement
fn clone(&self) -> NodeAnnouncement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more