Author

Topic: How to determine a WIFPrefix and compressed.WIFPrefix for a Paper Wallet? e.g. (Read 606 times)

member
Activity: 128
Merit: 10
I was able to figure out the compressedWIFPrefix is basically the Letter that the wallet generated private key starts with, in the case of Bitcoin it starts with either L or K which is why you see [LK] and Litcoin is T

The way that I determine the compressedWIFPrefix was by opening a wallet and typing in the console: dumpprivkey "The wallets address" Press enter and it will give you the compressed private key (52 digits), then you can see what letter the key starts with, Litecoin starts with T T77jSKLkPvX4SBgRN8v11jTdnHwb8ckrn7WLjXcNjLikug2dAhaP

To Determine the WIFPrefix I had to run the rest of the code with
window.networkVersion = 0x30;
      window.privateKeyPrefix = 0xb0;
      window.WIFPrefix = 'Put any Number in here to start';
      window.compressedWIFPrefix = 'T';

And the output automatically shows the Private Key Prefix as the first number of the 51 digit string using
https://github.com/cantonbecker/bitcoinpaperwallet


The Private Key WIF (Wallet Import Format) is a code that needs to be keep secret since it can be used to spend any funds that have been sent to the corresponding public key. Keys can be encoded in a number of different formats. The most popular encoding formats (WIF, WIFC, HEX, B64) are shown below.


Public Litecoin Address
LdZ2AU1oWfmqGopivVGG5fmmR4KyM42kva
Litecoin Address Compressed Format
LMvQWzsUppbdxq39JeMv3KqXantVSH2idr


Public Key (130 characters [0-9A-F]): 04C5CE09ABF9C5E1A0ACE700F7729FA996AB5115B05857D8EF550DB34F96A7E184C1BB8E00A07A0 6F3BF64FB3641A13A1618A8822B9791BEDC33AD40116BF68244
Public Key (compressed, 66 characters [0-9A-F]): 02C5CE09ABF9C5E1A0ACE700F7729FA996AB5115B05857D8EF550DB34F96A7E184

Private Key WIF
51 characters base58, starts with a '6'
6v3S2CrndTdGH8QS1Fw9cWZKJWfee52KytmiB687HPbPBdobUX9
Private Key WIF Compressed
52 characters base58, starts with a 'T'
T77jSKLkPvX4SBgRN8v11jTdnHwb8ckrn7WLjXcNjLikug2dAhaP



Private Key Hexadecimal Format (64 characters [0-9A-F]): 79480E439276C481E13799439A9A0BEC103E2701B17851A236650658F685C272
Private Key Base64 (44 characters): eUgOQ5J2xIHhN5lDmpoL7BA+JwGxeFGiNmUGWPaFwnI=

So, it works perfect now!
sr. member
Activity: 412
Merit: 287
I can't speak to the specific code you're using but networkVersion and privateKeyVersion are all you should need, and they can be found in the source code of the altcoin.

WifPrefix and compressedWIFPrefix are not important. PrivateKeyPrefix is used in both cases to derive the base58 private key, and it just so happens a base58 encoded, uncompressed private key with a prefix of 0x80 gives you a prefix of 5, and when compressed, is either L or K. Perhaps they're used in the app for a quick sanity check..
hero member
Activity: 525
Merit: 531
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
AFAIU compressedWIFPrefix = 'x', where x is first letter of private key associated with compressed public key.
sr. member
Activity: 268
Merit: 258
You will probably need to look in the source code to find these prefixes. If the coins have a wiki or forum, you could ask there.
member
Activity: 128
Merit: 10
Im forking this https://github.com/cantonbecker/bitcoinpaperwallet  and going to make paper wallets for my favorite Alts,


case 'Bitcoin':  
     window.networkVersion = 0x00;
     window.privateKeyPrefix = 0x80;
    window.WIFPrefix = '5';
     window.compressedWIFPrefix = '[LK]';

     break;
   case 'Litecoin':
      window.networkVersion = 0x30;
      window.privateKeyPrefix = 0xb0;
      window.WIFPrefix = '6';
      window.compressedWIFPrefix = 'T'
;
      break;

I am trying to set up an alt coin paper wallet generator and I havent been able to figure out how exactly to determine or find the value that needs to be place for the WIFPrefix and the compressedWIFPrefix?

I know how to determine window.networkVersion = 0x00; window.privateKeyPrefix = 0x80; from here
https://forum.digitalcoin.co/archive/index.php/t-1447.html
https://bitcointalksearch.org/topic/m.4134858

Now all I need to make sure its 100% functional is the WIFPrefix!

Any help here would be appreciated?

Thanks,
Jump to: