#bitcoin #wallet #transaction #blockchain #networking

no-std anychain-bitcoin

A Rust library for Bitcoin-focused cryptocurrency wallets, enabling seamless transactions on the Bitcoin blockchain

10 releases

new 0.1.9 Nov 15, 2024
0.1.7 Jul 26, 2024
0.1.4 Oct 23, 2023
0.1.1 Jul 6, 2023

#562 in Magic Beans

Download history 41/week @ 2024-07-28 1/week @ 2024-08-04 4/week @ 2024-08-11 1/week @ 2024-08-18 2/week @ 2024-09-08 3/week @ 2024-09-15 41/week @ 2024-09-22 4/week @ 2024-09-29 7/week @ 2024-10-13 1/week @ 2024-10-20 151/week @ 2024-11-03 124/week @ 2024-11-10

276 downloads per month
Used in anychain-bitcoincash

MIT/Apache

190KB
4K SLoC

anychain-bitcoin

anychain-bitcoin is a Rust crate that provides a simple and efficient way to interact with the Bitcoin blockchain. This library aims to make it easy for developers to build applications that require Bitcoin data and functionality without having to deal with the complexities of the underlying protocol.

Features

  • Easy-to-use API for querying and interacting with the Bitcoin blockchain
  • Support for mainnet, testnet, and regtest networks
  • Efficient and optimized for performance
  • Comprehensive documentation and examples

Installation

To use anychain-bitcoin in your Rust project, add the following to your Cargo.toml file:

[dependencies]
anychain-bitcoin = "0.1.8"

Then, import the crate in your code:

extern crate anychain_bitcoin;

Usage

Here's a simple example of how to use anychain-bitcoin to get the balance of a Bitcoin address: Addr

use anychain_bitcoin::{Bitcoin, Address};

fn main() {
    let bitcoin = Bitcoin::new();
    let address = Address::from_str("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").unwrap();

    let balance = bitcoin.get_balance(&address).unwrap();
    println!("Balance: {} satoshis", balance);
}

For more examples and detailed usage instructions, please refer to the documentation.

Contributing

We welcome contributions from the community! If you'd like to contribute to anychain-bitcoin, please follow these steps:

  1. Fork the repository
  2. Create a new branch for your changes
  3. Make your changes and commit them to your branch
  4. Submit a pull request to the main repository

Please make sure to write tests for your changes and follow the Rust coding style.

License

anychain-bitcoin is licensed under the MIT License. See LICENSE for more information

Dependencies

~3–4MB
~66K SLoC