coins-core

Crates.iocoins-core
lib.rscoins-core
version0.13.0
created_at2021-04-04 18:12:06.175379+00
updated_at2025-07-29 18:27:32.937619+00
descriptionCore library for coins-bip32 and coins-bip39
homepagehttps://github.com/summa-tx/coins
repositoryhttps://github.com/summa-tx/coins
max_upload_size
id378894
size38,611
James Prestwich (prestwich)

documentation

README

Coins Core

coins-core contains utilities and traits used by the coins-bip32 and coins-bip39 crates.

Crate Layout

Hashes

The hashes module provides utilities for newtyping hash outputs, including sha2, sha3, and ripemd160. These newtypes are called Marked__ and are intended to be used for a specific purpose. E.g. Hash256 is a marked type for Bitcoin's double-sha2, while Hash160 is a marked type for Bitcoin's ripemd160(sha2(x)).

Ser trait

The Ser trait is a simple serialization API using std::io::{Read, Write}. Implementers define the binary serialization format of the type, as well as the JSON serialization. The transaction type must implement Ser, as the provided txid logic assumes access to the serialize method.

Ser has an associated Error type. Most basic types can simply use the provided SerError. However, more complex (de)serialization will want to implement a custom error type to handle (e.g.) invalid transactions. These types must be easily instantiated from a SerError or an std::io::Error.

Commit count: 395

cargo fmt