addwitnessaddress

hidden

v0.17.0

addwitnessaddress "address" ( p2sh )

DEPRECATED: set the address_type argument of getnewaddress, or option -addresstype=[bech32|p2sh-segwit] instead.
Add a witness address for a script (with pubkey or redeemscript known). Requires a new wallet backup.
It returns the witness script.

Arguments:
1. "address" (string, required) An address known to the wallet
2. p2sh (bool, optional, default=true) Embed inside P2SH

Result:
"witnessaddress", (string) The value of the new address (P2SH or BIP173).
}
Don't trust. Verify. Docs extracted from src/wallet/rpcwallet.cpp#L1447-L1470.