Author

Topic: Is there a way to recover those funds? Error is BIP143 rejects uncompressed (Read 174 times)

HCP
legendary
Activity: 2086
Merit: 4314
Did you read BIP143?

Restrictions on public key type

As a default policy, only compressed public keys are accepted in P2WPKH and P2WSH. Each public key passed to a sigop inside version 0 witness program must be a compressed key: the first byte MUST be either 0x02 or 0x03, and the size MUST be 33 bytes. Transactions that break this rule will not be relayed or mined by default.

Since this policy is preparation for a future softfork proposal, to avoid potential future funds loss, users MUST NOT use uncompressed keys in version 0 witness programs.

Looks like your coins are stuck... Undecided
newbie
Activity: 5
Merit: 3
I happened to have old WIF for the uncompressed public key.

Then I made a p2sh segwit address out of it, using bitcoinjs v3:

Code:
      let keyPair = bitcoin.ECPair.fromWIF(secret);
      let pubKey = keyPair.getPublicKeyBuffer();
      let witnessScript = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey));
      let scriptPubKey = bitcoin.script.scriptHash.output.encode(bitcoin.crypto.hash160(witnessScript));
      address = bitcoin.address.fromOutputScript(scriptPubKey);


And sent some bitcoins there.
Now apparently it is unspendable..? Or is there a way to recover those funds?
Error Im getting is BIP143 rejects uncompressed public keys in P2WPKH or P2WSH

Thanks!
Jump to: