BTCPrivate / BitcoinPrivate-legacy

Bitcoin Private is a Bitcoin and Zclassic fork which uses ZK-SNARK technology for privacy and fungibility.
Other
284 stars 132 forks source link

missing addwitnessaddress from btcp-cli (used to spend from segwit address) #164

Closed 0xbytes closed 6 years ago

0xbytes commented 6 years ago

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:

  1. bitcoin-cli importprivkey [private key] "some label" true
  2. bitcoin-cli dumpwallet "aaa.txt"
  3. open aaa.txt and copy public bitcoin address that was imported from the private key in step 1.
  4. use bitcoin-cli addwitnessaddress [public key copied in step 3]
  5. rescan the blockchain
  6. spend from segwit
michaelotis commented 6 years ago

@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 6 years ago

Thanx, that works. Steps are:

  1. btcp-cli importprivkey [private key] "some label" true