Expand description
Bitcoin network.
The term “network” is overloaded, here Network
refers to the specific
Bitcoin network we are operating on e.g., signet, regtest. The terms
“network” and “chain” are often used interchangeably for this concept.
§Example: encoding a network’s magic bytes
use bitcoin::Network;
use bitcoin::consensus::encode::serialize;
let network = Network::Bitcoin;
let bytes = serialize(&network.magic());
assert_eq!(&bytes[..], &[0xF9, 0xBE, 0xB4, 0xD9]);
Modules§
- Module for serialization/deserialization of network variants into/from Bitcoin Core values
Structs§
- An error in parsing network string.
- Error in parsing network from chain hash.
Enums§
- The cryptocurrency network to act on.
- What kind of network we are on.