|
|
@ -1640,7 +1640,7 @@ char *LP_createblasttransaction(uint64_t *changep,int32_t *changeoutp,cJSON **tx |
|
|
|
char *LP_txblast(struct iguana_info *coin,cJSON *argjson) |
|
|
|
{ |
|
|
|
static void *ctx; |
|
|
|
int32_t broadcast,i,num,numblast,utxovout,completed=0,numvouts,changeout; char *passphrase,changeaddr[64],vinaddr[64],wifstr[65],str[65],*signret,*signedtx=0,*rawtx=0; struct vin_info V; uint32_t locktime,starttime; uint8_t pubkey33[33]; cJSON *retjson,*item,*outputs,*vins=0,*txobj=0,*privkeys=0; struct iguana_msgtx msgtx; bits256 privkey,pubkey,checktxid,utxotxid,signedtxid; uint64_t txfee,utxovalue,change; |
|
|
|
int32_t broadcast,i,num,numblast,utxovout,completed=0,numvouts,changeout; char *passphrase,changeaddr[64],vinaddr[64],wifstr[65],blastaddr[65],str[65],*signret,*signedtx=0,*rawtx=0; struct vin_info V; uint32_t locktime,starttime; uint8_t pubkey33[33]; cJSON *retjson,*item,*outputs,*vins=0,*txobj=0,*privkeys=0; struct iguana_msgtx msgtx; bits256 privkey,pubkey,checktxid,utxotxid,signedtxid; uint64_t txfee,utxovalue,change; |
|
|
|
if ( ctx == 0 ) |
|
|
|
ctx = bitcoin_ctx(); |
|
|
|
if ( (passphrase= jstr(argjson,"passphrase")) == 0 ) |
|
|
@ -1651,7 +1651,7 @@ char *LP_txblast(struct iguana_info *coin,cJSON *argjson) |
|
|
|
numblast = jint(argjson,"numblast"); |
|
|
|
utxovalue = j64bits(argjson,"utxovalue"); |
|
|
|
txfee = juint(argjson,"txfee"); |
|
|
|
conv_NXTpassword(privkey.bytes,pubkeyp->bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase)); |
|
|
|
conv_NXTpassword(privkey.bytes,pubkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase)); |
|
|
|
privkey.bytes[0] &= 248, privkey.bytes[31] &= 127, privkey.bytes[31] |= 64; |
|
|
|
bitcoin_priv2wif(coin->symbol,coin->wiftaddr,wifstr,privkey,coin->wiftype); |
|
|
|
bitcoin_priv2pub(ctx,coin->symbol,pubkey33,blastaddr,privkey,coin->taddr,coin->pubtype); |
|
|
@ -1710,6 +1710,7 @@ char *LP_txblast(struct iguana_info *coin,cJSON *argjson) |
|
|
|
free_json(privkeys), privkeys = 0; |
|
|
|
retjson = cJSON_CreateObject(); |
|
|
|
jaddstr(retjson,"result","success"); |
|
|
|
jaddstr(retjson,"blastaddr",blastaddr); |
|
|
|
jaddnum(retjson,"numblast",numblast); |
|
|
|
jaddnum(retjson,"completed",i); |
|
|
|
jaddbits256(retjson,"lastutxo",utxotxid); |
|
|
|