77 stable releases (19 major)

20.0.0 Sep 12, 2023
19.1.1 Jul 3, 2023
19.1.0 Jun 20, 2023
18.1.0 May 31, 2023
1.7.0 Jun 24, 2021

#181 in Cryptography

Download history 10/week @ 2024-01-19 1/week @ 2024-01-26 6/week @ 2024-02-02 39/week @ 2024-02-09 48/week @ 2024-02-16 100/week @ 2024-02-23 86/week @ 2024-03-01 73/week @ 2024-03-08 585/week @ 2024-03-15 71/week @ 2024-03-22 99/week @ 2024-03-29 53/week @ 2024-04-05 52/week @ 2024-04-12 59/week @ 2024-04-19 47/week @ 2024-04-26

227 downloads per month
Used in 5 crates (2 directly)

MIT OR BSD-3-Clause

1.5K SLoC


Safe Network Dbcs

Crate Documentation CI Safe Rust
Documentation unsafe forbidden
MaidSafe website SAFE Dev Forum SAFE Network Forum


This crate provides a library and API for working with Digital Bearer Certificates (DBC) on the Safe Network.

Safe Network Dbcs are envisioned to be a private and fungible digital currency that utilize a distributed (and sharded) spentbook of spends rather than a blockchain.

Some key properties of these Dbcs:

  • Distributed spentbook means that it is not necessary to trust in a single entity.
  • Sharded spentbook means that the system scales indefinitely.
  • Transactions are settled immmediately.
  • Privacy by default. all transactions use privacy features.
  • Utilizes a one-time key for each payment (aka stealth address).
  • Uses BLS cryptography.

Multi-sig is a concern of the user of this library.

Some writeups about the technology can be found at:



$ git clone https://github.com/maidsafe/sn_dbc.git
$ cd sn_dbc
$ cargo build


spentbook example

A spentbook example is provided which enables interacting with a mock spentbook and wallet.

$ cd sn_dbc
$ cargo run --example spentbook

Additional examples can be found in a separate crate:



$ cd sn_dbc
$ cargo bench


$ cd sn_dbc
$ cargo test

Key dependencies:

This crate depends most heavily on:


This SAFE Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT https://opensource.org/licenses/MIT) at your option.


Want to contribute? Great 🎉

There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!

For instructions on how to contribute, see our Guide to contributing.


~160K SLoC