|
|
@ -1226,7 +1226,7 @@ STRING_AND_THREEINTS(bitcoinrpc,listtransactions,account,count,skip,includewatch |
|
|
|
{ |
|
|
|
vouts = cJSON_CreateArray(); |
|
|
|
txids = cJSON_CreateArray(); |
|
|
|
iguana_addressreceived(myinfo,coin,json,remoteaddr,txids,vouts,coinaddr,1); |
|
|
|
iguana_addressreceived(myinfo,coin,0,remoteaddr,txids,vouts,coinaddr,1); |
|
|
|
if ( (m= cJSON_GetArraySize(txids)) > 0 ) |
|
|
|
{ |
|
|
|
for (j=0; j<m; j++,total++) |
|
|
@ -1305,7 +1305,7 @@ THREE_INTS(bitcoinrpc,listreceivedbyaddress,minconf,includeempty,flag) |
|
|
|
jaddstr(item,"address",waddr->coinaddr); |
|
|
|
txids = cJSON_CreateArray(); |
|
|
|
vouts = cJSON_CreateArray(); |
|
|
|
jaddnum(item,"amount",dstr(iguana_addressreceived(myinfo,coin,json,remoteaddr,txids,vouts,waddr->coinaddr,minconf))); |
|
|
|
jaddnum(item,"amount",dstr(iguana_addressreceived(myinfo,coin,0,remoteaddr,txids,vouts,waddr->coinaddr,minconf))); |
|
|
|
jadd(item,"txids",txids); |
|
|
|
jadd(item,"vouts",vouts); |
|
|
|
jaddi(array,item); |
|
|
@ -1316,6 +1316,22 @@ THREE_INTS(bitcoinrpc,listreceivedbyaddress,minconf,includeempty,flag) |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} |
|
|
|
|
|
|
|
STRING_AND_INT(bitcoinrpc,getreceivedbyaddress,address,minconf) |
|
|
|
{ |
|
|
|
char *balancestr; cJSON *balancejson,*retjson = cJSON_CreateObject(); |
|
|
|
if ( (balancestr= iguana_balance(IGUANA_CALLARGS,coin->symbol,address,-1,minconf)) != 0 ) |
|
|
|
{ |
|
|
|
if ( (balancejson= cJSON_Parse(balancestr)) != 0 ) |
|
|
|
{ |
|
|
|
jaddnum(retjson,"result",dstr(jdouble(balancejson,"balance"))); |
|
|
|
free_json(balancejson); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( jobj(retjson,"result") == 0 ) |
|
|
|
jaddstr(retjson,"error","couldnt get received by address"); |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} |
|
|
|
|
|
|
|
TWO_INTS(bitcoinrpc,listaccounts,minconf,includewatchonly) |
|
|
|
{ |
|
|
|
cJSON *retjson,*array; int64_t balance; struct iguana_waccount *wacct,*tmp; |
|
|
@ -1338,12 +1354,6 @@ HASH_AND_TWOINTS(bitcoinrpc,listsinceblock,blockhash,target,flag) |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} |
|
|
|
|
|
|
|
STRING_AND_INT(bitcoinrpc,getreceivedbyaddress,address,minconf) |
|
|
|
{ |
|
|
|
cJSON *retjson = cJSON_CreateObject(); |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} |
|
|
|
|
|
|
|
INT_ARRAY_STRING(bitcoinrpc,createmultisig,M,pubkeys,ignore) |
|
|
|
{ |
|
|
|
cJSON *retjson,*pkjson,*addresses; uint8_t script[2048],p2sh_rmd160[20]; char pubkeystr[256],msigaddr[64],*pkstr,scriptstr[sizeof(script)*2+1]; struct vin_info V; int32_t i,plen,len,n = cJSON_GetArraySize(pubkeys); |
|
|
|