Browse Source

Merge pull request #243 from jl777/dev

Dev
win-cross
jl777 8 years ago
committed by GitHub
parent
commit
da218ee15b
  1. 19
      README.md
  2. 2
      basilisk/basilisk.c
  3. 60
      basilisk/basilisk_bitcoin.c
  4. 37
      basilisk/tradebots_SVM.h
  5. 17
      iguana/dPoW.h
  6. 2
      iguana/dpow/dpow_fsm.c
  7. 102
      iguana/dpow/dpow_network.c
  8. 30
      iguana/dpow/dpow_rpc.c
  9. 5
      iguana/iguana777.c
  10. 2
      iguana/iguana777.h
  11. 1
      iguana/iguana_init.c
  12. 114
      iguana/iguana_notary.c
  13. 699
      iguana/kmd_lookup.h
  14. 2
      iguana/m_unix
  15. 8
      iguana/main.c
  16. 188
      iguana/tests/KMD.batch7.listunspent
  17. 190
      iguana/tests/KMD.batch8
  18. 187
      iguana/tests/KMD.batch8.importaddress
  19. 151
      iguana/tests/KMD.batch8.listunspent
  20. 72
      iguana/tests/KMD.batch8.txids
  21. 33
      iguana/tests/REVS.batch8
  22. 21
      iguana/tests/REVS.batch8.importaddress
  23. 2
      iguana/tests/dexexplorer
  24. 2
      iguana/tests/dexgetbalance
  25. 2
      iguana/tests/dexgetsupply
  26. 2
      iguana/tests/dexgettxin
  27. 2
      iguana/tests/dexlistspent
  28. 2
      iguana/tests/dexlistunspent
  29. 2
      iguana/tests/sendtoaddress
  30. 6
      includes/iguana_apideclares.h
  31. 1
      includes/iguana_structs.h

19
README.md

@ -23,11 +23,11 @@ iguana: most efficient bitcoin core implementation that can simultaneously be fu
komodo: this is the top secret project I cant talk about publicly yet
> #TL;DR#
>
> ```sudo apt-get update; sudo apt-get install git libcurl4-openssl-dev build-essential; git clone https://github.com/jl777/SuperNET; cd SuperNET; ./m_onetime m_unix;```
>
> The above one line gets SuperNET installed, built and launched for unix.
>
>
> ```sudo apt-get update; sudo apt-get install git libcurl4-openssl-dev build-essential libnanomsg-dev; git clone https://github.com/jl777/SuperNET; cd SuperNET; ./m_onetime m_unix;```
>
> The above one line gets SuperNET installed, built and launched for unix.
>
> After that ```./m_unix``` updates to latest.
> *Continue below at "Running".*
@ -44,6 +44,8 @@ The above two definitions need to be changed to match the mingw install on your
You need to make sure the nacl sdk is properly installed and you are able to build the examples.
Now you will need to get the external libs, which can be built from scratch using naclports or there use the reference builds of libcurl.a and libz.a in the SuperNET/crypto777/pnacl_libs. You can just copy those over into $(NACL_SDK_ROOT)/<pepper_dir>/lib/pnacl.
##For android##
You have to build a native libnanomsg for android. This section is work in progress. Contact ca333@protonmail.ch for assistance on building latest iguana for android.
#ONETIME#
Now you are ready to build.
@ -103,14 +105,14 @@ Internally, all paths convert the request into a standard SuperNET JSON request.
Another approach is to use the bitcoin RPC syntax via:
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"getinfo\",\"params\":[]}"
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
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/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
@ -124,7 +126,7 @@ iguana can be invoked with a command line argument. if it is a name of a file, i
"exchanges" -> { "name":"<name of exchange>", ... }
"apikey", "apisecret", "userid", "tradepassword" these are as expected
"pollgap" -> gap between each access to exchange for getting prices
on OSX mksquashfs is not native, you will need to install fuse: https://osxfuse.github.io/ and a squashfs for mac: https://github.com/vasi/squashfuse
**********
@ -221,4 +223,3 @@ sudo service ntp start
Now things should be ready. To update and run notary node:
pkill iguana; ./m_LP; tests/notaryinit

2
basilisk/basilisk.c

