Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitceptron/retriever-gui

A gui app to scan the utxo set for bitcoins locked in scripts built by custom derivation paths
https://github.com/bitceptron/retriever-gui

Last synced: 2 days ago
JSON representation

A gui app to scan the utxo set for bitcoins locked in scripts built by custom derivation paths

Awesome Lists containing this project

README

        

# bitceptron retriever gui

This is part of the bitceptron product suite. A gui app to scan the utxo set for bitcoins locked in scripts built by custom derivation paths.

## NOTICE

***THIS IS A PROOF-OF-CONCEPTish THING. NOT PRODUCTION READY YET.***

## About

Various wallets using different BIP32 derivation paths can be a problem for bitcoiners. In some cases, this might lead to confusion or a perception of loss of bitcoins, when incompatible wallets are used for receiving bitcoins and retrieving them in a later time. Bitceptron retriever is to alleviate that problem to some extent.

Bitceptron retriever uses the txout dump of bitcoincore to scan the utxo set for various descriptors derivable from your mnemonic and passphrase. We use miniscript to create the following single key descriptors:

1. P2PK.
2. P2PKH.
3. P2SHWPKH.
4. P2WPKH.
5. P2TR (Single key path spending without a script tree).

## Usage

To use the bitceptron-retriever-gui, you must follow these steps:

1. Make sure you have a bitcoind instance running with an rpc port open to requests.
2. Build the `bitceptron-retriever-gui` from source (`cargo build --release`) or download pertinent executable.
3. Run `RUST_LOG=trace ./bitceptron-retriever-gui` from where you put your release build, which defaults to `target/release` or run `RUST_LOG=trace cargo run --release` from the root of the repository.
4. Following screen opens up:
Screenshot 1403-03-10 at 11 53 39
5. Enter bitcoincore rpc data. If all inputs are valid, those lights turn green and the `Fix Setting` button activates:
Screenshot 1403-03-10 at 11 56 57
6. Enter exploration settings.
Screenshot 1403-03-10 at 12 01 35
7. About base derivation paths:
This is a vector of base derivation paths. These are the fixed parts of the derivation path, after which the exploration
starts. These base paths should comply with these formatting rules:

- Must start with "m"
- Each child should be separated by a "/"
- Children may be normal or hardened. Normal children are just numbers and hardened children are numbers followed by either of "h" or " ' " characters.

Some valid examples:

- "m/84'/0/0"
- "m/40/0h/0h"
- "m/0/1/2'/4h/8"

If use presets is selected, it will use the built-in list of all known base paths for bitcoin wallets which is based on the data provided by

8.About exploration path:
This is the exploration path in which the program searches. Exploration path consists of steps separated by a "/". Step semantics are as follows:

- For any A, a member of u32: A means the specific child number A of the parent.
- For any A and B, members of u32 with A <= B: A..B means all children number A (inclusive) to number B (inclusive) of the parent.
- For and A, a member of u32: ..A means all the children from number 0 (inclusive) to number B (inclusive) of the parents.
- " * " means all children from (inclusive) 0 to exploration_depth (inclusive).
- suffixes " ' " and " h " mean all hardened children. Not using these suffixes makes all children in that step normal.
- Suffix " a " means exploring both hardened and normal children at that step.

Some valid examples(lose the spaces):

- " ..100' / 50..75a / * / *"
- " 42a / 83..120a / 68h / *a / 54h"
- " *' / *h / *a "
9. Choose descriptors you want to be included in search and enter path of a temp directory of your choosing. Dump file will be created or searched for in this directory.
Screenshot 1403-03-10 at 12 05 41
10. Now fix settings.
Screenshot 1403-03-10 at 12 06 41
11. You see two buttons activated now. If you want tp fetch a new utxo dump file from your bitcoincore, press `new dump file`. If you want to use a dump file already existing in your temp folder, or if nothing exists, create a new one, press `use/create dump file`. If you are on the main net, dumping the utxo set will take a while. The file is about 12GB as of block 845,771.
12. After sorting out the dump file, you see `populate database` activated. It will create an in-memory database of all ScriptPubkeys in the utxo set. Takes about 15 mins as of block 845,771. You can stop populating whenever you want.
Screenshot 1403-03-10 at 12 14 16
13. After that, `new search` activates and you can perform any search you want. Just make sure the exploration settings are fixed. You can stop search whenever you want.
Screenshot 1403-03-10 at 12 16 37
14. By pressing `new search` if anything is found, you'll be informed by the `Results` window.
Screenshot 1403-03-10 at 12 19 17
15. To get the details, we need to connect to the bitcoincore. So press `get details` for more. After a while you'll see more details in the `Results` window.
Screenshot 1403-03-10 at 12 22 31

## Improvements
This is a POC thing as of now. Can be improved in error handeling, logging and architecture fields.

## Epilogue

Happy rusting plebs.