Skip to content

BDK async storage implementation using sqlx + postgres or sqlite

License

Notifications You must be signed in to change notification settings

bitcoindevkit/bdk-sqlx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bdk-sqlx

Status

This crate is still EXPERIMENTAL do not use with mainnet wallets.

Testing

  1. Install postgresql with psql tool. For example (macos):
    brew update
    brew install postgresql
    
  2. Create empty test database:
    psql postgres
    postgres=# create database test_bdk_wallet;
    
  3. Set DATABASE_URL to test database:
    export DATABASE_TEST_URL=postgresql://localhost/test_bdk_wallet
    
  4. Run tests, must use a single test thread since we reuse the postgres db:
    cargo test -- --test-threads=1
    

Example

  1. Create empty test database:
    psql postgres
    postgres=# create database example_bdk_wallet;
    postgres=# \q
    
  2. Set DATABASE_URL to test database:
    export DATABASE_URL=postgresql://localhost/example_bdk_wallet
    
  3. Run example:
    cargo run --example bdk_sqlx_postgres
    

About

BDK async storage implementation using sqlx + postgres or sqlite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages