blockchain – How Can I Fetch the Actual Steadiness of an XPUB with Python Bitcoinlib?


Objective

To create at the least a watch solely pockets performance in python. I’ll incorporate sending sats sooner or later as nicely.

Element

I’ve already shared the code (in Python) on my GitHub. On the lookout for some suggestions and making an attempt to make clear some ideas that I’m lacking.

You can provide any concepts, however the particular questions I’ve are right here. I’m a complete noob within the Bitcoin world, so some clarification could be appreciated.

Questions

  • Does the bitcoinlib Python library interface with the actual Bitcoin blockchain? I perceive there’s something like a take a look at chain the place I can get free testing cash. However any tutorial on tips on how to use it, particularly with the Python library?
  • I generated the seed phrases in information/seed.txt utilizing Blue Pockets (BW), and the XPUB uncovered by BW matches the one returned by CustomWallet.get_xpub technique. However the receiving handle from BW is not matching the CustomWallet.get_address technique. What does it imply? I perceive beneath an XPUB there are a number of (infinite?) receiving addresses, is that the explanation?
  • If I ship sats to an handle generated by the CustomWallet.get_address, will it present up in my Blue pockets if initialised with the identical seed? And vice versa?
  • Ought to pockets.transactions(include_new=True) give me the unconfirmed transactions? I’ve an unconfirmed transaction (on the true blockchain, I despatched from my Trezor), however it’s not displaying up after I name the tactic with Python.
  • Ought to the Pockets.stability() technique present the true stability within the pockets within the blockchain? I’ve transferred some quantity into the pockets, that BW is displaying, however my code says the stability is zero. What offers?
  • What could be the easiest way to check sending and receiving a number of transactions by way of code, resembling the actual Blockchain’s behaviour as a lot as doable however with out losing my sats?

Leave a Reply

Your email address will not be published. Required fields are marked *