Author

Topic: Bitcoin-Lib-PHP problem (Read 890 times)

hero member
Activity: 1400
Merit: 538
Crypto Casino & Sportsbook
September 11, 2014, 12:52:08 PM
#1
Could anyone help me on this issue?

https://github.com/Bit-Wasp/bitcoin-lib-php/issues/19

basee on https://github.com/Bit-Wasp/bitcoin-lib-php/blob/master/examples/electrum.php
I change the magic_byte ='00' to '41' for templecoin
and come up with as follows:

https://templecoin.com/api/electrum/private.php

put the seed as follows (without quotation)
"smart shut inside pride milk linger pretty happen stupid lung warmth zone"

look at the #5
QWTbEwMvmw4aKtao2taKDGM4y41Le7cgGcjPQWGyDsBHQ9mMXH

It is invalid, others are the same as electrum, I can't figure out how to solve this problem.

The source for the private WIF:

$magic_byte = '41';
$string = trim($seed);
$seed = Electrum::decode_mnemonic($string);

for($i = $startidx; $i < $startidx+10; $i++) {
$privkey = Electrum::generate_private_key($seed, $i,0);
$wif=BitcoinLib::private_key_to_WIF($privkey, FALSE, $magic_byte);
echo "$i ::
";
}

I need help on this.

UPDATE: I change the magic_byte='0' will have the same problem.
Jump to: