Skip to content

Replace deprecated Bitcoin::Script#addresses with #to_addr#3

Open
ydakuka wants to merge 1 commit into
Yamaguchi:masterfrom
ydakuka:fix-deprecation-warning
Open

Replace deprecated Bitcoin::Script#addresses with #to_addr#3
ydakuka wants to merge 1 commit into
Yamaguchi:masterfrom
ydakuka:fix-deprecation-warning

Conversation

@ydakuka

@ydakuka ydakuka commented Apr 24, 2026

Copy link
Copy Markdown

WARNING: Bitcoin::Script#addresses is deprecated. Use Bitcoin::Script#to_addr instead.

bitcoinrb deprecated Script#addresses in favor of Script#to_addr, which prints a warning to stdout on every call. For a v0 witness program the two methods return the same value (bech32_addr), so the substitution is behavior-preserving for both P2WPKH (20-byte) and P2WSH (32-byte) fallback addresses parsed from BOLT11 tagged field 9.

bitcoinrb deprecated Script#addresses in favor of Script#to_addr, which
prints a warning to stdout on every call. For a v0 witness program the
two methods return the same value (bech32_addr), so the substitution is
behavior-preserving for both P2WPKH (20-byte) and P2WSH (32-byte) fallback
addresses parsed from BOLT11 tagged field 9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant