Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function that returns Bitcoin address from output script #646

Merged
merged 6 commits into from
Jul 12, 2023

Conversation

r-czajkowski
Copy link
Contributor

@r-czajkowski r-czajkowski commented Jul 6, 2023

Depends on: #632

Add the new function that returns the Bitcoin address based on the script pub key placed on the output of a Bitcoin transaction.

Add the new function that returns the Bitcoin address based on the
script pub key placed on the output of a Bitcoin transaction.
@r-czajkowski r-czajkowski added the 🔌 typescript TypeScript library label Jul 6, 2023
@r-czajkowski r-czajkowski changed the title Add getAddressFromScriptPubKey fn Add getAddressFromScriptPubKey function Jul 6, 2023
Base automatically changed from request-redemption-in-one-tx to main July 6, 2023 13:36
@r-czajkowski r-czajkowski marked this pull request as ready for review July 7, 2023 08:30
typescript/src/bitcoin.ts Outdated Show resolved Hide resolved
typescript/src/bitcoin.ts Outdated Show resolved Hide resolved
typescript/src/bitcoin.ts Outdated Show resolved Hide resolved
The `scriptPubKey` is a field specific to transaction outputs but
basically, this function converts any script to a Bitcoin address. Here
we make this function more generic and rename to
`createAddressFromOutputScript`.
Rename `scriptPubKey` to `script` and update docs. The `scriptPubKey` is
a field specific to transaction outputs but basically, this function
converts any script to a Bitcoin address. Here we also update type of
this param to `Hex` instead of `string`.
@lukasz-zimnoch lukasz-zimnoch merged commit b43f6a5 into main Jul 12, 2023
23 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the get-btc-address-from-script-pub-key branch July 12, 2023 10:46
@r-czajkowski r-czajkowski changed the title Add getAddressFromScriptPubKey function Add function that returns Bitcoin address from output script Jul 12, 2023
@lukasz-zimnoch lukasz-zimnoch added this to the typescript/v1.3.0 milestone Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌 typescript TypeScript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants