Rust
Introduction
Learn how to send and receive instant Bitcoin payments with Rust and ZBD.
Prerequisites
To complete this guide, you will need the following:
- ZBD Project with a Live API key
- Rust and cargo installed
1. Create a Rust project
2. Install dependencies
Add both the zebedee-rust
and tokio
crates to your project:
3. Update your Cargo.toml
Update your Cargo.toml
file to use full features in tokio.
4. Create a Charge
Open your project’s main.rs
file and add the following code:
Make sure to create an environment variable called ZBD_API_KEY in your Rust project. This is the API key you get from your ZBD Project.
Run the following command to create your charge:
You can now create charges using the ZBD and Rust!
5. Try it yourself
You can now begin receiving instant Bitcoin payments with Rust + ZBD!
Was this page helpful?