rust-bitcoin-unsafe-fast/bitcoin/examples
rustaceanrob d9cf7270eb
Move `bitcoin/p2p` into `p2p`
Moves all of the content from `bitcoin/p2p` into `p2p`.

`TryFrom<Network>` must be implemented for `Network -> Magic` now that
`Network` is a foreign, non-exhaustive type. Ser/de test is updated
accordingly, as well as the `Magic::from_network` constructor, which I
have opted to return an `Option<Self>`. The `TryFrom` implementation
uses a new `UnknownNetworkError(Network)` that mirrors the `Magic ->
Network` error.

The example handshake does not generate a random nonce for the version
message, as there is no `rand` dependency in this crate and the program
only makes a single, user-defined connection.

It appears we can do better than copying and pasting the consensus
encoding macros and functions from `bitcoin` without doing weird
cross-crate macros that require some special knowledge of the crate to
know when they will compile.
2025-06-18 14:11:35 +01:00
..
bip32.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
create-p2wpkh-address.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
ecdsa-psbt-simple.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
ecdsa-psbt.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
io.rs bitcoin: Add an example of doing I/O to encode/decode 2025-01-08 10:18:00 +11:00
script.rs Finalize the script hex APIs 2025-05-08 15:12:05 +10:00
sighash.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
sign-tx-segwit-v0.rs Use variable directly in format! string 2025-05-06 09:49:03 +01:00
sign-tx-taproot.rs Merge rust-bitcoin/rust-bitcoin#4410: Wrap secp256k1::XOnlyPublicKey to improve error handling 2025-05-07 17:01:31 +00:00
taproot-psbt-simple.rs Merge rust-bitcoin/rust-bitcoin#4410: Wrap secp256k1::XOnlyPublicKey to improve error handling 2025-05-07 17:01:31 +00:00
taproot-psbt.rs Merge rust-bitcoin/rust-bitcoin#4410: Wrap secp256k1::XOnlyPublicKey to improve error handling 2025-05-07 17:01:31 +00:00