Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d7403473a6
  1. 11
      README.md
  2. 3
      SuperNET/Makefile
  3. 2
      iguana/iguana777.c
  4. 2
      iguana/iguana777.h
  5. 2
      iguana/iguana_bitmap.c
  6. 4
      iguana/iguana_blocks.c
  7. 168
      iguana/iguana_html.c
  8. 256
      iguana/iguana_json.c
  9. 5
      iguana/iguana_pubkeys.c
  10. BIN
      iguana/pnacl/Release/iguana.pexe
  11. BIN
      iguana/pnacl/Release/iguana_unstripped.bc
  12. BIN
      iguana/pnacl/Release/iguana_unstripped.pexe

11
README.md

@ -76,3 +76,14 @@ Another approach is to use the bitcoin RPC syntax via:
the params:[] array is where the standard bitcoin parameters go, the only change that is needed is to specify the coin the params:[] array is where the standard bitcoin parameters go, the only change that is needed is to specify the coin
alternatively {"agent":"SuperNET","method":"bitcoinrpc","coin":"BTCD"} will set the coin alternatively {"agent":"SuperNET","method":"bitcoinrpc","coin":"BTCD"} will set the coin
to use for bitcoin RPC calls. this will suffice in single coin environments to use for bitcoin RPC calls. this will suffice in single coin environments
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana",\"method\":\"test\"}"
curl --url "http://127.0.0.1:7778/iguana/test" -> html page with results
curl --url "http://127.0.0.1:7778/api/iguana/test" -> just json text
http://127.0.0.1:7778 -> superugly GUI
http://127.0.0.1:7778/iguana/test
http://127.0.0.1:7778/api/iguana/test
postCall('{"agent":"iguana","method":"test"}'}
iguana_JSON("{\"agent\":\"iguana",\"method\":\"test\"}"); -> direct C function call

3
SuperNET/Makefile

@ -23,9 +23,6 @@ LIBS = crypto777 nanomsg curl ssl crypto z glibc-compat nacl_spawn ppapi nacl_i
CFLAGS = -Wall -D__PNACL -fno-strict-aliasing $(EXTRA) CFLAGS = -Wall -D__PNACL -fno-strict-aliasing $(EXTRA)
LFLAGS = libs LFLAGS = libs
SOURCES = $(SOURCES)
# Build rules generated by macros from common.mk: # Build rules generated by macros from common.mk:
$(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep))))

2
iguana/iguana777.c

@ -302,7 +302,7 @@ void iguana_helper(void *arg)
MEMB = mycalloc('b',IGUANA_MAXBUNDLESIZE,sizeof(*MEMB)); MEMB = mycalloc('b',IGUANA_MAXBUNDLESIZE,sizeof(*MEMB));
while ( 1 ) while ( 1 )
{ {
iguana_jsonQ(); //iguana_jsonQ();
flag = 0; flag = 0;
if ( (ptr= queue_dequeue(&helperQ,0)) != 0 ) if ( (ptr= queue_dequeue(&helperQ,0)) != 0 )
{ {

2
iguana/iguana777.h

@ -684,6 +684,7 @@ int32_t is_bitcoinrpc(char *method);
char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,char *remoteaddr); char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,char *remoteaddr);
cJSON *iguana_pubkeyjson(struct iguana_info *coin,char *pubkeystr); cJSON *iguana_pubkeyjson(struct iguana_info *coin,char *pubkeystr);
// API functions
char *iguana_listsinceblock(struct supernet_info *myinfo,struct iguana_info *coin,bits256 blockhash,int32_t target); char *iguana_listsinceblock(struct supernet_info *myinfo,struct iguana_info *coin,bits256 blockhash,int32_t target);
char *iguana_getreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t minconf); char *iguana_getreceivedbyaccount(struct supernet_info *myinfo,struct iguana_info *coin,char *account,int32_t minconf);
@ -715,6 +716,7 @@ char *iguana_backupwallet(struct supernet_info *myinfo,struct iguana_info *coin,
char *iguana_signmessage(struct supernet_info *myinfo,struct iguana_info *coin,char *address,char *message); char *iguana_signmessage(struct supernet_info *myinfo,struct iguana_info *coin,char *address,char *message);
char *iguana_verifymessage(struct supernet_info *myinfo,struct iguana_info *coin,char *address,char *sig,char *message); char *iguana_verifymessage(struct supernet_info *myinfo,struct iguana_info *coin,char *address,char *sig,char *message);
char *iguana_validatepubkey(struct supernet_info *myinfo,struct iguana_info *coin,char *pubkey);
char *iguana_getnewaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *account); char *iguana_getnewaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *account);
char *iguana_makekeypair(struct supernet_info *myinfo,struct iguana_info *coin); char *iguana_makekeypair(struct supernet_info *myinfo,struct iguana_info *coin);
char *iguana_vanitygen(struct supernet_info *myinfo,struct iguana_info *coin,char *vanity); char *iguana_vanitygen(struct supernet_info *myinfo,struct iguana_info *coin,char *vanity);

2
iguana/iguana_bitmap.c

