Crate satsnet_primitives
source ·Expand description
§Rust Bitcoin - primitive types.
Primitive data types that are used throughout the rust-bitcoin
ecosystem.
This crate can be used in a no-std environment but requires an allocator.
Modules§
- absolute
alloc
Provides typeLockTime
that implements the logic around nLockTime/OP_CHECKLOCKTIMEVERIFY. - Bitcoin amounts.
- block
alloc
Block height and interval types. - fee_
rate alloc
ImplementsFeeRate
and assoctiated features. - locktime
alloc
Provides absolute and relative locktimes. - Bitcoin script opcodes.
- parse
alloc
Parsing utilities. - Proof-of-work related integer types.
- relative
alloc
Provides typeLockTime
that implements the logic around nSequence/OP_CHECKSEQUENCEVERIFY. - Bitcoin transaction input sequence number.
- Bitcoin transactions.
- weight
alloc
ImplementsWeight
and associated features.
Macros§
- Implements standard parsing traits for
$type
by calling into$inner_fn
. - Implements
FromStr
andTryFrom<{&str, String, Box<str>}> for $to
usingparse::int
, mapping the output using infallible conversion functionfn
. - Implements
TryFrom<$from> for $to
. - Implements
TryFrom<$from> for $to
usingparse::int
, mapping the output using infallible conversion functionfn
.
Structs§
- An amount.
- The block height, zero denotes the genesis block.
- The block interval.
- Encoding of 256-bit target as 32-bit float.
- Represents fee rate.
- Bitcoin transaction input sequence number.
- A signed amount.
- Represents block weight - the weight of a transaction or block.