Add a function to determine if a given tx includes inputs from a given outputScript
Details
- Reviewers
emack - Group Reviewers
Restricted Project - Commits
- rABC3eed55c5ca13: [token-server] Add function hasInputsFromOutputScript
npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I assume txs like this self minting tx are out of scope for this token server right? The function will return false as the minter won't be in the inputs but I guess this wouldn't be generated out of cashtab anyway yea?
Edge cases where a tx might still be technically "from" some unlisted outputScript are possible. I've tried to be explicit as possible with the function naming, with hasInputsFromOutputScript
the decision on whether or not this is an appropriate test would depend on the use of the function. Check out D15599 to see where this is going.
For the purposes of this function, we are checking if the token was sent from a hot wallet on the server. So, it will work for that. If we use self minting at some point, we would need some other kind of test.