Browse Source

Merge pull request #776 from jl777/jl777

improve cancel API to more fully cancel a trade negotiation
txblast
patch-3
jl777 7 years ago
committed by GitHub
parent
commit
880f150088
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      iguana/exchanges/LP_commands.c
  2. 3
      iguana/exchanges/LP_include.h
  3. 55
      iguana/exchanges/LP_ordermatch.c
  4. 13
      iguana/exchanges/LP_rpc.c
  5. 256
      iguana/exchanges/LP_transaction.c
  6. 1
      iguana/exchanges/LP_utxo.c
  7. 3
      iguana/exchanges/cancel
  8. 2
      iguana/exchanges/coins
  9. 2
      iguana/exchanges/install
  10. 4
      iguana/exchanges/txblast

7
iguana/exchanges/LP_commands.c

@ -120,6 +120,7 @@ cancel(uuid)\n\
buy(base, rel, price, relvolume, timeout=10, duration=3600, nonce)\n\
sell(base, rel, price, basevolume, timeout=10, duration=3600, nonce)\n\
withdraw(coin, outputs[], broadcast=0)\n\
txblast(coin, utxotxid, utxovout, utxovalue, txfee, passphrase, outputs[], broadcast=0)\n\
sendrawtransaction(coin, signedtx)\n\
swapstatus(pending=0, fast=0)\n\
swapstatus(coin, limit=10)\n\
@ -649,6 +650,12 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\
{
return(jprint(LP_gettx("stats_JSON",coin,jbits256(argjson,"txid"),0),1));
}
else if ( strcmp(method,"txblast") == 0 )
{
if ( (ptr= LP_coinsearch(coin)) != 0 )
return(LP_txblast(ptr,argjson));
else return(clonestr("{\"error\":\"cant find coind\"}"));
}
else if ( strcmp(method,"withdraw") == 0 )
{
if ( (ptr= LP_coinsearch(coin)) != 0 )

3
iguana/exchanges/LP_include.h

@ -459,7 +459,7 @@ struct LP_trade
uint64_t aliceid;
int64_t besttrust,bestunconfcredits;
double bestprice;
uint32_t negotiationdone,bestresponse,connectsent,firsttime,lasttime,firstprocessed,lastprocessed,newtime;
uint32_t negotiationdone,bestresponse,connectsent,firsttime,lasttime,firstprocessed,lastprocessed,newtime,cancelled;
char pairstr[64],funcid,iambob;
struct LP_quoteinfo Qs[4],Q;
};
@ -575,6 +575,7 @@ int64_t LP_dynamictrust(int64_t credits,bits256 pubkey,int64_t kmdvalue);
struct LP_address *LP_addressfind(struct iguana_info *coin,char *coinaddr);
int64_t LP_outpoint_amount(char *symbol,bits256 txid,int32_t vout);
void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint16_t myport,uint16_t netid,char *seednode);
int32_t LP_trades_canceluuid(char *uuidstr);
int _decreasing_uint64(const void *a,const void *b);
int32_t LP_alice_eligible(uint32_t quotetime);
int32_t LP_is_slowcoin(char *symbol);

55
iguana/exchanges/LP_ordermatch.c

@ -625,11 +625,20 @@ int32_t LP_alice_eligible(uint32_t quotetime)
char *LP_cancel_order(char *uuidstr)
{
if ( uuidstr != 0 && strcmp(LP_Alicequery.uuidstr,uuidstr) == 0 )
int32_t num = 0; cJSON *retjson;
if ( uuidstr != 0 )
{
LP_failedmsg(LP_Alicequery.R.requestid,LP_Alicequery.R.quoteid,-9998,LP_Alicequery.uuidstr);
LP_alicequery_clear();
return(clonestr("{\"result\":\"success\",\"status\":\"uuid canceled\"}"));
num = LP_trades_canceluuid(uuidstr);
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");
jaddnum(retjson,"numentries",num);
if ( strcmp(LP_Alicequery.uuidstr,uuidstr) == 0 )
{
LP_failedmsg(LP_Alicequery.R.requestid,LP_Alicequery.R.quoteid,-9998,LP_Alicequery.uuidstr);
LP_alicequery_clear();
jaddstr(retjson,"status","uuid canceled");
} else jaddstr(retjson,"status","will stop trade negotiation, but if swap started it wont cancel");
return(jprint(retjson,1));
}
return(clonestr("{\"error\":\"uuid not cancellable\"}"));
}
@ -1148,6 +1157,30 @@ int32_t LP_trades_bestpricecheck(void *ctx,struct LP_trade *tp)
return(0);
}
int32_t LP_trades_canceluuid(char *uuidstr)
{
int32_t num = 0; struct LP_trade *qtp,*tp,*tmp;
HASH_ITER(hh,LP_trades,tp,tmp)
{
if ( strcmp(tp->Q.uuidstr,uuidstr) == 0 )
{
tp->cancelled = (uint32_t)time(NULL);
num++;
}
}
DL_FOREACH_SAFE(LP_tradesQ,qtp,tmp)
{
if ( strcmp(qtp->Q.uuidstr,uuidstr) == 0 )
{
qtp->cancelled = (uint32_t)time(NULL);
num++;
}
}
if ( num > 0 )
fprintf(stderr,"uuid.%s %d cancelled\n",uuidstr,num);
return(num);
}
void LP_tradesloop(void *ctx)
{
struct LP_trade *qtp,*tp,*tmp; struct LP_quoteinfo *qp,Q; uint32_t now; int32_t timeout,funcid,flag,nonz; struct iguana_info *coin; struct LP_pubkey_info *pubp;
@ -1160,7 +1193,7 @@ void LP_tradesloop(void *ctx)
nonz = 0;
HASH_ITER(hh,LP_trades,tp,tmp)
{
if ( tp->negotiationdone != 0 )
if ( tp->negotiationdone != 0 || tp->cancelled != 0 )
continue;
//printf("check %s\n",tp->Q.uuidstr+32);
timeout = LP_AUTOTRADE_TIMEOUT;
@ -1202,7 +1235,7 @@ void LP_tradesloop(void *ctx)
timeout += LP_AUTOTRADE_TIMEOUT * .5;
if ( (coin= LP_coinfind(tp->Q.destcoin)) != 0 && coin->electrum != 0 )
timeout += LP_AUTOTRADE_TIMEOUT * .5;
if ( now > tp->firstprocessed+timeout*10 )
if ( now > tp->firstprocessed+timeout*10 || tp->cancelled != 0 )
{
//printf("purge swap aliceid.%llu\n",(long long)tp->aliceid);
portable_mutex_lock(&LP_tradesmutex);
@ -1220,9 +1253,17 @@ void LP_tradesloop(void *ctx)
portable_mutex_lock(&LP_tradesmutex);
DL_DELETE(LP_tradesQ,qtp);
HASH_FIND(hh,LP_trades,&qtp->aliceid,sizeof(qtp->aliceid),tp);
if ( tp != 0 && tp->cancelled != 0 )
{
fprintf(stderr,"purging cancelled %s funcid.%d\n",tp->Q.uuidstr,tp->funcid);
HASH_DELETE(hh,LP_trades,tp);
free(tp);
continue;
}
if ( tp == 0 )
{
if ( now > Q.timestamp+LP_AUTOTRADE_TIMEOUT*2 ) // eat expired
if ( now > Q.timestamp+LP_AUTOTRADE_TIMEOUT*2 || qtp->cancelled != 0 ) // eat expired
free(qtp);
else
{

13
iguana/exchanges/LP_rpc.c

@ -49,7 +49,8 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params)
// bitcoind_passthru callers: "importaddress", "estimatefee", "getblockhash", "sendrawtransaction", "signrawtransaction"
if ( coin != 0 )
{
//printf("issue.(%s, %s, %s, %s, %s)\n",coin->symbol,coin->serverport,coin->userpass,method,params);
//if ( strcmp(method,"listunspent") == 0 )
// printf("issue.(%s, %s, %s, %s, %s)\n",coin->symbol,coin->serverport,coin->userpass,method,params);
if ( coin->electrum != 0 && (strcmp(method,"getblock") == 0 || strcmp(method,"paxprice") == 0 || strcmp(method,"getrawmempool") == 0) )
return(cJSON_Parse("{\"error\":\"illegal electrum call\"}"));
if ( coin->inactive == 0 || strcmp(method,"importprivkey") == 0 || strcmp(method,"validateaddress") == 0 || strcmp(method,"getrawtransaction") == 0 || strcmp(method,"getblock") == 0 || strcmp(method,"getinfo") == 0 || strcmp(method,"getblockchaininfo") == 0 )
@ -57,10 +58,10 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params)
if ( coin->electrum == 0 )
{
retstr = bitcoind_passthru(coin->symbol,coin->serverport,coin->userpass,method,params);
if ( 0 && strcmp("KMD",coin->symbol) == 0 )
printf("%s.(%s %s): %s.%s -> (%s)\n",coin->symbol,coin->serverport,coin->userpass,method,params,retstr);
if ( retstr != 0 && retstr[0] != 0 )
{
//if ( strcmp(method,"listunspent") == 0 )
// printf("%s.(%s %s): %s.%s -> (%s)\n",coin->symbol,coin->serverport,coin->userpass,method,params,retstr);
retjson = cJSON_Parse(retstr);
free(retstr);
}
@ -417,6 +418,7 @@ cJSON *LP_listunspent(char *symbol,char *coinaddr,bits256 reftxid,bits256 reftxi
usecache = 0;
else if ( time(NULL) > ap->unspenttime+3 )
usecache = 0;
usecache = 0; // disable unspents cache for native
//printf("%s %s usecache.%d iswatched.%d\n",coin->symbol,coinaddr,usecache,LP_address_iswatchonly(symbol,coinaddr));
if ( usecache != 0 && (retstr= LP_unspents_filestr(symbol,coinaddr)) != 0 )
{
@ -435,9 +437,10 @@ cJSON *LP_listunspent(char *symbol,char *coinaddr,bits256 reftxid,bits256 reftxi
else numconfs = 1;
sprintf(buf,"[%d, 99999999, [\"%s\"]]",numconfs,coinaddr);
retjson = bitcoin_json(coin,"listunspent",buf);
//printf("LP_listunspent.(%s %s) -> %s\n",symbol,coinaddr,jprint(retjson,0));
//printf("LP_listunspent.(%s %s) -> %s\n",symbol,buf,jprint(retjson,0));
if ( (n= cJSON_GetArraySize(retjson)) > 0 )
{
char str[65];
array = cJSON_CreateArray();
for (i=0; i<n; i++)
{
@ -448,7 +451,7 @@ cJSON *LP_listunspent(char *symbol,char *coinaddr,bits256 reftxid,bits256 reftxi
{
jaddi(array,jduplicate(item));
free_json(txjson);
}
} //else printf("%s/v%d is spent\n",bits256_str(str,txid),vout);
}
free_json(retjson);
retjson = array;

256
iguana/exchanges/LP_transaction.c

@ -1518,6 +1518,262 @@ char *LP_opreturndecrypt(void *ctx,char *symbol,bits256 utxotxid,char *passphras
return(jprint(retjson,1));
}
char *LP_createblasttransaction(uint64_t *changep,int32_t *changeoutp,cJSON **txobjp,cJSON **vinsp,struct vin_info *V,struct iguana_info *coin,bits256 utxotxid,int32_t utxovout,uint64_t utxovalue,bits256 privkey,cJSON *outputs,int64_t txfee)
{
static void *ctx;
cJSON *txobj,*item,*vins; uint8_t addrtype,rmd160[20],pubkey33[33],tmptype,data[8192+64],script[8192],spendscript[256]; char *coinaddr,*rawtxbytes,*scriptstr,spendscriptstr[128],blastaddr[64],wifstr[64]; bits256 txid; uint32_t locktime,crc32,timestamp; int64_t change=0,adjust=0,total,value,amount = 0; int32_t i,offset,len,scriptlen,spendlen,suppress_pubkeys,ignore_cltverr,numvouts=0;
if ( ctx == 0 )
ctx = bitcoin_ctx();
*txobjp = *vinsp = 0;
*changep = 0;
*changeoutp = -1;
if ( coin == 0 || outputs == 0 || (numvouts= cJSON_GetArraySize(outputs)) <= 0 )
{
fprintf(stderr,"LP_createblasttransaction: illegal coin.%p outputs.%p or arraysize.%d, error\n",coin,outputs,numvouts);
return(0);
}
amount = txfee;
for (i=0; i<numvouts; i++)
{
item = jitem(outputs,i);
if ( (coinaddr= jfieldname(item)) != 0 )
{
if ( 0 && LP_address_isvalid(coin->symbol,coinaddr) <= 0 )
{
fprintf(stderr,"%s LP_createblasttransaction %s i.%d of %d is invalid\n",coin->symbol,coinaddr,i,numvouts);
return(0);
}
if ( (value= SATOSHIDEN * jdouble(item,coinaddr)) <= 0 )
{
fprintf(stderr,"LP_createblasttransaction: cant get value %s i.%d of %d %s\n",coinaddr,i,numvouts,jprint(outputs,0));
return(0);
}
amount += value;
//printf("vout.%d %.8f -> total %.8f\n",i,dstr(value),dstr(amount));
}
else
{
fprintf(stderr,"LP_createblasttransaction: cant get fieldname.%d of %d %s\n",i,numvouts,jprint(outputs,0));
return(0);
}
}
ignore_cltverr = 0;
suppress_pubkeys = 1;
memset(V,0,sizeof(*V));
V->N = V->M = 1;
V->signers[0].privkey = privkey;
bitcoin_priv2wif(coin->symbol,coin->wiftaddr,wifstr,privkey,coin->wiftype);
bitcoin_priv2pub(ctx,coin->symbol,pubkey33,blastaddr,privkey,coin->taddr,coin->pubtype);
bitcoin_addr2rmd160("KMD",coin->taddr,&tmptype,rmd160,blastaddr);
V->suppress_pubkeys = suppress_pubkeys;
V->ignore_cltverr = ignore_cltverr;
change = (utxovalue - amount);
timestamp = (uint32_t)time(NULL);
locktime = 0;
txobj = bitcoin_txcreate(coin->symbol,coin->isPoS,locktime,coin->txversion,timestamp);
scriptlen = bitcoin_standardspend(script,0,rmd160);
init_hexbytes_noT(spendscriptstr,script,scriptlen);
vins = cJSON_CreateArray();
jaddi(vins,LP_inputjson(utxotxid,utxovout,spendscriptstr));
jdelete(txobj,"vin");
jadd(txobj,"vin",jduplicate(vins));
*vinsp = vins;
for (i=0; i<numvouts; i++)
{
item = jitem(outputs,i);
if ( (coinaddr= jfieldname(item)) != 0 )
{
if ( (value= SATOSHIDEN * jdouble(item,coinaddr)) <= 0 )
{
fprintf(stderr,"LP_createblasttransaction: cant get value i.%d of %d %s\n",i,numvouts,jprint(outputs,0));
free_json(txobj);
return(0);
}
if ( (scriptstr= jstr(item,"script")) != 0 )
{
spendlen = (int32_t)strlen(scriptstr) >> 1;
if ( spendlen < sizeof(script) )
{
decode_hex(spendscript,spendlen,scriptstr);
//printf("i.%d using external script.(%s) %d\n",i,scriptstr,spendlen);
}
else
{
fprintf(stderr,"LP_createblasttransaction: custom script.%d too long %d\n",i,spendlen);
free_json(txobj);
return(0);
}
}
else
{
bitcoin_addr2rmd160(coin->symbol,coin->taddr,&addrtype,rmd160,coinaddr);
if ( addrtype == coin->pubtype )
spendlen = bitcoin_standardspend(spendscript,0,rmd160);
else spendlen = bitcoin_p2shspend(spendscript,0,rmd160);
if ( i == numvouts-1 && strcmp(coinaddr,coin->smartaddr) == 0 && change != 0 )
{
value += change;
change = 0;
}
}
txobj = bitcoin_txoutput(txobj,spendscript,spendlen,value + adjust);
}
else
{
fprintf(stderr,"LP_createblasttransaction: cant get fieldname.%d of %d %s\n",i,numvouts,jprint(outputs,0));
free_json(txobj);
return(0);
}
}
if ( change < 6000 )
change = 0;
*changep = change;
if ( change != 0 )
{
txobj = bitcoin_txoutput(txobj,script,scriptlen,change);
*changeoutp = numvouts;
}
if ( (rawtxbytes= bitcoin_json2hex(coin->symbol,coin->isPoS,&txid,txobj,V)) == 0 )
fprintf(stderr,"LP_createblasttransaction: error making rawtx suppress.%d\n",suppress_pubkeys);
*txobjp = txobj;
return(rawtxbytes);
}
char *bitcoin_signrawtransaction(int32_t *completedp,bits256 *signedtxidp,struct iguana_info *coin,char *rawtx,char *wifstr)
{
char *retstr,*paramstr,*hexstr,*signedtx = 0; int32_t len; uint8_t *data; cJSON *signedjson;
*completedp = 0;
memset(signedtxidp,0,sizeof(*signedtxidp));
paramstr = calloc(1,200000+1);
sprintf(paramstr,"[\"%s\", null, [\"%s\"]]",rawtx,wifstr);
if ( (retstr= bitcoind_passthru(coin->symbol,coin->serverport,coin->userpass,"signrawtransaction",paramstr)) != 0 )
{
//printf("%s signed -> %s\n",coin->symbol,retstr);
if ( (signedjson= cJSON_Parse(retstr)) != 0 )
{
if ( (hexstr= jstr(signedjson,"hex")) != 0 )
{
len = (int32_t)strlen(hexstr);
signedtx = calloc(1,len+1);
strcpy(signedtx,hexstr);
*completedp = is_cJSON_True(jobj(signedjson,"complete"));
len >>= 1;
data = malloc(len);
decode_hex(data,len,hexstr);
*signedtxidp = bits256_calctxid(coin->symbol,data,len);
free(data);
}
free_json(signedjson);
}
free(retstr);
}
free(paramstr);
return(signedtx);
}
char *LP_txblast(struct iguana_info *coin,cJSON *argjson)
{
static void *ctx;
int32_t broadcast,i,num,numblast,utxovout,completed=0,numvouts,changeout; char *passphrase,changeaddr[64],vinaddr[64],wifstr[65],blastaddr[65],str[65],*signret,*signedtx=0,*rawtx=0; struct vin_info V; uint32_t locktime,starttime; uint8_t pubkey33[33]; cJSON *retjson,*item,*outputs,*vins=0,*txobj=0,*privkeys=0; struct iguana_msgtx msgtx; bits256 privkey,pubkey,checktxid,utxotxid,signedtxid; uint64_t txfee,utxovalue,change;
if ( ctx == 0 )
ctx = bitcoin_ctx();
if ( (passphrase= jstr(argjson,"password")) == 0 )
return(clonestr("{\"error\":\"need password\"}"));
outputs = jarray(&numvouts,argjson,"outputs");
utxotxid = jbits256(argjson,"utxotxid");
utxovout = jint(argjson,"utxovout");
if ( (numblast= jint(argjson,"numblast")) == 0 )
numblast = 1000000;
utxovalue = j64bits(argjson,"utxovalue");
txfee = juint(argjson,"txfee");
broadcast = juint(argjson,"broadcast");
conv_NXTpassword(privkey.bytes,pubkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
privkey.bytes[0] &= 248, privkey.bytes[31] &= 127, privkey.bytes[31] |= 64;
bitcoin_priv2wif(coin->symbol,coin->wiftaddr,wifstr,privkey,coin->wiftype);
bitcoin_priv2pub(ctx,coin->symbol,pubkey33,blastaddr,privkey,coin->taddr,coin->pubtype);
safecopy(vinaddr,blastaddr,sizeof(vinaddr));
safecopy(changeaddr,blastaddr,sizeof(changeaddr));
privkeys = cJSON_CreateArray();
jaddistr(privkeys,wifstr);
starttime = (uint32_t)time(NULL);
for (i=0; i<numblast; i++)
{
if ( (rawtx= LP_createblasttransaction(&change,&changeout,&txobj,&vins,&V,coin,utxotxid,utxovout,utxovalue,privkey,outputs,txfee)) != 0 )
{
completed = 0;
memset(&msgtx,0,sizeof(msgtx));
memset(signedtxid.bytes,0,sizeof(signedtxid));
if ( (signedtx= bitcoin_signrawtransaction(&completed,&signedtxid,coin,rawtx,wifstr)) == 0 )
//if ( (completed= iguana_signrawtransaction(ctx,coin->symbol,coin->wiftaddr,coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->longestchain,&msgtx,&signedtx,&signedtxid,&V,1,rawtx,vins,privkeys,coin->zcash)) < 0 )
printf("LP_txblast: couldnt sign blast tx %s\n",bits256_str(str,signedtxid));
else if ( completed == 0 )
{
printf("LP_txblast incomplete signing blast tx (%s)\n",jprint(vins,0));
break;
}
else
{
if ( broadcast != 0 )
{
if ( (signret= LP_sendrawtransaction(coin->symbol,signedtx)) != 0 )
{
printf("LP_txblast.%s broadcast (%s) vs %s\n",coin->symbol,bits256_str(str,signedtxid),signret);
if ( is_hexstr(signret,0) == 64 )
{
decode_hex(checktxid.bytes,32,signret);
if ( bits256_cmp(checktxid,signedtxid) == 0 )
{
printf("blaster i.%d of %d: %s/v%d %.8f\n",i,numblast,bits256_str(str,signedtxid),changeout,dstr(change));
} else break;
}
else
{
printf("error sending tx:\n \"%s\" null '[\"%s\"]'\n",rawtx,wifstr);
break;
}
free(signret);
}
else
{
fprintf(stderr,"null return from LP_sendrawtransaction\n");
break;
}
} else printf("blaster i.%d of %d: %s/v%d %.8f %s\n",i,numblast,bits256_str(str,signedtxid),changeout,dstr(change),signedtx);
}
}
else
{
fprintf(stderr,"error creating txblast rawtransaction\n");
break;
}
if ( txobj != 0 )
free_json(txobj), txobj = 0;
if ( rawtx != 0 )
free(rawtx), rawtx = 0;
if ( signedtx != 0 )
free(signedtx), signedtx = 0;
if ( changeout < 0 || change == 0 )
break;
utxotxid = signedtxid;
utxovout = changeout;
utxovalue = change;
// good place to update outputs[] for a fully programmable blast
}
free_json(privkeys), privkeys = 0;
retjson = cJSON_CreateObject();
jaddstr(retjson,"result","success");
jaddstr(retjson,"blastaddr",blastaddr);
jaddnum(retjson,"broadcast",broadcast);
jaddnum(retjson,"numblast",numblast);
jaddnum(retjson,"completed",i);
jaddbits256(retjson,"lastutxo",utxotxid);
jaddnum(retjson,"lastutxovout",utxovout);
jaddnum(retjson,"lastutxovalue",dstr(utxovalue));
jaddnum(retjson,"elapsed",(uint32_t)time(NULL) - starttime);
jaddnum(retjson,"tx/sec",(double)i / ((uint32_t)time(NULL) - starttime + 1));
return(jprint(retjson,1));
}
char *LP_withdraw(struct iguana_info *coin,cJSON *argjson)
{
static void *ctx;

1
iguana/exchanges/LP_utxo.c

@ -548,6 +548,7 @@ struct LP_address *LP_address_utxo_reset(int32_t *nump,struct iguana_info *coin)
portable_mutex_lock(&coin->addressutxo_mutex);
if ( (array= LP_listunspent(coin->symbol,coin->smartaddr,zero,zero)) != 0 )
{
//printf("%s array.%s\n",coin->symbol,jprint(array,0));
portable_mutex_lock(&coin->addrmutex);
portable_mutex_lock(&LP_gcmutex);
DL_FOREACH_SAFE(ap->utxos,up,tmp)

3
iguana/exchanges/cancel

@ -0,0 +1,3 @@
#!/bin/bash
source userpass
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"cancel\",\"uuid\":\"<uuidstr>\"}"

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

2
iguana/exchanges/install

@ -1,5 +1,5 @@
#!/bin/bash
cp install updateprices get_supernet trackbtc auto_chipskmd auto_chipsbtc pendingswaps fundvalue balances dynamictrust getcoin kickstart tradesarray claim deposit10 deposit1 invreset sendrawtransaction processfiles stop millis mnzservers bot_buy bot_list bot_statuslist bot_pause bot_resume bot_sell bot_settings bot_status bot_stop guistats pubkeystats pendings coinswaps baserelswaps setpassphrase notarizations getrawtransaction parselog statsdisp m_js trust trusted setconfirms balance listunspent electrum snapshot_balance snapshot_loop secretaddresses dividends snapshot goals goal portfolio autoprice deletemessages getmessages debug buy sell bestfit orderbook client client_osx client_static run coins disable enable myprice myprices getcoins getpeers getpeersIP getprices help inv setprice status ../dexscripts
cp install updateprices get_supernet trackbtc auto_chipskmd auto_chipsbtc pendingswaps fundvalue balances dynamictrust getcoin kickstart tradesarray claim deposit10 deposit1 invreset sendrawtransaction processfiles stop millis mnzservers bot_buy bot_list bot_statuslist bot_pause bot_resume bot_sell bot_settings bot_status bot_stop guistats pubkeystats pendings coinswaps baserelswaps setpassphrase notarizations getrawtransaction parselog statsdisp m_js trust trusted setconfirms balance listunspent electrum snapshot_balance snapshot_loop secretaddresses dividends snapshot goals goal portfolio autoprice deletemessages getmessages debug buy sell bestfit orderbook client client_osx client_static coins disable enable myprice myprices getcoins getpeers getpeersIP getprices help inv setprice status ../dexscripts
cp coins.json ..
cd ../dexscripts
#cp ../exchanges/passphrase ../exchanges/userpass .

4
iguana/exchanges/txblast

@ -0,0 +1,4 @@
#!/bin/bash
source userpass
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"broadcast\":1,\"numblast\":1000,\"password\":\"default\",\"utxotxid\":\"bf8b73b2f72fbff1546811749eba3a028bce6320e5cdf2ae1ae414277661fb13\",\"utxovout\":1,\"utxovalue\":100000000,\"txfee\":20000,\"method\":\"txblast\",\"coin\":\"PIZZA\",\"outputs\":[{\"RUgW6fLfVsLJ87Ng4zJTqNedJSKYQ9ToAf\":0.0001}, {\"RLMHGUQginEGrnRtHoFBPZhLC9jeVdt1th\":0.0001}]}"
Loading…
Cancel
Save