|
|
@ -265,7 +265,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan |
|
|
|
if ( strlen(passphrase) == 66 && passphrase[0] == '0' && passphrase[1] == 'x' && is_hexstr(passphrase+2,0) == 64 ) |
|
|
|
{ |
|
|
|
decode_hex(privkey.bytes,32,passphrase+2); |
|
|
|
printf("ETH style privkey.(%s)\n",passphrase); |
|
|
|
//printf("ETH style privkey.(%s)\n",passphrase);
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -299,6 +299,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan |
|
|
|
RS_encode(G.LP_NXTaddr,nxtaddr); |
|
|
|
} |
|
|
|
bitcoin_priv2pub(ctx,coin->symbol,coin->pubkey33,coin->smartaddr,privkey,coin->taddr,coin->pubtype); |
|
|
|
if ( coin->etomic[0] != 0 ) |
|
|
|
{ |
|
|
|
uint8_t check64[64]; char checkaddr[64],checkaddr2[64]; |
|
|
|
if ( LP_etomic_priv2pub(check64,privkey) == 0 ) |
|
|
@ -307,7 +308,8 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan |
|
|
|
{ |
|
|
|
if ( LP_etomic_priv2addr(checkaddr,privkey) == 0 && LP_etomic_pub2addr(checkaddr2,check64) == 0 && strcmp(checkaddr,checkaddr2) == 0 ) |
|
|
|
{ |
|
|
|
printf("addr is (%s)\n",checkaddr); |
|
|
|
//printf("addr is (%s)\n",checkaddr);
|
|
|
|
strcpy(coin->smartaddr,checkaddr); |
|
|
|
} else printf("error getting addr (%s) != (%s)\n",checkaddr,checkaddr2); |
|
|
|
} else printf("pubkey 64 mismatch\n"); |
|
|
|
} else printf("error creating pubkey\n"); |
|
|
|