-
Notifications
You must be signed in to change notification settings - Fork 586
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
legacyrpc: add address type arg to getNewAddress and getRawChangeAddress
This handles the AddressType argument in the getNewAddress RPC handler. It recognizes "legacy", "p2sh-segwit", and "bech32" to match Bitcoin Core's RPC options. These correspond to bip44, bip49 "plus", and bip84. These are the waddrmgr.DefaultKeyScopes. The validateaddress RPC is already able to recognize these addresses, and it may be used to verify the addresses returned by getnewaddress. This adds btcjson.ErrRPCWalletInvalidAddressType with a code (-5) and message ("unknown address type") to match Bitcoin Core's v22.
- Loading branch information
Showing
6 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters