|
|
@ -394,13 +394,17 @@ uint64_t LP_privkey_init(struct LP_peerinfo *mypeer,int32_t mypubsock,char *symb |
|
|
|
iguana_priv2pub(pubkey33,coin->smartaddr,privkey,coin->pubtype); |
|
|
|
if ( coin->counter == 0 ) |
|
|
|
{ |
|
|
|
static uint32_t counter; |
|
|
|
char tmpstr[128]; |
|
|
|
coin->counter++; |
|
|
|
bitcoin_priv2wif(USERPASS_WIFSTR,privkey,188); |
|
|
|
if ( counter++ == 0 ) |
|
|
|
{ |
|
|
|
bitcoin_priv2wif(USERPASS_WIFSTR,privkey,188); |
|
|
|
conv_NXTpassword(userpass.bytes,pubkey.bytes,(uint8_t *)tmpstr,(int32_t)strlen(tmpstr)); |
|
|
|
userpub = curve25519(userpass,curve25519_basepoint9()); |
|
|
|
printf("userpass.(%s)\n",bits256_str(USERPASS,userpub)); |
|
|
|
} |
|
|
|
bitcoin_priv2wif(tmpstr,privkey,coin->wiftype); |
|
|
|
conv_NXTpassword(userpass.bytes,pubkey.bytes,(uint8_t *)tmpstr,(int32_t)strlen(tmpstr)); |
|
|
|
userpub = curve25519(userpass,curve25519_basepoint9()); |
|
|
|
printf("userpass.(%s)\n",bits256_str(USERPASS,userpub)); |
|
|
|
printf("%s (%s) %d wif.(%s) (%s)\n",symbol,coin->smartaddr,coin->pubtype,tmpstr,passphrase); |
|
|
|
if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 ) |
|
|
|
printf("importprivkey -> (%s)\n",jprint(retjson,1)); |
|
|
|