@ -917,6 +917,8 @@ void basilisks_loop(void *arg)
endmilli = startmilli + 500;
else endmilli = startmilli + 1000;
}
if ( myinfo->DEXEXPLORER != 0 )
kmd_bitcoinscan();
if ( myinfo->expiration != 0 && (myinfo->dexsock >= 0 || myinfo->IAMLP != 0 || myinfo->DEXactive > time(NULL)) )
{
//fprintf(stderr,"H ");

60
basilisk/basilisk_bitcoin.c

@ -22,36 +22,6 @@
};*/
#ifdef bitcoincancalculatebalances
int64_t bitcoin_value(struct iguana_info *coin,bits256 txid,int16_t vout,char *coinaddr)
{
char params[512],str[65]; char *curlstr; cJSON *txobj,*vouts,*item,*sobj,*addrs; int32_t j,m,n; int64_t value = 0;
sprintf(params,"[\"%s\", 1]",bits256_str(str,txid));
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",params)) != 0 )
{
if ( (txobj= cJSON_Parse(curlstr)) != 0 )
{
if ( (vouts= jarray(&n,txobj,"vout")) != 0 && vout < n )
{
item = jitem(vouts,vout);
if ( (sobj= jobj(item,"scriptPubKey")) != 0 && (addrs= jarray(&m,sobj,"addresses")) != 0 )
{
for (j=0; j<m; j++)
{
if ( strcmp(jstri(addrs,j),coinaddr) == 0 )
{
value = SATOSHIDEN * jdouble(item,"satoshis");
break;
}
}
}
}
free_json(txobj);
}
free(curlstr);
}
return(value);
}
char *bitcoin_balance(struct iguana_info *coin,char *coinaddr,int32_t lastheight,int32_t minconf)
{
int32_t i,n,height,maxconf=1<<30; int64_t balance = 0; char params[512],*curlstr; cJSON *array,*retjson,*curljson;
@ -84,6 +54,36 @@ char *bitcoin_balance(struct iguana_info *coin,char *coinaddr,int32_t lastheight
return(jprint(retjson,1));
}
int64_t bitcoin_value(struct iguana_info *coin,bits256 txid,int16_t vout,char *coinaddr)
{
char params[512],str[65]; char *curlstr; cJSON *txobj,*vouts,*item,*sobj,*addrs; int32_t j,m,n; int64_t value = 0;
sprintf(params,"[\"%s\", 1]",bits256_str(str,txid));
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",params)) != 0 )
{
if ( (txobj= cJSON_Parse(curlstr)) != 0 )
{
if ( (vouts= jarray(&n,txobj,"vout")) != 0 && vout < n )
{
item = jitem(vouts,vout);
if ( (sobj= jobj(item,"scriptPubKey")) != 0 && (addrs= jarray(&m,sobj,"addresses")) != 0 )
{
for (j=0; j<m; j++)
{
if ( strcmp(jstri(addrs,j),coinaddr) == 0 )
{
value = SATOSHIDEN * jdouble(item,"satoshis");
break;
}
}
}
}
free_json(txobj);
}
free(curlstr);
}
return(value);
}
char *basilisk_bitcoinblockhashstr(char *coinstr,char *serverport,char *userpass,int32_t height)
{
char numstr[128],*blockhashstr=0; bits256 hash2; struct iguana_info *coin;

37
basilisk/tradebots_SVM.h

@ -20,16 +20,14 @@
//#include <dispatch/dispatch.h>
typedef float svmtype;
#ifdef WIN32
// fadedreamz@gmail.com - added for successful compilation, however, for MSVC probably require a particular OpenCL SDK
// to work with it (e,g nvidia or amd SDK)
typedef struct fake_opencl_double {
typedef struct fake_opencl_double { //use a struct for double2 typedefinition on all OS - ca333@protonmail.ch
double x;
double y;
}double2;
#else
typedef double double2 __attribute__((ext_vector_type(2)));
#endif
#define MAX_VECTORS (1440 * 365 * 5)
#define MAIN_MAXCORES 16
#define c_to_refc(c) (c)
@ -192,7 +190,7 @@ void ocas_purge(struct ocas_vars *vars)
fatal("dot_expanded_features not implemented");
return(0);
}
static inline void add_expanded_features(register double *W,register double y,register int c,register int selector,register int numfeatures)
{
fatal("add_expanded_features not implemented");
@ -226,7 +224,7 @@ static inline double calc_ocas_output(register struct ocas_vars *vars,register i
// printf("%f ",sum);
return(sum);
}
static inline void add_ocas_output(register double y,register struct ocas_vars *vars,register int selector,register int c,register int weekind,register int answerind,register double *W,register double *new_a,register int numfeatures)
{
register int coeffi;
@ -321,7 +319,7 @@ static inline double _dbufave(register double *buf,register int len)
sum = 0.;
return(sum);
}
static inline void add_newcut_entry(register struct ocas_vars *vars,register int answerind,register int *new_cut,register int i,register int weekind,register double y)
{
weekind <<= 1;
@ -403,7 +401,7 @@ static int _increasing_double(const void *a,const void *b)
#undef double_a
#undef double_b
}
static inline void calc_ocas_strategy(register struct ocas_vars *vars,register int answerind,register double C,register int numfeatures,register int len,register int *weekinds,register int *new_cut,register double *W,register double *oldW,register double *output,register double *old_output,register double2 *hpfb)
{
double answermag;
@ -782,11 +780,11 @@ static void ocas_print(struct ocas_vars *vars,int answerind,int ishwm,double C)
//printf("ocas_print.A%d\n",answerind);
//printf("%s.A%02d %4d %8.2f | QP %9.3f QD %9.3f [%9.4f %7.3f] SV.%d %4d | M%9.6f (%9.6f max %8.1f %9.6f) %s.A%02d %9.6f%%\n",
dispvals[0] = vars->Q_P[answerind]/1000000000.; dispvals[1] = (C * vars->Q_D[answerind])/1000000000.;
dispvals[2] = (vars->Q_P[answerind]-C * vars->Q_D[answerind]) / 1000000000;
dispvals[2] = (vars->Q_P[answerind]-C * vars->Q_D[answerind]) / 1000000000;
dispvals[3] = (vars->Q_P[answerind]-C * vars->Q_D[answerind]) / MAX(1,fabs(vars->Q_P[answerind]));
printf("%3d %d.A%02d +%d -%d",vars->nohwm[answerind],vars->refc,answerind,vars->good[answerind],vars->bad[answerind]);
printf(" %4d %8.2f |QP %9.3f QD %10.2f [%11.2f %9.1f] SV.%3d %3d |M%9.3f errs.%-6d %-8.0f %5.2f%% errs %6.5f A%9.6f W0%9.6f D%11.9f\n",//[%7.4f%%]\n",
vars->numIt[answerind],vars->ocas_time/1000,dispvals[0],dispvals[1],dispvals[2],dispvals[3],
vars->numIt[answerind],vars->ocas_time/1000,dispvals[0],dispvals[1],dispvals[2],dispvals[3],
vars->nNZAlpha[answerind], vars->numlhs[answerind],
// PTRS->lastmetrics[answerind],PTRS->learningrates[answerind][0],PTRS->maxiters[answerind],PTRS->learningrates[answerind][1],
vars->lastmetrics[answerind][0],vars->trn_err[answerind],vars->maxiters[answerind],vars->perc[answerind],
@ -827,8 +825,8 @@ static inline void finish_ocasiter(register int answerind,register struct ocas_v
vars->errperc[answerind] = (100 * (double)vars->trn_err[answerind])/(double)MAX(1,vars->len[answerind]);
vars->Q_P[answerind] = 0.5*vars->sq_norm_W[answerind] + (C * vars->xi[answerind]);
vars->ocas_time = (vars->output_time + vars->w_time + vars->add_time + vars->sort_time + vars->qp_solver_time);
ocas_print(vars,answerind,0,C);
}
ocas_print(vars,answerind,0,C);
}
static inline int ocas_iter(struct ocas_vars *vars,int max_nohwm)
{
@ -947,8 +945,8 @@ static inline int init_ocas_vars(int numthreads,int selector,long answerindmask,
{
int answerind,lastanswerind,retval = 0;
lastanswerind = TRADEBOTS_NUMANSWERS;
vars->maxlen = maxlen;
vars->numthreads = numthreads;
vars->maxlen = maxlen;
vars->numthreads = numthreads;
vars->selector = selector;
//printf("init_ocas_vars lastanswerind.%d\n",lastanswerind);
for (answerind=0; answerind<lastanswerind; answerind++)
@ -956,8 +954,8 @@ static inline int init_ocas_vars(int numthreads,int selector,long answerindmask,
//printf("A%d.len_%d ",answerind,vars->len[answerind]);
if ( vars->len[answerind] > 0 )//&& (answerindmask == -1L || ((1L<<answerind) & answerindmask) != 0) )
{
vars->refc = c_to_refc(c); vars->c = c; vars->C = C;
vars->numfeatures = numfeatures; vars->maxlhs = maxlhs;
vars->refc = c_to_refc(c); vars->c = c; vars->C = C;
vars->numfeatures = numfeatures; vars->maxlhs = maxlhs;
if ( vars->CLspaces[answerind] == 0 )
vars->CLspaces[answerind] = myaligned_alloc(sizeof(*vars->CLspaces[answerind]));
vars->answerabsaves[answerind] = answerabsave[answerind];
@ -972,7 +970,7 @@ static inline int init_ocas_vars(int numthreads,int selector,long answerindmask,
//printf("mask.%lx init_ocas_vars selector.%d weekinds[0].%p\n",answerindmask,selector,vars->weekinds[0]);
return(retval);
}
void ocas_init(struct ocas_vars *vars,int32_t c,int32_t numfeatures,int32_t starti,int32_t endi)
{
struct ocas_CLbuffers *ptr; struct ocas_lhsbuffers *lhs;
@ -1061,7 +1059,7 @@ void ocas_init(struct ocas_vars *vars,int32_t c,int32_t numfeatures,int32_t star
vars->output_time = vars->sort_time = vars->w_time = vars->qp_solver_time = vars->ocas_time = vars->add_time = 0;
vars->startweekind = starti; vars->endweekind = endi;
}
int32_t ocas_gen(int32_t c,int32_t numfeatures,int32_t starti,int32_t endi)
{
int32_t i; struct ocas_vars *vars = calloc(1,sizeof(*vars));
@ -1072,4 +1070,3 @@ int32_t ocas_gen(int32_t c,int32_t numfeatures,int32_t starti,int32_t endi)
return(0);
}
#endif

17
iguana/dPoW.h

@ -175,10 +175,15 @@ char *_dex_getblockhash(struct supernet_info *myinfo,char *symbol,int32_t height
char *_dex_getbestblockhash(struct supernet_info *myinfo,char *symbol);
char *_dex_sendrawtransaction(struct supernet_info *myinfo,char *symbol,char *signedtx);
char *_dex_gettxout(struct supernet_info *myinfo,char *symbol,bits256 txid,int32_t vout);
char *_dex_gettxin(struct supernet_info *myinfo,char *symbol,bits256 txid,int32_t vout);
char *_dex_importaddress(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_validateaddress(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_listunspent(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_listunspent2(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_listspent(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_getbalance(struct supernet_info *myinfo,char *symbol,char *address);
char *_dex_listtransactions(struct supernet_info *myinfo,char *symbol,char *coinaddr,int32_t count,int32_t skip);
char *_dex_listtransactions2(struct supernet_info *myinfo,char *symbol,char *coinaddr,int32_t count,int32_t skip);
char *_dex_alladdresses(struct supernet_info *myinfo,char *symbol);
int32_t _dex_getheight(struct supernet_info *myinfo,char *symbol);
char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol);
@ -189,5 +194,17 @@ int32_t komodo_notaries(char *symbol,uint8_t pubkeys[64][33],int32_t height);
cJSON *dpow_checkaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *address);
void dex_channelsend(struct supernet_info *myinfo,bits256 srchash,bits256 desthash,uint32_t channel,uint32_t msgid,uint8_t *data,int32_t datalen);
void kmd_bitcoinscan();
cJSON *kmd_getbalance(struct iguana_info *coin,char *coinaddr);
struct iguana_info *iguana_coinfind(char *symbol);
cJSON *kmd_listtransactions(struct iguana_info *coin,char *coinaddr,int32_t count,int32_t skip);
cJSON *kmd_listunspent(struct iguana_info *coin,char *coinaddr);
cJSON *kmd_listspent(struct iguana_info *coin,char *coinaddr);
cJSON *kmd_gettxin(struct iguana_info *coin,bits256 txid,int32_t vout);
cJSON *dpow_listspent(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr);
cJSON *dpow_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr);
cJSON *dpow_gettxin(struct supernet_info *myinfo,struct iguana_info *coin,bits256 txid,int32_t vout);
#endif

2
iguana/dpow/dpow_fsm.c

@ -125,7 +125,7 @@ int32_t dpow_checkutxo(struct supernet_info *myinfo,struct dpow_info *dp,struct
int32_t haveutxo,completed,minutxo,n; bits256 signedtxid; cJSON *addresses; char *rawtx,*sendtx;
if ( strcmp("BTC",coin->symbol) == 0 )
{
minutxo = 9;
minutxo = 49;
n = 50;
}
else

102
iguana/dpow/dpow_network.c

@ -476,6 +476,14 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'x' )
{
if ( (retjson= dpow_gettxin(myinfo,coin,dexreq.hash,dexreq.shortarg)) != 0 )
{
dpow_randipbits(myinfo,coin,retjson);
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'H' )
{
hash2 = dpow_getblockhash(myinfo,coin,dexreq.intarg);
@ -491,6 +499,14 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'b' )
{
if ( (retjson= dpow_getbalance(myinfo,coin,(char *)&dexp->packet[datalen])) != 0 )
{
dpow_randipbits(myinfo,coin,retjson);
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'I' )
{
if ( (retjson= dpow_getinfo(myinfo,coin)) != 0 )
@ -527,6 +543,22 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'u' )
{
if ( (retjson= kmd_listunspent(coin,(char *)&dexp->packet[datalen])) != 0 )
{
dpow_randipbits(myinfo,coin,retjson);
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 's' )
{
if ( (retjson= dpow_listspent(myinfo,coin,(char *)&dexp->packet[datalen])) != 0 )
{
dpow_randipbits(myinfo,coin,retjson);
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'P' )
{
hash2 = dpow_getbestblockhash(myinfo,coin);
@ -550,6 +582,15 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == '2' )
{
//printf("call list.(%s %d %d)\n",(char *)&dexp->packet[datalen],dexreq.shortarg,dexreq.intarg);
if ( (retjson= kmd_listtransactions(coin,(char *)&dexp->packet[datalen],dexreq.shortarg,dexreq.intarg)) != 0 )
{
dpow_randipbits(myinfo,coin,retjson);
retstr = jprint(retjson,1);
}
}
else if ( dexreq.func == 'C' )
{
if ( (retjson= dpow_checkaddress(myinfo,coin,(char *)&dexp->packet[datalen])) != 0 )
@ -764,6 +805,18 @@ char *_dex_gettxout(struct supernet_info *myinfo,char *symbol,bits256 txid,int32
return(_dex_sendrequest(myinfo,&dexreq,3,"value"));
}
char *_dex_gettxin(struct supernet_info *myinfo,char *symbol,bits256 txid,int32_t vout)
{
struct dex_request dexreq;
//char str[65]; printf("gettxout(%s %s %d)\n",symbol,bits256_str(str,txid),vout);
memset(&dexreq,0,sizeof(dexreq));
safecopy(dexreq.name,symbol,sizeof(dexreq.name));
dexreq.hash = txid;
dexreq.shortarg = vout;
dexreq.func = 'x';
return(_dex_sendrequest(myinfo,&dexreq,3,"value"));
}
char *_dex_kvupdate(struct supernet_info *myinfo,char *symbol,char *key,char *value,int32_t flags)
{
struct dex_request dexreq; char keyvalue[IGUANA_MAXSCRIPTSIZE]; int32_t keylen,valuesize;
@ -913,12 +966,48 @@ char *_dex_validateaddress(struct supernet_info *myinfo,char *symbol,char *addre
return(_dex_sendrequeststr(myinfo,&dexreq,address,0,1,""));
}
char *_dex_listunspentarg(struct supernet_info *myinfo,char *symbol,char *address,uint8_t arg)
{
struct dex_request dexreq; char *retstr;
memset(&dexreq,0,sizeof(dexreq));
safecopy(dexreq.name,symbol,sizeof(dexreq.name));
dexreq.func = arg;
if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 )
{
//printf("UNSPENTS.(%s)\n",retstr);
}
return(_dex_arrayreturn(retstr));
}
char *_dex_listunspent(struct supernet_info *myinfo,char *symbol,char *address)
{
return(_dex_listunspentarg(myinfo,symbol,address,'U'));
}
char *_dex_listunspent2(struct supernet_info *myinfo,char *symbol,char *address)
{
return(_dex_listunspentarg(myinfo,symbol,address,'u'));
}
char *_dex_listspent(struct supernet_info *myinfo,char *symbol,char *address)
{
struct dex_request dexreq; char *retstr;
memset(&dexreq,0,sizeof(dexreq));
safecopy(dexreq.name,symbol,sizeof(dexreq.name));
dexreq.func = 'U';
dexreq.func = 's';
if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 )
{
//printf("UNSPENTS.(%s)\n",retstr);
}
return(_dex_arrayreturn(retstr));
}
char *_dex_getbalance(struct supernet_info *myinfo,char *symbol,char *address)
{
struct dex_request dexreq; char *retstr;
memset(&dexreq,0,sizeof(dexreq));
safecopy(dexreq.name,symbol,sizeof(dexreq.name));
dexreq.func = 'b';
if ( (retstr= _dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")) != 0 )
{
//printf("UNSPENTS.(%s)\n",retstr);
@ -937,6 +1026,17 @@ char *_dex_listtransactions(struct supernet_info *myinfo,char *symbol,char *addr
return(_dex_arrayreturn(_dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")));
}
char *_dex_listtransactions2(struct supernet_info *myinfo,char *symbol,char *address,int32_t count,int32_t skip)
{
struct dex_request dexreq;
memset(&dexreq,0,sizeof(dexreq));
safecopy(dexreq.name,symbol,sizeof(dexreq.name));
dexreq.intarg = skip;
dexreq.shortarg = count;
dexreq.func = '2';
return(_dex_arrayreturn(_dex_sendrequeststr(myinfo,&dexreq,address,0,1,"")));
}
int32_t dex_crc32find(struct supernet_info *myinfo,uint32_t crc32)
{
int32_t i,firstz = -1;

30
iguana/dpow/dpow_rpc.c

@ -405,6 +405,36 @@ cJSON *dpow_listunspent(struct supernet_info *myinfo,struct iguana_info *coin,ch
return(json);
}
cJSON *dpow_listspent(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr)
{
if ( myinfo->DEXEXPLORER != 0 )
return(kmd_listspent(coin,coinaddr));
else
{
return(0);
}
}
cJSON *dpow_getbalance(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr)
{
if ( myinfo->DEXEXPLORER != 0 )
return(kmd_getbalance(coin,coinaddr));
else
{
return(0);
}
}
cJSON *dpow_gettxin(struct supernet_info *myinfo,struct iguana_info *coin,bits256 txid,int32_t vout)
{
if ( myinfo->DEXEXPLORER != 0 )
return(kmd_gettxin(coin,txid,vout));
else
{
return(0);
}
}
cJSON *dpow_listtransactions(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,int32_t count,int32_t skip)
{
char buf[128],*retstr; cJSON *json = 0;

5
iguana/iguana777.c

@ -885,10 +885,13 @@ void iguana_coinloop(void *arg)
coins++;
coin = coins[0];
if ( (coin->notarychain= iguana_isnotarychain(coin->symbol)) >= 0 )
{
coin->VALIDATENODE = 0;
coin->DEXEXPLORER = myinfo->DEXEXPLORER;
}
//if ( coin->FULLNODE > 0 )
// coin->notarychain = -1;
printf("begin coinloop[%d] %s notarychain.%d\n",n,coin->symbol,coin->notarychain);
printf("begin coinloop[%d] %s notarychain.%d DEXEXPLORER.%d\n",n,coin->symbol,coin->notarychain,coin->DEXEXPLORER);
memset(zero.bytes,0,sizeof(zero));
while ( 1 )
{

2
iguana/iguana777.h

@ -137,7 +137,7 @@ struct supernet_info
uint8_t logs[256],exps[510];
struct message_info msgids[8192];
double *svmfeatures;
uint8_t notaries[64][33]; int32_t numnotaries;
uint8_t notaries[64][33]; int32_t numnotaries,DEXEXPLORER;
};
#include "../includes/iguana_funcs.h"

1
iguana/iguana_init.c

@ -77,6 +77,7 @@ void iguana_initcoin(struct iguana_info *coin,cJSON *argjson)
{
sprintf(dirname,"%s/%s",GLOBAL_TMPDIR,coin->symbol), OS_portable_path(dirname);
portable_mutex_init(&coin->RTmutex);
portable_mutex_init(&coin->kmdmutex);
portable_mutex_init(&coin->peers_mutex);
portable_mutex_init(&coin->blocks_mutex);
portable_mutex_init(&coin->special_mutex);

114
iguana/iguana_notary.c

@ -612,6 +612,16 @@ HASH_AND_STRING_AND_INT(dex,gettxout,txid,symbol,vout)
return(_dex_gettxout(myinfo,symbol,txid,vout));
}
TWO_STRINGS(dex,listunspent,symbol,address)
{
return(_dex_listunspent(myinfo,symbol,address));
}
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip)
{
return(_dex_listtransactions(myinfo,symbol,address,count,skip));
}
STRING_ARG(dex,getinfo,symbol)
{
return(_dex_getinfo(myinfo,symbol));
@ -657,16 +667,6 @@ TWO_STRINGS(dex,validateaddress,symbol,address)
return(_dex_validateaddress(myinfo,symbol,address));
}
TWO_STRINGS(dex,listunspent,symbol,address)
{
return(_dex_listunspent(myinfo,symbol,address));
}
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip)
{
return(_dex_listtransactions(myinfo,symbol,address,count,skip));
}
STRING_ARG(dex,getnotaries,symbol)
{
return(_dex_getnotaries(myinfo,symbol));
@ -698,6 +698,100 @@ THREE_STRINGS_AND_THREE_INTS(dex,kvupdate,symbol,key,value,flags,unused,unusedb)
} else return(clonestr("{\"error\":\"free updates only on KV chain\"}"));
}
#include "kmd_lookup.h"
TWO_STRINGS(dex,listunspent2,symbol,address)
{
cJSON *retjson;
if ( myinfo->DEXEXPLORER != 0 )
{
if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 )
{
if ( coin != 0 )
coin->DEXEXPLORER = myinfo->DEXEXPLORER * myinfo->IAMNOTARY * (iguana_isnotarychain(coin->symbol) >= 0);
if ( strcmp(coin->symbol,"BTC") == 0 || coin->DEXEXPLORER == 0 )
return(clonestr("[]"));
if ( (retjson= kmd_listunspent(coin,address)) != 0 )
return(jprint(retjson,1));
}
}
if ( symbol != 0 && address != 0 )
return(_dex_listunspent2(myinfo,symbol,address));
else return(clonestr("{\"error\":\"dex listunspent2 null symbol, address or coin\"}"));
}
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions2,symbol,address,count,skip)
{
cJSON *retjson;
if ( myinfo->DEXEXPLORER != 0 )
{
if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 )
{
if ( coin != 0 )
coin->DEXEXPLORER = myinfo->DEXEXPLORER * myinfo->IAMNOTARY * (iguana_isnotarychain(coin->symbol) >= 0);
if ( strcmp(coin->symbol,"BTC") == 0 || coin->DEXEXPLORER == 0 )
return(clonestr("[]"));
if ( (retjson= kmd_listtransactions(coin,address,count,skip)) != 0 )
return(jprint(retjson,1));
}
}
if ( symbol != 0 && address != 0 )
return(_dex_listtransactions2(myinfo,symbol,address,count,skip));
else return(clonestr("{\"error\":\"dex listunspent2 null symbol, address or coin\"}"));
}
HASH_AND_STRING_AND_INT(dex,gettxin,txid,symbol,vout)
{
if ( myinfo->DEXEXPLORER != 0 )
{
if ( symbol != 0 && (coin= iguana_coinfind(symbol)) != 0 && coin->DEXEXPLORER != 0 )
return(jprint(kmd_gettxin(coin,txid,vout),1));
if ( coin != 0 )
coin->DEXEXPLORER = myinfo->DEXEXPLORER * myinfo->IAMNOTARY * (iguana_isnotarychain(coin->symbol) >= 0);
}
if ( symbol != 0 )
return(_dex_gettxin(myinfo,symbol,txid,vout));
else return(clonestr("{\"error\":\"dex gettxin null symbolor coin\"}"));
}
TWO_STRINGS(dex,listspent,symbol,address)
{
if ( myinfo->DEXEXPLORER != 0 )
{
if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 && coin->DEXEXPLORER != 0 )
return(jprint(kmd_listspent(coin,address),1));
if ( coin != 0 )
coin->DEXEXPLORER = myinfo->DEXEXPLORER * myinfo->IAMNOTARY * (iguana_isnotarychain(coin->symbol) >= 0);
}
if ( symbol != 0 && address != 0 )
return(_dex_listspent(myinfo,symbol,address));
else return(clonestr("{\"error\":\"dex listspent null symbol, address or coin\"}"));
}
TWO_STRINGS(dex,getbalance,symbol,address)
{
if ( myinfo->DEXEXPLORER != 0 )
{
if ( symbol != 0 && address != 0 && (coin= iguana_coinfind(symbol)) != 0 && coin->DEXEXPLORER != 0 )
return(jprint(kmd_getbalance(coin,address),1));
if ( coin != 0 )
coin->DEXEXPLORER = myinfo->DEXEXPLORER * myinfo->IAMNOTARY * (iguana_isnotarychain(coin->symbol) >= 0);
}
if ( symbol != 0 && address != 0 )
return(_dex_getbalance(myinfo,symbol,address));
else return(clonestr("{\"error\":\"dex getbalance null symbol, address or coin\"}"));
}
STRING_ARG(dex,explorer,symbol)
{
if ( symbol != 0 && (coin= iguana_coinfind(symbol)) != 0 )
{
myinfo->DEXEXPLORER = 1;
coin->DEXEXPLORER = 1;
return(clonestr("{\"result\":\"success\"}"));
}
return(clonestr("{\"error\":\"coin not active\"}"));
}
#include "../includes/iguana_apiundefs.h"

699
iguana/kmd_lookup.h

@ -0,0 +1,699 @@
/******************************************************************************
* Copyright © 2014-2017 The SuperNET Developers. *
* *
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
* the top-level directory of this distribution for the individual copyright *
* holder information and the developer policies on copyright and licensing. *
* *
* Unless otherwise agreed in a custom licensing agreement, no part of the *
* SuperNET software, including this file may be copied, modified, propagated *
* or distributed except according to the terms contained in the LICENSE file *
* *
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#ifndef INCLUDE_KMDLOOKUP_H
#define INCLUDE_KMDLOOKUP_H
#define KMD_EXPLORER_LAG 3
struct kmd_voutinfo
{
bits256 spendtxid;
uint64_t amount;
uint16_t spendvini;
uint8_t type_rmd160[21], pad;
} PACKED;
struct kmd_transaction
{
bits256 txid; int32_t height,numvouts,numvins; uint32_t timestamp;
struct kmd_voutinfo vouts[];
} PACKED;
struct kmd_transactionhh
{
UT_hash_handle hh;
struct kmd_transaction *tx;
long fpos;
int32_t numvouts,numvins;
struct kmd_transactionhh *ptrs[];
};
struct kmd_addresshh
{
UT_hash_handle hh;
struct kmd_transactionhh *prev,*lastprev;
uint8_t type_rmd160[21], pad;
};
struct kmd_addresshh *_kmd_address(struct iguana_info *coin,uint8_t type_rmd160[21])
{
struct kmd_addresshh *addr;
portable_mutex_lock(&coin->kmdmutex);
HASH_FIND(hh,coin->kmd_addresses,type_rmd160,21,addr);
portable_mutex_unlock(&coin->kmdmutex);
if ( addr != 0 && 0 )
{
char coinaddr[64];
bitcoin_address(coinaddr,type_rmd160[0],&type_rmd160[1],20);
printf("%s found (%s) %02x\n",coin->symbol,coinaddr,type_rmd160[0]);
}
return(addr);
}
struct kmd_addresshh *_kmd_addressadd(struct iguana_info *coin,uint8_t type_rmd160[21])
{
struct kmd_addresshh *addr;
addr = calloc(1,sizeof(*addr));
memcpy(addr->type_rmd160,type_rmd160,21);
if ( 0 )
{
char coinaddr[64];
bitcoin_address(coinaddr,type_rmd160[0],&type_rmd160[1],20);
printf("%s NEW ADDRESS.(%s) %02x\n",coin->symbol,coinaddr,type_rmd160[0]);
}
portable_mutex_lock(&coin->kmdmutex);
HASH_ADD_KEYPTR(hh,coin->kmd_addresses,addr->type_rmd160,21,addr);
portable_mutex_unlock(&coin->kmdmutex);
return(addr);
}
struct kmd_addresshh *kmd_address(struct iguana_info *coin,char *coinaddr)
{
uint8_t type_rmd160[21];
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr);
return(_kmd_address(coin,type_rmd160));
}
struct kmd_transactionhh *kmd_transaction(struct iguana_info *coin,bits256 txid)
{
struct kmd_transactionhh *tx;
portable_mutex_lock(&coin->kmdmutex);
HASH_FIND(hh,coin->kmd_transactions,txid.bytes,sizeof(txid),tx);
portable_mutex_unlock(&coin->kmdmutex);
return(tx);
}
int32_t kmd_transactionvin(struct iguana_info *coin,bits256 spendtxid,int32_t vini,bits256 txid,int32_t vout)
{
struct kmd_transactionhh *ptr,*spendptr=0;
if ( bits256_nonz(txid) == 0 || vout < 0 )
return(0); // coinbase must be
if ( (ptr= kmd_transaction(coin,txid)) != 0 && vout < ptr->numvouts && (spendptr= kmd_transaction(coin,spendtxid)) != 0 )
{
ptr->ptrs[(vout<<1) + 1] = spendptr;
if ( bits256_cmp(ptr->tx->vouts[vout].spendtxid,spendtxid) != 0 || ptr->tx->vouts[vout].spendvini != vini )
{
if ( bits256_nonz(ptr->tx->vouts[vout].spendtxid) != 0 )
printf("ht.%d vout.%d overwriting nonz spend\n",ptr->tx->height,vout);
//uint8_t type_rmd160[21]; char str[65];
//bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],"RR5yAkzaxJeCVTwvpgCGsNcSPAZjeq3av4");
//if ( memcmp(type_rmd160,ptr->tx->vouts[vout].type_rmd160,21) == 0 )
// printf("RR5yAkzaxJeCVTwvpgCGsNcSPAZjeq3av4 %p vout.%d spend %.8f by %s/%d %p\n",ptr,vout,dstr(ptr->tx->vouts[vout].amount),bits256_str(str,spendtxid),vini,spendptr);
ptr->tx->vouts[vout].spendtxid = spendtxid;
ptr->tx->vouts[vout].spendvini = vini;
}
return(0);
}
char str[65]; printf("vin error %s vout.%d of %d vs ptr %p [%d] spent.%p\n",bits256_str(str,txid),vout,ptr->numvouts,ptr,ptr!=0?ptr->numvouts:-1,spendptr);
return(-1);
}
void kmd_transactionvout(struct iguana_info *coin,struct kmd_transactionhh *ptr,int32_t vout,uint64_t amount,uint8_t type_rmd160[21],bits256 spendtxid,int32_t spendvini)
{
struct kmd_addresshh *addr; struct kmd_transaction *tx = 0;
//printf("ht.%d VOUT %d %.8f\n",ptr->tx->height,vout,dstr(amount));
if ( vout < ptr->numvouts && (tx= ptr->tx) != 0 )
{
tx->vouts[vout].spendtxid = spendtxid;
tx->vouts[vout].spendvini = spendvini;
tx->vouts[vout].amount = amount;
memcpy(tx->vouts[vout].type_rmd160,type_rmd160,21);
if ( (addr= _kmd_address(coin,type_rmd160)) == 0 )
addr = _kmd_addressadd(coin,type_rmd160);
if ( addr != 0 )
{
if ( addr->prev != ptr )
{
ptr->ptrs[vout << 1] = addr->prev;
addr->lastprev = addr->prev;
addr->prev = ptr;
}
else
{
//printf("tricky case same address in different vouts, make sure backlink is right\n");
ptr->ptrs[vout<<1] = addr->lastprev;
}
} else printf("kmd_transactionvout unexpected null addr\n");
} else printf("vout.%d wont fit into numvouts.[%d] or null tx.%p\n",vout,ptr->numvouts,tx);
}
struct kmd_transactionhh *kmd_transactionadd(struct iguana_info *coin,struct kmd_transaction *tx,int32_t numvouts,int32_t numvins)
{
struct kmd_transactionhh *ptr; //char str[65];
if ( (ptr= kmd_transaction(coin,tx->txid)) == 0 )
{
ptr = calloc(1,sizeof(*ptr) + (sizeof(*ptr->ptrs)*numvouts*2));
ptr->numvouts = numvouts;
ptr->numvins = numvins;
ptr->tx = tx;
portable_mutex_lock(&coin->kmdmutex);
//char str[65]; printf("%s ht.%d u.%u NEW TXID.(%s) vouts.[%d]\n",coin->symbol,tx->height,tx->timestamp,bits256_str(str,tx->txid),numvouts);
HASH_ADD_KEYPTR(hh,coin->kmd_transactions,tx->txid.bytes,sizeof(tx->txid),ptr);
portable_mutex_unlock(&coin->kmdmutex);
} // else printf("warning adding already existing txid %s\n",bits256_str(str,tx->txid));
return(ptr);
}
struct kmd_transaction *kmd_transactionalloc(bits256 txid,int32_t height,uint32_t timestamp,int32_t numvouts,int32_t numvins)
{
struct kmd_transaction *tx;
tx = calloc(1,sizeof(*tx) + sizeof(struct kmd_voutinfo)*numvouts);
tx->numvouts = numvouts;
tx->numvins = numvins;
tx->txid = txid;
tx->height = height;
tx->timestamp = timestamp;
return(tx);
}
void kmd_flushfiles(struct iguana_info *coin)
{
if ( coin->kmd_txidfp != 0 )
fflush(coin->kmd_txidfp);
if ( coin->kmd_spendfp != 0 )
fflush(coin->kmd_spendfp);
}
FILE *kmd_txidinit(struct iguana_info *coin)
{
int32_t i; FILE *fp; char fname[1024]; struct kmd_transactionhh *ptr; struct kmd_transaction T,*tx; struct kmd_voutinfo V; long lastpos=0;
sprintf(fname,"%s/TRANSACTIONS/%s",GLOBAL_DBDIR,coin->symbol);
if ( (fp= fopen(fname,"rb+")) != 0 )
{
while ( fread(&T,1,sizeof(T),fp) == sizeof(T) )
{
if ( (tx= kmd_transactionalloc(T.txid,T.height,T.timestamp,T.numvouts,T.numvins)) != 0 )
{
//printf("INIT %s.[%d] vins.[%d] ht.%d %u\n",bits256_str(str,T.txid),T.numvouts,T.numvins,T.height,T.timestamp);
if ( (ptr= kmd_transactionadd(coin,tx,T.numvouts,T.numvins)) != 0 )
{
if ( ptr != kmd_transaction(coin,tx->txid) )
printf("ERROR: %p != %p for ht.%d\n",ptr,kmd_transaction(coin,tx->txid),tx->height);
ptr->fpos = lastpos;
ptr->numvins = T.numvins;
ptr->numvouts = T.numvouts;
for (i=0; i<T.numvouts; i++)
{
if ( fread(&V,1,sizeof(V),fp) == sizeof(V) )
{
kmd_transactionvout(coin,ptr,i,V.amount,V.type_rmd160,V.spendtxid,V.spendvini);
}
else
{
printf("error loading vout.%d ht.%d\n",i,T.height);
break;
}
}
if ( i == T.numvouts )
{
lastpos = ftell(fp);
if ( T.height > coin->kmd_height )
coin->kmd_height = T.height;
} else break;
}
} else break;
}
printf("finished txidinit fpos %ld vs lastpos %ld\n",ftell(fp),lastpos);
fseek(fp,lastpos,SEEK_SET);
} else fp = fopen(fname,"wb+");
return(fp);
}
FILE *kmd_spendinit(struct iguana_info *coin)
{
int32_t i,numvins,spentvout; FILE *fp; char fname[1024],str[65]; bits256 txid,spenttxid; struct kmd_transactionhh *ptr,*tmp; struct kmd_voutinfo *vptr; long lastpos=0;
sprintf(fname,"%s/TRANSACTIONS/%s.spends",GLOBAL_DBDIR,coin->symbol);
if ( (fp= fopen(fname,"rb+")) != 0 )
{
while ( fread(&txid,1,sizeof(txid),fp) == sizeof(txid) )
{
if ( fread(&numvins,1,sizeof(numvins),fp) == sizeof(numvins) )
{
for (i=0; i<numvins; i++)
{
if ( fread(&spenttxid,1,sizeof(spenttxid),fp) == sizeof(spenttxid) &&
fread(&spentvout,1,sizeof(spentvout),fp) == sizeof(spentvout) )
{
if ( kmd_transactionvin(coin,txid,i,spenttxid,spentvout) < 0 )
{
printf("error adding spend %s %d of %d\n",bits256_str(str,txid),i,numvins);
//break;
}
} else break;
}
if ( i == numvins )
lastpos = ftell(fp);
else break;
} else break;
}
printf("finished spendinit fpos %ld vs lastpos %ld\n",ftell(fp),lastpos);
fseek(fp,lastpos,SEEK_SET);
HASH_ITER(hh,coin->kmd_transactions,ptr,tmp)
{
//printf("scan for spends ht.%d\n",ptr->tx->height);
for (i=0; i<ptr->numvouts; i++)
{
vptr = &ptr->tx->vouts[i];
if ( vptr->spendvini >= 0 && bits256_nonz(vptr->spendtxid) != 0 )
{
if ( ptr->ptrs[(i<<1) + 1] != kmd_transaction(coin,vptr->spendtxid) )
{
printf("mismatch %s spend.%d %p %p\n",bits256_str(str,vptr->spendtxid),i,ptr->ptrs[(i<<1) + 1],kmd_transaction(coin,vptr->spendtxid));
}
}
}
}
} else fp = fopen(fname,"wb+");
return(fp);
}
cJSON *kmd_transactionjson(struct kmd_transactionhh *ptr,char *typestr)
{
int32_t i; char coinaddr[64]; cJSON *item,*array,*obj = cJSON_CreateObject();
array = cJSON_CreateArray();
jaddstr(obj,"type",typestr);
jaddbits256(obj,"txid",ptr->tx->txid);
jaddnum(obj,"height",ptr->tx->height);
jaddnum(obj,"timestamp",ptr->tx->timestamp);
for (i=0; i<ptr->numvouts; i++)
{
item = cJSON_CreateObject();
bitcoin_address(coinaddr,ptr->tx->vouts[i].type_rmd160[0],&ptr->tx->vouts[i].type_rmd160[1],20);
jaddnum(item,coinaddr,dstr(ptr->tx->vouts[i].amount));
jaddi(array,item);
}
jadd(obj,"vouts",array);
return(obj);
}
cJSON *kmd_unspentjson(struct kmd_transaction *tx,int32_t vout)
{
cJSON *item = cJSON_CreateObject();
jaddbits256(item,"txid",tx->txid);
jaddnum(item,"vout",vout);
jaddnum(item,"amount",dstr(tx->vouts[vout].amount));
return(item);
}
int32_t kmd_height(struct iguana_info *coin)
{
char params[64],*curlstr; cJSON *curljson; int32_t height = 0;
strcpy(params,"[]");
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getinfo",params)) != 0 )
{
if ( (curljson= cJSON_Parse(curlstr)) != 0 )
{
height = juint(curljson,"blocks");
//printf("kmd_height.%d (%s)\n",height,jprint(curljson,0));
free_json(curljson);
}
free(curlstr);
}
return(height);
}
cJSON *kmd_listtransactions(struct iguana_info *coin,char *coinaddr,int32_t count,int32_t skip)
{
struct kmd_addresshh *addr; struct kmd_transactionhh *ptr,*spent,*prev=0; uint8_t type_rmd160[21]; int32_t i,counter=0; cJSON *array = cJSON_CreateArray();
//if ( (height= kmd_height(coin)) > coin->kmd_height+KMD_EXPLORER_LAG )
// return(cJSON_Parse("[]"));
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr);
if ( (addr= _kmd_address(coin,type_rmd160)) != 0 && (ptr= addr->prev) != 0 && ptr->tx != 0 )
{
while ( ptr != 0 )
{
if ( counter >= skip && counter < count+skip )
jaddi(array,kmd_transactionjson(ptr,"received"));
if ( ++counter >= count+skip )
break;
for (i=0; i<ptr->numvouts; i++)
{
if ( memcmp(ptr->tx->vouts[i].type_rmd160,type_rmd160,21) == 0 && (spent= ptr->ptrs[(i<<1)+1]) != 0 )
{
if ( counter >= skip && counter < count+skip )
jaddi(array,kmd_transactionjson(spent,"sent"));
if ( ++counter >= count+skip )
break;
if ( ptr->ptrs[i << 1] != 0 )
prev = ptr->ptrs[i << 1];
}
}
if ( counter >= count+skip )
break;
ptr = prev;
}
}
return(array);
}
cJSON *kmd_gettxin(struct iguana_info *coin,bits256 txid,int32_t vout)
{
struct kmd_transactionhh *ptr,*spendptr; struct kmd_transaction *tx; cJSON *retjson;
if ( (ptr= kmd_transaction(coin,txid)) != 0 && (tx= ptr->tx) != 0 )
{
if ( vout >= ptr->numvouts )
return(cJSON_Parse("{\"error\":\"vout too big\"}"));
if ( (spendptr= ptr->ptrs[(vout << 1) + 1]) != 0 )
{
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");
jaddstr(retjson,"status","spent");
jaddnum(retjson,"height",tx->height);
jaddnum(retjson,"timestamp",tx->timestamp);
jaddbits256(retjson,"txid",txid);
jaddnum(retjson,"vout",vout);
jaddnum(retjson,"value",dstr(tx->vouts[vout].amount));
jaddbits256(retjson,"spendtxid",tx->vouts[vout].spendtxid);
jaddnum(retjson,"vin",tx->vouts[vout].spendvini);
} else return(cJSON_Parse("{\"result\":\"success\",\"status\":\"unspent\"}"));
}
return(cJSON_Parse("{\"error\":\"txid not found\"}"));
}
cJSON *kmd_listaddress(struct iguana_info *coin,char *coinaddr,int32_t mode)
{
struct kmd_addresshh *addr; struct kmd_transactionhh *ptr,*spent,*prev=0; uint8_t type_rmd160[21]; int32_t i; cJSON *array = cJSON_CreateArray();
/*if ( time(NULL) > coin->kmd_lasttime+30 )
{
coin->kmd_lasttime = (uint32_t)time(NULL);
if ( (height= kmd_height(coin)) > coin->kmd_height+KMD_EXPLORER_LAG*2 )
{
printf("height.%d > kmd_height.%d\n",height,coin->kmd_height);
return(cJSON_Parse("[]"));
}
}*/
if ( strcmp("1111111111111111111114oLvT2",coinaddr) == 0 ) // null rmd160 from coinbase
return(cJSON_Parse("[]"));
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],coinaddr);
if ( (addr= _kmd_address(coin,type_rmd160)) != 0 && (ptr= addr->prev) != 0 && ptr->tx != 0 )
{
while ( ptr != 0 )
{
prev = 0;
for (i=0; i<ptr->numvouts; i++)
{
if ( memcmp(ptr->tx->vouts[i].type_rmd160,type_rmd160,21) == 0 )
{
spent = ptr->ptrs[(i<<1) + 1];
//if ( strcmp("RFpYbieWuKm2ZsTaKeWkrrEdeSkVzhqX8x",coinaddr) == 0 )
// printf("mode.%d [%d] %s ht.%d amount %.8f spent.%p\n",mode,coin->kmd_height,coinaddr,ptr->tx->height,dstr(ptr->tx->vouts[i].amount),spent);
if ( (mode == 0 && spent == 0) || (mode == 1 && spent != 0) || mode == 2 )
jaddi(array,kmd_unspentjson(ptr->tx,i));
if ( ptr->ptrs[i<<1] != 0 )
{
if ( prev == 0 )
prev = ptr->ptrs[i<<1];
else if ( prev != ptr->ptrs[i<<1] )
printf("%s ht.%d prev.%p != %p\n",coinaddr,ptr->tx->height,prev,ptr->ptrs[i<<1]);
}
}
}
ptr = prev;
}
} else printf("no valid entry for (%s)\n",coinaddr);
return(array);
}
cJSON *kmd_listunspent(struct iguana_info *coin,char *coinaddr)
{
return(kmd_listaddress(coin,coinaddr,0));
}
cJSON *kmd_listspent(struct iguana_info *coin,char *coinaddr)
{
return(kmd_listaddress(coin,coinaddr,1));
}
int64_t _kmd_getbalance(struct iguana_info *coin,char *coinaddr,uint64_t *receivedp,uint64_t *sentp)
{
int32_t iter,i,n; cJSON *array,*item; uint64_t value;
for (iter=1; iter<=2; iter++)
{
if ( (array= kmd_listaddress(coin,coinaddr,iter)) != 0 )
{
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
for (i=0; i<n; i++)
{
item = jitem(array,i);
if ( (value= jdouble(item,"amount")*SATOSHIDEN) != 0 || (value= jdouble(item,"value")*SATOSHIDEN) != 0 )
{
if ( iter == 2 )
*receivedp += value;
else *sentp += value;
}
}
}
free_json(array);
}
}
return(*receivedp - *sentp);
}
cJSON *kmd_getbalance(struct iguana_info *coin,char *coinaddr)
{
cJSON *retjson; double netbalance=0.,fbalance; uint64_t s,r,sent=0,received=0; int64_t balance=0; struct kmd_addresshh *addr,*tmp; char address[64]; int32_t height = coin->kmd_height+1;
retjson = cJSON_CreateObject();
fbalance = 0.;
if ( strcmp(coinaddr,"*") == 0 )
{
HASH_ITER(hh,coin->kmd_addresses,addr,tmp)
{
bitcoin_address(address,addr->type_rmd160[0],&addr->type_rmd160[1],20);
s = r = 0;
balance += _kmd_getbalance(coin,address,&r,&s);
netbalance += dstr(r);
netbalance -= dstr(s);
if ( (r - s) > 100000*SATOSHIDEN )
printf("{\"address\":\"%s\",\"received\":%.8f,\"sent\":%.8f,\"balance\":%.8f,\"supply\":%.8f,\"supplyf\":%.8f}\n",address,dstr(r),dstr(s),dstr(r)-dstr(s),dstr(balance),netbalance);
received += r;
sent += s;
}
if ( strcmp("KMD",coin->symbol) == 0 )
jaddnum(retjson,"interestpaid",dstr(balance) - 100000000 - (height*3));
}
else
{
balance = _kmd_getbalance(coin,coinaddr,&received,&sent);
netbalance = dstr(balance);
}
jaddstr(retjson,"result","success");
jaddnum(retjson,"received",dstr(received));
jaddnum(retjson,"sent",dstr(sent));
//if ( fabs(netbalance*SATOSHIDEN - balance) > 1 )
jaddnum(retjson,"balancef",netbalance+1./(SATOSHIDEN*2)-SMALLVAL);
//else
jaddnum(retjson,"balance",dstr(balance));
jaddnum(retjson,"height",height);
if ( strcmp("KMD",coin->symbol) == 0 )
jaddnum(retjson,"mined",height*3);
return(retjson);
}
char *kmd_bitcoinblockhashstr(char *coinstr,char *serverport,char *userpass,int32_t height)
{
char numstr[128],*blockhashstr=0; bits256 hash2; struct iguana_info *coin;
sprintf(numstr,"%d",height);
if ( (blockhashstr= bitcoind_passthru(coinstr,serverport,userpass,"getblockhash",numstr)) == 0 )
return(0);
hash2 = bits256_conv(blockhashstr);
if ( blockhashstr == 0 || blockhashstr[0] == 0 || bits256_nonz(hash2) == 0 )
{
printf("couldnt get blockhash for %u, probably curl is disabled\n",height);
if ( blockhashstr != 0 )
free(blockhashstr);
if ( height == 0 )
{
if ( (coin= iguana_coinfind(coinstr)) != 0 )
{
bits256_str(numstr,*(bits256 *)coin->chain->genesis_hashdata);
return(clonestr(numstr));
}
}
return(0);
}
return(blockhashstr);
}
cJSON *kmd_blockjson(int32_t *heightp,char *coinstr,char *serverport,char *userpass,char *blockhashstr,int32_t height)
{
cJSON *json = 0; int32_t flag = 0; char buf[1024],*blocktxt = 0;
if ( blockhashstr == 0 )
blockhashstr = kmd_bitcoinblockhashstr(coinstr,serverport,userpass,height), flag = 1;
if ( blockhashstr != 0 )
{
sprintf(buf,"\"%s\"",blockhashstr);
blocktxt = bitcoind_passthru(coinstr,serverport,userpass,"getblock",buf);
//printf("get_blockjson.(%d %s) %s\n",height,blockhashstr,blocktxt);
if ( blocktxt != 0 && blocktxt[0] != 0 && (json= cJSON_Parse(blocktxt)) != 0 && heightp != 0 )
if ( (*heightp= juint(json,"height")) != height )
*heightp = -1;
if ( flag != 0 && blockhashstr != 0 )
free(blockhashstr);
if ( blocktxt != 0 )
free(blocktxt);
}
return(json);
}
int32_t _kmd_bitcoinscan(struct iguana_info *coin)
{
int32_t h,num=0,loadheight,i,n,j,iter,numtxids,numvins,numvouts,flag=0,height=-1; cJSON *txjson,*vouts,*vins,*blockjson,*txids,*vout,*vin,*sobj,*addresses; bits256 zero,txid; char *curlstr,params[128],str[65]; struct kmd_transactionhh *ptr; struct kmd_transaction *tx; uint8_t type_rmd160[21];
if ( coin->kmd_didinit == 0 )
{
if ( (coin->kmd_txidfp= kmd_txidinit(coin)) == 0 )
printf("error initializing %s.kmd txid\n",coin->symbol);
else if ( (coin->kmd_spendfp= kmd_spendinit(coin)) == 0 )
printf("error initializing %s.kmd spend\n",coin->symbol);
coin->kmd_didinit = 1;
}
height = kmd_height(coin);
loadheight = coin->kmd_height+1;
while ( loadheight < height-KMD_EXPLORER_LAG )
{
flag = 0;
if ( (loadheight % 10000) == 0 )
printf("loading ht.%d\n",loadheight);//,jprint(kmd_getbalance(coin,"*"),1));
if ( (blockjson= kmd_blockjson(&h,coin->symbol,coin->chain->serverport,coin->chain->userpass,0,loadheight)) != 0 )
{
if ( (txids= jarray(&numtxids,blockjson,"tx")) != 0 )
{
for (iter=0; iter<2; iter++)
for (i=0; i<numtxids; i++)
{
memset(&zero,0,sizeof(zero));
txid = jbits256(jitem(txids,i),0);
if ( iter == 0 && kmd_transaction(coin,txid) != 0 )
{
//printf("already have txid.%s\n",bits256_str(str,txid));
continue;
}
sprintf(params,"[\"%s\", 1]",bits256_str(str,txid));
if ( (curlstr= bitcoind_passthru(coin->symbol,coin->chain->serverport,coin->chain->userpass,"getrawtransaction",params)) != 0 )
{
if ( (txjson= cJSON_Parse(curlstr)) != 0 )
{
if ( bits256_cmp(txid,jbits256(txjson,"txid")) != 0 )
{
printf("txid mismatch error ht.%d i.%d\n",loadheight,i);
continue;
}
vouts = jarray(&numvouts,txjson,"vout");
vins = jarray(&numvins,txjson,"vin");
tx = 0;
ptr = 0;
if ( iter == 0 )
{
if ( (tx= kmd_transactionalloc(txid,loadheight,jint(txjson,"blocktime"),numvouts,numvins)) != 0 )
ptr = kmd_transactionadd(coin,tx,numvouts,numvins);
else printf("error init tx ptr.%p tx.%p\n",ptr,tx);
}
else
{
if ( (ptr= kmd_transaction(coin,txid)) != 0 )
tx = ptr->tx;
}
if ( ptr != 0 && tx != 0 )
{
if ( iter == 0 )
{
sobj = addresses = 0;
for (j=0; j<numvouts; j++)
{
vout = jitem(vouts,j);
if ( (sobj= jobj(vout,"scriptPubKey")) != 0 && (addresses= jarray(&n,sobj,"addresses")) != 0 )
{
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],jstri(addresses,0));
kmd_transactionvout(coin,ptr,j,jdouble(vout,"value")*SATOSHIDEN,type_rmd160,zero,-1);
} // else printf("missing sobj.%p or addresses.%p (%s)\n",sobj,addresses,jprint(vout,0)); //likely OP_RETURN
sobj = addresses = 0;
}
if ( coin->kmd_txidfp != 0 )
{
ptr->fpos = ftell(coin->kmd_txidfp);
fwrite(tx,1,sizeof(*tx) + tx->numvouts*sizeof(*tx->vouts),coin->kmd_txidfp);
}
}
else
{
if ( coin->kmd_spendfp != 0 )
{
fwrite(&txid,1,sizeof(txid),coin->kmd_spendfp);
fwrite(&numvins,1,sizeof(numvins),coin->kmd_spendfp);
}
for (j=0; j<numvins; j++)
{
bits256 spenttxid; int32_t spentvout;
vin = jitem(vins,j);
spenttxid = jbits256(vin,"txid");
spentvout = jint(vin,"vout");
//if ( bits256_nonz(spenttxid) == 0 || spentvout < 0 )
// printf("null spenttxid ht.%d j.%d spentvout.%d\n",loadheight,j,spentvout);
if ( kmd_transactionvin(coin,txid,j,spenttxid,spentvout) < 0 )
{
printf("error i.%d of numvins.%d (%s)\n",j,numvins,jprint(vin,0));
flag++;
}
if ( coin->kmd_spendfp != 0 )
{
fwrite(&spenttxid,1,sizeof(spenttxid),coin->kmd_spendfp);
fwrite(&spentvout,1,sizeof(spentvout),coin->kmd_spendfp);
}
}
}
} else printf("incomplete at ht.%d i.%d %p %p\n",loadheight,i,ptr,tx);
free_json(txjson);
} else printf("parseerror.(%s)\n",curlstr);
free(curlstr);
}
}
num++;
kmd_flushfiles(coin);
}
free_json(blockjson);
}
if ( flag != 0 || num > 5000 )
break;
coin->kmd_height = loadheight++;
}
return(num);
}
void kmd_bitcoinscan()
{
char *retstr; cJSON *array; int32_t i,n; struct iguana_info *coin; // scan allcoins also
if ( (retstr= dpow_notarychains(0,0,0,0)) != 0 )
{
if ( (array= cJSON_Parse(retstr)) != 0 )
{
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
for (i=0; i<n; i++)
{
if ( (coin= iguana_coinfind(jstri(array,i))) != 0 && strcmp(coin->symbol,"BTC") != 0 )
{
if ( strcmp("KMD",coin->symbol) == 0 )
_kmd_bitcoinscan(coin);
}
}
}
free_json(array);
}
free(retstr);
}
}
#endif

2
iguana/m_unix

@ -9,4 +9,4 @@ cd secp256k1; ./m_unix; cd ..
cd ../crypto777; ./m_unix; cd ../iguana
gcc -g -fno-aggressive-loop-optimizations -Wno-deprecated -c *.c ../basilisk/basilisk.c ../gecko/gecko.c ../datachain/datachain.c
gcc -g -fno-aggressive-loop-optimizations -Wno-deprecated -c main.c iguana777.c iguana_bundles.c ../basilisk/basilisk.c
gcc -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lpthread -lm
gcc -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lpthread -lm -lnanomsg

8
iguana/main.c

@ -670,6 +670,7 @@ void iguana_ensuredirs()
sprintf(dirname,"%s",GLOBAL_GENESISDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s",GLOBAL_CONFSDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s",GLOBAL_DBDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s/TRANSACTIONS",GLOBAL_DBDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s/purgeable",GLOBAL_DBDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s",GLOBAL_TMPDIR), OS_ensure_directory(dirname);
sprintf(dirname,"%s",GLOBAL_VALIDATEDIR), OS_ensure_directory(dirname);
@ -1575,7 +1576,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid)
if ( (n= cJSON_GetArraySize(array)) > 0 )
{
totalKMD = totalREVS = 0;
for (iter=0; iter<1; iter++)
for (iter=3; iter<4; iter++)
for (i=0; i<n; i++)
{
item = jitem(array,i);
@ -1611,7 +1612,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid)
printf("# %s KMD %.8f\n",coinaddr,dstr(kmdamount));
if ( (iter & 1) == 0 )
{
if ( 0 )
if ( 1 )
{
printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\" # %.8f\n",coinaddr,dstr(kmdamount));
printf("sleep 3\n");
@ -1675,7 +1676,7 @@ void iguana_main(void *arg)
else printf("ENDIAN ERROR\n");
mycalloc(0,0,0);
#ifdef __APPLE__
char *batchstr,*batchstr2; cJSON *batchjson; long batchsize; char fname[512],fname2[512]; int32_t batchid = 8;
char *batchstr,*batchstr2; cJSON *batchjson; long batchsize; char fname[512],fname2[512]; int32_t batchid = 9;
sprintf(fname,"REVS.raw"), sprintf(fname2,"REVS.rawtxids");
if ( 0 && (batchstr= OS_filestr(&batchsize,fname)) != 0 && (batchstr2= OS_filestr(&batchsize,fname2)) != 0 )
{
@ -1709,6 +1710,7 @@ void iguana_main(void *arg)
{
myinfo->rpcport = IGUANA_NOTARYPORT;
myinfo->IAMNOTARY = 1;
myinfo->DEXEXPLORER = 1;
}
}
#ifdef IGUANA_OSTESTS

188
iguana/tests/KMD.batch7.listunspent

@ -1,188 +0,0 @@
# RRcW51evLjdXhEne82mejRwTf8RAMvPxbf KMD 9682.18417850
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRcW51evLjdXhEne82mejRwTf8RAMvPxbf\",\"symbol\":\"KMD\"}"
echo "9682.18417850 <- expected amount RRcW51evLjdXhEne82mejRwTf8RAMvPxbf"
# RRtJZXkyye8CdgkiqqU2vDBzVL8br8v7qi KMD 19824.65353390, REVS 393.51044761
# RRtJZXkyye8CdgkiqqU2vDBzVL8br8v7qi KMD 19824.65353390
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRtJZXkyye8CdgkiqqU2vDBzVL8br8v7qi\",\"symbol\":\"KMD\"}"
echo "19824.65353390 <- expected amount RRtJZXkyye8CdgkiqqU2vDBzVL8br8v7qi"
# RRu4rm9zCpK41rSMn4NPtgrmcmHXBStQda KMD 5932.50248029
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRu4rm9zCpK41rSMn4NPtgrmcmHXBStQda\",\"symbol\":\"KMD\"}"
echo "5932.50248029 <- expected amount RRu4rm9zCpK41rSMn4NPtgrmcmHXBStQda"
# RRHcvhUfvmTFvyju9HxYUMG7ak2rAsZUG2 KMD 3202.01278205
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRHcvhUfvmTFvyju9HxYUMG7ak2rAsZUG2\",\"symbol\":\"KMD\"}"
echo "3202.01278205 <- expected amount RRHcvhUfvmTFvyju9HxYUMG7ak2rAsZUG2"
# RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3 KMD 2.29796059
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3\",\"symbol\":\"KMD\"}"
echo "2.29796059 <- expected amount RE1NYFqFG2vmhhHVY7QFC7sTp7zBxvSSP3"
# RWdo833bYVhMUHRdr8hMs7HHVcG2UNPwcZ KMD 11827.69657925
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWdo833bYVhMUHRdr8hMs7HHVcG2UNPwcZ\",\"symbol\":\"KMD\"}"
echo "11827.69657925 <- expected amount RWdo833bYVhMUHRdr8hMs7HHVcG2UNPwcZ"
# RJ9qXMATAvg1B5B5KGtiNS8cVv37JNpw8u KMD 9757.57240097
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJ9qXMATAvg1B5B5KGtiNS8cVv37JNpw8u\",\"symbol\":\"KMD\"}"
echo "9757.57240097 <- expected amount RJ9qXMATAvg1B5B5KGtiNS8cVv37JNpw8u"
# RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX KMD 495.97007681
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX\",\"symbol\":\"KMD\"}"
echo "495.97007681 <- expected amount RAMvDwi58oyArqfGseWZsYbR2BN3L7ghVX"
# RFsV4VaRdzLLFHotqsxZbim2ARwP8VHxJH KMD 138721.51640953, REVS 2656.00000000
# RFsV4VaRdzLLFHotqsxZbim2ARwP8VHxJH KMD 138721.51640953
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFsV4VaRdzLLFHotqsxZbim2ARwP8VHxJH\",\"symbol\":\"KMD\"}"
echo "138721.51640953 <- expected amount RFsV4VaRdzLLFHotqsxZbim2ARwP8VHxJH"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}"
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RV6bZE1shV9HufX9hztv7NdwwZXtPNGnmc KMD 1174.11345835
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RV6bZE1shV9HufX9hztv7NdwwZXtPNGnmc\",\"symbol\":\"KMD\"}"
echo "1174.11345835 <- expected amount RV6bZE1shV9HufX9hztv7NdwwZXtPNGnmc"
# RY5xeuFcrPgBQTtmsrNyo8Ha85z8CsQsQA KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RY5xeuFcrPgBQTtmsrNyo8Ha85z8CsQsQA\",\"symbol\":\"KMD\"}"
echo "9683.15249375 <- expected amount RY5xeuFcrPgBQTtmsrNyo8Ha85z8CsQsQA"
# RF11xHFssjxqa4UhUtZmReeb2w8ikmzkzL KMD 47.52053869, REVS 0.94300273
# RF11xHFssjxqa4UhUtZmReeb2w8ikmzkzL KMD 47.52053869
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RF11xHFssjxqa4UhUtZmReeb2w8ikmzkzL\",\"symbol\":\"KMD\"}"
echo "47.52053869 <- expected amount RF11xHFssjxqa4UhUtZmReeb2w8ikmzkzL"
# RWEq3Sf4H93Agwxf1ARD1MaPNCfBj54Zfx KMD 845.90749755
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWEq3Sf4H93Agwxf1ARD1MaPNCfBj54Zfx\",\"symbol\":\"KMD\"}"
echo "845.90749755 <- expected amount RWEq3Sf4H93Agwxf1ARD1MaPNCfBj54Zfx"
# RFuBgn2XPbePzKwWeiXYGdsACJutKkcH3x KMD 1660.54445484
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFuBgn2XPbePzKwWeiXYGdsACJutKkcH3x\",\"symbol\":\"KMD\"}"
echo "1660.54445484 <- expected amount RFuBgn2XPbePzKwWeiXYGdsACJutKkcH3x"
# RAo9Anrzy7Whzaxmp3tF5ZFTe77DPJUerN KMD 55313.07943406
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAo9Anrzy7Whzaxmp3tF5ZFTe77DPJUerN\",\"symbol\":\"KMD\"}"
echo "55313.07943406 <- expected amount RAo9Anrzy7Whzaxmp3tF5ZFTe77DPJUerN"
# RPEVJbazc37eXGGJhdZoN7Bo2B71kS1cBc KMD 30986.08798000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPEVJbazc37eXGGJhdZoN7Bo2B71kS1cBc\",\"symbol\":\"KMD\"}"
echo "30986.08798000 <- expected amount RPEVJbazc37eXGGJhdZoN7Bo2B71kS1cBc"
# RCNwFTJFxjxEVqsbr81Ug41E3K8fCjktwj KMD 34809.11928944
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCNwFTJFxjxEVqsbr81Ug41E3K8fCjktwj\",\"symbol\":\"KMD\"}"
echo "34809.11928944 <- expected amount RCNwFTJFxjxEVqsbr81Ug41E3K8fCjktwj"
# RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni KMD 4331.80770687
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni\",\"symbol\":\"KMD\"}"
echo "4331.80770687 <- expected amount RKuwq4oi4mqQ2V4r54mPEthn3TBrEwu2Ni"
# RKXi56k97RZcs6CW2chTL286HSjgrEtAsN KMD 880.19856168
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKXi56k97RZcs6CW2chTL286HSjgrEtAsN\",\"symbol\":\"KMD\"}"
echo "880.19856168 <- expected amount RKXi56k97RZcs6CW2chTL286HSjgrEtAsN"
# RKNkMHyMWcK84T6JJ4MRYgSUuKZqPPfGYx KMD 967.34693412
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKNkMHyMWcK84T6JJ4MRYgSUuKZqPPfGYx\",\"symbol\":\"KMD\"}"
echo "967.34693412 <- expected amount RKNkMHyMWcK84T6JJ4MRYgSUuKZqPPfGYx"
# RBn7LuP4xLM3Yq881BSNQ1gXCjDU8at4fr KMD 1192.08225695
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RBn7LuP4xLM3Yq881BSNQ1gXCjDU8at4fr\",\"symbol\":\"KMD\"}"
echo "1192.08225695 <- expected amount RBn7LuP4xLM3Yq881BSNQ1gXCjDU8at4fr"
# RW2xS8dpxjudqBX1hqxShP7FWn8EHYH4Rb KMD 405.34611747
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RW2xS8dpxjudqBX1hqxShP7FWn8EHYH4Rb\",\"symbol\":\"KMD\"}"
echo "405.34611747 <- expected amount RW2xS8dpxjudqBX1hqxShP7FWn8EHYH4Rb"
# RUqYxcjB5Hy6eqK1YDimjfXfhfp5TSyCF4 KMD 6712.04424766
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUqYxcjB5Hy6eqK1YDimjfXfhfp5TSyCF4\",\"symbol\":\"KMD\"}"
echo "6712.04424766 <- expected amount RUqYxcjB5Hy6eqK1YDimjfXfhfp5TSyCF4"
# RNvB5SiEEmGQrwFfyYXuDfeSWPDj35ypqA KMD 6087.83670543
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNvB5SiEEmGQrwFfyYXuDfeSWPDj35ypqA\",\"symbol\":\"KMD\"}"
echo "6087.83670543 <- expected amount RNvB5SiEEmGQrwFfyYXuDfeSWPDj35ypqA"
# RStGPxQ5amuNV4f7g8A1FhDj74qGeAXRgC KMD 11792.89870264
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RStGPxQ5amuNV4f7g8A1FhDj74qGeAXRgC\",\"symbol\":\"KMD\"}"
echo "11792.89870264 <- expected amount RStGPxQ5amuNV4f7g8A1FhDj74qGeAXRgC"
# RXiwnYTrCgxrxa5vrCuG8sUqKstu3Yn5on KMD 22265.01478541
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXiwnYTrCgxrxa5vrCuG8sUqKstu3Yn5on\",\"symbol\":\"KMD\"}"
echo "22265.01478541 <- expected amount RXiwnYTrCgxrxa5vrCuG8sUqKstu3Yn5on"
# RDPhtfYMEAor4kaDfZYuDnt1LC66Qf6jMH KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RDPhtfYMEAor4kaDfZYuDnt1LC66Qf6jMH\",\"symbol\":\"KMD\"}"
echo "9295.82639400 <- expected amount RDPhtfYMEAor4kaDfZYuDnt1LC66Qf6jMH"
# RRZc1FEgEFenoLDWG7XJRiks6Xf3ZRoQc2 KMD 92958.26394000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RRZc1FEgEFenoLDWG7XJRiks6Xf3ZRoQc2\",\"symbol\":\"KMD\"}"
echo "92958.26394000 <- expected amount RRZc1FEgEFenoLDWG7XJRiks6Xf3ZRoQc2"
# RNQsZLnKUb7eNdrpkynw3rA7bFPQPXPBFA KMD 25176.19648375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RNQsZLnKUb7eNdrpkynw3rA7bFPQPXPBFA\",\"symbol\":\"KMD\"}"
echo "25176.19648375 <- expected amount RNQsZLnKUb7eNdrpkynw3rA7bFPQPXPBFA"
# RQYqroKgVSAdzEEnCLwaP2qffH5ApmVPM2 KMD 3457.58494193
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQYqroKgVSAdzEEnCLwaP2qffH5ApmVPM2\",\"symbol\":\"KMD\"}"
echo "3457.58494193 <- expected amount RQYqroKgVSAdzEEnCLwaP2qffH5ApmVPM2"
# RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz KMD 30.59737295
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz\",\"symbol\":\"KMD\"}"
echo "30.59737295 <- expected amount RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz"
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 1506.60352500
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut\",\"symbol\":\"KMD\"}"
echo "1506.60352500 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut"
# RMpfU1RsWJK712wkiUNS9qyteZuEGGxWFy KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RMpfU1RsWJK712wkiUNS9qyteZuEGGxWFy\",\"symbol\":\"KMD\"}"
echo "9683.15249375 <- expected amount RMpfU1RsWJK712wkiUNS9qyteZuEGGxWFy"
# RD8imo1AHUvE1EuTL2EXQGoCMEWAfXgFEP KMD 3725.18622956
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RD8imo1AHUvE1EuTL2EXQGoCMEWAfXgFEP\",\"symbol\":\"KMD\"}"
echo "3725.18622956 <- expected amount RD8imo1AHUvE1EuTL2EXQGoCMEWAfXgFEP"
# RVosWpakrP2Cd5JcQjdhjFn9WnzvTqS9H7 KMD 1486.32571743
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RVosWpakrP2Cd5JcQjdhjFn9WnzvTqS9H7\",\"symbol\":\"KMD\"}"
echo "1486.32571743 <- expected amount RVosWpakrP2Cd5JcQjdhjFn9WnzvTqS9H7"
# RKmvo8crdpftFSPtJ8332KN82r1vZJaBKX KMD 7435.09663624, REVS 70.73874773
# RKmvo8crdpftFSPtJ8332KN82r1vZJaBKX KMD 7435.09663624
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKmvo8crdpftFSPtJ8332KN82r1vZJaBKX\",\"symbol\":\"KMD\"}"
echo "7435.09663624 <- expected amount RKmvo8crdpftFSPtJ8332KN82r1vZJaBKX"
# RMtNL8MfRZd4eQ99JF6fgRASVb8S2p7RWc KMD 9034.38127666
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RMtNL8MfRZd4eQ99JF6fgRASVb8S2p7RWc\",\"symbol\":\"KMD\"}"
echo "9034.38127666 <- expected amount RMtNL8MfRZd4eQ99JF6fgRASVb8S2p7RWc"
# RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX KMD 258541.07773074
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX\",\"symbol\":\"KMD\"}"
echo "258541.07773074 <- expected amount RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX"
# REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk KMD 7315.56699076
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk\",\"symbol\":\"KMD\"}"
echo "7315.56699076 <- expected amount REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk"
# RAPJuPCGMoPwfeHuckiea21LMek8BkH8Zr KMD 6679.18894509
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAPJuPCGMoPwfeHuckiea21LMek8BkH8Zr\",\"symbol\":\"KMD\"}"
echo "6679.18894509 <- expected amount RAPJuPCGMoPwfeHuckiea21LMek8BkH8Zr"
# RWKUXBUhn1NhD1w6DvRyxVokD1urauKQXm KMD 157.99530650
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWKUXBUhn1NhD1w6DvRyxVokD1urauKQXm\",\"symbol\":\"KMD\"}"
echo "157.99530650 <- expected amount RWKUXBUhn1NhD1w6DvRyxVokD1urauKQXm"
# RVvTxd7K5A6B5GugraTMd2peLzRgKZFMbu KMD 661.93286780
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RVvTxd7K5A6B5GugraTMd2peLzRgKZFMbu\",\"symbol\":\"KMD\"}"
echo "661.93286780 <- expected amount RVvTxd7K5A6B5GugraTMd2peLzRgKZFMbu"
# RGEawTGXLwwV4QdHGrmmTDxZrXgyUxQHRa KMD 5022.01175000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RGEawTGXLwwV4QdHGrmmTDxZrXgyUxQHRa\",\"symbol\":\"KMD\"}"
echo "5022.01175000 <- expected amount RGEawTGXLwwV4QdHGrmmTDxZrXgyUxQHRa"
# RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47 KMD 5206.02159816
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47\",\"symbol\":\"KMD\"}"
echo "5206.02159816 <- expected amount RHy56MTg74v8AY1Eo2RgbohbMbdHjUDN47"
# RCPys8hvEfFSDkMZL7GtYA8a5GSwih67Q1 KMD 10312.37298338
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCPys8hvEfFSDkMZL7GtYA8a5GSwih67Q1\",\"symbol\":\"KMD\"}"
echo "10312.37298338 <- expected amount RCPys8hvEfFSDkMZL7GtYA8a5GSwih67Q1"

190
iguana/tests/KMD.batch8

@ -0,0 +1,190 @@
sleep 999999
# REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8 KMD 11472.96269487
./komodo-cli sendtoaddress REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8 11472.96269487
sleep 3
echo "11472.96269487 <- expected amount REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8"
# RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV KMD 914.10663775
./komodo-cli sendtoaddress RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV 914.10663775
sleep 3
echo "914.10663775 <- expected amount RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV"
# R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG KMD 840.13904995
./komodo-cli sendtoaddress R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG 840.13904995
sleep 3
echo "840.13904995 <- expected amount R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG"
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707, REVS 189.50500057
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707
./komodo-cli sendtoaddress RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG 23492.49573707
sleep 3
echo "23492.49573707 <- expected amount RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2584.32223431
./komodo-cli sendtoaddress RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ 2584.32223431
sleep 3
echo "2584.32223431 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX KMD 1278.17612917
./komodo-cli sendtoaddress RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX 1278.17612917
sleep 3
echo "1278.17612917 <- expected amount RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX"
# RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS KMD 17042.34838900
./komodo-cli sendtoaddress RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS 17042.34838900
sleep 3
echo "17042.34838900 <- expected amount RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS"
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406, REVS 23.78885452
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406
./komodo-cli sendtoaddress RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a 1198.78675406
sleep 3
echo "1198.78675406 <- expected amount RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a"
# RCownUMXktAgPvzwpALnGimCA1RDJoTvx1 KMD 952.88812828
./komodo-cli sendtoaddress RCownUMXktAgPvzwpALnGimCA1RDJoTvx1 952.88812828
sleep 3
echo "952.88812828 <- expected amount RCownUMXktAgPvzwpALnGimCA1RDJoTvx1"
# RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM KMD 6594.40160977
./komodo-cli sendtoaddress RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM 6594.40160977
sleep 3
echo "6594.40160977 <- expected amount RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM"
# RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j KMD 9295.82639400
./komodo-cli sendtoaddress RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j 9295.82639400
sleep 3
echo "9295.82639400 <- expected amount RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j"
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788, REVS 608.60220842
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788
./komodo-cli sendtoaddress RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns 30681.77405788
sleep 3
echo "30681.77405788 <- expected amount RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns"
# RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8 KMD 257.45731805
./komodo-cli sendtoaddress RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8 257.45731805
sleep 3
echo "257.45731805 <- expected amount RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8"
# RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM KMD 1163.91492974
./komodo-cli sendtoaddress RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM 1163.91492974
sleep 3
echo "1163.91492974 <- expected amount RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM"
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877, REVS 597.97000000
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877
./komodo-cli sendtoaddress RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL 188643.68073877
sleep 3
echo "188643.68073877 <- expected amount RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL"
# RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz KMD 99.43583265
./komodo-cli sendtoaddress RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz 99.43583265
sleep 3
echo "99.43583265 <- expected amount RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz"
# RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU KMD 1394.37395910
./komodo-cli sendtoaddress RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU 1394.37395910
sleep 3
echo "1394.37395910 <- expected amount RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU"
# RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h KMD 24207.88123437
./komodo-cli sendtoaddress RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h 24207.88123437
sleep 3
echo "24207.88123437 <- expected amount RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783, REVS 233.03444206
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783
./komodo-cli sendtoaddress RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 17160.85255783
sleep 3
echo "17160.85255783 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688, REVS 2109.97700000
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688
./komodo-cli sendtoaddress REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe 203188.29997688
sleep 3
echo "203188.29997688 <- expected amount REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe"
# RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan KMD 2316.21007650
./komodo-cli sendtoaddress RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan 2316.21007650
sleep 3
echo "2316.21007650 <- expected amount RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan"
# RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH KMD 968.31524937
./komodo-cli sendtoaddress RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH 968.31524937
sleep 3
echo "968.31524937 <- expected amount RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH"
# RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV KMD 1663.06468462
./komodo-cli sendtoaddress RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV 1663.06468462
sleep 3
echo "1663.06468462 <- expected amount RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV"
# RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn KMD 929.58263940
./komodo-cli sendtoaddress RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn 929.58263940
sleep 3
echo "929.58263940 <- expected amount RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn"
# RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX KMD 91422.85735610
./komodo-cli sendtoaddress RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX 91422.85735610
sleep 3
echo "91422.85735610 <- expected amount RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
./komodo-cli sendtoaddress RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv 693.08132289
sleep 3
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737, REVS 835.32960760
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737
./komodo-cli sendtoaddress RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB 138920.34502737
sleep 3
echo "138920.34502737 <- expected amount RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB"
# RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99 KMD 9683.15249375
./komodo-cli sendtoaddress RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99 9683.15249375
sleep 3
echo "9683.15249375 <- expected amount RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99"
# RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4 KMD 1422.54025612
./komodo-cli sendtoaddress RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4 1422.54025612
sleep 3
echo "1422.54025612 <- expected amount RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4"
# RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN KMD 6041.35757346
./komodo-cli sendtoaddress RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN 6041.35757346
sleep 3
echo "6041.35757346 <- expected amount RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN"
# REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk KMD 3571.37913637
./komodo-cli sendtoaddress REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk 3571.37913637
sleep 3
echo "3571.37913637 <- expected amount REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk"
# RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB KMD 0.29002598
./komodo-cli sendtoaddress RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB 0.29002598
sleep 3
echo "0.29002598 <- expected amount RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB"
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 25106.60529680
./komodo-cli sendtoaddress RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut 25106.60529680
sleep 3
echo "25106.60529680 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut"
# RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw KMD 48415.76246875
./komodo-cli sendtoaddress RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw 48415.76246875
sleep 3
echo "48415.76246875 <- expected amount RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw"
# RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu KMD 2420.78820090
./komodo-cli sendtoaddress RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu 2420.78820090
sleep 3
echo "2420.78820090 <- expected amount RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu"
# REsjYn44yH4W9JcGiQND95mfJV98jzip9i KMD 6266.60868209
./komodo-cli sendtoaddress REsjYn44yH4W9JcGiQND95mfJV98jzip9i 6266.60868209
sleep 3
echo "6266.60868209 <- expected amount REsjYn44yH4W9JcGiQND95mfJV98jzip9i"
# total KMD 882306.06485397 REVS 0.00000000

187
iguana/tests/KMD.batch8.importaddress

@ -0,0 +1,187 @@
# REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8 KMD 11472.96269487
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8\",\"symbol\":\"KMD\"}" # 11472.96269487
sleep 3
echo "11472.96269487 <- expected amount REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8"
# RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV KMD 914.10663775
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV\",\"symbol\":\"KMD\"}" # 914.10663775
sleep 3
echo "914.10663775 <- expected amount RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV"
# R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG KMD 840.13904995
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG\",\"symbol\":\"KMD\"}" # 840.13904995
sleep 3
echo "840.13904995 <- expected amount R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG"
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707, REVS 189.50500057
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG\",\"symbol\":\"KMD\"}" # 23492.49573707
sleep 3
echo "23492.49573707 <- expected amount RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2584.32223431
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}" # 2584.32223431
sleep 3
echo "2584.32223431 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX KMD 1278.17612917
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX\",\"symbol\":\"KMD\"}" # 1278.17612917
sleep 3
echo "1278.17612917 <- expected amount RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX"
# RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS KMD 17042.34838900
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS\",\"symbol\":\"KMD\"}" # 17042.34838900
sleep 3
echo "17042.34838900 <- expected amount RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS"
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406, REVS 23.78885452
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a\",\"symbol\":\"KMD\"}" # 1198.78675406
sleep 3
echo "1198.78675406 <- expected amount RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a"
# RCownUMXktAgPvzwpALnGimCA1RDJoTvx1 KMD 952.88812828
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RCownUMXktAgPvzwpALnGimCA1RDJoTvx1\",\"symbol\":\"KMD\"}" # 952.88812828
sleep 3
echo "952.88812828 <- expected amount RCownUMXktAgPvzwpALnGimCA1RDJoTvx1"
# RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM KMD 6594.40160977
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM\",\"symbol\":\"KMD\"}" # 6594.40160977
sleep 3
echo "6594.40160977 <- expected amount RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM"
# RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j\",\"symbol\":\"KMD\"}" # 9295.82639400
sleep 3
echo "9295.82639400 <- expected amount RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j"
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788, REVS 608.60220842
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns\",\"symbol\":\"KMD\"}" # 30681.77405788
sleep 3
echo "30681.77405788 <- expected amount RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns"
# RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8 KMD 257.45731805
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8\",\"symbol\":\"KMD\"}" # 257.45731805
sleep 3
echo "257.45731805 <- expected amount RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8"
# RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM KMD 1163.91492974
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM\",\"symbol\":\"KMD\"}" # 1163.91492974
sleep 3
echo "1163.91492974 <- expected amount RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM"
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877, REVS 597.97000000
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL\",\"symbol\":\"KMD\"}" # 188643.68073877
sleep 3
echo "188643.68073877 <- expected amount RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL"
# RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz KMD 99.43583265
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz\",\"symbol\":\"KMD\"}" # 99.43583265
sleep 3
echo "99.43583265 <- expected amount RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz"
# RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU KMD 1394.37395910
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU\",\"symbol\":\"KMD\"}" # 1394.37395910
sleep 3
echo "1394.37395910 <- expected amount RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU"
# RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h KMD 24207.88123437
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h\",\"symbol\":\"KMD\"}" # 24207.88123437
sleep 3
echo "24207.88123437 <- expected amount RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783, REVS 233.03444206
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}" # 17160.85255783
sleep 3
echo "17160.85255783 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688, REVS 2109.97700000
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe\",\"symbol\":\"KMD\"}" # 203188.29997688
sleep 3
echo "203188.29997688 <- expected amount REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe"
# RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan KMD 2316.21007650
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan\",\"symbol\":\"KMD\"}" # 2316.21007650
sleep 3
echo "2316.21007650 <- expected amount RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan"
# RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH KMD 968.31524937
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH\",\"symbol\":\"KMD\"}" # 968.31524937
sleep 3
echo "968.31524937 <- expected amount RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH"
# RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV KMD 1663.06468462
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV\",\"symbol\":\"KMD\"}" # 1663.06468462
sleep 3
echo "1663.06468462 <- expected amount RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV"
# RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn KMD 929.58263940
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn\",\"symbol\":\"KMD\"}" # 929.58263940
sleep 3
echo "929.58263940 <- expected amount RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn"
# RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX KMD 91422.85735610
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX\",\"symbol\":\"KMD\"}" # 91422.85735610
sleep 3
echo "91422.85735610 <- expected amount RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}" # 693.08132289
sleep 3
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737, REVS 835.32960760
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB\",\"symbol\":\"KMD\"}" # 138920.34502737
sleep 3
echo "138920.34502737 <- expected amount RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB"
# RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99 KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99\",\"symbol\":\"KMD\"}" # 9683.15249375
sleep 3
echo "9683.15249375 <- expected amount RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99"
# RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4 KMD 1422.54025612
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4\",\"symbol\":\"KMD\"}" # 1422.54025612
sleep 3
echo "1422.54025612 <- expected amount RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4"
# RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN KMD 6041.35757346
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN\",\"symbol\":\"KMD\"}" # 6041.35757346
sleep 3
echo "6041.35757346 <- expected amount RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN"
# REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk KMD 3571.37913637
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk\",\"symbol\":\"KMD\"}" # 3571.37913637
sleep 3
echo "3571.37913637 <- expected amount REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk"
# RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB KMD 0.29002598
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB\",\"symbol\":\"KMD\"}" # 0.29002598
sleep 3
echo "0.29002598 <- expected amount RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB"
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 25106.60529680
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut\",\"symbol\":\"KMD\"}" # 25106.60529680
sleep 3
echo "25106.60529680 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut"
# RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw KMD 48415.76246875
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw\",\"symbol\":\"KMD\"}" # 48415.76246875
sleep 3
echo "48415.76246875 <- expected amount RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw"
# RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu KMD 2420.78820090
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu\",\"symbol\":\"KMD\"}" # 2420.78820090
sleep 3
echo "2420.78820090 <- expected amount RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu"
# REsjYn44yH4W9JcGiQND95mfJV98jzip9i KMD 6266.60868209
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REsjYn44yH4W9JcGiQND95mfJV98jzip9i\",\"symbol\":\"KMD\"}" # 6266.60868209
sleep 3
echo "6266.60868209 <- expected amount REsjYn44yH4W9JcGiQND95mfJV98jzip9i"

151
iguana/tests/KMD.batch8.listunspent

@ -0,0 +1,151 @@
# REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8 KMD 11472.96269487
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8\",\"symbol\":\"KMD\"}"
echo "11472.96269487 <- expected amount REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8"
# RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV KMD 914.10663775
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV\",\"symbol\":\"KMD\"}"
echo "914.10663775 <- expected amount RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV"
# R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG KMD 840.13904995
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG\",\"symbol\":\"KMD\"}"
echo "840.13904995 <- expected amount R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG"
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707, REVS 189.50500057
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG\",\"symbol\":\"KMD\"}"
echo "23492.49573707 <- expected amount RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG"
# RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ KMD 2584.32223431
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ\",\"symbol\":\"KMD\"}"
echo "2584.32223431 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ"
# RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX KMD 1278.17612917
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX\",\"symbol\":\"KMD\"}"
echo "1278.17612917 <- expected amount RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX"
# RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS KMD 17042.34838900
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS\",\"symbol\":\"KMD\"}"
echo "17042.34838900 <- expected amount RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS"
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406, REVS 23.78885452
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a\",\"symbol\":\"KMD\"}"
echo "1198.78675406 <- expected amount RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a"
# RCownUMXktAgPvzwpALnGimCA1RDJoTvx1 KMD 952.88812828
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RCownUMXktAgPvzwpALnGimCA1RDJoTvx1\",\"symbol\":\"KMD\"}"
echo "952.88812828 <- expected amount RCownUMXktAgPvzwpALnGimCA1RDJoTvx1"
# RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM KMD 6594.40160977
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM\",\"symbol\":\"KMD\"}"
echo "6594.40160977 <- expected amount RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM"
# RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j KMD 9295.82639400
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j\",\"symbol\":\"KMD\"}"
echo "9295.82639400 <- expected amount RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j"
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788, REVS 608.60220842
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns\",\"symbol\":\"KMD\"}"
echo "30681.77405788 <- expected amount RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns"
# RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8 KMD 257.45731805
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8\",\"symbol\":\"KMD\"}"
echo "257.45731805 <- expected amount RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8"
# RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM KMD 1163.91492974
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM\",\"symbol\":\"KMD\"}"
echo "1163.91492974 <- expected amount RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM"
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877, REVS 597.97000000
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL\",\"symbol\":\"KMD\"}"
echo "188643.68073877 <- expected amount RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL"
# RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz KMD 99.43583265
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz\",\"symbol\":\"KMD\"}"
echo "99.43583265 <- expected amount RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz"
# RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU KMD 1394.37395910
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU\",\"symbol\":\"KMD\"}"
echo "1394.37395910 <- expected amount RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU"
# RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h KMD 24207.88123437
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h\",\"symbol\":\"KMD\"}"
echo "24207.88123437 <- expected amount RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h"
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783, REVS 233.03444206
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"KMD\"}"
echo "17160.85255783 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8"
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688, REVS 2109.97700000
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe\",\"symbol\":\"KMD\"}"
echo "203188.29997688 <- expected amount REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe"
# RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan KMD 2316.21007650
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan\",\"symbol\":\"KMD\"}"
echo "2316.21007650 <- expected amount RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan"
# RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH KMD 968.31524937
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH\",\"symbol\":\"KMD\"}"
echo "968.31524937 <- expected amount RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH"
# RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV KMD 1663.06468462
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV\",\"symbol\":\"KMD\"}"
echo "1663.06468462 <- expected amount RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV"
# RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn KMD 929.58263940
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn\",\"symbol\":\"KMD\"}"
echo "929.58263940 <- expected amount RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn"
# RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX KMD 91422.85735610
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX\",\"symbol\":\"KMD\"}"
echo "91422.85735610 <- expected amount RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX"
# RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv KMD 693.08132289
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv\",\"symbol\":\"KMD\"}"
echo "693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv"
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737, REVS 835.32960760
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB\",\"symbol\":\"KMD\"}"
echo "138920.34502737 <- expected amount RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB"
# RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99 KMD 9683.15249375
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99\",\"symbol\":\"KMD\"}"
echo "9683.15249375 <- expected amount RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99"
# RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4 KMD 1422.54025612
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4\",\"symbol\":\"KMD\"}"
echo "1422.54025612 <- expected amount RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4"
# RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN KMD 6041.35757346
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN\",\"symbol\":\"KMD\"}"
echo "6041.35757346 <- expected amount RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN"
# REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk KMD 3571.37913637
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk\",\"symbol\":\"KMD\"}"
echo "3571.37913637 <- expected amount REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk"
# RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB KMD 0.29002598
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB\",\"symbol\":\"KMD\"}"
echo "0.29002598 <- expected amount RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB"
# RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut KMD 25106.60529680
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut\",\"symbol\":\"KMD\"}"
echo "25106.60529680 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut"
# RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw KMD 48415.76246875
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw\",\"symbol\":\"KMD\"}"
echo "48415.76246875 <- expected amount RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw"
# RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu KMD 2420.78820090
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu\",\"symbol\":\"KMD\"}"
echo "2420.78820090 <- expected amount RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu"
# REsjYn44yH4W9JcGiQND95mfJV98jzip9i KMD 6266.60868209
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"REsjYn44yH4W9JcGiQND95mfJV98jzip9i\",\"symbol\":\"KMD\"}"
echo "6266.60868209 <- expected amount REsjYn44yH4W9JcGiQND95mfJV98jzip9i"

72
iguana/tests/KMD.batch8.txids

@ -0,0 +1,72 @@
e706793cdd5ca2502b15067c429e31dd64ac37a9f7503b80685118dd3f0f2b33
11472.96269487 <- expected amount REbMisMicS8W7LUqBPJwkVfYHxNfSeW7d8
c742705c385577030a48fb6e6cae157373f39a5330d2536d91c7b9a5fbd8a51b
914.10663775 <- expected amount RKprtuU6cDvhMGPwJAbycWY8gYtyyWrJBV
86edf4d8240f695f1241d317c5b6a2132927680aa2b5022d540f901b40a501fc
840.13904995 <- expected amount R9ctRNEYWbE5zDmT77Xhz22Fr1LpPVj8CG
5b4c1b73e41f8f15f52d86fb53626b9672c49d44bb73dcc618632c4c35b55996
23492.49573707 <- expected amount RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG
38ae41db2fb95299e8201453f17341021ae25ffa28911bf2e68573f07bcbecec
2584.32223431 <- expected amount RC8jWr1QQsRyo1pDkue8AxGs58Wyz4F3wZ
75fe74a840973f2901f6f8b18f6d4191e70c4edd6a2d0ced5024482d2bd218eb
1278.17612917 <- expected amount RQGJHTEwF7TcpCGHCdRZHZVcmngwucWdXX
4fd4a96c77cfaa80cb88e3cdcde880ea1dd15c478f2dbd3bac9cbafd0470da86
17042.34838900 <- expected amount RAuq7MzV7DgjB2bLJJ9LunEj9P3zUMiNrS
166593bf7c22faa0f7d685e5040373362a99b86c61176a59578aca1f67985866
1198.78675406 <- expected amount RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a
8db1f874f62ea9a74892aee5de46e07904c6a328e1d2fb89944c038587086349
952.88812828 <- expected amount RCownUMXktAgPvzwpALnGimCA1RDJoTvx1
91805b62414de7bf4452a827d34dfb797d531e5bd069cb0229028358d75e3a84
6594.40160977 <- expected amount RSk32hhDqxGpFLNXBaza9e9HsSwEMmJJyM
9619461676f16f6d792c02ee1cf2c3c4895088c1031c767263086b3d7ebd744b
9295.82639400 <- expected amount RJyZ9XSE4b18JQWyxPFxTzNXqfkre6aF3j
8bb6c95663c93d5d91a0b9ebbb1bc01d3c8e776c76e9e6b7ecc449a9c4bf9795
30681.77405788 <- expected amount RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns
0926ad92015e3d3a4313bcc43ae55382b6e0212aaef4ef2629a67f29e39d00cc
257.45731805 <- expected amount RQKz3VoxhXq3aKqx2YLZnFMEjQGQ9ZU8S8
32097e87a4ae016c886035284962c77d755c86717db9fc23bfdb31ec852a1517
1163.91492974 <- expected amount RLHX9dCaUDnvCa7GEragjBJv9wCAXUqfYM
eef0c4739bc5a43997fed140af0d9ec884b232726cab5ce6bf37bf77466c37bc
188643.68073877 <- expected amount RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL
4edbfa109229b18d241820c38c92183f87b3a74f7214d6f2470554e483701ba4
99.43583265 <- expected amount RPyKbtBPVb3FYv5iFULNUB6bq9DdvekZuz
e3a2b2d44d9ddb41f8cfaaf3e077409cdb80c3fe6be29b29801d447f36bd73e0
1394.37395910 <- expected amount RPJDJKyCnHUEcSJCXPCcCVgAyYzTJQY9KU
6ffe858cd590d0237468450794fe5a5d38c7074f3e7ea4afaba36f511136557a
24207.88123437 <- expected amount RLi74YPDmXDf2UAiBoTqEwUayqX76cXb3h
3d33a0b167cdad93222d4d349f65b38aea97307e9fd73f230164eea2e2e3d339
17160.85255783 <- expected amount RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8
c0a1609c53754a8c27f1435458f17a0f6c2ca49245929cc90b29a8120efe50c1
203188.29997688 <- expected amount REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe
8cef57eecc08b69ed854d1ea77e7a3968050edd47973a36519499794ee5e5316
2316.21007650 <- expected amount RPD3kfdgogsPGbXefBdRt4QpiDZXFHwqan
61891b96d6e4fcc42a2509618744e19df94d3949a45118a66e00408a052d1d62
968.31524937 <- expected amount RGXyii2bqVefbqGmXtuaG19WQY5xa7f9qH
a1cb58ed4b02702c86dbb8c3a718d8f58ebc36704129618a3926a2e6c2add782
1663.06468462 <- expected amount RG7jKgxwFPKNPy4MFxXaBr7TRDEzR2sSkV
92f853441f10b27af1f7bfa310c8407cf57b787bde24f9c5718f88dd2b412005
929.58263940 <- expected amount RC63RYx695o7ve2fdjRtcXKqw4QwzTjqDn
4b86fcfbce4df5dc114c7ae8a8b12b6897ca3d3a5ccff395d7c668b1caa40b6e
91422.85735610 <- expected amount RLJ1GkGiu9jmDngdzYGNtwWffWkFYKgbuX
55282c7553eb17fa7d74c67aeb112e19effb4930cd8df184e18223dc3d1a4803
693.08132289 <- expected amount RHJ55iWUQNbKcSn8shbv1RbGuip3RSRHFv
c776090ef42630fa404ab43f36ed53b656c9dd69d19f3c5a380ff2939194f160
138920.34502737 <- expected amount RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB
4d75910e5b0db53220ca8ebc1ea5e7ee8bfd5b9934ce2fbe65dbf429fc5320f6
9683.15249375 <- expected amount RTUeFxM12wv69Mf5JcXFZGx9qVbGYtPf99
3a3b068904ee87f157d0b3b7f2c7ab7252d0b9be1fcb0178f2bf2bfff04bc344
1422.54025612 <- expected amount RG2cAef3JbCXiQkzPgrqS52HAQrBzJiAy4
137664f7fecf790ed3c944b91870c11206a5e12774716403cee9b66903d3055c
6041.35757346 <- expected amount RLzSA37kWBnxCz3yTspTLg1Y85ai18LZoN
4f489677f35c8c3844e039330310c1e1c85aa41e368ae6caeff517040ed0f773
3571.37913637 <- expected amount REmYfd1MwrYzxW7swvXMMcuKb7u1LFeNHk
4efa01883041a797c20a1d320d36e3a2cff2b9958b28254ed88306a1448b7752
0.29002598 <- expected amount RMuS51q7GuPd2jF8aYmRuD8vAwY3GpjhEB
fc195c8a97098890334c2291229d518cf03156100184dd9bb26fb548630bc387
25106.60529680 <- expected amount RXdBJ5cWDcS38ykuggEQZh3vSztxwmG3ut
0569eae7e77315a56d78fc110d6130441d4fdac9e5fe27d32739055a959bb1ee
48415.76246875 <- expected amount RPm9bzUBbWbhqPdnydRxFnEk5XXxxcdMPw
744f5222411621ef1a9764beda4bd64795269a18759b83ee0d9a442889403a62
2420.78820090 <- expected amount RUoGAwzyNUF1F22TkPq2Jx7cQVQk8Yn6Gu
8463044c21af1d44490760ac94ad05c279716ac8149e4cbf30b42b2ca987c386
6266.60868209 <- expected amount REsjYn44yH4W9JcGiQND95mfJV98jzip9i

33
iguana/tests/REVS.batch8

@ -0,0 +1,33 @@
sleep 999999
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707, REVS 189.50500057
sleep 1
fiat/revs sendtoaddress RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG 189.50500057
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406, REVS 23.78885452
sleep 1
fiat/revs sendtoaddress RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a 23.78885452
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788, REVS 608.60220842
sleep 1
fiat/revs sendtoaddress RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns 608.60220842
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877, REVS 597.97000000
sleep 1
fiat/revs sendtoaddress RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL 597.97000000
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783, REVS 233.03444206
sleep 1
fiat/revs sendtoaddress RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 233.03444206
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688, REVS 2109.97700000
sleep 1
fiat/revs sendtoaddress REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe 2109.97700000
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737, REVS 835.32960760
sleep 1
fiat/revs sendtoaddress RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB 835.32960760
# total KMD 0.00000000 REVS 4598.20711317
fae0e4e8f3ad348dff687f9baa3e9975d4d893a38cd45190b60f61868a577ca4
edc160137ddb19dc7d00ddce6c35589ad5ab3ab6fee7cfb53090ee512a6595a9
d745bfb6e8fb32fff521b249be86ee8dba904c03738755420b7980a8350160a8
931c7d187b641c681c8f75a03da9849053504a95f55534af3385e3426fc4c5ea
e2598e462f81aff6d57c48adf224983a5b8c72f2c396096651c6e354b6c43928
ac9e2a40a4d565587cb73616d179ae90592a60b3cfc628f84e42a4533d3e3c51
d86e7b79d0aac2347804e0c11baac74e985005fcba8edffb5b9c359c05a08bb0

21
iguana/tests/REVS.batch8.importaddress

@ -0,0 +1,21 @@
# RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG KMD 23492.49573707, REVS 189.50500057
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWq87C4y7KBfy95otyvkgyCf18LfXV2vcG\",\"symbol\":\"REVS\"}" # 189.50500057
sleep 3
# RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a KMD 1198.78675406, REVS 23.78885452
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RWC11HxcX18hxm38NTZ6U5EMA9uSPzTJ3a\",\"symbol\":\"REVS\"}" # 23.78885452
sleep 3
# RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns KMD 30681.77405788, REVS 608.60220842
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RFkQHrVHb7xiFgjmhz1tvbrYJ8DcEH33ns\",\"symbol\":\"REVS\"}" # 608.60220842
sleep 3
# RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL KMD 188643.68073877, REVS 597.97000000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RJCBezf4HwreDsMK6tCm5YtcZtfBfeY3wL\",\"symbol\":\"REVS\"}" # 597.97000000
sleep 3
# RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8 KMD 17160.85255783, REVS 233.03444206
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RH7cfyUkBwrLbxfWBggcbV3UgzaAHyy3J8\",\"symbol\":\"REVS\"}" # 233.03444206
sleep 3
# REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe KMD 203188.29997688, REVS 2109.97700000
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"REopaxhMho1ffQ9fpqC6YLKaAS8D2Q2Twe\",\"symbol\":\"REVS\"}" # 2109.97700000
sleep 3
# RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB KMD 138920.34502737, REVS 835.32960760
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"importaddress\",\"address\":\"RKmZ2U9SYweYcUCuVugKmyfiawpPzXX8JB\",\"symbol\":\"REVS\"}" # 835.32960760
sleep 3

2
iguana/tests/dexexplorer

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"explorer\",\"symbol\":\"KMD\"}"

2
iguana/tests/dexgetbalance

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"getbalance\",\"address\":\"RU58D7nNLXwD29hgC2MPgtAF458gGxnPYS\",\"symbol\":\"KMD\"}"

2
iguana/tests/dexgetsupply

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"getbalance\",\"address\":\"*\",\"symbol\":\"KMD\",\"timeout\":30000}"

2
iguana/tests/dexgettxin

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"gettxin\",\"vout\":0,\"txid\":\"cad09f4c3e23ef4cde4980cc0e2b296943f22cbaac183a30f86f49f7eccfedfd\",\"symbol\":\"KMD\"}"

2
iguana/tests/dexlistspent

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listspent\",\"address\":\"RU58D7nNLXwD29hgC2MPgtAF458gGxnPYS\",\"symbol\":\"KMD\"}"

2
iguana/tests/dexlistunspent

@ -1,2 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RU58D7nNLXwD29hgC2MPgtAF458gGxnPYS\",\"symbol\":\"KMD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"listunspent\",\"address\":\"RW3gz9fEadohRLZerK9r8zXkugk5swWHrf\",\"symbol\":\"KMD\"}"

2
iguana/tests/sendtoaddress

@ -1,3 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RVQV5spiARDTqfwBCxstWnMbrT6Q8mhRYz\", 0.15, \"testcomment\", \"sendcomment\"]}"
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"KMD\",\"method\":\"sendtoaddress\",\"params\":[\"RVQV5spiARDTqfwBCxstWnMbrT6Q8mhRYz\", 0.15, \"testcomment\", \"sendcomment\"]}"

6
includes/iguana_apideclares.h

@ -42,6 +42,12 @@ TWO_STRINGS(dex,listunspent,symbol,address);
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip);
TWO_STRINGS(dex,kvsearch,symbol,key);
THREE_STRINGS_AND_THREE_INTS(dex,kvupdate,symbol,key,value,flags,unused,unusedb);
TWO_STRINGS(dex,listunspent2,symbol,address);
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions2,symbol,address,count,skip);
HASH_AND_STRING_AND_INT(dex,gettxin,txid,symbol,vout);
TWO_STRINGS(dex,listspent,symbol,address);
TWO_STRINGS(dex,getbalance,symbol,address);
STRING_ARG(dex,explorer,symbol);
TWO_STRINGS(zcash,passthru,function,hex);
TWO_STRINGS(komodo,passthru,function,hex);

1
includes/iguana_structs.h

@ -536,6 +536,7 @@ struct iguana_info
struct iguana_block *RTblocks[65536]; uint8_t *RTrawdata[65536]; int32_t RTrecvlens[65536],RTnumtx[65536];
struct iguana_RTtxid *RTdataset; struct iguana_RTaddr *RTaddrs;
struct hashstr_item *alladdresses;
struct kmd_transactionhh *kmd_transactions; struct kmd_addresshh *kmd_addresses; portable_mutex_t kmdmutex; FILE *kmd_txidfp,*kmd_spendfp; int32_t kmd_didinit,kmd_height,DEXEXPLORER; uint32_t kmd_lasttime;
};
struct vin_signer { bits256 privkey; char coinaddr[64]; uint8_t siglen,sig[80],rmd160[20],pubkey[66]; };

Loading…
Cancel
Save