-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
I'm new to this so please bear with me. I've been using the Insight API as a client (via BlockExplorer and other public sites) for a while now but am hitting a few snags with regard to SegWit support...
(1) Is there any plan to incorporate searching for transactions related to a particular SegWit address, where the address is expressed in bech32 format ?
example: bc1q9x30z7rz52c97jwc2j79w76y7l3ny54nlvd4ew
Performing such queries currently leads to an error.
(2) I failed to send a SegWit-formatted raw transaction through the Insight API. The transaction is formatted properly and I was eventually able to push it through the BlockCypher API, but Insight always yields a message about the transaction having no inputs. Presumably Insight is reading the SegWit marker flag, which is always zero and immediately follows nVersion, treating it as the input count and choking on that. I was surprised because I had always assumed that the API blindly forwarded the raw hex transaction to a node behind the scenes and then echoed back the success or failure message. If the node itself understands the transaction, I figured in theory it should work. What's the issue here? Is Insight attempting to parse and analyze the transaction bytes before forwarding perhaps?
(3) Does Insight API support the use case of pushing a non-SegWit TX (that is, no SegWit inputs) to SegWit addresses? That is, inputs would all be P2PKH and at least one of the outputs would be P2WPKH.
Again, thanks for the help. Dealing with inbound/outbound transactions from customers, some of which will be SegWit formatted, is a pretty big deal for me so I'm just trying to figure out what I can and can't do with this API.
Best,
Festus