|
|
@ -605,17 +605,29 @@ TWOINTS_AND_ARRAY(dpow,ratify,minsigs,timestamp,ratified) |
|
|
|
|
|
|
|
HASH_AND_STRING(dex,gettransaction,txid,symbol) |
|
|
|
{ |
|
|
|
/*char str[65],url[1024],*retstr;
|
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
{ |
|
|
|
sprintf(url,"https://api.blocktrail.com/v1/btc/transaction/%s?api_key=%s",bits256_str(str,txid),myinfo->blocktrail_apikey); |
|
|
|
|
|
|
|
sprintf(url,"https://api.blocktrail.com/v1/btc/address/%s/unspent-outputs?api_key=%s",address,myinfo->blocktrail_apikey); |
|
|
|
}*/ |
|
|
|
return(_dex_getrawtransaction(myinfo,symbol,txid)); |
|
|
|
} |
|
|
|
|
|
|
|
HASH_AND_STRING_AND_INT(dex,gettxout,txid,symbol,vout) |
|
|
|
{ |
|
|
|
/*char str[65],url[1024],*retstr;
|
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
{ |
|
|
|
sprintf(url,"https://api.blocktrail.com/v1/btc/transaction/%s?api_key=%s",bits256_str(str,txid),myinfo->blocktrail_apikey); |
|
|
|
}*/ |
|
|
|
return(_dex_gettxout(myinfo,symbol,txid,vout)); |
|
|
|
} |
|
|
|
|
|
|
|
TWO_STRINGS(dex,listunspent,symbol,address) |
|
|
|
{ |
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && coin->FULLNODE == 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
{ |
|
|
|
char url[1024],*retstr,*coinaddr,*script; int32_t i,n,vout; cJSON *retjson,*data,*item,*item3,*data3; bits256 txid; uint64_t val; |
|
|
|
sprintf(url,"https://api.blocktrail.com/v1/btc/address/%s/unspent-outputs?api_key=%s",address,myinfo->blocktrail_apikey); |
|
|
@ -672,7 +684,7 @@ TWO_STRINGS(dex,listunspent,symbol,address) |
|
|
|
|
|
|
|
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip) |
|
|
|
{ |
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && coin->FULLNODE == 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
if ( symbol != 0 && strcmp(symbol,"BTC") == 0 && (coin= iguana_coinfind("BTC")) != 0 && myinfo->blocktrail_apikey[0] != 0 ) |
|
|
|
{ |
|
|
|
char url[1024],*retstr,*retstr2; cJSON *retjson,*retjson2,*retjson3,*data,*data2; int32_t i,n; |
|
|
|
sprintf(url,"https://api.blocktrail.com/v1/btc/address/%s/transactions?api_key=%s",address,myinfo->blocktrail_apikey); |
|
|
|