libsv / go-bt

The go-to Bitcoin Transaction (BT) Go library.
https://pkg.go.dev/mod/github.com/libsv/go-bt
ISC License
66 stars 26 forks source link

Address from scriptsig #133

Closed rohenaz closed 1 year ago

rohenaz commented 1 year ago

This lets you find the sender address from an input unlocking script

This will not impact existing calls to script.Addresses() since we only try in the fail case.

I added a sample tx and a convenience function for reading it. Might not need this if you can leverage your existing code for reading in test data but wasn't sure.

should isP2PK return true on these as well?

codecov-commenter commented 1 year ago

Codecov Report

Base: 83.70% // Head: 83.45% // Decreases project coverage by -0.24% :warning:

Coverage data is based on head (a752fa0) compared to base (f7971e5). Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #133 +/- ## ========================================== - Coverage 83.70% 83.45% -0.25% ========================================== Files 34 34 Lines 3701 3712 +11 ========================================== Hits 3098 3098 - Misses 434 445 +11 Partials 169 169 ``` | [Impacted Files](https://codecov.io/gh/libsv/go-bt/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libsv) | Coverage Δ | | |---|---|---| | [bscript/script.go](https://codecov.io/gh/libsv/go-bt/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libsv#diff-YnNjcmlwdC9zY3JpcHQuZ28=) | `62.34% <0.00%> (-2.91%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libsv). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=libsv)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

mergify[bot] commented 1 year ago

This pull request looks stale. Feel free to reopen it if you think it's a mistake.