jl777
9 years ago
26 changed files with 2577 additions and 1033 deletions
@ -0,0 +1,22 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2016 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. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from datachain.c
|
|||
|
|||
void datachain_events_processBTC(struct supernet_info *myinfo,struct datachain_info *dPoW,struct datachain_event *event) |
|||
{ |
|||
|
|||
} |
|||
|
@ -0,0 +1,189 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2016 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. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from datachain.c
|
|||
|
|||
int32_t datachain_rwgenesis(int32_t rwflag,uint8_t *serialized,struct gecko_genesis_opreturn *opret) |
|||
{ |
|||
int32_t len = 0; |
|||
if ( rwflag == 0 ) |
|||
{ |
|||
memcpy(opret->type,&serialized[len],sizeof(opret->type)), len += sizeof(opret->type); |
|||
memcpy(opret->symbol,&serialized[len],sizeof(opret->symbol)), len += sizeof(opret->symbol); |
|||
memcpy(opret->name,&serialized[len],sizeof(opret->name)), len += sizeof(opret->name); |
|||
} |
|||
else |
|||
{ |
|||
memcpy(&serialized[len],opret->type,sizeof(opret->type)), len += sizeof(opret->type); |
|||
memcpy(&serialized[len],opret->symbol,sizeof(opret->symbol)), len += sizeof(opret->symbol); |
|||
memcpy(&serialized[len],opret->name,sizeof(opret->name)), len += sizeof(opret->name); |
|||
} |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->PoSvalue),&opret->PoSvalue); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->netmagic),&opret->netmagic); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->timestamp),&opret->timestamp); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->nBits),&opret->nBits); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->nonce),&opret->nonce); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->blocktime),&opret->blocktime); |
|||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(opret->port),&opret->port); |
|||
if ( rwflag == 0 ) |
|||
{ |
|||
opret->version = serialized[len++]; |
|||
opret->pubval = serialized[len++]; |
|||
opret->p2shval = serialized[len++]; |
|||
opret->wifval = serialized[len++]; |
|||
memcpy(opret->rmd160,&serialized[len],20), len += 20; |
|||
} |
|||
else |
|||
{ |
|||
serialized[len++] = opret->version; |
|||
serialized[len++] = opret->pubval; |
|||
serialized[len++] = opret->p2shval; |
|||
serialized[len++] = opret->wifval; |
|||
memcpy(&serialized[len],opret->rmd160,20), len += 20; |
|||
} |
|||
//printf("opreturn len.%d\n",len);
|
|||
return(len); |
|||
} |
|||
|
|||
bits256 datachain_opreturn_convert(uint8_t *txidbytes,int32_t *txlenp,struct iguana_msgblock *msg,struct gecko_genesis_opreturn *opret) |
|||
{ |
|||
bits256 txid,zero; int32_t minerpaymentlen=0; uint8_t minerpayment[512]; char coinbasestr[128],name[64],symbol[64]; |
|||
if ( opret->PoSvalue > 0 ) |
|||
minerpaymentlen = bitcoin_standardspend(minerpayment,0,opret->rmd160); |
|||
memset(zero.bytes,0,sizeof(zero)); |
|||
memset(symbol,0,sizeof(symbol)), memcpy(symbol,opret->symbol,sizeof(opret->symbol)); |
|||
memset(name,0,sizeof(name)), memcpy(name,opret->name,sizeof(opret->name)); |
|||
sprintf(coinbasestr,"%s_%s",symbol,name); |
|||
*txlenp = iguana_coinbase(1,GECKO_DEFAULTVERSION,txidbytes,opret->timestamp,zero,(uint8_t *)coinbasestr,(int32_t)strlen(coinbasestr)+1,minerpayment,minerpaymentlen,opret->PoSvalue,&txid); |
|||
memset(msg,0,sizeof(*msg)); |
|||
msg->H.version = opret->version; |
|||
msg->H.merkle_root = txid; |
|||
msg->H.timestamp = opret->timestamp; |
|||
msg->H.bits = opret->nBits; |
|||
msg->H.nonce = opret->nonce; |
|||
return(txid); |
|||
} |
|||
|
|||
int32_t datachain_genesis_verify(struct gecko_genesis_opreturn *opret) |
|||
{ |
|||
int32_t txlen,datalen; bits256 txid,threshold,hash2; uint8_t serialized[1024],txidbytes[1024]; struct iguana_msgblock msg; char str[65],str2[65]; |
|||
txid = datachain_opreturn_convert(txidbytes,&txlen,&msg,opret); |
|||
threshold = bits256_from_compact(opret->nBits); |
|||
datalen = iguana_rwblockhdr(1,0,serialized,&msg); |
|||
hash2 = iguana_calcblockhash("virtual",blockhash_sha256,serialized,datalen); |
|||
//for (i=0; i<datalen; i++)
|
|||
// printf("%02x",serialized[i]);
|
|||
if ( bits256_cmp(threshold,hash2) > 0 ) |
|||
{ |
|||
//printf(" valid blockhash!\n");
|
|||
return(0); |
|||
} |
|||
else |
|||
{ |
|||
printf(" ERROR invalid blockhash! txid.%s %s\n",bits256_str(str2,txid),bits256_str(str,hash2)); |
|||
return(-1); |
|||
} |
|||
} |
|||
|
|||
int32_t datachain_opreturn_create(uint8_t *serialized,char *symbol,char *name,char *coinaddr,int64_t PoSvalue,uint32_t nBits,uint16_t blocktime,uint16_t port,uint8_t p2shval,uint8_t wifval) |
|||
{ |
|||
int32_t i,len,datalen,txlen; struct gecko_genesis_opreturn opret; bits256 threshold,txid,hash2; struct iguana_info *btcd; struct iguana_msgblock msg; uint8_t txidbytes[1024]; |
|||
btcd = iguana_coinfind("BTCD"); |
|||
memset(&opret,0,sizeof(opret)); |
|||
opret.type[0] = 'N', opret.type[1] = 'E', opret.type[2] = 'W'; |
|||
memcpy(opret.symbol,symbol,sizeof(opret.symbol)); |
|||
memcpy(opret.name,name,sizeof(opret.name)); |
|||
opret.version = GECKO_DEFAULTVERSION; |
|||
opret.PoSvalue = PoSvalue; |
|||
opret.nBits = nBits; |
|||
opret.p2shval = p2shval; |
|||
opret.wifval = wifval; |
|||
opret.blocktime = blocktime; |
|||
opret.port = port; |
|||
opret.timestamp = (uint32_t)time(NULL); |
|||
OS_randombytes((void *)&opret.netmagic,sizeof(opret.netmagic)); |
|||
bitcoin_addr2rmd160(&opret.pubval,opret.rmd160,coinaddr); |
|||
txid = datachain_opreturn_convert(txidbytes,&txlen,&msg,&opret); |
|||
threshold = bits256_from_compact(nBits); |
|||
for (i=0; i<100000000; i++) |
|||
{ |
|||
opret.nonce = msg.H.nonce = i; |
|||
datalen = iguana_rwblockhdr(1,0,serialized,&msg); |
|||
hash2 = iguana_calcblockhash(symbol,btcd->chain->hashalgo,serialized,datalen); |
|||
if ( bits256_cmp(threshold,hash2) > 0 ) |
|||
break; |
|||
} |
|||
//char str[65],str2[65];
|
|||
//for (i=0; i<datalen; i++)
|
|||
// printf("%02x",serialized[i]);
|
|||
//printf(" <- msgblock datalen.%d txid.%s hash2.%s\n",datalen,bits256_str(str,txid),bits256_str(str2,hash2));
|
|||
len = datachain_rwgenesis(1,serialized,&opret); |
|||
datachain_genesis_verify(&opret); |
|||
return(len); |
|||
} |
|||
|
|||
void datachain_events_processKOMODO(struct supernet_info *myinfo,struct datachain_info *dPoW,struct datachain_event *event) |
|||
{ |
|||
struct gecko_chain *chain; bits256 hash2,threshold; struct gecko_genesis_opreturn opret; int32_t datalen,i,j,len,txlen; char symbol[16],name[64],magicstr[16],blockstr[8192],nbitstr[16],issuer[64],hashstr[65],str2[65],argbuf[1024],chainname[GECKO_MAXNAMELEN]; cJSON *valsobj; struct iguana_msgblock msg; uint8_t serialized[256],txidbytes[1024],buf[4]; struct iguana_info *virt,*btcd; |
|||
if ( (btcd= iguana_coinfind("BTCD")) != 0 && memcmp(event->opreturn,"NEW",3) == 0 ) |
|||
{ |
|||
//int32_t i; for (i=0; i<76; i++)
|
|||
// printf("%02x",event->opreturn[i]);
|
|||
//printf(" <- event\n");
|
|||
if ( (len= datachain_rwgenesis(0,event->opreturn,&opret)) <= event->oplen ) |
|||
{ |
|||
datachain_genesis_verify(&opret); |
|||
memset(symbol,0,sizeof(symbol)), memcpy(symbol,opret.symbol,sizeof(opret.symbol)); |
|||
memset(name,0,sizeof(name)), memcpy(name,opret.name,sizeof(opret.name)); |
|||
hash2 = datachain_opreturn_convert(txidbytes,&txlen,&msg,&opret); |
|||
threshold = bits256_from_compact(opret.nBits); |
|||
msg.txn_count = 1; |
|||
//n = iguana_serialize_block(virt->chain,&hash2,serialized,newblock);
|
|||
datalen = iguana_rwblockhdr(1,0,serialized,&msg); |
|||
hash2 = iguana_calcblockhash(symbol,btcd->chain->hashalgo,serialized,datalen); |
|||
for (i=0; i<datalen; i++) |
|||
printf("%02x",serialized[i]); |
|||
printf(" <- genhdr.%d\n",datalen); |
|||
for (i=0; i<txlen; i++) |
|||
printf("%02x",txidbytes[i]); |
|||
printf(" <- genesistx\n"); |
|||
//char str[65]; printf("komodo datalen.%d %s\n",datalen,bits256_str(str,hash2));
|
|||
if ( bits256_cmp(threshold,hash2) > 0 ) |
|||
{ |
|||
bitcoin_address(issuer,60,opret.rmd160,20); |
|||
bits256_str(hashstr,hash2); |
|||
for (j=0,i=3; i>=0; i--,j++) |
|||
buf[i] = (opret.netmagic >> (j*8)); |
|||
init_hexbytes_noT(magicstr,buf,4); |
|||
for (j=0,i=3; i>=0; i--,j++) |
|||
buf[i] = (opret.nBits >> (j*8)); |
|||
init_hexbytes_noT(nbitstr,buf,4); |
|||
init_hexbytes_noT(blockstr,serialized,datalen); |
|||
strcat(blockstr,"01"), datalen++; |
|||
init_hexbytes_noT(&blockstr[datalen << 1],txidbytes,txlen); |
|||
sprintf(argbuf,"{\"name\":\"%s\",\"symbol\":\"%s\",\"netmagic\":\"%s\",\"port\":%u,\"blocktime\":%u,\"pubval\":\"%02x\",\"p2shval\":\"%02x\",\"wifval\":\"%02x\",\"unitval\":\"%02x\",\"genesishash\":\"%s\",\"genesis\":{\"version\":1,\"timestamp\":%u,\"nBits\":\"%s\",\"nonce\":%d,\"merkle_root\":\"%s\"},\"genesisblock\":\"%s\"}",name,symbol,magicstr,opret.port,opret.blocktime,opret.pubval,opret.p2shval,opret.wifval,(opret.nBits >> 24) & 0xff,hashstr,opret.timestamp,nbitstr,opret.nonce,bits256_str(str2,msg.H.merkle_root),blockstr); |
|||
if ( (valsobj= cJSON_Parse(argbuf)) != 0 ) |
|||
{ |
|||
printf("datachain.NEW (%s/%s port.%u blocktime.%d) issuer.%s (%s)\n",opret.symbol,opret.name,opret.port,opret.blocktime,issuer,jprint(valsobj,0)); |
|||
if ( (chain= gecko_chain(myinfo,chainname,valsobj)) != 0 && (virt= chain->info) != 0 ) |
|||
printf("duplicate chain.%s rejected\n",opret.symbol); |
|||
else if ( (virt= basilisk_geckochain(myinfo,symbol,chainname,valsobj)) != 0 ) |
|||
chain->info = virt; |
|||
free_json(valsobj); |
|||
} |
|||
} else printf("failed PoW test for genesis.%s\n",opret.symbol); |
|||
} else printf("opret unexpected len.%d vs %d\n",len,event->oplen); |
|||
} |
|||
} |
@ -0,0 +1,174 @@ |
|||
/******************************************************************************
|
|||
* Copyright © 2014-2016 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. * |
|||
* * |
|||
******************************************************************************/ |
|||
|
|||
// included from datachain.c
|
|||
#include "datachain_KOMODO.c" |
|||
#include "datachain_BTC.c" |
|||
|
|||
void datachain_events_process_virt(struct supernet_info *myinfo,struct datachain_info *dPoW,struct datachain_event *event) |
|||
{ |
|||
|
|||
} |
|||
|
|||
int _increasing_events(const void *a,const void *b) |
|||
{ |
|||
#define uint64_a (*(struct datachain_event **)a)->hdrsi_unspentind |
|||
#define uint64_b (*(struct datachain_event **)b)->hdrsi_unspentind |
|||
if ( uint64_b > uint64_a ) |
|||
return(-1); |
|||
else if ( uint64_b < uint64_a ) |
|||
return(1); |
|||
return(0); |
|||
#undef uint64_a |
|||
#undef uint64_b |
|||
} |
|||
|
|||
void datachain_events_sort(struct datachain_info *dPoW) |
|||
{ |
|||
if ( dPoW->numevents > 0 ) |
|||
{ |
|||
qsort(dPoW->events,dPoW->numevents,sizeof(dPoW->events),_increasing_events); |
|||
printf("sorted %d events\n",dPoW->numevents); |
|||
} |
|||
} |
|||
|
|||
struct datachain_event *datachain_event_create(struct iguana_info *coin,int64_t crypto777_payment,int64_t burned,int32_t height,uint32_t hdrsi,uint32_t unspentind,uint8_t *opreturn,int32_t oplen) |
|||
{ |
|||
struct datachain_event *event; |
|||
event = calloc(1,sizeof(*event) + oplen); |
|||
event->hdrsi_unspentind = ((uint64_t)hdrsi << 32) | unspentind; |
|||
event->crypto777_payment = crypto777_payment; |
|||
event->burned = burned; |
|||
event->height = height; |
|||
safecopy(event->symbol,coin->symbol,sizeof(event->symbol)); |
|||
if ( strcmp(event->symbol,"BTC") == 0 ) |
|||
event->btc_or_btcd = DATACHAIN_ISBTC; |
|||
else if ( strcmp(event->symbol,"BTCD") == 0 ) |
|||
event->btc_or_btcd = DATACHAIN_ISKOMODO; |
|||
event->oplen = oplen; |
|||
memcpy(event->opreturn,opreturn,oplen); |
|||
return(event); |
|||
} |
|||
|
|||
void datachain_events_process(struct supernet_info *myinfo,int32_t btc_or_btcd,struct datachain_info *dPoW,int32_t firsti,int32_t lasti) |
|||
{ |
|||
int32_t i; struct datachain_event *event; |
|||
if ( firsti >= 0 && lasti <= dPoW->numevents ) |
|||
{ |
|||
for (i=0; i<=lasti; i++) |
|||
if ( (event= dPoW->events[i]) != 0 ) |
|||
{ |
|||
if ( btc_or_btcd == DATACHAIN_ISBTC ) |
|||
datachain_events_processBTC(myinfo,dPoW,event); |
|||
else if ( btc_or_btcd == DATACHAIN_ISKOMODO ) |
|||
datachain_events_processKOMODO(myinfo,dPoW,event); |
|||
else datachain_events_process_virt(myinfo,dPoW,event); |
|||
dPoW->state.numprocessed++; |
|||
} |
|||
} else printf("illegal datachain_events_process.[%d, %d] numevents.%d\n",firsti,lasti,dPoW->numevents); |
|||
} |
|||
|
|||
void datachain_state_reset(struct supernet_info *myinfo,int32_t btc_or_btcd,struct datachain_info *dPoW) |
|||
{ |
|||
struct datachain_state *state = &dPoW->state; |
|||
memset(state,0,sizeof(*state)); |
|||
} |
|||
|
|||
void datachain_reset(struct supernet_info *myinfo,int32_t btc_or_btcd,struct datachain_info *dPoW) |
|||
{ |
|||
struct iguana_info *virt,*tmp; |
|||
if ( btc_or_btcd == DATACHAIN_ISBTC ) // all needs to be reset on BTC reorg
|
|||
datachain_reset(myinfo,DATACHAIN_ISKOMODO,&myinfo->dPoW.BTCD); |
|||
else if ( btc_or_btcd == DATACHAIN_ISKOMODO ) |
|||
{ |
|||
HASH_ITER(hh,myinfo->allcoins,virt,tmp) |
|||
{ |
|||
if ( virt->started != 0 && virt->active != 0 && virt->virtualchain != 0 ) |
|||
datachain_reset(myinfo,0,&virt->dPoW); |
|||
} |
|||
} |
|||
datachain_events_sort(dPoW); |
|||
datachain_state_reset(myinfo,btc_or_btcd,dPoW); |
|||
} |
|||
|
|||
int32_t datachain_eventadd(struct supernet_info *myinfo,int32_t ordered,struct datachain_info *dPoW,int32_t btc_or_btcd,struct datachain_event *event) |
|||
{ |
|||
uint64_t hdrsi_unspentind; int32_t retval = 0; |
|||
if ( ordered != 0 ) |
|||
{ |
|||
if ( dPoW->ordered == 0 ) |
|||
datachain_events_sort(dPoW); |
|||
} else dPoW->ordered = 0; |
|||
hdrsi_unspentind = ((uint64_t)dPoW->state.lasthdrsi << 32) | dPoW->state.lastunspentind; |
|||
if ( ordered != 0 ) |
|||
{ |
|||
if ( dPoW->ordered != dPoW->numevents ) |
|||
{ |
|||
printf("trigger reset and process.%d ordered.%d numevents.%d\n",btc_or_btcd,dPoW->ordered,dPoW->numevents); |
|||
datachain_reset(myinfo,btc_or_btcd,dPoW); |
|||
if ( dPoW->numevents > 0 ) |
|||
datachain_events_process(myinfo,btc_or_btcd,dPoW,0,dPoW->numevents-1); |
|||
if ( btc_or_btcd == DATACHAIN_ISBTC ) // all needs to be reprocessed on BTC reorg
|
|||
{ |
|||
if ( myinfo->dPoW.BTCD.numevents > 0 ) |
|||
datachain_events_process(myinfo,DATACHAIN_ISKOMODO,&myinfo->dPoW.BTCD,0,myinfo->dPoW.BTCD.numevents - 1); |
|||
} |
|||
else if ( btc_or_btcd == DATACHAIN_ISKOMODO ) |
|||
{ |
|||
struct iguana_info *virt,*tmp; |
|||
HASH_ITER(hh,myinfo->allcoins,virt,tmp) |
|||
{ |
|||
if ( virt->started != 0 && virt->active != 0 && virt->virtualchain != 0 ) |
|||
if ( virt->dPoW.numevents > 0 ) |
|||
datachain_events_process(myinfo,0,&virt->dPoW,0,virt->dPoW.numevents-1); |
|||
} |
|||
} |
|||
dPoW->ordered = dPoW->numevents; |
|||
} |
|||
} |
|||
if ( event != 0 ) |
|||
{ |
|||
if ( dPoW->numevents >= dPoW->maxevents ) |
|||
{ |
|||
dPoW->maxevents += 1024; |
|||
dPoW->events = realloc(dPoW->events,sizeof(*dPoW->events) * dPoW->maxevents); |
|||
} |
|||
if ( event->hdrsi_unspentind > hdrsi_unspentind ) |
|||
{ |
|||
dPoW->state.lasthdrsi = (uint32_t)(event->hdrsi_unspentind >> 32); |
|||
dPoW->state.lastunspentind = (uint32_t)event->hdrsi_unspentind; |
|||
retval = 1; |
|||
} |
|||
if ( ordered != 0 ) |
|||
{ |
|||
if ( retval != 1 && dPoW->ordered != 0 ) |
|||
{ |
|||
printf("datachain_eventadd unexpected ordered event that is not at the end\n"); |
|||
retval = -1; |
|||
} |
|||
dPoW->events[dPoW->numevents] = event; |
|||
if ( dPoW->ordered == dPoW->numevents ) |
|||
datachain_events_process(myinfo,btc_or_btcd,dPoW,dPoW->numevents,dPoW->numevents); |
|||
dPoW->numevents++; |
|||
dPoW->ordered = dPoW->numevents; |
|||
} else dPoW->events[dPoW->numevents++] = event; |
|||
} |
|||
return(dPoW->numevents); |
|||
} |
|||
|
|||
void datachain_update_txidvout(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,struct datachain_info *dPoW,int32_t btc_or_btcd,int32_t spentheight,bits256 txid,int32_t vout,uint8_t rmd160[20],int64_t value) |
|||
{ |
|||
// MGW via deposit events
|
|||
} |
@ -0,0 +1,60 @@ |
|||
.exchangecontainer{ |
|||
margin:30px; |
|||
|
|||
background-color:#FFF; |
|||
color:#000; |
|||
|
|||
} |
|||
.innersection{ |
|||
background-color:#EEE; |
|||
margin:20px 0; |
|||
padding:10px; |
|||
} |
|||
.innersection h4{ |
|||
padding:7px; |
|||
font-weight:bolder; |
|||
} |
|||
.coin1, .coin2{ |
|||
float:left; |
|||
color:#000; |
|||
background-color:#EEE; |
|||
width:50%; |
|||
padding: 10px 10px; |
|||
|
|||
} |
|||
|
|||
.exchangecontainer label, #exchange_model #frmexchange label{ |
|||
color:#000; |
|||
|
|||
} |
|||
#frmexchange label{ |
|||
text-align:left !important; |
|||
} |
|||
.innersection .exchange{ |
|||
text-align:center; |
|||
width: 120px; |
|||
background-color: #009688; |
|||
|
|||
} |
|||
.button{ |
|||
width: 20%; |
|||
margin: 0 auto; |
|||
} |
|||
.shape{ |
|||
font-family: inherit; |
|||
font-size: inherit; |
|||
line-height: inherit; |
|||
height: 33px; |
|||
border-radius: 6px; |
|||
box-shadow: 0 0 0; |
|||
border: 1px solid #ccc; |
|||
width: 166px; |
|||
text-align: center; |
|||
} |
|||
.innersection table td{ padding:10px;} |
|||
|
|||
#address_to, #address_from{ |
|||
|
|||
width:100% !important; |
|||
height:45px !important; |
|||
} |
@ -0,0 +1,842 @@ |
|||
<!DOCTYPE HTML> |
|||
|
|||
<html> |
|||
|
|||
<head> |
|||
|
|||
<title>iguana</title> |
|||
|
|||
<!-- Bootstrap --> |
|||
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> |
|||
<link rel="stylesheet" type="text/css" href="css/jquery.dropdown.css"> |
|||
<link rel="stylesheet" type="text/css" href="css/ripples.css"> |
|||
|
|||
<!-- Gogole Theme --> |
|||
<link rel="stylesheet" type="text/css" href="css/googleFonts.css"> |
|||
<link rel="stylesheet" type="text/css" href="css/googleIcons.css"> |
|||
<link rel="stylesheet" type="text/css" href="css/googleTheme.css"> |
|||
|
|||
<link rel="stylesheet" href="js/amcharts/style.css" type="text/css"> |
|||
|
|||
<script src="js/amcharts/amcharts.js" type="text/javascript"></script> |
|||
<script src="js/amcharts/serial.js" type="text/javascript"></script> |
|||
<script src="js/amcharts/amstock.js" type="text/javascript"></script> |
|||
<script src="js/amcharts/plugins/dataloader/dataloader.min.js" type="text/javascript"></script> |
|||
|
|||
<script> |
|||
|
|||
var httpresult; |
|||
function http_handler() |
|||
{ |
|||
if ( this.status == 200 && this.responseText != null ) |
|||
{ |
|||
alert(this.responseText); |
|||
httpresult = this.responseText; |
|||
} |
|||
} |
|||
|
|||
function httpGet(url) |
|||
{ |
|||
var client; |
|||
if ( window.XMLHttpRequest ) |
|||
client = new XMLHttpRequest(); |
|||
else client = new ActiveXObject(\"Microsoft.XMLHTTP\"); |
|||
client.onload = http_handler; |
|||
client.open(\"GET\",url); |
|||
client.send(); |
|||
} |
|||
|
|||
AmCharts.ready(function () { createStockChart(); }); |
|||
var interval,BASE= "BTCD",REL = "BTC"; |
|||
|
|||
function createStockChart() { |
|||
var chartData = []; |
|||
var chart = AmCharts.makeChart("chartdiv", |
|||
{ |
|||
"type": "serial", |
|||
"theme": "dark", |
|||
"valueAxes": [ |
|||
{ "title":"BTC", "id": "vert", "axisAlpha": 0, "dashLength": 1, "position": "left"}, |
|||
{ "id": "horiz", "axisAlpha": 0, "dashLength": 1, "position": "bottom", "labelFunction": function (value) { |
|||
var date = new Date(value); |
|||
return AmCharts.formatDate(date, "MMM DD HH:NN:SS"); |
|||
}} |
|||
], |
|||
"graphs": [ |
|||
{ "id": "g1", "lineColor": "#00FFFF", "bullet": "round", "valueField": "bid", "balloonText": "[[category]] [[h]]:[[m]]:[[s]] account:[[offerer]] id:[[orderid]] volume:[[volume]] bid:[[bid]]" }, |
|||
{ "id": "g2", "lineColor": "#FF8800", "bullet": "round", "valueField": "ask", "balloonText": "[[category]] [[h]]:[[m]]:[[s]] account:[[offerer]] id:[[orderid]] volume:[[volume]] ask:[[ask]]" }], |
|||
"categoryField": "date", |
|||
"categoryAxis": { "parseDates": true, "equalSpacing": true, "dashLength": 1, "minorGridEnabled": true }, |
|||
"chartScrollbar": {}, |
|||
"chartCursor": {}, |
|||
"dataProvider": chartData |
|||
}); |
|||
|
|||
var startButton = document.getElementById('start'); |
|||
var endButton = document.getElementById('stop'); |
|||
var buyButton = document.getElementById('buy'); |
|||
var sellButton = document.getElementById('sell'); |
|||
/* |
|||
var BTCbutton = document.getElementById('BTC'); |
|||
var CNYbutton = document.getElementById('CNY'); |
|||
var USDbutton = document.getElementById('USD'); |
|||
var EURbutton = document.getElementById('EUR'); |
|||
var JPYbutton = document.getElementById('JPY'); |
|||
var GBPbutton = document.getElementById('GBP'); |
|||
var AUDbutton = document.getElementById('AUD'); |
|||
var CADbutton = document.getElementById('CAD'); |
|||
var CHFbutton = document.getElementById('CHF'); |
|||
var NZDbutton = document.getElementById('NZD'); |
|||
|
|||
USDbutton.addEventListener('click', USDrel); |
|||
EURbutton.addEventListener('click', EURrel); |
|||
JPYbutton.addEventListener('click', JPYrel); |
|||
GBPbutton.addEventListener('click', GBPrel); |
|||
AUDbutton.addEventListener('click', AUDrel); |
|||
CADbutton.addEventListener('click', CADrel); |
|||
CHFbutton.addEventListener('click', CHFrel); |
|||
NZDbutton.addEventListener('click', NZDrel); |
|||
CNYbutton.addEventListener('click', CNYrel); |
|||
BTCbutton.addEventListener('click', BTCrel); |
|||
*/ |
|||
|
|||
var BTCDbutton = document.getElementById('BTCD'); |
|||
var VPNbutton = document.getElementById('VPN'); |
|||
var VRCbutton = document.getElementById('VRC'); |
|||
var SYSbutton = document.getElementById('SYS'); |
|||
var SuperNETbutton = document.getElementById('SuperNET'); |
|||
var crypto777button = document.getElementById('crypto777'); |
|||
var pangeabutton = document.getElementById('Pangea'); |
|||
var InstantDEXbutton = document.getElementById('InstantDEX'); |
|||
var Tradebotsbutton = document.getElementById('Tradebots'); |
|||
var NXTprivacybutton = document.getElementById('NXTprivacy'); |
|||
|
|||
|
|||
startButton.addEventListener('click', startDemo); |
|||
endButton.addEventListener('click', endDemo); |
|||
buyButton.addEventListener('click', buyaction); |
|||
sellButton.addEventListener('click', sellaction); |
|||
|
|||
BTCDbutton.addEventListener('click', BTCDbase); |
|||
VPNbutton.addEventListener('click', VPNbase); |
|||
SYSbutton.addEventListener('click', SYSbase); |
|||
SuperNETbutton.addEventListener('click', SuperNETbase); |
|||
crypto777button.addEventListener('click', crypto777base); |
|||
pangeabutton.addEventListener('click', Pangeabase); |
|||
InstantDEXbutton.addEventListener('click', InstantDEXbase); |
|||
Tradebotsbutton.addEventListener('click', Tradebotsbase); |
|||
NXTprivacybutton.addEventListener('click', NXTprivacybase); |
|||
|
|||
function changebase(newbase) |
|||
{ |
|||
BASE = newbase; |
|||
if ( chartData.length > 0 ) |
|||
{ |
|||
chartData.splice(0,chartData.length); |
|||
chart.validateData(); |
|||
} |
|||
} |
|||
function BTCDbase() { changebase("BTCD"); } |
|||
function VPNbase() { changebase("VPN"); } |
|||
function SYSbase() { changebase("SYS"); } |
|||
function SuperNETbase() { changebase("SuperNET"); } |
|||
function crypto777base() { changebase("crypto777"); } |
|||
function Pangeabase() { changebase("Pangea"); } |
|||
function InstantDEXbase() { changebase("InstantDEX"); } |
|||
function Tradebotsbase() { changebase("Tradebots"); } |
|||
function NXTprivacybase() { changebase("NXTprivacy"); } |
|||
|
|||
function USDrel() { REL = "USD"; } |
|||
function EURrel() { REL = "EUR"; } |
|||
function JPYrel() { REL = "JPY"; } |
|||
function GBPrel() { REL = "GBP"; } |
|||
function AUDrel() { REL = "AUD"; } |
|||
function CADrel() { REL = "CAD"; } |
|||
function CHFrel() { REL = "CHF"; } |
|||
function NZDrel() { REL = "NZD"; } |
|||
function CNYrel() { REL = "CNY"; } |
|||
function BTCrel() { REL = "CNY"; } |
|||
|
|||
function startDemo() { |
|||
startButton.disabled = "disabled"; |
|||
endButton.disabled = ""; |
|||
interval = setInterval(getDataFromServer, 1000); |
|||
} |
|||
|
|||
function endDemo() { |
|||
startButton.disabled = ""; |
|||
endButton.disabled = "disabled"; |
|||
clearInterval(interval); |
|||
} |
|||
|
|||
function buyaction() { |
|||
alert("need to do market buy"); |
|||
} |
|||
|
|||
function sellaction() { |
|||
alert("need to do market sell"); |
|||
} |
|||
|
|||
function getDataFromServer() |
|||
{ |
|||
var i,newData = []; |
|||
var request='{"agent":"InstantDEX","method":"events","base":"'+BASE+'","rel":"'+REL+'"}'; |
|||
SPNAPI.makeRequest(request, |
|||
function(request,response) |
|||
{ |
|||
newData = JSON.parse(response); |
|||
if ( newData.length > 0 ) |
|||
{ |
|||
alert(response); |
|||
chartData.push.apply(chartData, newData); |
|||
if (chartData.length > 50) |
|||
chartData.splice(0, chartData.length - 50); |
|||
chart.validateData(); //call to redraw the chart with new data |
|||
} |
|||
}); |
|||
|
|||
// newData = JSON.parse("[{\"h\":14,\"m\":44,\"s\":32,\"date\":1407877200000,\"bid\":30,\"ask\":35},{\"date\":1407877200000,\"bid\":40,\"ask\":44},{\"date\":1407877200000,\"bid\":49,\"ask\":45},{\"date\":1407877200000,\"ask\":28},{\"date\":1407877200000,\"ask\":52}]"); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
</script> |
|||
|
|||
</head> |
|||
|
|||
<body data-custom-load="true" data-name="iguana" data-tools="pnacl newlib glibc clang-newlib mac" data-configs="Debug Release" |
|||
data-path="{tc}/{config}"> |
|||
<!-- <div class="jumbotron" style="height:100px;"> |
|||
<h> Status: <code id="statusField">NO-STATUS</code></h> |
|||
<p> |
|||
<select id="pipe_name" hidden> |
|||
<option>urand</option> |
|||
<option>Pangea</option> |
|||
<option>MGW</option> |
|||
</select> |
|||
<input type="text" id="pipe_input_box" hidden> |
|||
</p> |
|||
<p><textarea id="pipe_output" hidden></textarea></p> |
|||
</div> --> |
|||
<div class="iguana"> |
|||
<nav class="navbar navbar-default"> |
|||
<div class="container-fluid"> |
|||
<!-- Brand and toggle get grouped for better mobile display --> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse"> |
|||
<!--Hamburger--> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<!--<a class="navbar-brand" href="#"> |
|||
<img alt="Brand" style="z-index:-1;" src="logo.png" width="25" height="25"> |
|||
</a>--> |
|||
<a href="#" class="navbar-brand">Iguana</a> |
|||
</div> |
|||
<!-- Collect the nav links, forms, and other content for toggling --> |
|||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li id="welcome"> <!--<a href="#">Welcome <span class="sr-only">(current)</span></a>--></li> |
|||
|
|||
<!--<li class="dropdown"> |
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">More <span class="caret"></span></a> |
|||
<ul class="dropdown-menu"> |
|||
<li><a href="#">Wiki</a></li> |
|||
<li><a href="#">Wallet</a></li> |
|||
<li><a href="#">Community</a></li> |
|||
<li role="separator" class="divider"></li> |
|||
<li><a href="#">Contact</a></li> |
|||
<li role="separator" class="divider"></li> |
|||
<li><a>Upload Conf<input type="file" id="files" name="file" /></a></li> |
|||
<div id="byte_range"></div> |
|||
<div id="byte_content"></div> |
|||
</ul> |
|||
</li>--> |
|||
</ul> |
|||
</div> |
|||
<!-- /.navbar-collapse --> |
|||
</div> |
|||
<!-- /.container-fluid --> |
|||
</nav> |
|||
<div class="container"> |
|||
<!--<div id="welcome_page" class="page" style="text-align: center;"> |
|||
<div class="panel panel-default"> |
|||
<!-- Default panel contents |
|||
<div class="panel-heading">Welcome</div> |
|||
<div class="panel-body"> |
|||
<h2>iguana</h2> |
|||
<p> |
|||
iguana is fast. |
|||
</p> |
|||
<p> |
|||
iguana does all bitcoin compatibles. |
|||
</p> |
|||
<p> |
|||
iguana is fast. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div>--> |
|||
<!-- eyedea page is for creating front-end markup --> |
|||
<div id="Pangea_page" class="page"> |
|||
<div class="row" style="margin-bottom:15px;"> |
|||
<div class="col-xs-4 col-sm-3 col-md-2"> |
|||
<div class="api-navpills"> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-8 col-sm-9 col-md-10"> |
|||
|
|||
|
|||
|
|||
<div class="panel-group"> |
|||
<div class="panel panel-default api-call-All"> |
|||
<div class="panel-heading"> |
|||
<h4 class="panel-title api-panel-title">Json posting form</h4> |
|||
</div> |
|||
<!-- panel-heading --> |
|||
<div class="panel-body"> |
|||
<div class="row"> |
|||
<div class="col-xs-9 col-sm-10 col-md-8"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<textarea name="json_to_submit" id="json_src" cols="30" rows="5" class="result form-control" placeholder='Paste json here'></textarea> |
|||
</div> |
|||
<div class="form-group"> |
|||
<button class="btn btn-primary host_pangea_request" id='submit_primary'>Host game</button> |
|||
<button class="btn btn-primary list_pangea_request" id='list_pangea'>List games</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-6 col-md-4 col-lg-4"> |
|||
<div class="panel-body"> |
|||
<h5 class='uri-link'>Response</h5> |
|||
<pre class="hljs json result">JSON response</pre> |
|||
<button class="btn btn-default clear-response">Clear response</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<hr> |
|||
<h3> |
|||
<span>List of games</span> |
|||
<!--<button id="clearHistory" style='float: right' class='btn btn-default'>Clear history</button>--> |
|||
</h3> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<table class="table" id='game_list_table'> |
|||
<tbody> |
|||
|
|||
</tbody> |
|||
</table> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- panel-body --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<!--Coin Management Starts--> |
|||
<div id="Coins_page" class="page"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading"> |
|||
<h3>Coin Management</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
|
|||
<div class="pull-right"> |
|||
<button id="Coins_reset" class="btn btn-raised" title="Reset">Reset</button> |
|||
<button id="Coins_refresh" class="btn btn-raised" title="Refresh">Refresh</button> |
|||
<button id="Coins_add" class="btn btn-raised btn-primary" type="button" data-toggle="modal" data-target="#CoinEditModal" title="Add">Add</button> |
|||
</div> |
|||
|
|||
<table id="Coins_table" class="table table-hover table-condensed table-bordered "> |
|||
<thead> |
|||
<tr> |
|||
<th>Symbol</th> |
|||
<th>Description</th> |
|||
<th>Status</th> |
|||
<th>Action</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
</tbody> |
|||
</table> |
|||
<!--Modal starts--> |
|||
<div class="modal fade" id="CoinEditModal" tabindex="-1" role="dialog" aria-labelledby="editCoinHeader"> |
|||
<div class="modal-dialog" role="document"> |
|||
<div class="modal-content"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
|||
<h4 class="modal-title" id="editCoinHeader">Edit Coin</h4> |
|||
</div> |
|||
<div class="modal-body"> |
|||
<div id="coinEditFormContainer"> |
|||
<form class="form-horizontal" id="frmCoinEdit" name="frmCoinEdit"> |
|||
<div id="txtSymbolGroup" class="form-group"> |
|||
<label for="txtSymbol" class="control-label col-xs-2 col-md-2">Symbol</label> |
|||
<div class="col-xs-10 col-md-10"> |
|||
<input type="text" id="txtSymbol" name="txtSymbol" class="form-control input-sm" /> |
|||
</div> |
|||
</div> |
|||
<div id="txtDescriptionGroup" class="form-group"> |
|||
<label for="txtDescription" class="control-label col-xs-2 col-md-2">Description</label> |
|||
<div class="col-xs-10 col-md-10"> |
|||
<input type="text" id="txtDescription" name="txtDescription" class="form-control input-sm" /> |
|||
</div> |
|||
</div> |
|||
<div id="ddCoinStatus" class="form-group"> |
|||
<label for="ddStatus" class="control-label col-xs-2 col-md-2">Status</label> |
|||
<div class="col-xs-10 col-md-10"> |
|||
<select type="text" id="ddStatus" name="ddStatus" class="form-control input-sm"></select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button id="btnClearCoinForm" type="button" class="btn btn-raised btn-default" data-dismiss="modal">Nevermind</button> |
|||
<button id="btnSaveCoinForm" type="button" class="btn btn-raised btn-primary" data-dismiss="modal">Save</button> |
|||
<!-- <button id="btnSaveCoinForm" type="button" class="btn btn-primary">Save</button> --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--Modal Ends--> |
|||
|
|||
<div class="row"> |
|||
<div class="col-xs-9 col-sm-10 col-md-8"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-body"> |
|||
<div class="form-group"> |
|||
<textarea id="json_src_coin" cols="30" rows="5" class="result form-control" placeholder='Paste json here'></textarea> |
|||
</div> |
|||
<div class="form-group"> |
|||
<button class="btn btn-primary submit_new_coin_test" >Add coin</button> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-xs-6 col-md-4 col-lg-4"> |
|||
<div class="panel-body"> |
|||
<h5 class='uri-link'>Response</h5> |
|||
<pre class="hljs json coin_result">JSON response</pre> |
|||
<button class="btn btn-default clear-response-coin">Clear response</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--Coin Management Ends--> |
|||
|
|||
|
|||
<!-- peers tab --> |
|||
<div id="Peers_page" class="page"> |
|||
<div class="row"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading"> |
|||
<h3> |
|||
<span>Peer Management</span> |
|||
</h3> |
|||
</div> |
|||
<div class="panel-body"><div> |
|||
<button class="btn btn-xs btn-success btn-raised connect_to_peers_from_conf" >Load peers</button> |
|||
|
|||
<button class="btn btn-xs btn-success btn-raised save_peersdata_to_conf" >Save Peers</button> |
|||
<button class="btn btn-xs btn-success btn-raised update_allpeer_status" >Update Peers</button> |
|||
<div class="pull-right"> |
|||
<span class="checkbox"><label><input id="cbShowFavoritePeers" type="checkbox"/> Favorites</label></span> |
|||
</div></div><div class="pre-scrollable"> |
|||
<table id="peersTable" class="table table-hover table-bordered pre-scrollable"> |
|||
<thead> |
|||
<tr> |
|||
<th>IP Address</th> |
|||
<th>Coin Type</th> |
|||
<th>Height</th> |
|||
<th>Rank</th> |
|||
<th>Block</th> |
|||
<th>Favourite </th> |
|||
<th>Actions</th> |
|||
|
|||
</tr> |
|||
</thead> |
|||
<tbody id="peersTableBody"></tbody> |
|||
</table></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div id="Tradebot_page" class="page"> |
|||
<div class="row"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading"> |
|||
<h3> |
|||
<span>Tradebot</span> |
|||
</h3> |
|||
</div> |
|||
<div class="panel-body center button_div"> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="monitor" >monitor</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="monitorall" >monitorall</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="unmonitor" >unmonitor</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="accumulate" >accumulate</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="divest" >divest</button> |
|||
|
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="activebots" >activebots</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="status" >status</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="pause" >pause</button> |
|||
|
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="stop" >stop</button> |
|||
<button class="btn btn-primary Tradebot_set_method_table" data-method="resume" >resume</button> |
|||
|
|||
|
|||
</div> |
|||
<div class="panel-body"> |
|||
|
|||
<table id="tradebot_input" class="table table-hover table-bordered"> |
|||
|
|||
|
|||
</table> |
|||
<table id="trade_output" class="table table-hover table-bordered"> |
|||
|
|||
|
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div id="Settings_page" class="page"> |
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title">Settings</h3> |
|||
</div> |
|||
<div class="panel-body" > |
|||
<div class="row"> |
|||
<div class="pre-scrollable"> |
|||
<div class="col-xs-6 col-md-6 col-lg-6 "> |
|||
<div id="advanced_settings"></div> |
|||
</div> |
|||
<div class="col-xs-6 col-md-6 col-lg-6"> |
|||
<div id="config_settings"></div> |
|||
<div class="function" id="fread" hidden> |
|||
<span> |
|||
<select class="file-handle" id="freadHandle"></select> |
|||
Count: |
|||
<input type="text" id="freadBytes"> |
|||
<button>fread</button> |
|||
</span> |
|||
</div> |
|||
<div class="function" id="fwrite" hidden> |
|||
<span> |
|||
<select class="file-handle" id="fwriteHandle"></select> |
|||
Data: |
|||
<input type="text" id="fwriteData"> |
|||
<button>fwrite</button> |
|||
</span> |
|||
</div> |
|||
</div></div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-xs-6 col-md-6 col-lg-6"> |
|||
<div class="form-group"> |
|||
<button class="btn btn-primary _not_pressed" id="save_settings">Save</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div id="Debug_page" class="page"> |
|||
<div class='panel panel-default'> |
|||
<div class='panel-heading'> |
|||
<h3><span> |
|||
Encrypt/decrypt JSON |
|||
</span></h3> |
|||
</div> |
|||
<div class='panel-body'> |
|||
<div class="row"> |
|||
<div class="col-sm-8 col-md-8"> |
|||
<form class="form-horizontal"> |
|||
<div class="form-group"> |
|||
<label for="debug_passphrase" class="control-label col-sm-3 col-md-3"> |
|||
Passphrase |
|||
</label> |
|||
<div class="col-sm-7 col-md-7"> |
|||
<input type="text" class="form-control" id='debug_passphrase'> |
|||
<span class='material-input'></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="debug_permanentfile" class="control-label col-sm-3 col-md-3"> |
|||
Permanentfile |
|||
</label> |
|||
<div class="col-sm-7 col-md-7"> |
|||
<div> |
|||
<input type="text" class="form-control" id='debug_permanentfile'> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="debug_json_src" class="control-label col-sm-3 col-md-3"> |
|||
Json |
|||
</label> |
|||
<div class="col-sm-7 col-md-7"> |
|||
<textarea name="" id="debug_json_src" cols="30" rows="5" class='form-control'></textarea> |
|||
<span class='material-input'></span> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<button class="btn btn-primary" id="debug_json_encrypt"> |
|||
Encrypt JSON |
|||
</button> |
|||
<button class="btn btn-primary" id="debug_json_decrypt"> |
|||
Decrypt JSON |
|||
</button> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<div class="col-sm-4 col-md-4"> |
|||
<h5 class="uri-link">Response</h5> |
|||
<pre class="hljs json coin_result" id="debug_json_result">JSON response</pre> |
|||
|
|||
<h5 class="uri-link">File contents</h5> |
|||
<pre class="hljs" id="debug_json_file">encrypted file content</pre> |
|||
|
|||
<button class="btn btn-default" id="debug_clear_response">Clear response</button> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<div class="jumbotron"> |
|||
<table> |
|||
<tr > |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="1" id="dest-imagAPI-1" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="2" id="dest-imagAPI-2"/></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="3" id="dest-imagAPI-3" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="4" id="dest-imagAPI-4" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="5" id="dest-imagAPI-5" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="6" id="dest-imagAPI-6" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="7" id="dest-imagAPI-7" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="8" id="dest-imagAPI-8" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="9" id="dest-imagAPI-9" /></td> |
|||
<td><img src="" height="90" width="90" class="imagAPI" data-id="10" id="dest-imagAPI-10" /></td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td align="center" ><input id="name-imagAPI-1" type="text" value="abc1.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-2" type="text" value="abc2.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-3" type="text" value="abc3.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-4" type="text" value="abc4.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-5" type="text" value="abc5.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-6" type="text" value="abc6.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-7" type="text" value="abc7.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-8" type="text" value="abc8.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-9" type="text" value="abc9.jpg" size="7"/></td> |
|||
<td align="center" ><input id="name-imagAPI-10" type="text" value="abc10.jpg" size="7"/></td> |
|||
|
|||
|
|||
</tr> |
|||
<tr style="display: none;"> |
|||
<td><img src="images/img1.png" height="90" width="90" id="src-imagAPI-1" /></td> |
|||
<td><img src="images/img2.jpg" height="90" width="90" id="src-imagAPI-2" /></td> |
|||
<td><img src="images/img3.png" height="90" width="90" id="src-imagAPI-3" /></td> |
|||
<td><img src="images/img4.png" height="90" width="90" id="src-imagAPI-4" /></td> |
|||
<td><img src="images/img1.png" height="90" width="90" id="src-imagAPI-5" /></td> |
|||
<td><img src="images/img2.jpg" height="90" width="90" id="src-imagAPI-6" /></td> |
|||
<td><img src="images/img3.png" height="90" width="90" id="src-imagAPI-7" /></td> |
|||
<td><img src="images/img4.png" height="90" width="90" id="src-imagAPI-8" /></td> |
|||
<td><img src="images/img1.png" height="90" width="90" id="src-imagAPI-9" /></td> |
|||
<td><img src="images/img2.jpg" height="90" width="90" id="src-imagAPI-10" /></td> |
|||
</tr> |
|||
<tr><td colspan="10"> |
|||
<span id="mousexy"></span> |
|||
</td> |
|||
</tr> |
|||
|
|||
</table> |
|||
|
|||
<div class="debuglog" hidden> <pre id="log" style="font-weight: bold"></pre></div> |
|||
</div> |
|||
</div> |
|||
<div id="Bitmap_page" class="page"> |
|||
<div> |
|||
<select id="pic-changer"> |
|||
<option value="none">None selected</option> |
|||
<option value="img3.jpg" data-picture="images/img3.png">Image1</option> |
|||
</select> |
|||
</div> |
|||
|
|||
<div id="image-location"> |
|||
|
|||
</div> |
|||
<div> |
|||
<span id="bit_mousexy"></span> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div id="Blockexplorer_page" class="page"> |
|||
<div class="panel panel-default"> |
|||
<!-- Default panel contents --> |
|||
<div class="panel-heading"> |
|||
<h3>Block Explorer tab</h3> |
|||
</div> |
|||
<div class="panel-body center"> |
|||
<div class="pull-right"> |
|||
<span class="checkbox"><label><input id="cbChangeExternalBlocks" type="checkbox"/> Use External Blocks</label></span> |
|||
</div> |
|||
<h3>Set Active coin</h3> |
|||
<div id="BlockExpCoin"> |
|||
|
|||
</div> |
|||
<div > |
|||
<table id="block_input_table"></table> |
|||
</div> |
|||
<div> |
|||
|
|||
<table id="block_output_table" width="500px"> |
|||
|
|||
</table> |
|||
</div> |
|||
|
|||
|
|||
<table id="appstatus" class="table table-hover table-bordered"> |
|||
|
|||
</table> |
|||
</div> |
|||
</div> |
|||
<style type="text/css"> |
|||
#Blockexplorer_page .center { |
|||
text-align: center; |
|||
} |
|||
</style> |
|||
</div> |
|||
|
|||
|
|||
<div id="Instandex_page" class="page"> |
|||
<div class="panel panel-default"> |
|||
<!-- Default panel contents --> |
|||
<div class="panel-heading"> |
|||
<h3>InstantDEX</h3> |
|||
<div class="chart"> |
|||
<button id="start">Start</button> |
|||
<button id="stop" disabled="disabled">Stop </button> |
|||
<button id="BTCD"> BTCD</button> |
|||
<button id="VPN">VPN</button> |
|||
<button id="SYS">SYS</button> |
|||
<button id="VRC">VRC</button> |
|||
<button id="SuperNET">SuperNET</button> |
|||
<button id="crypto777">crypto777</button> |
|||
<button id="InstantDEX">InstantDEX</button> |
|||
<button id="Tradebots">Tradebots</button> |
|||
<button id="Pangea">Pangea</button> |
|||
<button id="NXTprivacy">NXTprivacy</button> |
|||
<button id="buy">BUY</button> |
|||
<button id="sell">SELL</button> |
|||
<div id="chartdiv"></div> |
|||
</div> |
|||
|
|||
</div><div class="pre-scrollable"> |
|||
<div class="panel-body center"> |
|||
<button class="btn xyz_button_click btn-primary instantdex_set_method_table" data-method="orderbook" >orderbook</button> |
|||
<button class="btn xyz_button_click btn-primary instantdex_set_method_table" data-method="apikeypair" >API Keypair</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="setuserid" >Set Userid</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="allpairs" >Allpairs</button> |
|||
|
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="balance" >Balance</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="support" >Supports</button> |
|||
|
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="sell" >Sell</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="buy" >Buy</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="withdraw" >Withdraw</button> |
|||
|
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="order_status" >Order status </button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="order_open" >Open Orders</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="order_cancel" >Cancel Order</button> |
|||
|
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="trade_history" >Trade History</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="pollgap" >Pollgap</button> |
|||
<button class="btn btn-primary instantdex_set_method_table" data-method="tradeint" >Trade integration</button> |
|||
|
|||
</div> |
|||
|
|||
<div class="panel-body center"> |
|||
<table id="Instandex_form_table" class="table table-hover table-bordered"> |
|||
</table> |
|||
</div> |
|||
<div class="panel-body center"> |
|||
<table id="Instandex_output_table" class="table table-hover table-bordered" > |
|||
|
|||
</table> |
|||
</div></div> |
|||
|
|||
</div> |
|||
<style type="text/css"> |
|||
#Blockexplorer_page .center { |
|||
text-align: center; |
|||
} |
|||
</style> |
|||
</div> |
|||
|
|||
|
|||
<div id="listener"></div> |
|||
</div> |
|||
</div> |
|||
<!--if android style ripple effect is not working, try temporarily deleting the following line--> |
|||
<script type="text/javascript " src="example.js "></script> |
|||
|
|||
<!--jQuery--> |
|||
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script> |
|||
|
|||
<!--Bootstrap--> |
|||
<script type="text/javascript" src="js/bootstrap.js"></script> |
|||
|
|||
|
|||
<!--Google Theme--> |
|||
<script type="text/javascript" src='js/googleTheme.min.js'></script> |
|||
<script type="text/javascript" src='js/ripples.min.js'></script> |
|||
<script type="text/javascript" src='js/jquery.dropdown.js'></script> |
|||
|
|||
<!--Iguana genric code--> |
|||
<script type="text/javascript" src="js/api.js" " charset="utf-8 "></script> |
|||
<script src="app/coin_mgmt.js "></script> |
|||
<script type="text/javascript " src="js/util.js "></script> |
|||
<script type="text/javascript " src="js/sites.js " charset="utf-8 "></script> |
|||
<script type="text/javascript " src="app/common.js "></script> |
|||
<script type="text/javascript " src="app/startup.js " ></script> |
|||
<script type="text/javascript " src="js/settings.js " charset="utf-8 "></script> |
|||
<!--Iguana tabs--> |
|||
<script src='js/form.js'></script> |
|||
<script type="text/javascript " src='js/peerlist.js'></script> |
|||
<script type="text/javascript " src="js/methods.js " charset="utf-8 "></script> |
|||
|
|||
<script type="text/javascript " src="js/imgAPI.js " ></script> |
|||
<script type="text/javascript " src="js/pangea.js" ></script> |
|||
<script type="text/javascript " src="js/blockexplorer.js" ></script> |
|||
<script type="text/javascript " src="js/instantdex.js" ></script> |
|||
<script type="text/javascript " src="js/tradebot.js" ></script> |
|||
<script type="text/javascript " src="js/storage.js" ></script> |
|||
<script type="text/javascript " src="js/jquery.tablesort.js" ></script> |
|||
<script type="text/javascript " src="js/tradeintegration.js" ></script> |
|||
<script type="text/javascript " src="js/debugJson.js" ></script> |
|||
<script type="text/javascript " src="js/bitmap.js " ></script> |
|||
</body> |
|||
|
|||
</html> |
@ -1,2 +1,2 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\", 0.0001, \"4e4557444558000000496e7374616e744445580000407a10f35a0000e1526b5aab0b6b57ffffff1e000000000100013c0580f1dce4182fce875748c4986b240ff7d7bc3fffb0\", \"sendcomment\"]}" |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\", 0.0001, \"4e4557444558000000496e7374616e74444558000000000000407a10f35a0000dffc6993a2216d57ffffff1e1f4e010001000cba013c0580f1dce4182fce875748c4986b240ff7d7bc3fffb0\", \"sendcomment\"]}" |
|||
|
|||
|
@ -0,0 +1,2 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"basilisk\",\"method\":\"genesis_opreturn\",\"vals\":{\"issuer\":\"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\",\"stake\":1000000,\"blocktime\":1,\"name\":\"HOT ICO\",\"symbol\":\"HOT\",\"p2sh\":5,\"wif\":128,\"nBits\":\"1effffff\"}}" |
|||
|
@ -0,0 +1,2 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"sendtoaddress\",\"params\":[\"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\", 0.0001, \"4e4557484f54000000484f542049434f000000000000000000407a10f35a00007f53009145d46b57ffffff1e0000000001009577013c0580f1dce4182fce875748c4986b240ff7d7bc3fffb0\", \"sendcomment\"]}" |
|||
|
@ -1 +1 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"0100000071d46a5701df62e7985792f07682f565e9496d9358398839f6d7154f531c481d872fb74fcd010000006b483045022100ba971715e5084c71a4239d57af05dc8cf8c9ba478e50949e55accc8345a5388502206da445b50c927ff1b69901c60c97cd01e488c9a865efa5cb724bfc24a05d863d012103377aea6f477582332f128acb197b9f463b5262571d23afaa113dfab48753e3cdffffffff0310270000000000001976a914f1dce4182fce875748c4986b240ff7d7bc3fffb088acc02d9a3b000000001976a914c210f6711e98fe9971757ede2b2dcb0507f3f25e88ac00000000000000004c6a4a00407a10f35a00007ed8874d63a66a57ffffff1e000000000100010005800000000000000000000000000000000000000000444558000000496e7374616e74444558000000000000000000000000\"]}" |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"01000000a2216d57010000000000000000000000000000000000000000000000000000000000000000ffffffff0f4445585f496e7374616e7444455800ffffffff0100407a10f35a00001976a914f1dce4182fce875748c4986b240ff7d7bc3fffb088ac00000000\"]}" |
|||
|
Loading…
Reference in new issue