Author

Topic: Electrum 4.0.9 address subscription problems (Read 94 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
March 15, 2021, 11:52:29 AM
#3
(I don't think the console lets you run arbitrary Python commands).

It's incorrect. I've tried importing libraries (Re: Electrum appImage console) and run few command that could be dangerous such as eval() dan exac() successfully.

So it turns out that the console is a full-fledged Python shell.

Unfortunately even with this capability it is convoluted to get subscripted addresses and URLs, because you have to create the Notify class yourself. There is no instance created for you if you're using the GUI because it doesn't natively have this functionality, by not having a menu item for it.

Code:
>>> import electrum.synchronizer
>>> wallet

>>> wallet.network
bc1qux45c80493lu34n398m32ug63rajhtvyl99y05
>>> notifier = electrum.synchronizer.Notifier(wallet.network)
>>> notifier.start_watching_addr("bc1qux45c80493lu34n398m32ug63rajhtvyl99y05","http://example.com/subscribe")

>>> notifier.watched_addresses
defaultdict(, {})

The other member, notifier._start_watching_queue doesn't even provide an easy way to view all the members. It's not some kind of list object that can be iterated through without popping items from the queue.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
1. Is there any limit to the number of addresses for this subscripting method?

No. It is implemented as an asyncio.Queue so it can contain an infinite number of entries. But performance slows down as you watch a large number of addresses.

2. Is there any way for finding out the number of subscripting address to the notifying-url through electrum?
3. Is there any way to check whether the address is subscripting to any url?

There isn't, you have to keep a record of subscribed addresses and their URLs yourself. Unless you somehow managed to retrieve the value of Notifier.watched_addresses or Notifier._start_watching_queue through Electrum (I don't think the console lets you run arbitrary Python commands).
newbie
Activity: 6
Merit: 3
Hi. I have some bitcoin addresses and they are subscripting to an notifying-url by electrum 'notify' command. I also get notifications from electrum successfully through http post to this notifying url.

My questions are below:
1. Is there any limit to the number of addresses for this subscripting method?
2. Is there any way for finding out the number of subscripting address to the notifying-url through electrum?
3. Is there any way to check whether the address is subscripting to any url?

Thanks for any help.
Jump to: