Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esneider/indy
🕵️♂️ Find and sweep all the funds spendable by your bitcoin private key.
https://github.com/esneider/indy
bitcoin electrum electrum-server hd-wallet mnemonic-phrase mnemonics segwit
Last synced: about 2 months ago
JSON representation
🕵️♂️ Find and sweep all the funds spendable by your bitcoin private key.
- Host: GitHub
- URL: https://github.com/esneider/indy
- Owner: esneider
- License: mit
- Created: 2020-05-22T22:11:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T19:57:25.000Z (8 months ago)
- Last Synced: 2024-05-03T21:05:05.485Z (8 months ago)
- Topics: bitcoin, electrum, electrum-server, hd-wallet, mnemonic-phrase, mnemonics, segwit
- Language: Python
- Homepage:
- Size: 4.62 MB
- Stars: 60
- Watchers: 7
- Forks: 25
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Indy: the ultimate recovery tool](readme/header.png)
## About
Recovering funds from a wallet using just the mnemonic phrase has historically been a difficult problem. The main reason being that different wallets use different derivation paths and script types. Sadly, the mnemonic format doesn't document this and other important metadata needed during the recovery process.
Indy intends to cover the gap left by the standard by making the recovery of funds from a mnemonic trivial. Just input your mnemonic and let the tool guess the derivation path used by the wallet.
You can use Indy to sweep all the funds to a destination address of your choice.
## Features
* Supports sweeping funds from mnemonics, xprivs, and xpubs (for xpubs it will just find the UTXOs)
* Supports mnemonics in English, Chinese, Spanish, French, Italian, Japanese and Korean
* Supports all the derivation paths and address types from the wallets listed in [walletsrecovery.org](https://walletsrecovery.org/)
* Supports customizing the address gap limit and the account gap limit
* Supports using a custom electrum server## Demo
![](readme/demo.gif)
## How it works
Indy uses electrum servers to try [every possible combination](https://github.com/esneider/indy/blob/master/descriptors.py#L10) of known derivation paths and script types. Once the relevant path and script type combinations are detected, the tool will proceed to find all the UTXOs for those combinations. After all funds are found, if you desire so, Indy can create a transaction that will sweep them to an address of your choosing.
Some wallets use a custom address gap limit (or none at all), or really high account numbers, so you can choose to override these parameters.
Finally, notice that this tool is only useful for single key wallets. If you are using a multisig or lightning wallet, then you cannot recover the funds with just the mnemonic.
## Installation
```
git clone https://github.com/esneider/indy && cd indy
pip3 install -r requirements.txt
python3 indy.py --help
```## Usage
```
] [--broadcast]
usage: indy.py [-h] [--passphrase ] [--address
[--fee-rate ] [--address-gap ] [--account-gap ]
[--host ] [--port ] [--protocol {t,s}] [--no-batching]
keyFind and sweep all the funds from a mnemonic or bitcoin key, regardless of the
derivation path or address format used.positional arguments:
key master key to sweep, formats: mnemonic, xpriv or xpuboptional arguments:
-h, --help show this help message and exit
--passphrase optional secret phrase necessary to decode the mnemonicsweep transaction:
craft a transaction sending all funds to this address
--address
--broadcast if present broadcast the transaction to the network
--fee-rate fee rate to use in sat/vbyte (default: next block fee)scanning parameters:
--address-gap max empty addresses gap to explore (default: 20)
--account-gap max empty account levels gap to explore (default: 0)electrum server:
--host hostname of the electrum server to use
--port port number of the electrum server to use
--protocol {t,s} electrum connection protocol: t=TCP, s=SSL (default: s)
--no-batching disable request batching
```## Credits
This tool was created after reading [this twitter thread](https://twitter.com/aantonop/status/1259478489427775491) by [@aantonop](https://twitter.com/aantonop). Many thanks for the idea and the relentless contributions to the Bitcoin community!
Also, Indy stands on the tremendous effort done by [@NVK](https://twitter.com/NVK) and [@J9Roem](https://twitter.com/J9Roem) documenting the derivation paths for many wallets at [walletsrecovery.org](https://walletsrecovery.org/). It belongs in a museum!