Giter VIP home page Giter VIP logo

bdk-example's Introduction

BDK example with Esplora API

This is a basic example of using the BDK crate with the Blockstream Esplora REST API.

You'll need a recent version of Rust/Cargo, then just: cargo run

Example output:

Setup Esplora API source: https://blockstream.info/testnet/api
Setup key-value database at wallet/db.dat
Create a Testnet descriptor wallet
Get the last unused address
Address: tb1qnrfpnfyruvhgqn09qs7mpr5cd6k6j4g6fm9h3c
Sync the wallet from the blockchain
Get the wallet balance
Descriptor balance (satoshis): { immature: 0, trusted_pending: 0, untrusted_pending: 0, confirmed: 7553220 }

You might get an Esplora 429 error if you get rate-limited.

bdk-example's People

Contributors

delta1 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.