| Crates.io | coins-core |
| lib.rs | coins-core |
| version | 0.13.0 |
| created_at | 2021-04-04 18:12:06.175379+00 |
| updated_at | 2025-07-29 18:27:32.937619+00 |
| description | Core library for coins-bip32 and coins-bip39 |
| homepage | https://github.com/summa-tx/coins |
| repository | https://github.com/summa-tx/coins |
| max_upload_size | |
| id | 378894 |
| size | 38,611 |
coins-core contains utilities and traits used by the coins-bip32 and
coins-bip39 crates.
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)).
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.