dash-types¶
This crate supplies shared definitions and procedural macros that build the foundation for the Base SDK's higher level types, including
- Support for Bitcoin-based consensus encoding (using rust-bitcoin's
bitcoin-consensus-encoding) - Standardized
serdeformatting routines for common types (long integers, UTF-8 bytes, hex bytes) - Growable (
Vec{De,En}coder) and fixed sized (Arr{De,En}coder) codecs, fixed size buffers (ArrayBuf) - Macro definitions to reduce routine boilerplate
- Name-stable programmatic identifiers (
TypeId) for consensus types
Usage¶
To import dash-types to your project, add the following to the [dependencies] section in Cargo.toml
To use an unpublished revision of this crate, identify the commit hash to pin against and use the following replacing
the value of rev.
dash-types = { git = "https://github.com/dashpay/base-sdk", rev = "a1b2c3d4e5f67890abcdef1234567890abcdef" }
To build this crate on a clone of the repository, at the repository root, run the following
Features¶
This crate is #![no_std] + alloc by default.
| Feature | Default | Description |
|---|---|---|
bitcoin-primitives |
Enables adapters for types defined in bitcoin-primitives. Implies codec. |
|
codec |
Enables support for encoding and decoding types using bitcoin-consensus-encoding |
|
full |
Enables all features and std support. |
|
serde |
Enables support for encoding and decoding codec-backed types using serde. Implies codec. |
Documentation¶
Documentation for the most recent release of dash-types is available at https://dashpay.github.io/base-sdk/types and
changes between versions are recorded in the changelog.
License¶
dash-types is released under the terms of the MIT license. Copyright © 2026-present, The Dash Core developers.
To read a copy of the license terms, visit https://opensource.org/license/MIT.