@ -1125,7 +1125,7 @@ void iguana_bitmap(char *space,int32_t max,char *name)
if ( name == 0 || name[0] == 0 ) if ( name == 0 || name[0] == 0 )
name = "BTCD"; name = "BTCD";
coin = iguana_coinfind(name); coin = iguana_coinfind(name);
if ( (rect= iguana_bitmapfind(name)) == 0 ) if ( 1 || (rect= iguana_bitmapfind(name)) == 0 )
{ {
strcpy(space,"{\"name\":\"nobitmap\",\"amplitude\":222,\"width\":1,\"height\":1,\"pixels\":[222,0,22]}"); strcpy(space,"{\"name\":\"nobitmap\",\"amplitude\":222,\"width\":1,\"height\":1,\"pixels\":[222,0,22]}");
//sprintf(space,"Content-type: text/standard\r\n"); //sprintf(space,"Content-type: text/standard\r\n");

4
iguana/iguana_blocks.c

@ -49,10 +49,10 @@ struct iguana_block *iguana_blockhashset(struct iguana_info *coin,int32_t height
{ {
static int depth; static int depth;
struct iguana_block *block,*prev; struct iguana_block *block,*prev;
if ( height > coin->blocks.maxbits || depth != 0 ) if ( height > 0 && (height > coin->blocks.maxbits || depth != 0) )
{ {
printf("illegal height.%d when max.%d, depth.%d\n",height,coin->blocks.maxbits,depth); printf("illegal height.%d when max.%d, depth.%d\n",height,coin->blocks.maxbits,depth);
getchar(); //getchar();
return(0); return(0);
} }
depth++; depth++;

168
iguana/iguana_html.c

@ -19,59 +19,59 @@
char Default_agent[64] = { "ALL" }; char Default_agent[64] = { "ALL" };
#define IGUANA_FORMS "[ \ #define IGUANA_FORMS "[ \
\ \
{\"disp\":\"simple explorer\",\"agent\":\"ramchain\",\"method\":\"explore\",\"fields\":[{\"skip\":1,\"field\":\"search\",\"cols\":65,\"rows\":1}]}, \ {\"disp\":\"simple explorer\",\"agent\":\"ramchain\",\"method\":\"explore\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"search\",\"cols\":65,\"rows\":1}]}, \
{\"disp\":\"block height\",\"agent\":\"ramchain\",\"method\":\"block\",\"fields\":[{\"field\":\"height\",\"cols\":10,\"rows\":1}]}, \ {\"disp\":\"block height\",\"agent\":\"ramchain\",\"method\":\"block\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"height\",\"cols\":10,\"rows\":1}]}, \
{\"disp\":\"block hash\",\"agent\":\"ramchain\",\"method\":\"block\",\"fields\":[{\"field\":\"hash\",\"cols\":65,\"rows\":1}]}, \ {\"disp\":\"block hash\",\"agent\":\"ramchain\",\"method\":\"block\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"hash\",\"cols\":65,\"rows\":1}]}, \
{\"disp\":\"txid\",\"agent\":\"ramchain\",\"method\":\"txid\",\"fields\":[{\"skip\":1,\"field\":\"hash\",\"cols\":65,\"rows\":1}]}, \ {\"disp\":\"txid\",\"agent\":\"ramchain\",\"method\":\"txid\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"hash\",\"cols\":65,\"rows\":1}]}, \
{\"disp\":\"status\",\"agent\":\"ramchain\",\"method\":\"status\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"status\",\"agent\":\"ramchain\",\"method\":\"status\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"bundleinfo\",\"agent\":\"ramchain\",\"method\":\"bundleinfo\",\"fields\":[{\"skip\":1,\"field\":\"height\",\"cols\":12,\"rows\":1}]}, \ {\"disp\":\"bundleinfo\",\"agent\":\"ramchain\",\"method\":\"bundleinfo\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"height\",\"cols\":12,\"rows\":1}]}, \
\ \
{\"disp\":\"addcoin\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"addcoin\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"pausecoin\",\"agent\":\"iguana\",\"method\":\"pausecoin\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"pausecoin\",\"agent\":\"iguana\",\"method\":\"pausecoin\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"startcoin\",\"agent\":\"iguana\",\"method\":\"startcoin\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"startcoin\",\"agent\":\"iguana\",\"method\":\"startcoin\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"addnode\",\"agent\":\"iguana\",\"method\":\"addnode\",\"fields\":[{\"skip\":1,\"field\":\"ipaddr\",\"cols\":32,\"rows\":1}]}, \ {\"disp\":\"addnode\",\"agent\":\"iguana\",\"method\":\"addnode\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"ipaddr\",\"cols\":32,\"rows\":1}]}, \
{\"disp\":\"maxpeers\",\"agent\":\"iguana\",\"method\":\"maxpeers\",\"fields\":[{\"skip\":1,\"field\":\"max\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"maxpeers\",\"agent\":\"iguana\",\"method\":\"maxpeers\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"max\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"peers\",\"agent\":\"iguana\",\"method\":\"peers\",\"fields\":[{\"field\":\"coin\",\"cols\":16,\"rows\":1}]}, \ {\"disp\":\"peers\",\"agent\":\"iguana\",\"method\":\"peers\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":16,\"rows\":1}]}, \
{\"disp\":\"nodestatus\",\"agent\":\"iguana\",\"method\":\"nodestatus\",\"fields\":[{\"skip\":1,\"field\":\"ipaddr\",\"cols\":32,\"rows\":1}]}, \ {\"disp\":\"nodestatus\",\"agent\":\"iguana\",\"method\":\"nodestatus\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"ipaddr\",\"cols\":32,\"rows\":1}]}, \
\ \
{\"disp\":\"rates\",\"agent\":\"PAX\",\"method\":\"rates\",\"fields\":[{\"skip\":1,\"field\":\"peg\",\"cols\":16,\"rows\":1}]},\ {\"disp\":\"rates\",\"agent\":\"PAX\",\"method\":\"rates\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"peg\",\"cols\":16,\"rows\":1}]},\
{\"disp\":\"prices\",\"agent\":\"PAX\",\"method\":\"prices\",\"fields\":[{\"skip\":1,\"field\":\"peg\",\"cols\":16,\"rows\":1}]},\ {\"disp\":\"prices\",\"agent\":\"PAX\",\"method\":\"prices\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"peg\",\"cols\":16,\"rows\":1}]},\
{\"agent\":\"PAX\",\"method\":\"lock\",\"fields\":[{\"skip\":1,\"field\":\"peg\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"lockdays\",\"cols\":6,\"rows\":1},{\"skip\":1,\"field\":\"units\",\"cols\":12,\"rows\":1}]}, \ {\"agent\":\"PAX\",\"method\":\"lock\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"peg\",\"cols\":16,\"rows\":1},{\"field\":\"lockdays\",\"cols\":6,\"rows\":1},{\"field\":\"units\",\"cols\":12,\"rows\":1}]}, \
{\"agent\":\"PAX\",\"method\":\"redeem\",\"fields\":[{\"skip\":1,\"field\":\"txid\",\"cols\":65,\"rows\":1},{\"skip\":1,\"field\":\"dest\",\"cols\":65,\"rows\":1}]},\ {\"agent\":\"PAX\",\"method\":\"redeem\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"txid\",\"cols\":65,\"rows\":1},{\"field\":\"dest\",\"cols\":65,\"rows\":1}]},\
{\"disp\":\"balance\",\"agent\":\"PAX\",\"method\":\"balance\",\"fields\":[{\"skip\":1,\"field\":\"address\",\"cols\":44,\"rows\":1}]},\ {\"disp\":\"balance\",\"agent\":\"PAX\",\"method\":\"balance\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"address\",\"cols\":44,\"rows\":1}]},\
{\"agent\":\"PAX\",\"method\":\"rollover\",\"fields\":[{\"skip\":1,\"field\":\"txid\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"newpeg\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"newlockdays\",\"cols\":6,\"rows\":1}]},\ {\"agent\":\"PAX\",\"method\":\"rollover\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"txid\",\"cols\":16,\"rows\":1},{\"field\":\"newpeg\",\"cols\":16,\"rows\":1},{\"field\":\"newlockdays\",\"cols\":6,\"rows\":1}]},\
{\"agent\":\"PAX\",\"method\":\"swap\",\"fields\":[{\"skip\":1,\"field\":\"txid\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"othertxid\",\"cols\":16,\"rows\":1}]},\ {\"agent\":\"PAX\",\"method\":\"swap\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"txid\",\"cols\":16,\"rows\":1},{\"field\":\"othertxid\",\"cols\":16,\"rows\":1}]},\
{\"agent\":\"PAX\",\"method\":\"bet\",\"fields\":[{\"skip\":1,\"field\":\"peg\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"price\",\"cols\":16,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":16,\"rows\":1}]},\ {\"agent\":\"PAX\",\"method\":\"bet\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"peg\",\"cols\":16,\"rows\":1},{\"field\":\"price\",\"cols\":16,\"rows\":1},{\"field\":\"amount\",\"cols\":16,\"rows\":1}]},\
\ \
{\"agent\":\"InstantDEX\",\"method\":\"placebid\",\"fields\":[{\"skip\":1,\"field\":\"base\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"exchange\",\"cols\":16,\"rows\":1},{\"field\":\"price\",\"cols\":16,\"rows\":1},{\"field\":\"volume\",\"cols\":16,\"rows\":1}]}, \ {\"agent\":\"InstantDEX\",\"method\":\"placebid\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"base\",\"cols\":8,\"rows\":1},{\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"field\":\"exchange\",\"cols\":16,\"rows\":1},{\"field\":\"price\",\"cols\":16,\"rows\":1},{\"field\":\"volume\",\"cols\":16,\"rows\":1}]}, \
{\"agent\":\"InstantDEX\",\"method\":\"placeask\",\"fields\":[{\"skip\":1,\"field\":\"base\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"exchange\",\"cols\":16,\"rows\":1},{\"field\":\"price\",\"cols\":16,\"rows\":1},{\"field\":\"volume\",\"cols\":16,\"rows\":1}]}, \ {\"agent\":\"InstantDEX\",\"method\":\"placeask\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"base\",\"cols\":8,\"rows\":1},{\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"field\":\"exchange\",\"cols\":16,\"rows\":1},{\"field\":\"price\",\"cols\":16,\"rows\":1},{\"field\":\"volume\",\"cols\":16,\"rows\":1}]}, \
{\"agent\":\"InstantDEX\",\"method\":\"orderbook\",\"fields\":[{\"skip\":1,\"field\":\"base\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"exchange\",\"cols\":16,\"rows\":1}]}, \ {\"agent\":\"InstantDEX\",\"method\":\"orderbook\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"base\",\"cols\":8,\"rows\":1},{\"field\":\"rel\",\"cols\":8,\"rows\":1},{\"field\":\"exchange\",\"cols\":16,\"rows\":1}]}, \
{\"disp\":\"orderstatus\",\"agent\":\"InstantDEX\",\"method\":\"orderstatus\",\"fields\":[{\"skip\":1,\"field\":\"orderid\",\"cols\":32,\"rows\":1}]}, \ {\"disp\":\"orderstatus\",\"agent\":\"InstantDEX\",\"method\":\"orderstatus\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"orderid\",\"cols\":32,\"rows\":1}]}, \
{\"disp\":\"cancelorder\",\"agent\":\"InstantDEX\",\"method\":\"cancelorder\",\"fields\":[{\"skip\":1,\"field\":\"orderid\",\"cols\":32,\"rows\":1}]}, \ {\"disp\":\"cancelorder\",\"agent\":\"InstantDEX\",\"method\":\"cancelorder\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"orderid\",\"cols\":32,\"rows\":1}]}, \
{\"disp\":\"balance\",\"agent\":\"InstantDEX\",\"method\":\"balance\",\"fields\":[{\"skip\":1,\"field\":\"exchange\",\"cols\":16,\"rows\":1}]}, \ {\"disp\":\"balance\",\"agent\":\"InstantDEX\",\"method\":\"balance\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"exchange\",\"cols\":16,\"rows\":1}]}, \
{\"newline\":0,\"disp\":\"allorderbooks\",\"agent\":\"InstantDEX\",\"method\":\"allorderbooks\",\"fields\":[{\"skip\":1,\"field\":\"allorderbooks\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"allorderbooks\",\"agent\":\"InstantDEX\",\"method\":\"allorderbooks\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"allorderbooks\",\"cols\":1,\"rows\":1}]}, \
{\"newline\":0,\"disp\":\"openorders\",\"agent\":\"InstantDEX\",\"method\":\"openorders\",\"fields\":[{\"skip\":1,\"field\":\"openorders\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"openorders\",\"agent\":\"InstantDEX\",\"method\":\"openorders\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"openorders\",\"cols\":1,\"rows\":1}]}, \
{\"newline\":0,\"disp\":\"tradehistory\",\"agent\":\"InstantDEX\",\"method\":\"tradehistory\",\"fields\":[{\"skip\":1,\"field\":\"tradehistory\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"tradehistory\",\"agent\":\"InstantDEX\",\"method\":\"tradehistory\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tradehistory\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"allexchanges\",\"agent\":\"InstantDEX\",\"method\":\"allexchanges\",\"fields\":[{\"skip\":1,\"field\":\"allexchanges\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"allexchanges\",\"agent\":\"InstantDEX\",\"method\":\"allexchanges\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"allexchanges\",\"cols\":1,\"rows\":1}]}, \
\ \
{\"agent\":\"pangea\",\"method\":\"bet\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":24,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":24,\"rows\":1}]}, \ {\"agent\":\"pangea\",\"method\":\"bet\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":24,\"rows\":1},{\"field\":\"amount\",\"cols\":24,\"rows\":1}]}, \
{\"disp\":\"call\",\"agent\":\"pangea\",\"method\":\"call\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"call\",\"agent\":\"pangea\",\"method\":\"call\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"fold\",\"agent\":\"pangea\",\"method\":\"fold\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"fold\",\"agent\":\"pangea\",\"method\":\"fold\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"status\",\"agent\":\"pangea\",\"method\":\"status\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"status\",\"agent\":\"pangea\",\"method\":\"status\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"hand history\",\"agent\":\"pangea\",\"method\":\"handhistory\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"hand history\",\"agent\":\"pangea\",\"method\":\"handhistory\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"history\",\"agent\":\"pangea\",\"method\":\"history\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"history\",\"agent\":\"pangea\",\"method\":\"history\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":1,\"rows\":1}]}, \
{\"disp\":\"follow\",\"agent\":\"pangea\",\"method\":\"follow\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":24,\"rows\":1}]}, \ {\"disp\":\"follow\",\"agent\":\"pangea\",\"method\":\"follow\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":24,\"rows\":1}]}, \
{\"disp\":\"lobby\",\"agent\":\"pangea\",\"method\":\"lobby\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"lobby\",\"agent\":\"pangea\",\"method\":\"lobby\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1}]}, \
{\"disp\":\"join\",\"agent\":\"pangea\",\"method\":\"join\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":24,\"rows\":1}]}, \ {\"disp\":\"join\",\"agent\":\"pangea\",\"method\":\"join\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":24,\"rows\":1}]}, \
{\"agent\":\"pangea\",\"method\":\"buyin\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"tableid\",\"cols\":24,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":12,\"rows\":1}]}, \ {\"agent\":\"pangea\",\"method\":\"buyin\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":24,\"rows\":1},{\"field\":\"amount\",\"cols\":12,\"rows\":1}]}, \
{\"agent\":\"pangea\",\"method\":\"newtournament\",\"fields\":[{\"field\":\"mintables\",\"cols\":8,\"rows\":1},{\"field\":\"maxtables\",\"cols\":4,\"rows\":1},{\"field\":\"starttime\",\"cols\":16,\"rows\":1},{\"field\":\"prizefund\",\"cols\":12,\"rows\":1},{\"field\":\"coin\",\"cols\":12,\"rows\":1}]}, \ {\"agent\":\"pangea\",\"method\":\"newtournament\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"mintables\",\"cols\":8,\"rows\":1},{\"field\":\"maxtables\",\"cols\":4,\"rows\":1},{\"field\":\"starttime\",\"cols\":16,\"rows\":1},{\"field\":\"prizefund\",\"cols\":12,\"rows\":1},{\"field\":\"coin\",\"cols\":12,\"rows\":1}]}, \
{\"agent\":\"pangea\",\"method\":\"newtable\",\"fields\":[{\"field\":\"minplayers\",\"cols\":4,\"rows\":1},{\"field\":\"maxplayers\",\"cols\":4,\"rows\":1},{\"field\":\"rake\",\"cols\":4,\"rows\":1},{\"field\":\"bigblind\",\"cols\":12,\"rows\":1},{\"field\":\"ante\",\"cols\":12,\"rows\":1},{\"field\":\"minbuyin\",\"cols\":12,\"rows\":1},{\"field\":\"maxbuyin\",\"cols\":12,\"rows\":1}]}, \ {\"agent\":\"pangea\",\"method\":\"newtable\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"minplayers\",\"cols\":4,\"rows\":1},{\"field\":\"maxplayers\",\"cols\":4,\"rows\":1},{\"field\":\"rake\",\"cols\":4,\"rows\":1},{\"field\":\"bigblind\",\"cols\":12,\"rows\":1},{\"field\":\"ante\",\"cols\":12,\"rows\":1},{\"field\":\"minbuyin\",\"cols\":12,\"rows\":1},{\"field\":\"maxbuyin\",\"cols\":12,\"rows\":1}]}, \
{\"disp\":\"leave\",\"agent\":\"pangea\",\"method\":\"leave\",\"fields\":[{\"skip\":1,\"field\":\"tableid\",\"cols\":8,\"rows\":1}]}, \ {\"disp\":\"leave\",\"agent\":\"pangea\",\"method\":\"leave\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"tableid\",\"cols\":8,\"rows\":1}]}, \
\ \
{\"agent\":\"jumblr\",\"method\":\"send\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":13,\"rows\":1},{\"skip\":1,\"field\":\"address\",\"cols\":8,\"rows\":1}]}, \ {\"agent\":\"jumblr\",\"method\":\"send\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"amount\",\"cols\":13,\"rows\":1},{\"field\":\"address\",\"cols\":8,\"rows\":1}]}, \
{\"agent\":\"jumblr\",\"method\":\"invoice\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":13,\"rows\":1},{\"skip\":1,\"field\":\"address\",\"cols\":8,\"rows\":1}]}, \ {\"agent\":\"jumblr\",\"method\":\"invoice\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"amount\",\"cols\":13,\"rows\":1},{\"field\":\"address\",\"cols\":8,\"rows\":1}]}, \
{\"agent\":\"jumblr\",\"method\":\"shuffle\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"amount\",\"cols\":13,\"rows\":1}]}, \ {\"agent\":\"jumblr\",\"method\":\"shuffle\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"amount\",\"cols\":13,\"rows\":1}]}, \
{\"agent\":\"jumblr\",\"method\":\"balance\",\"fields\":[{\"skip\":1,\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"skip\":1,\"field\":\"address\",\"cols\":13,\"rows\":1}]}, \ {\"agent\":\"jumblr\",\"method\":\"balance\",\"fields\":[{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"coin\",\"cols\":8,\"rows\":1},{\"field\":\"address\",\"cols\":13,\"rows\":1}]}, \
\ \
{\"newline\":0,\"disp\":\"InstantDEX\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"InstantDEX\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"InstantDEX\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"InstantDEX\",\"cols\":1,\"rows\":1}]}, \
{\"newline\":0,\"disp\":\"PAX\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"PAX\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"PAX\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"PAX\",\"cols\":1,\"rows\":1}]}, \
@ -80,41 +80,41 @@ char Default_agent[64] = { "ALL" };
{\"disp\":\"ramchain\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"ramchain\",\"cols\":1,\"rows\":1}]}, \ {\"disp\":\"ramchain\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"ramchain\",\"cols\":1,\"rows\":1}]}, \
{\"newline\":0,\"disp\":\"iguana\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"iguana\",\"cols\":1,\"rows\":1}]}, \ {\"newline\":0,\"disp\":\"iguana\",\"agent\":\"iguana\",\"method\":\"setagent\",\"fields\":[{\"field\":\"iguana\",\"cols\":1,\"rows\":1}]}, \
\ \
{\"agent\":\"hash\",\"method\":\"NXT\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":100,\"rows\":1}]}, \ {\"agent\":\"hash\",\"method\":\"NXT\",\"fields\":[{\"field\":\"password\",\"cols\":100,\"rows\":1}]}, \
{\"agent\":\"hash\",\"method\":\"curve25519\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"curve25519\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"rmd160_sha256\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"rmd160_sha256\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha256_sha256\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha256_sha256\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"base64_encode\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"base64_encode\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"base64_decode\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"base64_decode\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"crc32\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"crc32\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha512\",\"fields\":[{\"skip\":1,\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha512\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha384\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha384\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha256\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha256\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha224\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha224\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"rmd320\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"rmd320\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"rmd256\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"rmd256\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"rmd160\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"rmd160\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"rmd128\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"rmd128\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"sha1\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"sha1\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"md2\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"md2\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"md4\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"md4\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"md5\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"md5\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"tiger\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"tiger\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"whirlpool\",\"fields\":[{\"skip\":1,\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"whirlpool\",\"fields\":[{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_sha512\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_sha512\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_sha384\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_sha384\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_sha256\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_sha256\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_sha224\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_sha224\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_rmd320\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_rmd320\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_rmd256\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_rmd256\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_rmd160\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_rmd160\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_rmd128\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_rmd128\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_sha1\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_sha1\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_md2\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_md2\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_md4\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_md4\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_md5\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_md5\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_tiger\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \ {\"agent\":\"hash\",\"method\":\"hmac_tiger\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}, \
{\"agent\":\"hash\",\"method\":\"hmac_whirlpool\",\"fields\":[{\"skip\":1,\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}\ {\"agent\":\"hash\",\"method\":\"hmac_whirlpool\",\"fields\":[{\"field\":\"password\",\"cols\":32,\"rows\":1},{\"field\":\"message\",\"cols\":64,\"rows\":3}]}\
]" ]"
char *HTMLheader = char *HTMLheader =
@ -289,7 +289,7 @@ function iguana_poll( )\
if ( rows == 0 && cols == 0 ) if ( rows == 0 && cols == 0 )
sprintf(buf,"<input type=\"text\" name=\"%s\"/>",fieldname); sprintf(buf,"<input type=\"text\" name=\"%s\"/>",fieldname);
else sprintf(buf,"<textarea cols=\"%d\" rows=\"%d\" name=\"%s\" %s></textarea>",cols,rows,fieldname,cols == 1 ? "hidden" : ""); else sprintf(buf,"<textarea cols=\"%d\" rows=\"%d\" name=\"%s\" %s></textarea>",cols,rows,fieldname,cols == 1 ? "hidden" : "");
str = disp==0?jstr(obj,"disp"):disp; str = 0;//disp==0?jstr(obj,"disp"):disp;
sprintf(&retbuf[size],"<td>%s %s </td>\r\n",str!=0?str:fieldname,buf), size += strlen(&retbuf[size]); sprintf(&retbuf[size],"<td>%s %s </td>\r\n",str!=0?str:fieldname,buf), size += strlen(&retbuf[size]);
} }
sprintf(formfooter,"<td colspan=\"2\"> <input type=\"button\" value=\"%s\" onclick=\"click_%s()\" /></td> </tr>\n</table></form>",button,clickname); sprintf(formfooter,"<td colspan=\"2\"> <input type=\"button\" value=\"%s\" onclick=\"click_%s()\" /></td> </tr>\n</table></form>",button,clickname);

256
iguana/iguana_json.c

@ -468,29 +468,18 @@ cJSON *iguana_txjson(struct iguana_info *coin,struct iguana_txid *tx,int32_t hei
return(json); return(json);
} }
char *iguana_listsinceblock(struct supernet_info *myinfo,struct iguana_info *coin,bits256 blockhash,int32_t target) /*
{ if ( (coinaddr= jstr(json,"address")) != 0 )
return(clonestr("{\"error\":\"notyet\"}"));
}
char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,char *method,cJSON *json)
{ {
char *hashstr,*txidstr,*coinaddr,*txbytes,rmd160str[41],str[65]; int32_t len,height,i,n,valid = 0;
cJSON *addrs,*retjson,*retitem; uint8_t rmd160[20],addrtype; bits256 hash2,checktxid;
memset(&hash2,0,sizeof(hash2)); struct iguana_txid *tx,T; struct iguana_block *block = 0;
if ( coin == 0 && (coin= iguana_coinselect()) == 0 )
return(clonestr("{\"error\":\"ramchain_coinparser needs coin\"}"));
if ( (coinaddr= jstr(json,"address")) != 0 )
{
if ( btc_addr2univ(&addrtype,rmd160,coinaddr) == 0 ) if ( btc_addr2univ(&addrtype,rmd160,coinaddr) == 0 )
{ {
if ( addrtype == coin->chain->pubval || addrtype == coin->chain->p2shval ) if ( addrtype == coin->chain->pubval || addrtype == coin->chain->p2shval )
valid = 1; valid = 1;
else return(clonestr("{\"error\":\"invalid addrtype\"}")); else return(clonestr("{\"error\":\"invalid addrtype\"}"));
} else return(clonestr("{\"error\":\"cant convert address to rmd160\"}")); } else return(clonestr("{\"error\":\"cant convert address to rmd160\"}"));
} }
if ( strcmp(method,"block") == 0 ) if ( strcmp(method,"block") == 0 )
{ {
height = -1; height = -1;
if ( ((hashstr= jstr(json,"blockhash")) != 0 || (hashstr= jstr(json,"hash")) != 0) && strlen(hashstr) == sizeof(bits256)*2 ) if ( ((hashstr= jstr(json,"blockhash")) != 0 || (hashstr= jstr(json,"hash")) != 0) && strlen(hashstr) == sizeof(bits256)*2 )
decode_hex(hash2.bytes,sizeof(hash2),hashstr); decode_hex(hash2.bytes,sizeof(hash2),hashstr);
@ -509,9 +498,9 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
} }
} }
else return(clonestr("{\"error\":\"cant find block\"}")); else return(clonestr("{\"error\":\"cant find block\"}"));
} }
else if ( strcmp(method,"tx") == 0 ) else if ( strcmp(method,"tx") == 0 )
{ {
if ( ((txidstr= jstr(json,"txid")) != 0 || (txidstr= jstr(json,"hash")) != 0) && strlen(txidstr) == sizeof(bits256)*2 ) if ( ((txidstr= jstr(json,"txid")) != 0 || (txidstr= jstr(json,"hash")) != 0) && strlen(txidstr) == sizeof(bits256)*2 )
{ {
retitem = cJSON_CreateObject(); retitem = cJSON_CreateObject();
@ -524,9 +513,9 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
return(clonestr("{\"error\":\"cant find txid\"}")); return(clonestr("{\"error\":\"cant find txid\"}"));
} }
else return(clonestr("{\"error\":\"invalid txid\"}")); else return(clonestr("{\"error\":\"invalid txid\"}"));
} }
else if ( strcmp(method,"rawtx") == 0 ) else if ( strcmp(method,"rawtx") == 0 )
{ {
if ( ((txidstr= jstr(json,"txid")) != 0 || (txidstr= jstr(json,"hash")) != 0) && strlen(txidstr) == sizeof(bits256)*2 ) if ( ((txidstr= jstr(json,"txid")) != 0 || (txidstr= jstr(json,"hash")) != 0) && strlen(txidstr) == sizeof(bits256)*2 )
{ {
decode_hex(hash2.bytes,sizeof(hash2),txidstr); decode_hex(hash2.bytes,sizeof(hash2),txidstr);
@ -547,9 +536,9 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
return(clonestr("{\"error\":\"cant find txid\"}")); return(clonestr("{\"error\":\"cant find txid\"}"));
} }
else return(clonestr("{\"error\":\"invalid txid\"}")); else return(clonestr("{\"error\":\"invalid txid\"}"));
} }
else if ( strcmp(method,"txs") == 0 ) else if ( strcmp(method,"txs") == 0 )
{ {
if ( ((hashstr= jstr(json,"block")) != 0 || (hashstr= jstr(json,"blockhash")) != 0) && strlen(hashstr) == sizeof(bits256)*2 ) if ( ((hashstr= jstr(json,"block")) != 0 || (hashstr= jstr(json,"blockhash")) != 0) && strlen(hashstr) == sizeof(bits256)*2 )
{ {
decode_hex(hash2.bytes,sizeof(hash2),hashstr); decode_hex(hash2.bytes,sizeof(hash2),hashstr);
@ -582,36 +571,107 @@ char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,
jaddstr(retitem,"txlist","get list of all tx for this address"); jaddstr(retitem,"txlist","get list of all tx for this address");
} }
return(jprint(retitem,1)); return(jprint(retitem,1));
}
else
{
n = 0;
if ( valid == 0 )
{
if ( (addrs= jarray(&n,json,"addrs")) == 0 )
return(clonestr("{\"error\":\"need address or addrs\"}"));
} }
else if ( strcmp(method,"status") == 0 || strcmp(method,"getinfo") == 0 ) for (i=0; i<=n; i++)
{ {
retitem = cJSON_CreateObject(); retitem = cJSON_CreateObject();
jaddstr(retitem,"result",coin->statusstr); if ( i > 0 )
return(jprint(retitem,1)); retjson = cJSON_CreateArray();
if ( i > 0 )
{
if ( (coinaddr= jstr(jitem(addrs,i-1),0)) == 0 )
return(clonestr("{\"error\":\"missing address in addrs\"}"));
if ( btc_addr2univ(&addrtype,rmd160,coinaddr) < 0 )
{
free_json(retjson);
return(clonestr("{\"error\":\"illegal address in addrs\"}"));
} }
else if ( strcmp(method,"getbestblockhash") == 0 ) if ( addrtype != coin->chain->pubval && addrtype != coin->chain->p2shval )
return(clonestr("{\"error\":\"invalid addrtype in addrs\"}"));
}
if ( strcmp(method,"utxo") == 0 )
{ {
retitem = cJSON_CreateObject(); jaddstr(retitem,"utxo","utxo entry");
jaddstr(retitem,"result",bits256_str(str,coin->blocks.hwmchain.RO.hash2));
return(jprint(retitem,1));
} }
else if ( strcmp(method,"getblockcount") == 0 ) else if ( strcmp(method,"unconfirmed") == 0 )
{ {
retitem = cJSON_CreateObject(); jaddstr(retitem,"unconfirmed","unconfirmed entry");
jaddnum(retitem,"result",coin->blocks.hwmchain.height); }
else if ( strcmp(method,"balance") == 0 )
{
jaddstr(retitem,"balance","balance entry");
}
else if ( strcmp(method,"totalreceived") == 0 )
{
jaddstr(retitem,"totalreceived","totalreceived entry");
}
else if ( strcmp(method,"totalsent") == 0 )
{
jaddstr(retitem,"totalsent","totalsent entry");
}
else if ( strcmp(method,"validateaddress") == 0 )
{
jaddstr(retitem,"validate",coinaddr);
}
if ( n == 0 )
return(jprint(retitem,1)); return(jprint(retitem,1));
else jaddi(retjson,retitem);
} }
return(jprint(retjson,1));
}
*/
char *iguana_listsinceblock(struct supernet_info *myinfo,struct iguana_info *coin,bits256 blockhash,int32_t target)
{
cJSON *retitem = cJSON_CreateObject();
return(jprint(retitem,1));
}
char *iguana_getinfo(struct supernet_info *myinfo,struct iguana_info *coin)
{
cJSON *retitem = cJSON_CreateObject();
jaddstr(retitem,"result",coin->statusstr);
return(jprint(retitem,1));
}
char *iguana_getbestblockhash(struct supernet_info *myinfo,struct iguana_info *coin)
{
cJSON *retitem = cJSON_CreateObject();
char str[65]; jaddstr(retitem,"result",bits256_str(str,coin->blocks.hwmchain.RO.hash2));
return(jprint(retitem,1));
}
char *iguana_getblockcount(struct supernet_info *myinfo,struct iguana_info *coin)
{
cJSON *retitem = cJSON_CreateObject();
jaddnum(retitem,"result",coin->blocks.hwmchain.height);
return(jprint(retitem,1));
}
char *ramchain_coinparser(struct supernet_info *myinfo,struct iguana_info *coin,char *method,cJSON *json)
{
//char *hashstr,*txidstr,*coinaddr,*txbytes,rmd160str[41],str[65]; int32_t len,height,i,n,valid = 0;
//cJSON *addrs,*retjson,*retitem; uint8_t rmd160[20],addrtype; bits256 hash2,checktxid;
//memset(&hash2,0,sizeof(hash2)); struct iguana_txid *tx,T; struct iguana_block *block = 0;
if ( coin == 0 && (coin= iguana_coinselect()) == 0 )
return(clonestr("{\"error\":\"ramchain_coinparser needs coin\"}"));
if ( strcmp(method,"status") == 0 || strcmp(method,"getinfo") == 0 )
return(iguana_getinfo(myinfo,coin));
else if ( strcmp(method,"getbestblockhash") == 0 )
return(iguana_getbestblockhash(myinfo,coin));
else if ( strcmp(method,"getblockcount") == 0 )
return(iguana_getblockcount(myinfo,coin));
else if ( strcmp(method,"validatepubkey") == 0 ) else if ( strcmp(method,"validatepubkey") == 0 )
return(jprint(iguana_pubkeyjson(coin,jstr(json,"pubkey")),1)); return(iguana_validatepubkey(myinfo,coin,jstr(json,"pubkey")));
/*
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","vanitygen","vanity",params[0]));
return(sglue3(0,myinfo,coin,remoteaddr,"ramchain","createmultisig","M",params[0],"pubkeys",params[1],"account",params[2]));
return(sglue3(0,myinfo,coin,remoteaddr,"ramchain","listtransactions","account",params[0],"count",params[1],"from",params[2]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","getreceivedbyaddress","address",params[0],"minconfs",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listreceivedbyaddress","minconf",params[0],"includeempty",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listsinceblock","blockhash",params[0],"target",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","getreceivedbyaccount","account",params[0],"minconfs",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listreceivedbyaccount","account",params[0],"includeempty",params[1]));*/
else if ( strcmp(method,"listtransactions") == 0 ) else if ( strcmp(method,"listtransactions") == 0 )
return(iguana_listtransactions(myinfo,coin,jstr(json,"account"),juint(json,"count"),juint(json,"from"))); return(iguana_listtransactions(myinfo,coin,jstr(json,"account"),juint(json,"count"),juint(json,"from")));
else if ( strcmp(method,"getreceivedbyaddress") == 0 ) else if ( strcmp(method,"getreceivedbyaddress") == 0 )
@ -624,15 +684,6 @@ return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listreceivedbyaccount","accou
return(iguana_getreceivedbyaccount(myinfo,coin,jstr(json,"account"),juint(json,"minconf"))); return(iguana_getreceivedbyaccount(myinfo,coin,jstr(json,"account"),juint(json,"minconf")));
else if ( strcmp(method,"listreceivedbyaccount") == 0 ) else if ( strcmp(method,"listreceivedbyaccount") == 0 )
return(iguana_listreceivedbyaccount(myinfo,coin,jstr(json,"account"),juint(json,"includeempty"))); return(iguana_listreceivedbyaccount(myinfo,coin,jstr(json,"account"),juint(json,"includeempty")));
/* -return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getnewaddress","account",params[0]));
-return(sglue(0,myinfo,coin,remoteaddr,"ramchain","makekeypair"));
-return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getaccountaddress","account",params[0]));
-return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","setaccount","address",params[0],"account",params[1]));
-return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getaccount","address",params[0]));
-return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getaddressesbyaccount","account",params[0]));
-return(sglue(0,myinfo,coin,remoteaddr,"ramchain","listaddressgroupings"));
-return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getbalance","account",params[0],"minconf",params[1])
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","listaccounts","minconf",params[0]));*/
else if ( strcmp(method,"getnewaddress") == 0 ) else if ( strcmp(method,"getnewaddress") == 0 )
return(iguana_getnewaddress(myinfo,coin,jstr(json,"account"))); return(iguana_getnewaddress(myinfo,coin,jstr(json,"account")));
else if ( strcmp(method,"makekeypair") == 0 ) else if ( strcmp(method,"makekeypair") == 0 )
@ -651,20 +702,6 @@ return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listreceivedbyaccount","accou
return(iguana_getbalance(myinfo,coin,jstr(json,"account"),juint(json,"minconf"))); return(iguana_getbalance(myinfo,coin,jstr(json,"account"),juint(json,"minconf")));
else if ( strcmp(method,"listaccounts") == 0 ) else if ( strcmp(method,"listaccounts") == 0 )
return(iguana_listaccounts(myinfo,coin,juint(json,"minconf"))); return(iguana_listaccounts(myinfo,coin,juint(json,"minconf")));
/*
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","dumpprivkey","address",params[0]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","importprivkey","wip",params[0]));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","dumpwallet"));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","importwallet","wallet",params[0]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","walletpassphrase","passphrase",params[0],"timeout",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","walletpassphrasechange","oldpassphrase",params[0],"newpassphrase",params[1]));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","walletlock"));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","encryptwallet","passphrase",params[0]));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","checkwallet"));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","repairwallet"));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","backupwallet","filename",params[0]));
*/
else if ( strcmp(method,"dumpprivkey") == 0 ) else if ( strcmp(method,"dumpprivkey") == 0 )
return(iguana_dumpprivkey(myinfo,coin,jstr(json,"address"))); return(iguana_dumpprivkey(myinfo,coin,jstr(json,"address")));
else if ( strcmp(method,"importprivkey") == 0 ) else if ( strcmp(method,"importprivkey") == 0 )
@ -687,16 +724,6 @@ return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","walletpassphrasechange","oldp
return(iguana_repairwallet(myinfo,coin)); return(iguana_repairwallet(myinfo,coin));
else if ( strcmp(method,"backupwallet") == 0 ) else if ( strcmp(method,"backupwallet") == 0 )
return(iguana_backupwallet(myinfo,coin,jstr(json,"filename"))); return(iguana_backupwallet(myinfo,coin,jstr(json,"filename")));
/*
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","signmessage","address",params[0],"message",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","verifymessage","address",params[0],"sig",params[1],"message",params[2]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","listunspent","minconf",params[0],"maxconf",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","lockunspent","unlock",params[0],"array",params[1]));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","listlockunspent"));
return(sglue3(0,myinfo,coin,remoteaddr,"ramchain","gettxout","txid",params[0],"vout",params[1],"mempool",params[2]));
return(sglue(0,myinfo,coin,remoteaddr,"ramchain","gettxoutsetinfo"));
*/
else if ( strcmp(method,"signmessage") == 0 ) else if ( strcmp(method,"signmessage") == 0 )
return(iguana_signmessage(myinfo,coin,jstr(json,"address"),jstr(json,"message"))); return(iguana_signmessage(myinfo,coin,jstr(json,"address"),jstr(json,"message")));
else if ( strcmp(method,"verifymessage") == 0 ) else if ( strcmp(method,"verifymessage") == 0 )
@ -711,14 +738,6 @@ return(sglue3(0,myinfo,coin,remoteaddr,"ramchain","gettxout","txid",params[0],"v
return(iguana_gettxout(myinfo,coin,jbits256(json,"txid"),juint(json,"vout"),juint(json,"mempool"))); return(iguana_gettxout(myinfo,coin,jbits256(json,"txid"),juint(json,"vout"),juint(json,"mempool")));
else if ( strcmp(method,"gettxoutsetinfo") == 0 ) else if ( strcmp(method,"gettxoutsetinfo") == 0 )
return(iguana_gettxoutsetinfo(myinfo,coin)); return(iguana_gettxoutsetinfo(myinfo,coin));
/*
return(sglue4(0,myinfo,coin,remoteaddr,"ramchain","sendtoaddress","address",params[0],"amount",params[1],"comment",params[2],"comment2",params[3]));
return(sglue5(0,myinfo,coin,remoteaddr,"ramchain","move","fromaccount",params[0],"toaccount",params[1],"amount",params[2],"minconf",params[3],"comment",params[4]));
return(sglue6(0,myinfo,coin,remoteaddr,"ramchain","sendfrom","fromaccount",params[0],"toaddress",params[1],"amount",params[2],"minconf",params[3],"comment",params[4],"comment2",params[5]));
return(sglue4(0,myinfo,coin,remoteaddr,"ramchain","sendmany","fromaccount",params[0],"payments",params[1],"minconf",params[2],"comment",params[3]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","settxfee","amount",params[0]));
*/
else if ( strcmp(method,"sendtoaddress") == 0 ) else if ( strcmp(method,"sendtoaddress") == 0 )
return(iguana_sendtoaddress(myinfo,coin,jstr(json,"address"),jdouble(json,"amount"),jstr(json,"comment"),jstr(json,"comment2"))); return(iguana_sendtoaddress(myinfo,coin,jstr(json,"address"),jdouble(json,"amount"),jstr(json,"comment"),jstr(json,"comment2")));
else if ( strcmp(method,"move") == 0 ) else if ( strcmp(method,"move") == 0 )
@ -729,16 +748,6 @@ return(sglue4(0,myinfo,coin,remoteaddr,"ramchain","sendmany","fromaccount",param
return(iguana_sendmany(myinfo,coin,jstr(json,"fromaccount"),jobj(json,"payments"),juint(json,"minconf"),jstr(json,"comment"))); return(iguana_sendmany(myinfo,coin,jstr(json,"fromaccount"),jobj(json,"payments"),juint(json,"minconf"),jstr(json,"comment")));
else if ( strcmp(method,"settxfee") == 0 ) else if ( strcmp(method,"settxfee") == 0 )
return(iguana_settxfee(myinfo,coin,jdouble(json,"amount"))); return(iguana_settxfee(myinfo,coin,jdouble(json,"amount")));
/*
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getrawtransaction","txid",params[0],"verbose",params[1]));
return(sglue2(0,myinfo,coin,remoteaddr,"ramchain","createrawtransaction","vins",params[0],"vouts",params[1]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","decoderawtransaction","rawtx",params[0]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","decodescript","script",params[0]));
return(sglue3(0,myinfo,coin,remoteaddr,"ramchain","signrawtransaction","rawtx",params[0],"vins",params[1],"privkeys",params[2]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","sendrawtransaction","rawtx",params[0]));
return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getrawchangeaddress","account",params[0]));
*/
else if ( strcmp(method,"getrawtransaction") == 0 ) else if ( strcmp(method,"getrawtransaction") == 0 )
return(iguana_getrawtransaction(myinfo,coin,jbits256(json,"txid"),juint(json,"verbose"))); return(iguana_getrawtransaction(myinfo,coin,jbits256(json,"txid"),juint(json,"verbose")));
else if ( strcmp(method,"createrawtransaction") == 0 ) else if ( strcmp(method,"createrawtransaction") == 0 )
@ -753,61 +762,6 @@ return(sglue1(0,myinfo,coin,remoteaddr,"ramchain","getrawchangeaddress","account
return(iguana_sendrawtransaction(myinfo,coin,jstr(json,"rawtx"))); return(iguana_sendrawtransaction(myinfo,coin,jstr(json,"rawtx")));
else if ( strcmp(method,"getrawchangeaddress") == 0 ) else if ( strcmp(method,"getrawchangeaddress") == 0 )
return(iguana_getrawchangeaddress(myinfo,coin,jstr(json,"account"))); return(iguana_getrawchangeaddress(myinfo,coin,jstr(json,"account")));
else
{
n = 0;
if ( valid == 0 )
{
if ( (addrs= jarray(&n,json,"addrs")) == 0 )
return(clonestr("{\"error\":\"need address or addrs\"}"));
}
for (i=0; i<=n; i++)
{
retitem = cJSON_CreateObject();
if ( i > 0 )
retjson = cJSON_CreateArray();
if ( i > 0 )
{
if ( (coinaddr= jstr(jitem(addrs,i-1),0)) == 0 )
return(clonestr("{\"error\":\"missing address in addrs\"}"));
if ( btc_addr2univ(&addrtype,rmd160,coinaddr) < 0 )
{
free_json(retjson);
return(clonestr("{\"error\":\"illegal address in addrs\"}"));
}
if ( addrtype != coin->chain->pubval && addrtype != coin->chain->p2shval )
return(clonestr("{\"error\":\"invalid addrtype in addrs\"}"));
}
if ( strcmp(method,"utxo") == 0 )
{
jaddstr(retitem,"utxo","utxo entry");
}
else if ( strcmp(method,"unconfirmed") == 0 )
{
jaddstr(retitem,"unconfirmed","unconfirmed entry");
}
else if ( strcmp(method,"balance") == 0 )
{
jaddstr(retitem,"balance","balance entry");
}
else if ( strcmp(method,"totalreceived") == 0 )
{
jaddstr(retitem,"totalreceived","totalreceived entry");
}
else if ( strcmp(method,"totalsent") == 0 )
{
jaddstr(retitem,"totalsent","totalsent entry");
}
else if ( strcmp(method,"validateaddress") == 0 )
{
jaddstr(retitem,"validate",coinaddr);
}
if ( n == 0 )
return(jprint(retitem,1));
else jaddi(retjson,retitem);
}
return(jprint(retjson,1));
}
return(clonestr("{\"error\":\"illegal ramchain method or missing coin\"}")); return(clonestr("{\"error\":\"illegal ramchain method or missing coin\"}"));
} }

5
iguana/iguana_pubkeys.c

@ -1193,6 +1193,11 @@ char *iguana_vanitygen(struct supernet_info *myinfo,struct iguana_info *coin,cha
return(clonestr("{\"error\":\"notyet\"}")); return(clonestr("{\"error\":\"notyet\"}"));
} }
char *iguana_validatepubkey(struct supernet_info *myinfo,struct iguana_info *coin,char *pubkey)
{
return(clonestr("{\"error\":\"notyet\"}"));
}
char *iguana_createmultisig(struct supernet_info *myinfo,struct iguana_info *coin,int32_t M,cJSON *pubkeys,char *account) char *iguana_createmultisig(struct supernet_info *myinfo,struct iguana_info *coin,int32_t M,cJSON *pubkeys,char *account)
{ {

BIN
iguana/pnacl/Release/iguana.pexe

Binary file not shown.

BIN
iguana/pnacl/Release/iguana_unstripped.bc

Binary file not shown.

BIN
iguana/pnacl/Release/iguana_unstripped.pexe

Binary file not shown.
Loading…
Cancel
Save