#bitcoin #flags #crypto #primitive #documentation #associated #detailed

no-std satsnet

General purpose library for using and interoperating with satsnet

3 releases

0.32.2 Sep 11, 2024
0.32.1 Sep 10, 2024
0.32.0-rc1 Sep 10, 2024

#3 in #detailed

Download history 347/week @ 2024-09-06 107/week @ 2024-09-13 30/week @ 2024-09-20

484 downloads per month
Used in 2 crates (via satsnet-rpc-json)

CC0 license

1.5MB
26K SLoC

Rust Bitcoin Library

This is a library that supports the Bitcoin network protocol and associated primitives. It is designed for Rust programs built to work with the Bitcoin network.

Except for its dependency on libsecp256k1 (and optionally libbitcoinconsensus), this library is written entirely in Rust. It illustrates the benefits of strong type safety, including ownership and lifetime, for financial and/or cryptographic software.

See README.md for detailed documentation about development and supported environments.

Available feature flags

  • std - the usual dependency on std (default).
  • secp-recovery - enables calculating public key from a signature and message.
  • base64 - (dependency), enables encoding of PSBTs and message signatures.
  • rand - (dependency), makes it more convenient to generate random values.
  • serde - (dependency), implements serde-based serialization and deserialization.
  • secp-lowmemory - optimizations for low-memory devices.
  • bitcoinconsensus-std - enables std in bitcoinconsensus and communicates it to this crate so it knows how to implement std::error::Error. At this time there's a hack to achieve the same without this feature but it could happen the implementations diverge one day.
  • ordered - (dependency), adds implementations of ArbitraryOrdOrd to some structs. Bitcoin amounts.

This module mainly introduces the [Amount] and [SignedAmount] types. We refer to the documentation on the types for more information.

Dependencies

~5.5–8MB
~91K SLoC