missing addwitnessaddress from btcp-cli (used to spend from segwit address)
0xbytes opened this issue · 2 comments
0xbytes commented
It is not possible to add a segwit address using btcp-cli.
btcp-cli is missing the switch addwitnessaddress. All forks of bitcoin that support segwit have this feature. It is not possible to spend from a segwit address using btcp-cli.
Usually the procedure to import a segwit address is:
- bitcoin-cli importprivkey [private key] "some label" true
- bitcoin-cli dumpwallet "aaa.txt"
- open aaa.txt and copy public bitcoin address that was imported from the private key in step 1.
- use bitcoin-cli addwitnessaddress [public key copied in step 3]
- rescan the blockchain
- spend from segwit
michaelotis commented
@0xbytes Full segwit support has not been fully implemented, you will not be able to create segwit addresses or send segwit transactions. You will need to importprivkey and sweep your funds to a transparent b1 address or private z address (getnewaddress, z_getnewaddress), importprivkey will rescan the blockchain and you'll be able to spend.
0xbytes commented
Thanx, that works.
Steps are:
- btcp-cli importprivkey [private key] "some label" true