Python-bitcoinlib for zcash?

Does anyone know if there’s a python-bitcoinlib equivalent for zcash?

I think it will help with the adoption of zcash more generally.

1 Like

I started implementing python-zcashlib as an extension to python-bitcoinlib last year. So far it is still very incomplete and only supports what I needed to implement my Genesis Block Mining script GenesisZ. I haven’t announced any of it publicly yet but you are free to try it out or help me completing the zcashlib :wink:

I have a fork of python-bitcoinlib that contains preliminary Zcash support (as part of work on Internal Chain Fork Detector · Issue #1925 · zcash/zcash · GitHub):

As the branch name implies, it is not at all stable or production-ready, but if someone is interested in contributing then I might clean it up a bit. I’m also curious about @sebstar’s approach - I didn’t think it would be possible to safely handle consensus rules etc. with an extension, but maybe it is possible.

1 Like

I also first thought about forking bitcoinlib, but then realized that because of python’s way of being able to overload and extend virtually anything, it would be possible to write an extension. They beauty of it is that we don’t need to merge bitcoinlib upstream changes all the time but can instead just checkout the latest version.

I use given bitcoinlib functionality where possible and make my Z… classes extend the underlying bitcoin classes (e.g. ZCoreMainParams inherits from CoreMainParams etc.).
I’ll merge some stuff that you implemented in your fork and that is still missing from my zcashlib when I find the time.

1 Like

I am very interested. I need a python client to send/receive z-transactions. Basically a wallet which I can control in my cloud. Do I need to run my own zcash node? What is the easiest way? Which zcash daemon to use?

1 Like

If it works I’d try it. All I need is to run as my wallet to control myself to send/receive. is in in a kinda reliable stage?

1 Like