Skip to content

Conversation

@notmandatory
Copy link
Member

@notmandatory notmandatory commented Mar 13, 2023

Description

Fixes #319

Notes to the reviewers

The test data was generated with:

bitcoin-cli -rpcwallet="regtest2" -datadir=/tmp/regtest1/bitcoind -regtest validateaddress "bcrt1qqjn9gky9mkrm3c28e5e87t5akd3twg6xezp0tv"
{
  "isvalid": true,
  "address": "bcrt1qqjn9gky9mkrm3c28e5e87t5akd3twg6xezp0tv",
  "scriptPubKey": "001404a6545885dd87b8e147cd327f2e9db362b72346",
  "isscript": false,
  "iswitness": true,
  "witness_version": 0,
  "witness_program": "04a6545885dd87b8e147cd327f2e9db362b72346"
}

Changelog notice

Added

  • Expose Address payload and network properties.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

@notmandatory notmandatory changed the title Add address payload Expose Address payload and network properties Mar 13, 2023
@notmandatory notmandatory force-pushed the add_address_payload branch 3 times, most recently from 9df2e1b to 5f657a5 Compare March 13, 2023 23:03
@notmandatory notmandatory marked this pull request as ready for review March 13, 2023 23:05
@notmandatory notmandatory force-pushed the add_address_payload branch 2 times, most recently from e0a7324 to 877f599 Compare March 13, 2023 23:17
@notmandatory notmandatory self-assigned this Mar 13, 2023
@notmandatory notmandatory added the enhancement New feature or request label Mar 13, 2023
@thunderbiscuit
Copy link
Member

thunderbiscuit commented Mar 14, 2023

Reading this I think you might be able to kill two issues with one PR: see my comment on #267. I was about to add it to my PR #307 but I think it's a perfect fit for this one instead.

This would be the required method to add: https://docs.rs/bitcoin/0.29.2/bitcoin/util/address/struct.Address.html#method.from_script

Copy link
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK cd10c75.

@notmandatory notmandatory merged commit 6be4dda into bitcoindevkit:master Mar 23, 2023
@notmandatory notmandatory added this to the Release 0.28.0 milestone Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project
Status: Done

Development

Successfully merging this pull request may close these issues.

Expose the payload of an Address

2 participants