| Crates.io | bitcoin-dogecoin |
| lib.rs | bitcoin-dogecoin |
| version | 0.32.7-doge.0 |
| created_at | 2025-11-07 12:56:55.925467+00 |
| updated_at | 2026-01-13 15:56:46.105408+00 |
| description | General purpose library for using and interoperating with Bitcoin and Dogecoin. |
| homepage | |
| repository | https://github.com/dfinity/rust-dogecoin |
| max_upload_size | |
| id | 1921553 |
| size | 1,734,961 |
Library with support for de/serialization, parsing and executing on data-structures and network messages related to Bitcoin and Dogecoin.
This library is a fork of rust-bitcoin, adapted to support the Dogecoin network. For reference, see the original rust-bitcoin README.
The goal of this project is to provide Dogecoin-compatible types, consensus rules, and utilities, following the architecture of rust-bitcoin, in particular:
The following core files have been modified from the upstream rust-bitcoin library:
bitcoin/src/blockdata/block.rs: Add scrypt-based proof-of-work validation (block_hash_with_scrypt() and validate_pow_with_scrypt()) to support Dogecoin's scrypt hashing algorithm.
bitcoin/src/pow.rs: Implement Dogecoin's difficulty adjustment algorithms:
min_transition_threshold_dogecoin() and max_transition_threshold_dogecoin() for proper difficulty boundsbitcoin/src/p2p/message.rs: Generic RawNetworkMessage and NetworkMessage over Header and Block types to support both Bitcoin and Dogecoin block and header formats (which can include AuxPoW information).
A Dogecoin module has been added with the following components:
mod.rs: Dogecoin types including:
Header: Dogecoin block header with optional AuxPoW informationBlock: Dogecoin block structure supporting both legacy and merged-mined blocksNetwork: Dogecoin network enum (mainnet, testnet, regtest)auxpow.rs: Implementation of Auxiliary Proof-of-Work (merged mining) validation
params.rs: Dogecoin consensus parameters for all networks (mainnet, testnet, regtest), such as Digishield and AuxPoW activation height,
BIP activation heights, target spacing, max attainable targets, etc
constants.rs: Dogecoin-specific constants, such as Genesis block definition, and address prefixes
address/: Dogecoin address handling with support for P2PKH and P2SH address types
Note: Advanced Bitcoin features such as Taproot, SegWit v1, and PSBT v2 are not applicable to Dogecoin and are not supported in this fork.
This library should always compile with any combination of features on Rust 1.56.1.
To build with the MSRV you will likely need to pin a bunch of dependencies, see ./contrib/test.sh
for the current list.
This project is a fork of rust-bitcoin, originally licensed under CC0 v1.0 Universal.
This fork is licensed under the Apache License, Version 2.0, except where otherwise noted.
We use the SPDX license list and SPDX IDs.