Skip to content

lvaccaro/edk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDK

Elements Dev Kit

A modern, lightweight, descriptor-based wallet library for Elements / Liquid written in Rust!
Inspired by BDK for Elements & Liquid

CI Status

About

It uses Elements Miniscript to support descriptors with generalized conditions.

Based on:

  • rust-elements: Library with support for de/serialization, parsing and executing on data structures and network messages related to Elements
  • rust-miniscript-elements: Library for handling Miniscript, which is a subset of Elements Script designed to support simple and general tooling.
  • bdk: A modern, lightweight, descriptor-based wallet library written in Rust.

Examples

Sync the balance of a descriptor

    let database = MemoryDatabase::new();
    let client = Client::new("ssl://blockstream.info:995").unwrap();
    let wallet = Wallet::new(descriptor, master_blinding_key, database, client).unwrap();
    let balance = wallet.balance().unwrap();
    println!("AssetId: Value");
    for b in balance {
        println!("{}: {}", b.0, b.1);
    }

Generate a few addresses

    let database = MemoryDatabase::new();
    let client = Client::new("ssl://blockstream.info:995").unwrap();
    let wallet = Wallet::new(descriptor, master_blinding_key, database, client).unwrap();
    println!("Address #0: {}", wallet.get_new_address()?);
    println!("Address #1: {}", wallet.get_new_address()?);
    println!("Address #2: {}", wallet.get_new_address()?);

Testing

Unit testing

cargo test

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A wallet library for Elements / Liquid written in Rust!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages