tera/Source/HTML/wallet.html
progr76@gmail.com e2104b0fa6 0.995
2019-04-07 18:09:59 +03:00

1859 lines
64 KiB
HTML

<!DOCTYPE HTML>
<html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TERA</title>
<link rel="shortcut icon" href="/HTML/PIC/wallet.png" type="image/png">
<link rel="stylesheet" type="text/css" href="../HTML/CSS/style.css">
<link rel="stylesheet" type="text/css" href="../HTML/CSS/wallet.css">
<link rel="stylesheet" type="text/css" href="../HTML/CSS/buttons.css">
</head>
<script>
window.RUN_CLIENT=1;
window.RUN_SERVER=0;
if(typeof global === 'object')
{
global.RUN_CLIENT=1;
global.RUN_SERVER=0;
}
</script>
<script type="text/javascript" src="/HTML/JS/coinlib.js"></script>
<script type="text/javascript" src="../HTML/JS/client.js"></script>
<script type="text/javascript" src="../HTML/JS/sha3.js"></script>
<script type="text/javascript" src="../HTML/JS/crypto-client.js"></script>
<script type="text/javascript" src="/HTML/JS/wallet-lib.js"></script>
<script type="text/javascript" src="/HTML/JS/wallet-node.js"></script>
<script type="text/javascript" src="/HTML/JS/terahashlib.js"></script>
<script>
var CONFIG_DATA={}; CONFIG_DATA.CONSTANTS={};
var ServerBlockNumDB=0;
var ServerCurBlockNum=0;
var ServerTime=0;
var MiningAccount=0;
//var min_power_pow_acc_create=0;
var WalletStatus;
var BLOCK_PROCESSING_LENGTH=8;
var PubKeyStr;
var PrivKeyStr;
var WalletOpen;
var INTERNET_IP_FROM_STUN;
var SERVER_IP;
var SERVER_PORT;
var CurTabName;
var TabArr=[{name:"TabAccounts",log:1},{name:"TabSend",log:1},{name:"TabHistory"},{name:"TabDapps"},{name:"TabExplorer"}];
var SaveIdArr=["idAccount","idTo","idSumSend","idDescription","idSelStyle",
"idViewAccountNum","idViewBlockNum","idViewHistoryNum","idViewActNum","idViewHashNum","idViewDappNum",
"idRunText","idViewAccountFilter","idViewHistoryFilter","idUseSoundHistory",
"idBlockCount","idPeriodAutoCheckPoint"];
var MaxAccID=0;
var MaxDappsID=0;
var MaxActNum=0;
var HistoryMaxNum=0;
var idPercentItem;
var WasSetRestart=0;
</script>
<script>
/*User action User action User action User action User action User action User action User action User action */
//CONFIG
//CONFIG
//CONFIG
function IsPrivateMode()
{
if(PrivKeyStr && PrivKeyStr.length===64 && PrivKeyStr!=="0000000000000000000000000000000000000000000000000000000000000000")
return true;
else
return false;
}
function NewPrivateKey()
{
var arr = new Uint8Array(32);
window.crypto.getRandomValues(arr);
var Str=GetHexFromArr(sha3(arr));
document.getElementById("idKeyNew").value=Str;
SetVisibleEditKeys(1);
var Select=document.getElementById("idTypeKey");
Select.value="private";
SetVisibleItemByTypeKey();
}
function EditPrivateKey()
{
if(!IsVisibleBlock("edit_keys"))
{
var Select=document.getElementById("idTypeKey");
if(IsPrivateMode())
{
document.getElementById("idKeyNew").value=PrivKeyStr;
Select.value="private";
}
else
{
document.getElementById("idKeyNew").value=PubKeyStr;
Select.value="public";
}
SetVisibleEditKeys(1);
}
else
{
CancelSavePrivateKey();
}
}
function ConvertToPrivateKey()
{
var Str=document.getElementById("idKeyNew").value;
if(!Str || Str.length<20)
{
SetError("Enter secret words that are at least 20 characters long");
return;
}
var Str2=document.getElementById("idKeyNew2").value;
if(Str2 && Str!==Str2)
{
SetError("Re-entered secret does not match");
return;
}
document.getElementById("idTypeKey").value="private";
SetVisibleItemByTypeKey();
document.getElementById("idKeyNew").value=GetPrivateKeyFromStr(Str);
document.getElementById("idKeyNew2").value="";
}
function GetPrivateKeyFromStr(Str)
{
var StrHex=sha3_str(Str);
for(var i=0;i<100000;i++)
StrHex=sha3_str(StrHex);
return StrHex.toUpperCase();
}
function CancelSavePrivateKey()
{
SetVisibleEditKeys(0);
}
//ACCOUNTS
//ACCOUNTS
//ACCOUNTS
function FindMyAccounts()
{
GetData("FindMyAccounts",{},function (Data)
{
WasAccountsDataStr="";
UpdatesData();
});
}
function ViewNewAccount()
{
var name="idAccountEdit";
if(IsVisibleBlock(name))
{
SetVisibleBlock(name,false);
}
else
{
SetVisibleBlock(name,true);
$("idAccountName").focus();
var Select=document.getElementById("idAccount");
SetViewWN();
}
}
function SetViewWN()
{
document.getElementById("Item.WN").innerText="";
SetVisibleBlock("Item.WN","none");
}
function CancelCreateAccount()
{
var name="idAccountEdit";
SetVisibleBlock(name,false)
}
var WasCreateAccountInfo;
function CreateAccount(bAddToPay)
{
if(!CanSendTransaction)
{
SetError("Can't Send transaction");
return;
}
WasCreateAccountInfo=PubKeyStr;
var Description=document.getElementById("idAccountName").value;
var Adviser=ParseNum(document.getElementById("idAdviser").value);
var Smart=ParseNum(document.getElementById("idSmart").value);
var Currency=ParseNum(document.getElementById("idCurrency").value);
var WN=ParseNum(document.getElementById("idWN").value);
if(!Description)
{
SetError("Enter the account name.");
return;
}
if(WN)
{
GetData("GetAccountKey",WN,function (Data)
{
if(Data && Data.result===1)
{
SendTrCreateAcc(Currency,Data.PubKeyStr,Description,Adviser,Smart,1,bAddToPay);
}
});
}
else
{
SendTrCreateAcc(Currency,PubKeyStr,Description,Adviser,Smart,0,bAddToPay);
}
}
function SetVisibleEditKeys(bSet)
{
SetVisibleBlock("edit_keys",bSet);
if(bSet)
{
SetVisibleItemByTypeKey();
document.getElementById("idKeyNew").focus();
}
}
function SelectTypeKey()
{
var Select=document.getElementById("idTypeKey");
var Item=document.getElementById("idKeyNew");
var Item2=document.getElementById("idKeyNew2");
if(Select.value==="public" && (Item.value.length!==66 || Item.value.substr(0,1)!=="0"))
{
Item.value="";
Item2.value="";
}
else
if(Select.value==="private" && Item.value===PubKeyStr)
{
Item.value="";
Item2.value="";
}
else
if(Select.value==="brain" && Item.value.length>=64 && IsHexStr(Item.value))
{
Item.value="";
Item2.value="";
}
SetVisibleItemByTypeKey();
}
function SetVisibleItemByTypeKey()
{
var Select=document.getElementById("idTypeKey");
if(Select.value==="brain")
{
SetVisibleBlock("idViewKeyNew2","table-row");
SetVisibleBlock("idBtConvertKey","inline-block");
SetVisibleBlock("idBtSaveKey",false);
}
else
{
SetVisibleBlock("idViewKeyNew2","none");
SetVisibleBlock("idBtConvertKey",false);
SetVisibleBlock("idBtSaveKey","inline-block");
}
}
//SEND
</script>
<script>
//Pagination
var CountViewRows=20;
var DefAccounts={BlockName:"idPaginationAccount", NumName:"idViewAccountNum", TabName:"grid_accounts_all",APIName:"GetAccountList",Param3:"",FilterName:"idViewAccountFilter",TotalSum:"idTotalSum"};
var DefBlock={BlockName:"idPaginationBlock", NumName:"idViewBlockNum", TabName:"grid_block_all",APIName:"GetBlockList",Param3:"",FilterName:""};//idViewBlockFilter
var DefHistory={BlockName:"idPaginationHistory", NumName:"idViewHistoryNum", TabName:"grid_history",APIName:"GetHistoryAct",Param3:"",FilterName:"idViewHistoryFilter",TotalSum:"idTotalSumH"};
var DefActs={BlockName:"idPaginationAct", NumName:"idViewActNum", TabName:"grid_acts_all",APIName:"GetActList",Param3:""};
var DefHash={BlockName:"idPaginationHash", NumName:"idViewHashNum", TabName:"grid_hash_all",APIName:"GetHashList",Param3:""};
var DefDapps={BlockName:"idPaginationDapps", NumName:"idViewDappNum", TabName:"grid_dapps_all",APIName:"GetDappList",Param3:"",FilterName:"idViewDappsFilter",FilterName2:"idCategory",CountViewRows:10};
function ViewHistory()
{
ViewCurrent(DefHistory);
}
function ViewDapps()
{
ViewCurrent(DefDapps);
}
var MapCheckBtPress={};
var ArrCheckEscPress=[];
function SetImg(This,Name)
{
if(!This)
return;
MapCheckBtPress[Name]=This;
if(IsVisibleBlock(Name))
{
This.id="idUp";
for(var i=ArrCheckEscPress.length-1;i>=0;i--)
{
var element=ArrCheckEscPress[i];
if(element.name===Name)
{
return;
}
}
ArrCheckEscPress.push({name:Name,item:This,tab:CurTabName});
}
else
{
This.id="idDown";
}
//console.log("This="+This.value);
}
setInterval(function ()
{
for(var key in MapCheckBtPress)
{
var item=MapCheckBtPress[key];
SetImg(item,key);
}
},300);
</script>
<script>
/*Get data from server Get data from server Get data from server Get data from server Get data from server */
function UpdatesConfigData()
{
GetData("GetWalletInfo",{}, function (Data)
{
SetConfigData(Data);
});
}
function UpdatesAccountsData()
{
GetData("/GetWalletAccounts",{}, function (Data,responseText)
{
SetAccountsData(Data,responseText);
});
}
function UpdatesData()
{
UpdatesAccountsData();
CheckNameAccTo();
CheckSending();
}
var TitleWarning=0;
function SetTitle(TitleName)
{
if(TitleWarning===1)
document.title="*"+TitleName+"*";
else
if(TitleWarning===2)
document.title="**"+TitleName+"**";
else
if(TitleWarning>2)
document.title="***"+TitleName+"***";
else
document.title=TitleName;
}
function SetConfigData(Data)
{
if(!Data || !Data.result)
return;
CONFIG_DATA=Data;
ServerBlockNumDB=Data.BlockNumDB;
ServerCurBlockNum=Data.CurBlockNum;
ServerTime=Data.CurTime;
var DeltaTime=Data.DELTA_CURRENT_TIME/1000;
var Name="TERA";
if(CONFIG_DATA.CONSTANTS.WALLET_NAME)
Name=CONFIG_DATA.CONSTANTS.WALLET_NAME;
if(CONFIG_DATA.CONSTANTS.COUNT_VIEW_ROWS)
CountViewRows=CONFIG_DATA.CONSTANTS.COUNT_VIEW_ROWS;
SetBlockChainConstant(Data);
MaxBlockNum=GetCurrentBlockNumByTime();
var StrVersion=" 0."+Data.VersionNum;
if(Data.CODE_VERSION.VersionNum && Data.VersionNum<Data.CODE_VERSION.VersionNum)
{
StrVersion=StrVersion+"/0."+Data.CODE_VERSION.VersionNum;
}
SetTitle(Name+StrVersion);
if(Data.RelayMode && Data.CurBlockNum>Data.BlockNumDB+BLOCK_PROCESSING_LENGTH*2)
{
CanSendTransaction=0;
var StrMode="";
var MaxNum=Data.CurBlockNum-BLOCK_PROCESSING_LENGTH;
if(MaxNum>0)
{
var Percent=100*Data.BlockNumDB/MaxNum;
if(Percent<0)
Percent=0;
Percent=Percent.toFixed(2);
StrMode=" "+Percent+"% "+" ("+Data.BlockNumDB+"/"+MaxNum+")";
}
SetMainStatus("<DIV align='center' style='color:red'><big><B>Waiting for synchronization "+StrMode+"</B></big></DIV>");
WalletStatus="WAIT";
}
else
if(WalletStatus==="WAIT")
{
CanSendTransaction=1;
WalletStatus="OK";
SetMainStatus("<DIV align='center' style='color:green'><big><B>Synchronization complete</B></big></DIV>",1);
}
else
{
CanSendTransaction=1;
}
MaxAccID=Data.MaxAccID;
MaxDappsID=Data.MaxDappsID;
MaxActNum=Data.MaxActNum;
//min_power_pow_acc_create=Data.MIN_POWER_POW_ACC_CREATE+3;
PubKeyStr=Data.PublicKey;
PrivKeyStr=Data.PrivateKey;
WalletOpen=Data.WalletOpen;
SetVisibleBtOpenWallet();
HistoryMaxNum=Data.HistoryMaxNum;
DeltaTime=DeltaTime.toFixed(3);
var DeltaDB=Data.CurBlockNum-Data.BlockNumDB;
if(DeltaDB<10)
DeltaDB="&nbsp;"+DeltaDB;
var DeltaTX=Data.CurBlockNum-Data.TXBlockNum;
if(DeltaTX<10)
DeltaTX="&nbsp;"+DeltaTX;
var Str="<font face='monospace'>Block: <B>"+Data.CurBlockNum+"</B> DB delta:<b>"+DeltaDB+"</b> TX delta:<b>"+DeltaTX + "</b> Time delta:<B>"+DeltaTime+" sec</B> Wallet ver:"+"<B>"+StrVersion+"</B></font>";
document.getElementById("idCurrentBlockNum").innerHTML=Str;
SetArrLog(Data.ArrLog);
if(document.getElementById("idPubKey").innerText!==PubKeyStr)
document.getElementById("idPubKey").innerText=PubKeyStr;
if(document.getElementById("idDataPath").innerText!==Data.DATA_PATH)
document.getElementById("idDataPath").innerText=Data.DATA_PATH;
if(document.getElementById("idNodeAddr").innerText!==Data.NodeAddrStr)
document.getElementById("idNodeAddr").innerText=Data.NodeAddrStr;
//document.getElementById("idTo").max=MaxAccID;
document.getElementById("idAdviser").max=MaxAccID;
SetVisibleBlock("idDevelopService",Data.IsDevelopAccount);
SetVisibleBlock("idDevelopService2",Data.IsDevelopAccount);
// SetVisibleBlock("idFilterA",Data.IsDevelopAccount);
//SetVisibleBlock("idFilterB",Data.IsDevelopAccount);
//SetVisibleBlock("idFilterH",Data.IsDevelopAccount);
//SetVisibleBlock("idNetwork",CONFIG_DATA.CONSTANTS.COMMON_KEY);
if(Data.NeedRestart)
{
DoRestartWallet();
}
INTERNET_IP_FROM_STUN=Data.INTERNET_IP_FROM_STUN;
SERVER_IP=Data.ip;
SERVER_PORT=Data.port;
//Mining
MiningAccount=Data.MiningAccount;
document.getElementById("idUseMining").checked=CONFIG_DATA.CONSTANTS.USE_MINING;
if(!idPercentItem || document.activeElement!==idPercentItem)
{
idPercentItem=document.getElementById("idPercentMining");
idPercentItem.value=CONFIG_DATA.CONSTANTS.POW_MAX_PERCENT;
}
if(Data.CountMiningCPU>0 && CONFIG_DATA.CONSTANTS.USE_MINING)
SetVisibleBlock("idMiningParams","inline-block");
else
SetVisibleBlock("idMiningParams",0);
SetStatusMining(" Mining on:<B>"+MiningAccount+"</B> HashRate:<B>"+(Math.floor(Data.HashRate*10)/10)+"</B>Mh/s CPU RUN:<B>"+Data.CountRunCPU+"</B>/"+Data.CountMiningCPU+" "+(Data.MiningPaused?"<B style='color:darkred;'>=PAUSED=</B>":""));
if(CONFIG_DATA.CONSTANTS.USE_MINING && Data.CountRunCPU!==Data.CountMiningCPU)
{
$("idUseMining").className="checkbox checkbox_red";
}
else
{
$("idUseMining").className="checkbox";
}
if(Data.CODE_VERSION.VersionNum && Data.VersionNum<Data.CODE_VERSION.VersionNum)
{
$("idAutoUpdate").className="checkbox checkbox_alert";
}
else
{
$("idAutoUpdate").className="checkbox";
}
document.getElementById("idAutoUpdate").checked=CONFIG_DATA.CONSTANTS.USE_AUTO_UPDATE;
window.DEBUG_WALLET=CONFIG_DATA.CONSTANTS.DEBUG_WALLET;
SetViewWN();
$("idHintStyle").disabled = !CONFIG_DATA.USE_HINT;
}
function SetVisibleBtOpenWallet()
{
SetVisibleBlock("idOpenWallet",WalletOpen!==undefined);
var item=document.getElementById("idOpenWallet");
if(WalletOpen==true)
{
item.value="Wallet opened";
item.style="background-image: url('/HTML/PIC/lock_open.png');color:green;";
}
else
if(WalletOpen==false)
{
item.value="Wallet closed";
item.style="background-image: url('/HTML/PIC/lock_closed.png');color:"+"#9b712a";
}
SetVisibleBlock("wallet_config_tab",WalletOpen!==false);
}
</script>
<script>
//LIB
function ConfirmationFromBlock(BlockNum)
{
var Length=MaxBlockNum-8-BlockNum;
if(Length>0)
{
if(Length<=100)
return Length;
else
{
return ">"+Math.floor(Length/100)*100;
}
}
else
return "";
}
function ToLogServer(Str)
{
GetData("ToLogServer",Str, function (Data)
{
UpdatesData();
});
}
var PrevServerStr;
function SetStatusFromServer(Str)
{
var id = document.getElementById("idServerLog");
if(PrevServerStr!==Str)
{
PrevServerStr=Str;
id.innerText=Str;
}
}
var bMainCanClear=true;
var StrMainStatus="";
var StrNormalStatus="";
function SetMainStatus(Str,bCanClear)
{
bMainCanClear=bCanClear;
StrMainStatus=Str;
ViewStatus();
}
function SetStatus(Str,bError)
{
if(bError)
return SetError(Str);
StrNormalStatus=Str;
if(bMainCanClear)
{
StrMainStatus="";
}
ViewStatus();
}
function ViewStatus()
{
var Str=StrMainStatus+StrNormalStatus;
var id = $("idStatus");
id.innerHTML=Str;
}
function SetError(Str,bNoSound)
{
if(!bNoSound)
$("sound_err").play();
SetStatus("<DIV align='left' style='color:red'><B>"+Str+"</B></DIV>");
}
function SetStatusMining(Str)
{
var id = $("idStatusMining");
id.innerHTML=Str;
}
//EVENTS
//EVENTS
//EVENTS
function SetVisibleTab()
{
if(!CurTabName)
CurTabName=TabArr[0].name;
var bLogVisible=0;
var str;
for (var i=0;i<TabArr.length;i++)
{
var name=TabArr[i].name;
var Item=document.getElementById(name);
if(!Item)
continue;
if(CurTabName===name)
{
bLogVisible=TabArr[i].log;
Item.style.display = 'block';
str="current bt bttab"
}
else
{
Item.style.display = 'none';
str="bttab bt"
}
var ItemM=document.getElementById("M"+name);
if(ItemM)
ItemM.className=str;
}
//SetVisibleBlock("idStatus",bLogVisible);
SetVisibleBlock("idServerBlock",bLogVisible);
}
function OnSelectTab(name)
{
if(name==="TabHistory")
{
ViewHistory();
}
else
if(name==="TabDapps")
{
ViewDapps();
}
}
function SelectTab(name)
{
CurTabName=name;
OnSelectTab(name);
history.pushState(null,null,"#"+name);
//window.location.hash="#"+name;
SetVisibleTab();
SaveValues();
DoStableScroll();
}
function CheckCtrlEnterAndESC(e,F)
{
SaveValues();
if(e.ctrlKey && e.keyCode===13)
{
if(CurTabName==="TabAccounts" && IsVisibleBlock("edit_keys"))
SavePrivateKey();
else
if(CurTabName==="TabAccounts" && IsVisibleBlock("idAccountEdit"))
CreateAccount(0);
else
if(CurTabName==="TabAccounts" && IsVisibleBlock("edit_mining_set"))
SaveMiningSet();
else
if(CurTabName==="TabSend")
{
if(IsVisibleBlock("edit_transaction"))
SignAndSendFromJSON();
else
if(IsVisibleBlock("idBlockOnSend"))
SendMoney2();
else
SendMoneyBefore();
}
else
if(IsVisibleBlock("idBlockPasswordSet"))
SetPassword();
else
if(IsVisibleBlock("idBlockPasswordGet"))
SetPassword();
else
if(WalletOpen===false)
{
ViewOpenWallet();
}
}
else
if(e.keyCode===27)
{
for(var i=ArrCheckEscPress.length-1;i>=0;i--)
{
var element=ArrCheckEscPress[i];
if(element.tab===CurTabName)
{
SetVisibleBlock(element.name,false);
SetImg(element.item,element.name);
ArrCheckEscPress.splice(i,1);
break;
}
}
}
}
function LoadValues()
{
if(LoadValuesByArr(SaveIdArr))
{
CurTabName=localStorage["CurTabName"];
LoadMapAfter["idAccount"]=localStorage.getItem("idAccount");
}
}
function SaveValues()
{
SaveValuesByArr(SaveIdArr);
localStorage["CurTabName"]=CurTabName;
}
//INIT
//INIT
//INIT
function SelectStyle(value)
{
var Select=document.getElementById("idSelStyle");
if(value)
Select.value=value;
if(!Select.value)
Select.value=Select.options[0].value;
document.body.className="univers "+Select.value;
}
window.onload=function()
{
FillCategory("idCategory");
LoadValues();
InitPasItems();
SelectStyle();
SelectTypeKey();
InitRun();
window.onkeydown = CheckCtrlEnterAndESC;
SetVisibleTab();
localStorage["BIGWALLET"]=1;
window.OnInitWallet();
}
if(!window.OnInitWallet)
window.OnInitWallet=function()
{
UpdatesConfigData();
UpdatesData();
setInterval(UpdatesData,1000);
setInterval(UpdatesConfigData,335);
setInterval(CheckNewMoney,1000);
setInterval(SaveValues,2000);
setTimeout(CheckNameAccTo,100);
if(window.location.hash)
{
var LocationPath=window.location.hash.substr(1);
//console.log("LocationPath="+LocationPath)
if(LocationPath)
{
SelectTab(LocationPath);
}
}
setTimeout(function ()
{
OnSelectTab(CurTabName);
},100)
}
function InitRun()
{
if(localStorage["WasStart"]!=="1")
{
var ValText=document.getElementById("idRunText").value;
if(ValText && ValText!=="undefined" && ValText.trim())
{
localStorage["WasStart"]="1";
SetError("Run script ... Was Error?",1);
eval(ValText);
SetStatus("Run script ... OK");
}
localStorage["WasStart"]="0";
}
}
function SetRun()
{
SaveValues();
localStorage["WasStart"]="0";
SetStatus("Set to Run script");
}
</script>
<script>
var itemPasswordGet,itemPassword1,itemPassword2,itemBtPassword;
function InitPasItems()
{
itemPassword1=$("idPassword1");
itemPassword2=$("idPassword2");
itemPasswordGet=$("idPasswordGet");
}
function OnClickOpenCloseWallet()
{
if(WalletOpen===true)
{
GetData("CloseWallet",{},function (Data)
{
if(Data && Data.result===1)
{
SetStatus("Wallet close");
}
});
}
else
if(WalletOpen===false)
{
ViewOpenWallet();
}
}
function ViewOpenWallet()
{
if(WalletOpen!==false)
{
SetStatus("Wallet not close");
return;
}
itemPasswordGet.onkeydown = OnEnterPas1;
itemPasswordGet.value="";
SetVisibleBlock("idBlockPasswordGet",true);
itemPasswordGet.focus();
}
function OpenWallet()
{
var Passwd1=itemPasswordGet.value;
GetData("OpenWallet",Passwd1, function (Data)
{
if(Data && Data.result===1)
{
itemPasswordGet.value="";
SetStatus("Wallet open");
SetVisibleBlock("idBlockPasswordGet",false);
SetImg(itemBtPassword,'idBlockPasswordGet');
}
else
{
SetError("Wrong password!")
}
});
}
function CancelOpenWallet()
{
SetVisibleBlock("idBlockPasswordGet",false);
SetImg(itemBtPassword,'idBlockPasswordGet');
}
function ViewSetPassword()
{
if(WalletOpen===false)
{
SetError("First open wallet!");
return;
}
itemPassword1.onkeydown = OnEnterPas1;
itemPassword2.onkeydown = OnEnterPas2;
itemPassword1.value="";
itemPassword2.value="";
SetVisibleBlock("idBlockPasswordSet",!IsVisibleBlock("idBlockPasswordSet"));
SetImg(itemBtPassword,'idBlockPasswordSet');
itemPassword1.focus();
}
function SetPassword()
{
if(!IsVisibleBlock("idBlockPasswordSet"))
{
OpenWallet();
return;
}
var Passwd1=itemPassword1.value;
var Passwd2=itemPassword2.value;
if(Passwd1!==Passwd2)
{
SetError("Passwords are not equal");
return;
}
itemPassword1.value="";
itemPassword2.value="";
GetData("SetWalletPasswordNew",Passwd1, function (Data)
{
if(Data && Data.result===1)
{
SetStatus("New password was set");
SetVisibleBlock("idBlockPasswordSet",false);
SetImg(itemBtPassword,'idBlockPasswordSet');
}
});
}
function CancelSetPassword()
{
SetVisibleBlock("idBlockPasswordSet",false);
SetImg(itemBtPassword,'idBlockPasswordSet');
SetVisibleBlock("idBlockPasswordGet",false);
SetImg(itemBtPassword,'idBlockPasswordGet');
}
function OnEnterPas1(e)
{
if(e.keyCode===13)
{
if(IsVisibleBlock("idBlockPasswordSet"))
{
itemPassword2.focus();
}
else
{
OpenWallet();
}
}
//SetStatus("e.keyCode="+e.keyCode)
}
function OnEnterPas2(e)
{
if(e.keyCode===13)
{
SetPassword();
}
//SetStatus("e.keyCode="+e.keyCode)
}
</script>
<style type="text/css">
table.password
{
border-collapse: collapse;
width: 400px;
}
#idOpenWallet
{
z-index:1001;
position:relative;
float: right;
top:15px;
right:0px;
padding: 0 0 0 20px;
text-align: center;
box-shadow: 0 0 0 1px;
width: 130px;
height: 40px;
line-height: 20px;
margin: 10px;
background: transparent;
font-weight: 600;
background-image: url('/HTML/PIC/lock_closed.png');
background-repeat: no-repeat;
background-size: 20%;
cursor: pointer;
}
#idBlockPasswordSet,#idBlockPasswordGet
{
z-index:1000;
position:absolute;
top:150px;
right:25%;
height:150px;
width:320px;
padding: 10px;
background: #d9d9d9;
text-align: left;
box-shadow: 0 0 0 1px;
background-image: url('/HTML/PIC/key.png');
background-repeat: no-repeat;
}
</style>
<style id="idHintStyle">
th.hint:hover:after
{
position: absolute;
content: attr(data-name);
background: #f7efa3;
text-align: center;
font-size:smaller;
padding: 10px;
border-radius: 5px;
border: 1px solid #3b1c0e;
transform: translateY(-50px) translateX(-30px);
}
</style>
<script>
$("idHintStyle").disabled=1;
</script>
<body>
<DIV align='center'>
<DIV align='left' style="width: 800px;border2: 1px solid #727473;">
<table id="TabHeader">
<tr>
<th><DIV id="MTabAccounts" onclick="SelectTab('TabAccounts')" class="bttab">CONFIG</DIV></th>
<th><DIV id="MTabSend" onclick="SelectTab('TabSend')" class="bttab">SEND</DIV></th>
<th><DIV id="MTabHistory" onclick="SelectTab('TabHistory')" class="bttab">HISTORY</DIV></th>
<th><DIV id="MTabDapps" onclick="SelectTab('TabDapps')" class="bttab">DApps</DIV></th>
<th><DIV id="MTabExplorer" onclick="SelectTab('TabExplorer')" class="bttab">EXPLORER</DIV></th>
</tr>
</table>
<INPUT id="idOpenWallet" style="display: none" type="button" onclick="OnClickOpenCloseWallet()" value="Wallet closed">
<DIV id="idStatus" style="height: 40px">&nbsp;</DIV>
<BR><BR><BR>
<DIV id="TabAccounts" style="display: block">
<BR>
<DIV id="idNodeUpdateMiningStatus" style="display: block">
<DIV style="float: left">
<input type="checkbox" class="checkbox" id="idAutoUpdate" onchange = "UseAutoUpdate()"/>
<label for="idAutoUpdate">Autoupdate</label>
</DIV>
<DIV style="float: left">
<input type="checkbox" class="checkbox" id="idUseMining" onchange = "UseMining()"/>
<label for="idUseMining">Mining</label>
</DIV>
<DIV style="float: left;display: none" id="idMiningParams">
<DIV style="float: left; color: blue;">CPU use:<input type="number" min=0 max=100 id="idPercentMining" onchange="SetPercentMining()"/>%</DIV>
<DIV style="float: left; margin: 2px 0 0 8px;" id="idStatusMining"></DIV>
</DIV>
</DIV>
<DIV id="idDevelopService" style="display: none">
<BR>
<INPUT type="button" id="idDown" onclick="SetVisibleBlock('idDevelopServiceView',!IsVisibleBlock('idDevelopServiceView'));SetImg(this,'idDevelopServiceView')"
class="btdoit bt" value="DEV SERVICE">
<DIV id="idDevelopServiceView" style="display: none">
<table>
<tr>
<td style="width: 100px">
<BR>
<INPUT type="button" class="bt btdoit" onclick="SetCodeVersion()" value="CODE VERS>>"><BR>
<INPUT type="button" class="bt btdoit" onclick="SetCorrTime()" value="DELTA TIME >>"><BR>
</td>
<td style="width: 500px">
Value:<INPUT type="string" id="idDevValue" value="0"><BR>
<TEXTAREA id="idDevService" rows="15" cols="90"> </TEXTAREA><BR>
</td>
</tr>
</table>
<INPUT type="button" onclick="CreateCheckPoint()" class="btdoit bt" value="CHECK POINT">
<INPUT type="button" onclick="SetNewCodeVersion()" class="btdoit bt" value=">>NEW VERSION">
<INPUT type="button" onclick="StartTimeCorrect()" class="btdoit bt" value=">>TIME CORR.">
<input type="checkbox" class="checkbox" id="idUseAutoCheckPoint" onchange = "UseAutoCheckPoint()"/>
<label for="idUseAutoCheckPoint">Auto check point each :</label>
<INPUT type="number" id="idPeriodAutoCheckPoint" style="width: 60px" value="10"> sec<BR>
<input type="checkbox" class="checkbox" id="idUseAutoCorrTime" onchange = "UseAutoCorrTime()"/>
<label for="idUseAutoCorrTime">Auto corr time</label><BR>
<HR>
</DIV>
</DIV>
<BR><BR><DIV id="idCurrentBlockNum" style="float: left"></DIV>
<DIV id="wallet_config_tab" style="display: none;float: left">
Wallet data path: <B id="idDataPath"></B><BR>
Public key: <B id="idPubKey"></B><BR>
Node addr: <B id="idNodeAddr"></B>
<BR>
<INPUT type="button" onclick="MoveUp($('edit_keys'));NewPrivateKey();" class="btdoit bt" value="New wallet..." id="idDown2">
<INPUT type="button" onclick="MoveUp($('edit_keys'));EditPrivateKey();SetImg(this,'edit_keys');" class="btdoit bt" value="Edit wallet" id="idDown">
<INPUT type="button" onclick="MoveUp($('idAccountEdit'));ViewNewAccount();SetImg(this,'idAccountEdit');" class="btdoit bt" value="New account" id="idDown">
<INPUT type="button" onclick="MoveUp($('edit_mining_set'));MiningSets();SetImg(this,'edit_mining_set');" class="btdoit bt" value="Set mining" id="idDown">
<INPUT type="button" onclick="ViewSetPassword();itemBtPassword=this; SetImg(itemBtPassword,'idBlockPasswordSet');" class="bt btdoit" value="Set password" id="idDown">
</DIV>
<DIV>
<DIV id="edit_mining_set" style="display: none">
<table class="form_input keys" id="grid_mining_set">
<tr>
<td><DIV>Mining account:</DIV></td><td><INPUT type="number" id="idMiningAccount" min=0 max=1000000000000 value="0"></td>
</tr>
<tr>
<td></td>
<td><INPUT type="button" onclick="SaveMiningSet()" class="bt" value="Save">
<INPUT type="button" onclick="CancalMiningSet()" class="bt" value="Cancel"></td>
</tr>
</table>
</DIV>
<DIV id="edit_keys" style="display: none">
<table class="form_input keys" id="grid_edit_key">
<tr>
<td>
<select size="1" id="idTypeKey" onkeyup="SelectTypeKey();" onchange="SelectTypeKey();">
<option value="private">Private key</option>
<option value="public">Public key (sign from another wallet)</option>
<option value="brain">Brain key generator</option>
</select>
</td><td><INPUT type="string" autocomplete="off" id="idKeyNew" value=""></td>
</tr>
<tr id="idViewKeyNew2" style="display: none">
<td>You can repeat the secret words:</td>
<td><INPUT type="string" id="idKeyNew2" value=""></td>
</tr>
<tr>
<td></td>
<td>
<INPUT type="button" onclick="ConvertToPrivateKey()" class="btdoit bt" style="width: 130px;display: none;" id="idBtConvertKey" value="Convert to key">
<INPUT type="button" onclick="SavePrivateKey()" class="bt" id="idBtSaveKey" value="Save">
<INPUT type="button" onclick="CancelSavePrivateKey()" class="bt" value="Cancel">
</td>
</tr>
</table>
</DIV>
<DIV id="idAccountEdit" style="display: none">
<table class="form_input keys" id="grid_edit_newacc">
<tr>
<td><DIV>Public name:</DIV></td>
<td>
<INPUT type="string" maxlength="40" autocomplete="off" id="idAccountName" onkeyup="CheckLengthAccDesription('idAccountName',40)" value="">
</td>
</tr>
<tr>
<td>
<DIV>Adviser:</DIV></td><td><INPUT type="number" id="idAdviser" min=0 max=1000000000000 value="0">
</td>
</tr>
<tr>
<td>
<DIV>Currency:</DIV></td><td><INPUT type="number" id="idCurrency" min=0 max=1000000000 value="0">
</td>
</tr>
<tr>
<td>
<DIV>Smart:</DIV></td><td><INPUT type="number" id="idSmart" min=0 max=1000000000 value="0">
</td>
</tr>
<!--<tr>-->
<!--<td></td><td><INPUT type="checkbox" checked id="idAutoSetMining">Mining on this account</td>-->
<!--</tr>-->
<tr id="idRowWN" style="display: none">
<td>
<DIV>Wallet number:</DIV></td><td><INPUT type="number" id="idWN" min=0 max=100 value="0">
</td>
</tr>
<tr>
<td></td>
<td><INPUT type="button" onclick="CreateAccount(0)" class="bt" value="Create">
<INPUT type="button" onclick="CancelCreateAccount()" class="bt" value="Cancel">
<INPUT type="button" onclick="CreateAccount(1)" class="bt btdoit" style="width: 130px;" id="idBtRun" value="Add to Pay list">
</td>
</tr>
</table>
</DIV>
</DIV>
<BR>
<table id="grid_accounts" class="grid">
<tr>
<th id="(RetHistoryAccount(Item))" class="num">ID</th>
<th id="SUM_TO_STRING(Item.Value)" class="sum bold">Amount</th>
<th id="CurrencyNameItem(Item)" data-name="Currency" class="cur hint">Cur</th>
<th id="Item.Name" data-name="Account name" class="accname hint">Name</th>
<th id="Item.Value.OperationID" data-name="Operation ID" class="snum hint">OP</th>
<th id="Item.Adviser" data-name="Adviser" class="snum hint">Adv</th>
<th id="(RetChangeSmart(Item))" data-name="Smart contract (DApp)" class="smart hint">Smart</th>
<th id="Item.WN" class="num" style="width: 30px;"></th>
</tr>
</table>
<B><DIV id="idMyTotalSum"></DIV></B>
<INPUT type="button" id="idDown" onclick="MoveUp($('idNetworkView'));ViewNetworkMode();SetImg(this,'idNetworkView')"
class="btdoit bt" value="NET CONNECT">
<INPUT type="button" id="idDown" onclick="MoveUp($('idRemoteView'));ViewRemoteParams();SetImg(this,'idRemoteView')"
class="btdoit bt" value="HTTP ACCESS">
<INPUT type="button" id="idDown" onclick="MoveUp($('idConstantView'));ViewConstant();SetImg(this,'idConstantView')"
class="btdoit bt" value="CONSTANTS">
<INPUT type="button" onclick="FindMyAccounts();" class="btdoit bt" value="Refresh accounts">
<DIV>
<DIV id="idNetworkView" style="display: none">
<H3>Network connections:</H3>
<INPUT type="checkbox" id="idUseDirectIP">Run server and use direct IP:<BR>
IP:<INPUT maxlength="16" id="idIP"> Port:<INPUT maxlength="9" id="idPort"><BR>
<!--<INPUT type="checkbox" id="idUseIncomeGrayIP">Allow connection users without a direct ip:<BR>-->
<!--White list nodes (HEX-format):<BR>-->
<TEXTAREA id="idNodeWhiteList" rows="4" cols="100" style="display: none"> </TEXTAREA>
<BR>
<!--<INPUT type="button" onclick="SetNetworkParams(0)" class="btdoit bt" value="Save">-->
<INPUT type="button" onclick="SetNetworkParams(1)" class="btdoit bt" value="Save and Restart">
<HR>
</DIV>
<DIV id="idRemoteView" style="display: none">
<H3>Remote access:</H3>
<table class="form_input keys">
<tr>
<td>HTTP port:</td>
<td><INPUT type="string" id="idHTTPPort" maxlength="6" value="80"></td>
</tr>
<tr>
<td>Password on HTTP:</td>
<td><INPUT type="string" id="idHTTPPassword"></td>
</tr>
</table>
<BR>
<!--<INPUT type="button" onclick="SetRemoteParams(0)" class="btdoit bt" value="Save">-->
<INPUT type="button" onclick="SetRemoteParams(1)" class="btdoit bt" value="Save and Restart">
<HR>
</DIV>
<DIV id="idConstantView" style="display: none">
<H3>All constants (only for advanced users):</H3>
<TEXTAREA id="idConstant" rows="20" cols="110"> </TEXTAREA><BR>
<BR>
<INPUT type="button" onclick="SaveConstant(0)" class="btdoit bt" value="Save">
<INPUT type="button" onclick="SaveConstant(1)" class="btdoit bt" value="Save and Restart">
<HR>
</DIV>
</DIV>
Style:
<select size="1" id="idSelStyle" onkeyup="SelectStyle();SaveValues()" onchange="SelectStyle();SaveValues()">
<option value="styleBrown">Brown</option>
<option value="styleBlue">Blue</option>
<option value="styleGreen">Green</option>
<option value="styleDark">Dark</option>
<option value="styleGray">Gray</option>
<option value="styleContrast1">Contrast 1</option>
<option value="styleContrast2">Contrast 2</option>
<option value="styleContrast3">Contrast 3</option>
</select>
</DIV>
<DIV id="TabHistory" style="display: none">
<DIV id="idPaginationHistory" style="display: none">
Search:<INPUT type="search" id="idViewHistoryFilter" value="" onchange="CheckNewSearch(DefHistory); ViewCurrent(DefHistory)">
<INPUT type="button" onclick="ViewBegin(DefHistory)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefHistory)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewHistoryNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefHistory)">
<INPUT type="button" onclick="ViewNext(DefHistory,HistoryMaxNum)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefHistory,HistoryMaxNum)" class="btdoitm bt" value="->|">
</DIV>
<table id="grid_history" class="grid">
<tr>
<th id="(RetDirect(Item.Direct))" class="direct">Direct</th>
<th id="ConfirmationFromBlock(Item.BlockNum)" class="txt">Confirm</th>
<th id="(escapeHtml(DateFromBlock(Item.BlockNum,0)))" class="date">Date</th>
<th id="SUM_TO_STRING(Item)" class="sum smallbold">Amount</th>
<th id="CurrencyName(Item.Currency)" class="cur">Cur</th>
<th id="Item.Description"class="desc">Description</th>
<th id="Item.FromID" class="num">From</th>
<th id="(GetStrID(Item.ToID,Item.ToName))" class="txt">To</th>
<th id="Item.FromOperationID">Operation</th>
<th id="(RetOpenBlock(Item.BlockNum,1))" class="num">Block</th>
</tr>
</table>
<B><DIV id="idTotalSumH"></DIV></B>
<INPUT type="checkbox" onchange = "SaveValues()" id="idUseSoundHistory">Use sound on receive coins<BR>
<script>
//ACCOUNT ID
function GetStrID(num,name)
{
if(num===1000000000000)
num="<B>∞</B>";
if(name)
return ""+num+"&nbsp;<B>"+escapeHtml(name)+"</B>";
else
return "<B>"+num+"</B>";
}
</script>
</DIV>
<DIV id="TabSend" style="display: none">
<DIV id="idSendList"> </DIV>
<table class="form_input">
<tr>
<td style="min-width: 115px">From account</td>
<td>
<select size="1" id="idAccount" onkeyup="OnEditTransactionFields()" onchange="OnEditTransactionFields()">
</select>
</td>
</tr>
<tr><td>&nbsp;</td><td><DIV id="idNameTo" class="smallbold"></DIV></td></tr>
<tr>
<td>Pay to</td>
<td>
<INPUT style="float: left" type="string" id="idTo" value="" onkeyup="OnEditIdTo()" onchange="OnEditIdTo()"placeholder="Payee (required)" >
</td>
</tr>
<tr>
<td>Amount</td>
<td>
<INPUT type="number" id="idSumSend" style="color:#1e21cb" value="" step=0 min=0 max=1000000000 onkeyup="OnEditTransactionFields()" onchange="OnEditTransactionFields()">&nbsp;
<button style="font-family: monospace;" onclick="SetAllSum()"></button>
<B id="idCoinName"></B>
</td>
</tr>
<tr>
<td>Description (optional)</td><td><textarea id="idDescription" rows="4" onkeyup="CheckLengthAccDesription('idDescription',200);OnEditTransactionFields()" onchange="OnEditTransactionFields()"></textarea></td>
<td><DIV id="idAttach"> </DIV></td>
</tr>
<tr>
<td>
</td>
<td>
<INPUT type="button" onclick="ClearTransaction()" class="bsend bt" value="Clear">
<INPUT type="button" onclick="EditJSONTransaction();SetImg(this,'edit_transaction');" class="bsend bt" value="Edit JSON" id="idDown">
<INPUT type="button" onclick="SendMoneyBefore()" class="bsend bt" id="idSendButton" value="Send" >
</td>
</tr>
</table>
<DIV id="edit_transaction" style="display: none">
<textarea id="idTransaction" rows="20" onkeyup="StartEditTransactionJSON()" onchange="StartEditTransactionJSON()"></textarea>
<BR>
<INPUT type="button" onclick="SignJSON()" class="btdoit bt" value="Sign JSON" id="idSignJSON">
<INPUT type="button" onclick="SendMoneyJSON()" class="btdoit bt" value="Send from JSON">
</DIV>
<script>
function SetAllSum()
{
var Item=MapAccounts[$("idAccount").value];
if(Item)
$("idSumSend").value=FLOAT_FROM_COIN(Item.Value).toStringF();
}
</script>
</DIV>
<DIV id="TabDapps" style="display: none">
<INPUT type="button" onclick="window.Open('./HTML/dapp-edit.html','smart',1240)" class="btdoit btopen bt" id="idOpenSmart" value="Dapps editor">
<BR>
<DIV id="idPaginationDapps" style="display: block">
<!--<DIV id="view_header" >DAPPS</DIV><BR>-->
Search:<INPUT type="search" id="idViewDappsFilter" value="" onchange="CheckNewSearch(DefDapps); ViewCurrent(DefDapps)">
Category:
<select size="1" id="idCategory" onchange="ViewCurrent(DefDapps)">
</select>
<BR>
<INPUT type="button" onclick="ViewBegin(DefDapps)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefDapps)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewDappNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefDapps)">
<INPUT type="button" onclick="ViewNext(DefDapps,MaxDappsID)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefDapps,MaxDappsID)" class="btdoitm bt" value="->|">
<table id="grid_dapps_all" class="grid">
<tr>
<th id="(RetNumDapp(Item))" class="num">ID</th>
<th id="(RetOpenDapps(Item,0,0))" class="accname">Name</th>
<th id="Item.Description" class="code">Description</th>
<th id="(RetCategory(Item))" class="">Category</th>
<th id="(RetBaseAccount(Item))" class="num">Base Account</th>
<th id="(RetHistoryAccount(Item,'Owner'))" class="num">Owner</th>
<th id="RetBool(Item.TokenGenerate)" class="bool">Token generate</th>
<!--<th id="Item.ISIN" class="num">ISIN</th>-->
<th id="(RetOpenBlock(Item.BlockNum,1))" class="num">Block Num</th>
<!--<th id="GetHexFromArr(Item.SumHash)" class="hash">SumHash</th>-->
</tr>
</table>
<INPUT type="button" onclick="ViewPrev(DefDapps)" class="btdoit bt" value="<< Prev">
<INPUT type="button" onclick="ViewNext(DefDapps,MaxDappsID)" class="btdoit bt" value="Next >>">
</DIV>
</DIV>
<DIV id="TabExplorer" style="display: none">
<INPUT type="button" onclick="window.Open('./HTML/stat.html','counters',920)" class="btdoit btopen bt" id="idCounters" value="Counters">
<INPUT type="button" onclick="window.Open('./HTML/chains.html','chains',1240,600)" class="btdoit btopen bt" id="idChains" value="Chains">
<INPUT type="button" onclick="window.Open('./HTML/console.html','console',1240)" class="btdoit btopen bt" id="idConsole" value="Console">
<INPUT type="button" onclick="window.Open('./HTML/monitor.html','monitor',1200)" class="btdoit btopen bt" id="idMonitor" value="Monitor">
<INPUT type="button" onclick="window.Open('./HTML/network.html','network',1200)" class="btdoit btopen bt" id="idNetwork" value="Network">
<BR>
<INPUT type="button" onclick="ViewCurrent(DefAccounts,1,this);" class="btdoit bt btexlporer" id="idDown" value="Accounts">
<INPUT type="button" onclick="ViewCurrent(DefBlock,1,this)" class="btdoit bt btexlporer" id="idDown" value="Blocks & Tr">
<INPUT type="button" onclick="ViewCurrent(DefActs,1,this)" class="btdoit bt btexlporer" id="idDown" value="Accounts acts">
<INPUT type="button" onclick="ViewCurrent(DefHash,1,this)" class="btdoit bt btexlporer" id="idDown" value="Accounts hash">
<INPUT type="button" onclick="SetVisibleUtil(this)" class="btdoit bt btexlporer" id="idDown" value="Utilites">
<script>
function SetVisibleUtil(This)
{
MoveUp($("idUtilView"));
SetVisibleBlock('idUtilView',!IsVisibleBlock('idUtilView'));
SetImg(This,'idUtilView');
}
</script>
<BR>
<DIV>
<DIV id="idPaginationAccount" style="display: none">
<HR>
<DIV id="view_header" >Accounts</DIV><BR>
Search:<INPUT type="search" id="idViewAccountFilter" value="" onchange="CheckNewSearch(DefAccounts); ViewCurrent(DefAccounts)">
<INPUT type="button" onclick="ViewBegin(DefAccounts)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefAccounts)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewAccountNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefAccounts)">
<INPUT type="button" onclick="ViewNext(DefAccounts,MaxAccID)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefAccounts,MaxAccID)" class="btdoitm bt" value="->|">
<table id="grid_accounts_all" class="grid">
<tr>
<th id="(RetHistoryAccount(Item))" class="num">ID</th>
<th id="SUM_TO_STRING(Item.Value)" class="sum smallbold">Amount</th>
<th id="CurrencyNameItem(Item)" class="cur">Cur</th>
<th id="Item.Name" class="accname">Name</th>
<th id="Item.PubKeyStr" class="pubkey">PubKey</th>
<th id="Item.Value.OperationID" class="num">Operation</th>
<th id="Item.Adviser" class="num">Adviser</th>
<th id="Item.Value.Smart" class="num">Smart</th>
<th id="(RetOpenBlock(Item.BlockNumCreate,1))" class="num">Block Num</th>
<!--<th id="Item.Arr[0].BlockNum" class="num">0</th>-->
<!--<th id="Item.Arr[1].BlockNum" class="num">1</th>-->
<!--<th id="Item.Arr[2].BlockNum" class="num">2</th>-->
<!--<th id="Item.Arr[3].BlockNum" class="num">3</th>-->
<!--<th id="Item.Arr[4].BlockNum" class="num">4</th>-->
</tr>
</table>
<INPUT type="button" onclick="ViewPrev(DefAccounts)" class="btdoit bt" value="<< Prev">
<INPUT type="button" onclick="ViewNext(DefAccounts,MaxAccID)" class="btdoit bt" value="Next >>">
<BR>
<B><DIV id="idTotalSum"></DIV></B>
<BR>
</DIV>
<DIV id="idPaginationBlock" style="display: none">
<HR>
<DIV id="view_header" >Blocks<BR></DIV>
<!--<DIV id="idFilterB">JS:<INPUT type="search" id="idViewBlockFilter" value="" onchange="ViewCurrent(DefBlock)"></DIV>-->
<INPUT type="button" onclick="ViewBegin(DefBlock)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefBlock)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewBlockNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefBlock)">
<INPUT type="button" onclick="ViewNext(DefBlock,ServerBlockNumDB)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefBlock,ServerBlockNumDB)" class="btdoitm bt" value="->|">
<table id="grid_block_all" class="grid">
<tr>
<th id="(RetOpenBlock(Item.BlockNum,Item.TrDataLen))" class="num">Num</th>
<th id="(DateFromBlock(Item.BlockNum,1))" class="date">Date</th>
<th id="GetHexFromArr(Item.TreeHash)" class="hash">Data Hash</th>
<th id="GetHexFromArr(Item.PowHash)" class="hash">PowHash</th>
<th id="GetHexFromArr(Item.Hash)" class="hash">Block Hash</th>
<!--<th id="GetHexFromArr(Item.SumHash)" class="hash">SumHash</th>-->
<th id="Item.TrDataLen" class="num">Bytes</th>
<th id="Item.Power" class="num">Pow</th>
<th id="Item.Miner" class="num">Miner</th>
<!--<th id="GetHexFromArr(Item.Hash1)" class="hash">Hash1</th>-->
<!--<th id="GetHexFromArr(Item.Hash2)" class="hash">Hash2</th>-->
<!--<th id="GetHexFromArr(Item.AddrHash)" class="hash">AddrHash</th>-->
<!--<th id="ReadUintFromArr(Item.AddrHash,6)" class="hash">Nonce0</th>-->
<!--<th id="ReadUintFromArr(Item.AddrHash,12)" class="hash">Nonce1</th>-->
<!--<th id="ReadUintFromArr(Item.AddrHash,18)" class="hash">Nonce2</th>-->
<th id="GetPowPower(Item.Hash1)" class="num">Pow1</th>
<th id="GetPowPower(Item.Hash2)" class="num">Pow2</th>
</tr>
</table>
<INPUT type="button" onclick="ViewPrev(DefBlock)" class="btdoit bt" value="<< Prev">
<INPUT type="button" onclick="ViewNext(DefBlock,ServerBlockNumDB)" class="btdoit bt" value="Next >>">
</DIV>
<DIV id="idPaginationAct" style="display: none">
<HR>
<DIV id="view_header" >Accounts acts<BR></DIV>
<INPUT type="button" onclick="ViewBegin(DefActs)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefActs)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewActNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefActs)">
<INPUT type="button" onclick="ViewNext(DefActs,MaxActNum)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefActs,MaxActNum)" class="btdoitm bt" value="->|">
<table id="grid_acts_all" class="grid">
<tr>
<th id="Item.Num" class="num">Num</th>
<th id="Item.ID" class="num">Account</th>
<th id="Item.Mode">Mode</th>
<th id="(RetOpenBlock(Item.BlockNum,1))" class="num">Block</th>
<th id="Item.TrNum" class="num">TrNum</th>
<th id="(escapeHtml(DateFromBlock(Item.BlockNum,1)))" class="date">Date</th>
<th id="Item.PrevValue.OperationID" class="num">Prev. Operation</th>
<th id="SUM_TO_STRING(Item.PrevValue)" class="sum">Prev. amount</th>
<th id="Item.PrevValue.NextPos" class="num">Prev. History</th>
</tr>
</table>
<INPUT type="button" onclick="ViewPrev(DefActs)" class="btdoit bt" value="<< Prev">
<INPUT type="button" onclick="ViewNext(DefActs,MaxActNum)" class="btdoit bt" value="Next >>">
</DIV>
<DIV id="idPaginationHash" style="display: none">
<HR>
<DIV id="view_header" >Accounts hash<BR></DIV>
<INPUT type="button" onclick="ViewBegin(DefHash)" class="btdoitm bt" value="|<-">
<INPUT type="button" onclick="ViewPrev(DefHash)" class="btdoit bt" value="<< Prev">
<INPUT type="number" id="idViewHashNum" style="text-align: center" value="0" min=0 max=1000000000 onchange="ViewCurrent(DefHash)">
<INPUT type="button" onclick="ViewNext(DefHash,CONFIG_DATA.MAX_ACCOUNT_HASH)" class="btdoit bt" value="Next >>">
<INPUT type="button" onclick="ViewEnd(DefHash,CONFIG_DATA.MAX_ACCOUNT_HASH)" class="btdoitm bt" value="->|">
<table id="grid_hash_all" class="grid">
<tr>
<th id="Item.Num" class="num">Num</th>
<th id="(RetOpenBlock(Item.BlockNum,Item.TrDataLen))" class="num">Block</th>
<th id="(escapeHtml(DateFromBlock(Item.BlockNum,1)))" class="date">Date</th>
<th id="GetHexFromArr(Item.AccHash)" class="code">AccHash</th>
<th id="GetHexFromArr(Item.SumHash)" class="code">SumHash</th>
<th id="Item.AccountMax" class="num">AccountMax</th>
<th id="Item.SmartCount" class="num">SmartCount</th>
<th id="GetHexFromArr(Item.SmartHash)" class="code">SmartHash</th>
</tr>
</table>
<INPUT type="button" onclick="ViewPrev(DefHash)" class="btdoit bt" value="<< Prev">
<INPUT type="button" onclick="ViewNext(DefHash,CONFIG_DATA.MAX_ACCOUNT_HASH)" class="btdoit bt" value="Next >>">
</DIV>
<DIV id="idUtilView" style="display: none">
<HR>
<DIV id="view_header" >UTILITES<BR></DIV>
Number of blocks in depth:<INPUT type="number" id="idBlockCount" onchange = "SaveValues()" value="0"><BR>
<INPUT type="button" onclick="RestartNode()" class="bt btdoit btlong" value="Restart node">
<INPUT type="button" onclick="RewriteTransactions()" class="bt btdoit btlong" value="Rewrite transactions">
<INPUT type="button" onclick="TruncateBlockChain()" class="btdoit btlong bt" value="Truncate chain">
<INPUT type="button" onclick="ClearDataBase()" class="btdoit btlong bt" value="Clear DataBase <!>">
<DIV id="idDevelopService2">
<INPUT type="button" onclick="CleanChain()" class="bt btdoit btlong" value="Clean chain">
<BR>
<textarea id="idRunText" rows="8" cols="98" autofocus></textarea>
<BR>
<INPUT type="button" onclick="SetRun()" class="bt btdoit" value="Set run">
</DIV>
<BR>
</DIV>
</DIV>
</DIV>
<BR>
<DIV id="idServerBlock" style="width: 99.5%">
<HR>
Log from node:
<DIV id="idServerLog"></DIV><BR>
</DIV>
<DIV id="idBlockPasswordSet" style="display: none">
<H3 align="center">Enter new password:</H3>
<table class="password" id="idTablePassword1">
<tr style="display: none">
<td><DIV>Login:</DIV></td><td><INPUT type="string" id="Login1" value=""></td>
</tr>
<tr>
<td><DIV>Password:</DIV></td><td><INPUT type="password" autocomplete="WalletPassword" id="idPassword1" value=""></td>
</tr>
<tr>
<td><DIV>Repeat:</DIV></td><td><INPUT type="password" autocomplete="WalletPassword" id="idPassword2" onkeyup="" value=""></td>
</tr>
<tr>
<td></td>
<td><INPUT type="button" onclick="SetPassword()" class="bt" value="Set">
<INPUT type="button" onclick="CancelSetPassword()" class="bt" value="Cancel"></td>
</tr>
</table>
</DIV>
<DIV id="idBlockPasswordGet" style="display: none">
<H3 align="center">Enter your password:</H3>
<table class="password" id="idTablePassword2">
<tr style="display: none">
<td><DIV>Login:</DIV></td><td><INPUT type="string" id="Login2" value=""></td>
</tr>
<tr>
<td><DIV>Password:</DIV></td><td><INPUT type="password" autocomplete="WalletPassword" id="idPasswordGet" value=""></td>
</tr>
<tr>
<td></td>
<td><INPUT type="button" onclick="SetPassword()" class="bt" value="Set">
<INPUT type="button" onclick="CancelSetPassword()" class="bt" value="Cancel"></td>
</tr>
</table>
</DIV>
<DIV id="idBlockOnSend" style="display: none">
<DIV align="center">
Send <B id="idOnSendText"></B><BR>
<button onclick="SendMoney2()" id="idBtOnSend" class="radius">Send</button>
<button onclick='SetVisibleBlock("idBlockOnSend",0);' class="radius">Cancel</button>
<DIV align="left">
<DIV id="idCheckOnSend"><input type="checkbox" id="idWhiteOnSend"/> Add this account to white list</DIV>
</DIV>
</DIV>
</DIV>
<audio style="visibility: hidden;" controls="controls" id="sound_coin">
<source src="coin.mp3" type="audio/mpeg"/>
</audio>
<audio style="visibility: hidden;" controls="controls" id="sound_err">
<source src="click.mp3" type="audio/mpeg"/>
</audio>
</DIV>
</DIV>
</body>
</html>
<DIV id="idStableScroll" align='center'>
<A href="https://terafoundation.org/">Web</A>
<A href="https://bitcointalk.org/index.php?topic=4573801.0">ANN</A>
<A href="https://twitter.com/terafoundation">Twitter</A>
<A href="https://web.telegram.org/#/im?p=@terafoundation">Telegram</A>
<A href="https://discord.gg/CvwrbeG">Discord</A>
<!--<A href="https://github.com/terafoundation/wallet">GitHub</A>-->
<!--progr76@gmail.com-->
</DIV>
<script>
// const buffer = new SharedArrayBuffer(8);
// console.log(buffer.byteLength);
</script>