[09:42:14] #571 has been merged down into master and 4.7.0-rc branch [13:53:18] @anquii [13:53:19] https://github.com/essentiaone/HDWallet/blob/develop/HDWalletKit/Wallet/Coin.swift#L25 [13:53:38] https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L136 [13:54:08] https://github.com/navcoin/navcoin-core/blob/master/src/chainparams.cpp#L221 [13:54:30] the other values in the HDWallet are specified in hex [13:54:58] https://github.com/navcoin/navcoin-core/blob/master/src/chainparams.cpp#L221 [13:55:09] https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L132 [13:55:16] https://github.com/navcoin/navcoin-core/blob/master/src/chainparams.cpp#L216 [13:55:45] so for navcoin [13:56:08] privateKeyVersion: 0x0488ADE4 [13:56:44] publicKeyHash: 0x35 [13:57:04] scriptHash: 0x55 [13:57:44] wifAddressPrefix: 0x96 [13:58:31] https://github.com/essentiaone/HDWallet/blob/develop/HDWalletKit/Wallet/UTXOBased/UtxoPrivateKeyType.swift looks like a simple regex on addresses an private keys [14:50:35] @aguycalled Thanks for this. But isn't the pubKeyHash 0x53? [14:51:11] 53 in hexadecimal is 0x35 [14:51:19] if its prefixed with 0x is in hex [14:51:26] otherwise is decimal [14:52:13] Ok, was just looking at https://en.bitcoin.it/wiki/List_of_address_prefixes [14:52:21] as I can't get it to work with these values [15:06:16] that regex on addresses might be simple, but quite a hurdle for me as I don't really have any context of what they refer to. [15:46:50] For the regex, I'd assume the wifCompressed to be [P][1-9A-HJ-NP-Za-km-z]{51} [15:47:08] Not really sure how to figure out the uncompressed one. [15:47:47] same as btc just different prefix [15:51:24] Yeah, but how to figure out the leading symbol of 96 hex? [15:51:30] when 80 hex is 5 [15:52:44] BTC has ^5[HJK][0-9A-Za-z&&[^0OIl]]{49} [15:59:46] # cat d var bitcore = require("bitcore-lib"); var Buffer = require("buffer").Buffer; var value = new Buffer.from("test", "utf8"); var hash = bitcore.crypto.Hash.sha256(value); // Compressed Key (nu skool) var bn = bitcore.crypto.BN.fromBuffer(hash); var privateKey = new bitcore.PrivateKey(bn); var wif = privateKey.toWIF(); // Uncompressed Key (old skool) var privateKey2 = bitcore.PrivateKey.fromBuffer(hash); var wif2 = [15:59:47] privateKey2.toWIF(); var publicKey1 = new bitcore.PublicKey(privateKey); var publicKey2 = new bitcore.PublicKey(privateKey2); var addr1 = publicKey1.toAddress(); //compressed var addr2 = publicKey2.toAddress(); //uncompressed console.log('Compressed'); console.log('WIF: ' + wif); console.log('Address: ' + addr1); console.log(''); console.log('Uncompressed'); console.log('WIF: ' + wif2); console.log('Address: ' + addr2); [15:59:54] # node d Compressed WIF: PHKgVuuFpLZWk9enq5LRCKgtZ7C4bRYoofanq63vjS6NnxwpC7iC Address: NUZ8ETGvwzSYvYNMtAHHxB6mbHkJpDdX3s Uncompressed WIF: 63nvMbeDRKUktvAU9dKu9uifR3JuvZkTTtLSLWEocSd7JHT5TSj Address: NcEoWDA5p27zUFUav5C8DBcGwEtLYvpGkA [16:00:07] @anquii