hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
147 stars 57 forks source link

New Predicate: matching on ScriptPubKey of prevouts #599

Open MicaiahReid opened 4 months ago

MicaiahReid commented 4 months ago

It would be nice for users to be able to match on the ScriptPubKey field of a transaction input's prevout field. This will allow them to create predicates that notify when a certain address sends a transaction.

Some context:

We already download the full transaction input data from the bitcoin RPC, so we just need to augment our types here and here, create a new input predicate, and match with the predicate with a patter similar to this

ImCitizen13 commented 3 months ago

That would be great to add as all the pieces are in place

MicaiahReid commented 3 months ago

@ImCitizen13 Would you be interested in taking this on?

We're currently focusing on some reliability work for the tool, so community involvement on new features would definitely be welcome!

ImCitizen13 commented 3 months ago

I'm not too familiar with rust, but I'll definitely give it a try and let you know of the progress. I'll have some questions if you can help along the way. 🙏🙏

MicaiahReid commented 3 months ago

@ImCitizen13 Yes of course! Feel free to ask questions here or on Discord.

And thanks for contributing!