Any plans for non-deterministic watch-only wallet?
Guys first, Specter is great piece of software, thank you a lot 👍 Do you have any plans for supporting non-deterministic watch-only wallet? There are still a lot of non-BIP32 paper wallets out there.
We've been thinking on adding that for a while, but didn't get the time yet... Can't promise anything, but I'll try in the coming weeks to find some time for that
This would be a perfect usecase for our new extension-framework. Here is roughly how to get started:
- https://www.youtube.com/watch?v=MHiAH1YffFE
- https://www.youtube.com/watch?v=s41RFyRn1I8
Hi, I would like to work on this
See also the extension-documentation which is probably not that important for this task but worth a mention:
https://docs.specter.solutions/desktop/extensions/intro/
Also, i'd suggest to use the bdk instead of dealing with the internal API of specter in order to do the Transaction generation stuff. bdk has nice python-bindings and it's as easy as pip3 install bdkpython. The documentation, especially for the python-bindings are not that great.
I looked through the examples and python ones are a bit rare. Here are some nuggest i found. Especially the Spotbit stuff might be interesting:
- https://github.com/BlockchainCommons/spotbit/blob/072b1cdff471681e5f6727541b9cb0d0ec8cbc2c/beancounter.py
- https://github.com/thunderbiscuit/bitcoindevkit-scripts/tree/aa601c93dfbe92f1812179f4441c002e091f2953/python (consider also to look at the examples on other languages in order to get an idea how to implement it in python)
- https://github.com/k9ert/spectrum/blob/feature/sync_progress/tests/test_bdk.py
- https://github.com/stepansnigirev/bdk_playground
Let me know if you need any help. We'd be happy to join you in the Development chat: https://t.me/+yS4VO2JqBHkzYTI6
Okay, thanks for the resources
Hi @k9ert, I went through the videos and code samples.
I do have some silly doubts😅 I would like to know to which files or in what folder I should work. also, In the frontend part, should there be an option in the wallets dropdown to create non-deterministic watch-only wallets or some other way?
I'd suggest to create an extension which has a scope to simply sweep a paperwallet. You type or scan a secret key from something like e.g. https://www.bitaddress.org/ and the extension creates a transaction which sweeps the complete amount to one of your existing wallets. If we have that, we can think about anything else but i think this extension would solve a lot of problems for a lot of people. We could improve that solution but having that, would already be a big deal.
I would like to know to which files or in what folder I should work. I propose those steps:
- Create a new extension
- Create a silly test within the extension which is using the bdk library. Start with a copy of what you can find in
specterext-taxtheft. - Get familiar with that library. Figure out how to create a transaction with that library based on some secret key created with bitaddress.org
- If you have that working in a test, you can try to incorporate that in a frontend. But having the test will probably need some time. Especially if you have some learning to dos on the bitcoin side.
ooh okay
Hi @k9ert ,
I think I found an issue with the extension_gen.py file
so when I was creating an extension I got this error

However, when I changed line 206 from
with open(fq_fname, "w") as file: to with open(fq_fname, "w", encoding='utf-8') as file:
it worked
So if this is a problem with everyone, should I create a PR for it?
Oh, yes, please! I'm also happy if you would spend a bit more time on the extension generation, please have a look here: https://github.com/cryptoadvance/specter-desktop/issues/1957
Okay sure! I will then work on that issue first
Great! I had a discussion with @moneymanolis on how to cut this one in smaller pieces and i think we have some more concrete ideas on how to get this done with a bit more guidance. Stay tuned (or rather work on the ext-gen code for now).