|
@ -385,19 +385,58 @@ char *basilisk_standardservice(char *CMD,struct supernet_info *myinfo,void *_add |
|
|
#include "basilisk_lisk.c" |
|
|
#include "basilisk_lisk.c" |
|
|
#include "basilisk_CMD.c" |
|
|
#include "basilisk_CMD.c" |
|
|
|
|
|
|
|
|
|
|
|
#include "../includes/iguana_apidefs.h" |
|
|
|
|
|
#include "../includes/iguana_apideclares.h" |
|
|
|
|
|
|
|
|
|
|
|
HASH_ARRAY_STRING(basilisk,balances,hash,vals,hexstr) |
|
|
|
|
|
{ |
|
|
|
|
|
return(basilisk_standardservice("BAL",myinfo,0,hash,vals,hexstr,1)); |
|
|
|
|
|
//return(basilisk_standardcmd(myinfo,"BAL",activecoin,remoteaddr,basilisktag,vals,coin->basilisk_balances,coin->basilisk_balancesmetric));
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr) |
|
|
|
|
|
{ |
|
|
|
|
|
return(basilisk_standardservice("VAL",myinfo,0,hash,vals,hexstr,1)); |
|
|
|
|
|
//return(basilisk_standardcmd(myinfo,"VAL",activecoin,remoteaddr,basilisktag,vals,coin->basilisk_value,coin->basilisk_valuemetric));
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HASH_ARRAY_STRING(basilisk,rawtx,hash,vals,hexstr) |
|
|
|
|
|
{ |
|
|
|
|
|
char *retstr=0,*symbol; uint32_t basilisktag; struct basilisk_item *ptr,Lptr; int32_t timeoutmillis; |
|
|
|
|
|
if ( (symbol= jstr(vals,"symbol")) != 0 || (symbol= jstr(vals,"coin")) != 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( (coin= iguana_coinfind(symbol)) != 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
basilisktag = juint(vals,"basilisktag"); |
|
|
|
|
|
if ( juint(vals,"burn") == 0 ) |
|
|
|
|
|
jaddnum(vals,"burn",0.0001); |
|
|
|
|
|
if ( (timeoutmillis= juint(vals,"timeout")) <= 0 ) |
|
|
|
|
|
timeoutmillis = BASILISK_TIMEOUT; |
|
|
|
|
|
if ( (ptr= basilisk_bitcoinrawtx(&Lptr,myinfo,coin,remoteaddr,basilisktag,timeoutmillis,vals)) != 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
retstr = ptr->retstr; |
|
|
|
|
|
} |
|
|
|
|
|
if ( ptr != &Lptr ) |
|
|
|
|
|
free(ptr); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return(retstr); |
|
|
|
|
|
} |
|
|
|
|
|
#include "../includes/iguana_apiundefs.h" |
|
|
|
|
|
|
|
|
void basilisk_functions(struct iguana_info *coin,int32_t protocol) |
|
|
void basilisk_functions(struct iguana_info *coin,int32_t protocol) |
|
|
{ |
|
|
{ |
|
|
coin->protocol = protocol; |
|
|
coin->protocol = protocol; |
|
|
switch ( protocol ) |
|
|
switch ( protocol ) |
|
|
{ |
|
|
{ |
|
|
case IGUANA_PROTOCOL_BITCOIN: |
|
|
/*case IGUANA_PROTOCOL_BITCOIN:
|
|
|
coin->basilisk_balances = basilisk_bitcoinbalances; |
|
|
coin->basilisk_balances = basilisk_bitcoinbalances; |
|
|
coin->basilisk_rawtx = basilisk_bitcoinrawtx; |
|
|
coin->basilisk_rawtx = basilisk_bitcoinrawtx; |
|
|
//coin->basilisk_rawtxmetric = basilisk_bitcoin_rawtxmetric;
|
|
|
//coin->basilisk_rawtxmetric = basilisk_bitcoin_rawtxmetric;
|
|
|
coin->basilisk_value = basilisk_bitcoinvalue; |
|
|
coin->basilisk_value = basilisk_bitcoinvalue; |
|
|
coin->basilisk_valuemetric = basilisk_bitcoin_valuemetric; |
|
|
coin->basilisk_valuemetric = basilisk_bitcoin_valuemetric; |
|
|
break; |
|
|
break; |
|
|
/*case IGUANA_PROTOCOL_IOTA:
|
|
|
case IGUANA_PROTOCOL_IOTA: |
|
|
coin->basilisk_balances = basilisk_iotabalances; |
|
|
coin->basilisk_balances = basilisk_iotabalances; |
|
|
coin->basilisk_rawtx = basilisk_iotarawtx; |
|
|
coin->basilisk_rawtx = basilisk_iotarawtx; |
|
|
break; |
|
|
break; |
|
|