|
@ -361,6 +361,12 @@ dividends(coin, height, <args>)\n\ |
|
|
retstr = clonestr("{\"result\":\"success\"}"); |
|
|
retstr = clonestr("{\"result\":\"success\"}"); |
|
|
else if ( strcmp(method,"getprices") == 0 ) |
|
|
else if ( strcmp(method,"getprices") == 0 ) |
|
|
return(LP_prices()); |
|
|
return(LP_prices()); |
|
|
|
|
|
else if ( strcmp(method,"listunspent") == 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 ) |
|
|
|
|
|
return(jprint(LP_address_utxos(ptr,jstr(argjson,"address"),1),1)); |
|
|
|
|
|
else return(clonestr("{\"error\":\"cant find coind\"}")); |
|
|
|
|
|
} |
|
|
else if ( strcmp(method,"orderbook") == 0 ) |
|
|
else if ( strcmp(method,"orderbook") == 0 ) |
|
|
return(LP_orderbook(base,rel,jint(argjson,"duration"))); |
|
|
return(LP_orderbook(base,rel,jint(argjson,"duration"))); |
|
|
else if ( strcmp(method,"registerall") == 0 ) |
|
|
else if ( strcmp(method,"registerall") == 0 ) |
|
@ -402,12 +408,6 @@ dividends(coin, height, <args>)\n\ |
|
|
return(clonestr("{\"error\":\"you are running an obsolete version, update\"}")); |
|
|
return(clonestr("{\"error\":\"you are running an obsolete version, update\"}")); |
|
|
else if ( strcmp(method,"lookup") == 0 ) |
|
|
else if ( strcmp(method,"lookup") == 0 ) |
|
|
return(clonestr("{\"error\":\"you are running an obsolete version, update\"}")); |
|
|
return(clonestr("{\"error\":\"you are running an obsolete version, update\"}")); |
|
|
else if ( strcmp(method,"listunspent") == 0 ) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 ) |
|
|
|
|
|
return(jprint(LP_address_utxos(ptr,jstr(argjson,"address"),1),1)); |
|
|
|
|
|
else return(clonestr("{\"error\":\"cant find coind\"}")); |
|
|
|
|
|
} |
|
|
|
|
|
if ( strcmp(method,"broadcast") == 0 ) |
|
|
if ( strcmp(method,"broadcast") == 0 ) |
|
|
{ |
|
|
{ |
|
|
bits256 zero; char *cipherstr; int32_t cipherlen; uint8_t cipher[LP_ENCRYPTED_MAXSIZE]; |
|
|
bits256 zero; char *cipherstr; int32_t cipherlen; uint8_t cipher[LP_ENCRYPTED_MAXSIZE]; |
|
|