jl777
9 years ago
33 changed files with 1824 additions and 847 deletions
@ -0,0 +1,277 @@ |
|||
/*-
|
|||
* Copyright 2009 Colin Percival, 2011 ArtForz, 2011 pooler, 2013 Balthazar |
|||
* All rights reserved. |
|||
* |
|||
* Redistribution and use in source and binary forms, with or without |
|||
* modification, are permitted provided that the following conditions |
|||
* are met: |
|||
* 1. Redistributions of source code must retain the above copyright |
|||
* notice, this list of conditions and the following disclaimer. |
|||
* 2. Redistributions in binary form must reproduce the above copyright |
|||
* notice, this list of conditions and the following disclaimer in the |
|||
* documentation and/or other materials provided with the distribution. |
|||
* |
|||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
|||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
|||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
|||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|||
* SUCH DAMAGE. |
|||
* |
|||
* This file was originally written by Colin Percival as part of the Tarsnap |
|||
* online backup system. |
|||
*/ |
|||
|
|||
#include "../includes/curve25519.h" |
|||
#define SCRYPT_BUFFER_SIZE (131072 + 63) |
|||
|
|||
/*
|
|||
static inline uint32_t be32dec(const void *pp) |
|||
{ |
|||
const uint8_t *p = (uint8_t const *)pp; |
|||
return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); |
|||
} |
|||
|
|||
static inline void be32enc(void *pp,uint32_t x) |
|||
{ |
|||
uint8_t *p = (uint8_t *)pp; |
|||
p[3] = x & 0xff; |
|||
p[2] = (x >> 8) & 0xff; |
|||
p[1] = (x >> 16) & 0xff; |
|||
p[0] = (x >> 24) & 0xff; |
|||
} |
|||
|
|||
void HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx,const void * _K,size_t Klen) |
|||
{ |
|||
size_t i; uint8_t pad[64],khash[32]; const uint8_t * K = (const uint8_t *)_K; |
|||
// If Klen > 64, the key is really SHA256(K).
|
|||
if ( Klen > 64 ) |
|||
{ |
|||
SHA256_Init(&ctx->ictx); |
|||
SHA256_Update(&ctx->ictx, K, Klen); |
|||
SHA256_Final(khash, &ctx->ictx); |
|||
K = khash; |
|||
Klen = 32; |
|||
} |
|||
// Inner SHA256 operation is SHA256(K xor [block of 0x36] || data).
|
|||
SHA256_Init(&ctx->ictx); |
|||
memset(pad, 0x36, 64); |
|||
for (i = 0; i < Klen; i++) |
|||
pad[i] ^= K[i]; |
|||
SHA256_Update(&ctx->ictx, pad, 64); |
|||
// Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash).
|
|||
SHA256_Init(&ctx->octx); |
|||
memset(pad, 0x5c, 64); |
|||
for (i = 0; i < Klen; i++) |
|||
pad[i] ^= K[i]; |
|||
SHA256_Update(&ctx->octx, pad, 64); |
|||
// Clean the stack.
|
|||
memset(khash,0,32); |
|||
} |
|||
|
|||
// Add bytes to the HMAC-SHA256 operation.
|
|||
void HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx,const void *in,size_t len) |
|||
{ |
|||
SHA256_Update(&ctx->ictx,in,len); |
|||
} |
|||
|
|||
// Finish an HMAC-SHA256 operation.
|
|||
void HMAC_SHA256_Final(uint8_t digest[32],HMAC_SHA256_CTX *ctx) |
|||
{ |
|||
uint8_t ihash[32]; |
|||
SHA256_Final(ihash,&ctx->ictx); |
|||
SHA256_Update(&ctx->octx,ihash,32); |
|||
SHA256_Final(digest,&ctx->octx); |
|||
memset(ihash,0,32); |
|||
} |
|||
|
|||
// PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and write the output to buf. The value dkLen must be at most 32 * (2^32 - 1)
|
|||
void PBKDF2_SHA256(const uint8_t *passwd,size_t passwdlen,const uint8_t *salt,size_t saltlen,uint64_t c,uint8_t *buf,size_t dkLen) |
|||
{ |
|||
HMAC_SHA256_CTX PShctx, hctx; |
|||
size_t i,clen; uint8_t ivec[4],U[32],T[32]; uint64_t j; int32_t k; |
|||
// Compute HMAC state after processing P and S.
|
|||
HMAC_SHA256_Init(&PShctx, passwd, passwdlen); |
|||
HMAC_SHA256_Update(&PShctx, salt, saltlen); |
|||
// Iterate through the blocks.
|
|||
for (i=0; i*32<dkLen; i++) |
|||
{ |
|||
// Generate INT(i + 1).
|
|||
be32enc(ivec,(uint32_t)(i + 1)); |
|||
// Compute U_1 = PRF(P, S || INT(i)).
|
|||
memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); |
|||
HMAC_SHA256_Update(&hctx, ivec, 4); |
|||
HMAC_SHA256_Final(U, &hctx); |
|||
// T_i = U_1 ...
|
|||
memcpy(T,U,32); |
|||
for (j=2; j<=c; j++) |
|||
{ |
|||
// Compute U_j.
|
|||
HMAC_SHA256_Init(&hctx, passwd, passwdlen); |
|||
HMAC_SHA256_Update(&hctx, U, 32); |
|||
HMAC_SHA256_Final(U, &hctx); |
|||
// ... xor U_j ...
|
|||
for (k=0; k<32; k++) |
|||
T[k] ^= U[k]; |
|||
} |
|||
// Copy as many bytes as necessary into buf
|
|||
clen = dkLen - i * 32; |
|||
if (clen > 32) |
|||
clen = 32; |
|||
memcpy(&buf[i * 32],T,clen); |
|||
} |
|||
}*/ |
|||
|
|||
// Generic scrypt_core implementation
|
|||
|
|||
static inline void xor_salsa8(uint32_t B[16], const uint32_t Bx[16]) |
|||
{ |
|||
int32_t i; uint32_t x00,x01,x02,x03,x04,x05,x06,x07,x08,x09,x10,x11,x12,x13,x14,x15; |
|||
x00 = (B[0] ^= Bx[0]); |
|||
x01 = (B[1] ^= Bx[1]); |
|||
x02 = (B[2] ^= Bx[2]); |
|||
x03 = (B[3] ^= Bx[3]); |
|||
x04 = (B[4] ^= Bx[4]); |
|||
x05 = (B[5] ^= Bx[5]); |
|||
x06 = (B[6] ^= Bx[6]); |
|||
x07 = (B[7] ^= Bx[7]); |
|||
x08 = (B[8] ^= Bx[8]); |
|||
x09 = (B[9] ^= Bx[9]); |
|||
x10 = (B[10] ^= Bx[10]); |
|||
x11 = (B[11] ^= Bx[11]); |
|||
x12 = (B[12] ^= Bx[12]); |
|||
x13 = (B[13] ^= Bx[13]); |
|||
x14 = (B[14] ^= Bx[14]); |
|||
x15 = (B[15] ^= Bx[15]); |
|||
for (i = 0; i < 8; i += 2) { |
|||
#define R(a, b) (((a) << (b)) | ((a) >> (32 - (b)))) |
|||
/* Operate on columns. */ |
|||
x04 ^= R(x00+x12, 7); x09 ^= R(x05+x01, 7); |
|||
x14 ^= R(x10+x06, 7); x03 ^= R(x15+x11, 7); |
|||
|
|||
x08 ^= R(x04+x00, 9); x13 ^= R(x09+x05, 9); |
|||
x02 ^= R(x14+x10, 9); x07 ^= R(x03+x15, 9); |
|||
|
|||
x12 ^= R(x08+x04,13); x01 ^= R(x13+x09,13); |
|||
x06 ^= R(x02+x14,13); x11 ^= R(x07+x03,13); |
|||
|
|||
x00 ^= R(x12+x08,18); x05 ^= R(x01+x13,18); |
|||
x10 ^= R(x06+x02,18); x15 ^= R(x11+x07,18); |
|||
|
|||
/* Operate on rows. */ |
|||
x01 ^= R(x00+x03, 7); x06 ^= R(x05+x04, 7); |
|||
x11 ^= R(x10+x09, 7); x12 ^= R(x15+x14, 7); |
|||
|
|||
x02 ^= R(x01+x00, 9); x07 ^= R(x06+x05, 9); |
|||
x08 ^= R(x11+x10, 9); x13 ^= R(x12+x15, 9); |
|||
|
|||
x03 ^= R(x02+x01,13); x04 ^= R(x07+x06,13); |
|||
x09 ^= R(x08+x11,13); x14 ^= R(x13+x12,13); |
|||
|
|||
x00 ^= R(x03+x02,18); x05 ^= R(x04+x07,18); |
|||
x10 ^= R(x09+x08,18); x15 ^= R(x14+x13,18); |
|||
#undef R |
|||
} |
|||
B[0] += x00; |
|||
B[1] += x01; |
|||
B[2] += x02; |
|||
B[3] += x03; |
|||
B[4] += x04; |
|||
B[5] += x05; |
|||
B[6] += x06; |
|||
B[7] += x07; |
|||
B[8] += x08; |
|||
B[9] += x09; |
|||
B[10] += x10; |
|||
B[11] += x11; |
|||
B[12] += x12; |
|||
B[13] += x13; |
|||
B[14] += x14; |
|||
B[15] += x15; |
|||
} |
|||
|
|||
static inline void scrypt_core(uint32_t *X,uint32_t *V) |
|||
{ |
|||
uint32_t i,j,k; |
|||
for (i=0; i<1024; i++) |
|||
{ |
|||
memcpy(&V[i * 32],X,128); |
|||
xor_salsa8(&X[0],&X[16]); |
|||
xor_salsa8(&X[16],&X[0]); |
|||
} |
|||
for (i=0; i<1024; i++) |
|||
{ |
|||
j = 32 * (X[16] & 1023); |
|||
for (k = 0; k < 32; k++) |
|||
X[k] ^= V[j + k]; |
|||
xor_salsa8(&X[0],&X[16]); |
|||
xor_salsa8(&X[16],&X[0]); |
|||
} |
|||
} |
|||
|
|||
/* cpu and memory intensive function to transform a 80 byte buffer into a 32 byte output
|
|||
scratchpad size needs to be at least 63 + (128 * r * p) + (256 * r + 64) + (128 * r * N) bytes |
|||
r = 1, p = 1, N = 1024 |
|||
*/ |
|||
|
|||
bits256 scrypt_nosalt(const void *input,size_t inputlen,void *scratchpad) |
|||
{ |
|||
uint32_t *V; uint32_t X[32]; bits256 result; |
|||
memset(result.bytes,0,sizeof(result)); |
|||
V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); |
|||
calc_hmac_sha256((void *)X,128,(void *)input,(int32_t)inputlen,(void *)input,(int32_t)inputlen); |
|||
//PBKDF2_SHA256((const uint8_t *)input,inputlen,(const uint8_t *)input,inputlen,1,(uint8_t *)X,128);
|
|||
scrypt_core(X,V); |
|||
calc_hmac_sha256((void *)result.bytes,sizeof(result),(void *)input,(int32_t)inputlen,(void *)X,128); |
|||
//PBKDF2_SHA256((const uint8_t *)input,inputlen,(uint8_t *)X,128,1,(uint8_t*)&result,32);
|
|||
return result; |
|||
} |
|||
|
|||
bits256 scrypt(const void *data,size_t datalen,const void *salt,size_t saltlen,void *scratchpad) |
|||
{ |
|||
uint32_t *V; uint32_t X[32]; bits256 result; |
|||
memset(result.bytes,0,sizeof(result)); |
|||
V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); |
|||
calc_hmac_sha256((void *)X,128,(void *)data,(int32_t)datalen,(void *)salt,(int32_t)saltlen); |
|||
//PBKDF2_SHA256((const uint8_t *)data,datalen,(const uint8_t *)salt,saltlen,1,(uint8_t *)X,128);
|
|||
scrypt_core(X,V); |
|||
calc_hmac_sha256((void *)result.bytes,sizeof(result),(void *)data,(int32_t)datalen,(void *)X,128); |
|||
//PBKDF2_SHA256((const uint8_t *)data,datalen,(uint8_t *)X,128,1,(uint8_t *)&result,32);
|
|||
return result; |
|||
} |
|||
|
|||
bits256 scrypt_hash(const void *input,size_t inputlen) |
|||
{ |
|||
uint8_t scratchpad[SCRYPT_BUFFER_SIZE]; |
|||
return scrypt_nosalt(input,inputlen,scratchpad); |
|||
} |
|||
|
|||
bits256 scrypt_salted_hash(const void *input,size_t inputlen,const void *salt,size_t saltlen) |
|||
{ |
|||
uint8_t scratchpad[SCRYPT_BUFFER_SIZE]; |
|||
return scrypt(input,inputlen,salt,saltlen,scratchpad); |
|||
} |
|||
|
|||
bits256 scrypt_salted_multiround_hash(const void *input,size_t inputlen,const void *salt,size_t saltlen,const uint32_t nRounds) |
|||
{ |
|||
uint32_t i; bits256 resultHash = scrypt_salted_hash(input,inputlen,salt,saltlen); |
|||
bits256 transitionalHash = resultHash; |
|||
for(i=1; i<nRounds; i++) |
|||
{ |
|||
resultHash = scrypt_salted_hash(input,inputlen,(const void *)&transitionalHash,32); |
|||
transitionalHash = resultHash; |
|||
} |
|||
return resultHash; |
|||
} |
|||
|
|||
bits256 scrypt_blockhash(const void *input) |
|||
{ |
|||
uint8_t scratchpad[SCRYPT_BUFFER_SIZE]; |
|||
return scrypt_nosalt(input,80,scratchpad); |
|||
} |
|||
|
@ -1,168 +1,842 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|||
<!DOCTYPE HTML> |
|||
|
|||
<html> |
|||
|
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<title>amStock Example</title> |
|||
|
|||
<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> |
|||
AmCharts.ready(function () { |
|||
generateChartData(); |
|||
createStockChart(); |
|||
}); |
|||
|
|||
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 |
|||
}); |
|||
|
|||
function generateChartData() { |
|||
var firstDate = new Date(2012, 0, 1); |
|||
firstDate.setDate(firstDate.getDate() - 1000); |
|||
firstDate.setHours(0, 0, 0, 0); |
|||
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'); |
|||
|
|||
for (var i = 0; i < 1000; i++) { |
|||
var newDate = new Date(firstDate); |
|||
newDate.setHours(0, i, 0, 0); |
|||
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 a = Math.round(Math.random() * (40 + i)) + 100 + i; |
|||
var b = Math.round(Math.random() * 100000000); |
|||
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'); |
|||
|
|||
chartData.push({ |
|||
date: newDate, |
|||
value: a, |
|||
volume: b |
|||
}); |
|||
|
|||
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"); } |
|||
|
|||
var chart; |
|||
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}]"); |
|||
} |
|||
|
|||
function createStockChart() { |
|||
chart = new AmCharts.AmStockChart(); |
|||
|
|||
// As we have minutely data, we should set minPeriod to "mm" |
|||
var categoryAxesSettings = new AmCharts.CategoryAxesSettings(); |
|||
categoryAxesSettings.minPeriod = "mm"; |
|||
chart.categoryAxesSettings = categoryAxesSettings; |
|||
|
|||
// DATASETS ////////////////////////////////////////// |
|||
var dataSet = new AmCharts.DataSet(); |
|||
dataSet.color = "#b0de09"; |
|||
dataSet.fieldMappings = [{ |
|||
fromField: "value", |
|||
toField: "value" |
|||
}, { |
|||
fromField: "volume", |
|||
toField: "volume" |
|||
}]; |
|||
dataSet.dataProvider = chartData; |
|||
dataSet.categoryField = "date"; |
|||
|
|||
// set data sets to the chart |
|||
chart.dataSets = [dataSet]; |
|||
|
|||
// PANELS /////////////////////////////////////////// |
|||
// first stock panel |
|||
var stockPanel1 = new AmCharts.StockPanel(); |
|||
stockPanel1.showCategoryAxis = false; |
|||
stockPanel1.title = "Value"; |
|||
stockPanel1.percentHeight = 70; |
|||
|
|||
// graph of first stock panel |
|||
var graph1 = new AmCharts.StockGraph(); |
|||
graph1.valueField = "value"; |
|||
graph1.type = "smoothedLine"; |
|||
graph1.lineThickness = 2; |
|||
graph1.bullet = "round"; |
|||
graph1.bulletBorderColor = "#FFFFFF"; |
|||
graph1.bulletBorderAlpha = 1; |
|||
graph1.bulletBorderThickness = 3; |
|||
stockPanel1.addStockGraph(graph1); |
|||
|
|||
// create stock legend |
|||
var stockLegend1 = new AmCharts.StockLegend(); |
|||
stockLegend1.valueTextRegular = " "; |
|||
stockLegend1.markerType = "none"; |
|||
stockPanel1.stockLegend = stockLegend1; |
|||
|
|||
|
|||
// second stock panel |
|||
var stockPanel2 = new AmCharts.StockPanel(); |
|||
stockPanel2.title = "Volume"; |
|||
stockPanel2.percentHeight = 30; |
|||
var graph2 = new AmCharts.StockGraph(); |
|||
graph2.valueField = "volume"; |
|||
graph2.type = "column"; |
|||
graph2.cornerRadiusTop = 2; |
|||
graph2.fillAlphas = 1; |
|||
stockPanel2.addStockGraph(graph2); |
|||
|
|||
// create stock legend |
|||
var stockLegend2 = new AmCharts.StockLegend(); |
|||
stockLegend2.valueTextRegular = " "; |
|||
stockLegend2.markerType = "none"; |
|||
stockPanel2.stockLegend = stockLegend2; |
|||
|
|||
// set panels to the chart |
|||
chart.panels = [stockPanel1, stockPanel2]; |
|||
|
|||
|
|||
// OTHER SETTINGS //////////////////////////////////// |
|||
var scrollbarSettings = new AmCharts.ChartScrollbarSettings(); |
|||
scrollbarSettings.graph = graph1; |
|||
scrollbarSettings.usePeriod = "10mm"; // this will improve performance |
|||
scrollbarSettings.updateOnReleaseOnly = false; |
|||
scrollbarSettings.position = "top"; |
|||
chart.chartScrollbarSettings = scrollbarSettings; |
|||
|
|||
var cursorSettings = new AmCharts.ChartCursorSettings(); |
|||
cursorSettings.valueBalloonsEnabled = true; |
|||
chart.chartCursorSettings = cursorSettings; |
|||
|
|||
|
|||
// PERIOD SELECTOR /////////////////////////////////// |
|||
var periodSelector = new AmCharts.PeriodSelector(); |
|||
periodSelector.position = "top"; |
|||
periodSelector.dateFormat = "YYYY-MM-DD JJ:NN"; |
|||
periodSelector.inputFieldWidth = 150; |
|||
periodSelector.periods = [{ |
|||
period: "hh", |
|||
count: 1, |
|||
label: "1 hour" |
|||
}, { |
|||
period: "hh", |
|||
count: 2, |
|||
label: "2 hours" |
|||
}, { |
|||
period: "hh", |
|||
count: 5, |
|||
label: "5 hour" |
|||
}, { |
|||
period: "hh", |
|||
count: 12, |
|||
label: "12 hours" |
|||
}, { |
|||
period: "MAX", |
|||
label: "MAX" |
|||
}]; |
|||
chart.periodSelector = periodSelector; |
|||
|
|||
var panelsSettings = new AmCharts.PanelsSettings(); |
|||
panelsSettings.mouseWheelZoomEnabled = true; |
|||
panelsSettings.usePrefixes = true; |
|||
chart.panelsSettings = panelsSettings; |
|||
|
|||
|
|||
chart.write('chartdiv'); |
|||
} |
|||
|
|||
|
|||
</script> |
|||
|
|||
</head> |
|||
<body style="background-color:#FFFFFF"> |
|||
<div id="chartdiv" style="width:100%; height:600px;"></div> |
|||
|
|||
<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> |
|||
</html> |
|||
|
@ -1,4 +1,4 @@ |
|||
include ../mingw.path |
|||
LIBS := ../win/libsecp256k1.a ../win/libcrypto.a ../win/libssl.a /usr/share/mingw-w64/lib/libpthread.a ../agents/win32/libcrypto777.a ../win/libcurldll.a /usr/i586-mingw32msvc/lib/libws2_32.a /usr/i586-mingw32msvc/lib/libgdi32.a -I/usr/mingw32/include -I/usr/i386/include -I/usr/i386/include/curl -I/home/user/SuperNET/iguana -I/home/user/SuperNET/includes -I/home/user/SuperNET/crypto777 |
|||
LIBS := /usr/share/mingw-w64/lib/libpthread.a ../agents/win32/libcrypto777.a /usr/i586-mingw32msvc/lib/libws2_32.a /usr/i586-mingw32msvc/lib/libgdi32.a -I/usr/mingw32/include -I/usr/i386/include -I/home/user/SuperNET/iguana -I/home/user/SuperNET/includes -I/home/user/SuperNET/crypto777 |
|||
|
|||
include mingw |
|||
|
File diff suppressed because it is too large
@ -1 +1 @@ |
|||
curl --url "http://127.0.0.1:7778" --data "{\"method\":\"decoderawtransaction\",\"params\":[\"0100000011533957010252b9534fe0186625e3075606f9b547e223830af04b3fb9dab2aaadc7cad5300100000000ffffffff0280969800000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac700c023b000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac00000000\"]}" |
|||
curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTC\",\"method\":\"decoderawtransaction\",\"params\":[\"01000000016def80687bd97e9b932827a9fa8ce20d7e0c9032b3bc3a211a830e80ac0f5d560100000000ffffffff02bb280000000000002308d7019f135580dfb27576a914ca1e04745e8ca0c60d8c5881531d51bec470743f88acb5469800000000001976a9145513ce20df70c082324da1781c222a4d68dfe87988ac00000000\"]}" |
|||
|
Loading…
Reference in new issue