diff --git a/css/app.d7891853.css b/css/app.d7891853.css
new file mode 100644
index 0000000..68f7729
--- /dev/null
+++ b/css/app.d7891853.css
@@ -0,0 +1 @@
+@import url(https://fonts.googleapis.com/css2?family=Nunito:wght@200;400;700&display=swap);body,html{background:linear-gradient(180deg,#4d5879,#26314e);color:#a7b0ca;font-family:Nunito,sans-serif;font-weight:700;font-size:16px;height:100%;margin:0}pre{overflow-x:auto;font-size:14px}*{box-sizing:border-box}.rotate svg{transition:all 2s linear}.rotate.down svg{transform:rotate(1turn)}.df{display:flex}.error{background:#ca4b4b;margin:0 0 30px;padding:10px;text-align:center;color:#fff;font-weight:200}.labeltabs{display:flex;margin-bottom:5px}.labeltabs label{cursor:pointer;border-bottom:2px solid transparent;opacity:.4;transition:all .3s}.labeltabs label.active{font-weight:700;border-bottom:2px solid #59c7f1;opacity:1}.labeltabs label:first-child{margin-right:20px}.close{position:absolute;top:20px;right:20px;color:#59c7f1;font-size:24px;z-index:2}.morebutton{color:#ccc;font-size:14px;padding:0 10px}canvas{display:inline-block!important;max-width:100%;height:auto!important}#powstatus{width:100%;position:relative;height:32px;overflow:hidden;position:absolute;z-index:5}#powstatus .status{padding:5px;position:absolute;transition:all .7s;text-align:center;left:0;right:0;height:32px;text-shadow:0 0 6px rgba(0,0,0,.27)}#powstatus .status svg{-webkit-filter:drop-shadow(0 0 6px rgba(0,0,0,.270588));filter:drop-shadow(0 0 6px rgba(0,0,0,.270588))}#powstatus .status.busy{background:#363e58;top:-32px}#powstatus .status.busy.active{top:0}#powstatus .status.ready{background:#59c7f1;color:#fff;top:32px}#powstatus .status.ready.active{top:0}.showmobile{display:block!important}@media (min-width:1040px){.showmobile{display:none!important}}.hidemobile{display:none!important}@media (min-width:1040px){.hidemobile{display:block!important}}#app{overflow:hidden;position:relative}#app,#app .page{width:100vw;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}#app .page{background:#26314e;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjIAAAAUCAYAAACXptdbAAAA00lEQVR4nO3WOw7CMBAEUIfDcv8bhIqKhPgXixHvlbuzjhDNbKWUZ/m0H8zeznZH89pszW1PZq/cjdzW7lbmWmej9yP//Z3Znvnsm1X72u/0Zmfe/pNt0m/tfaf17q78zNyKzNHuLN8yn/HGivm3b1ztZmcu33s0PAIA8FMUGQAgliIDAMRSZACAWIoMABBLkQEAYikyAEAsRQYAiKXIAACxFBkAIJYiAwDEUmQAgFiKDAAQS5EBAGIpMgBALEUGAIilyAAAsRQZACCWIgMAZCqlvAC39jN1dolr3gAAAABJRU5ErkJggg==);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjIAAAAUCAYAAACXptdbAAAA00lEQVR4nO3WOw7CMBAEUIfDcv8bhIqKhPgXixHvlbuzjhDNbKWUZ/m0H8zeznZH89pszW1PZq/cjdzW7lbmWmej9yP//Z3Znvnsm1X72u/0Zmfe/pNt0m/tfaf17q78zNyKzNHuLN8yn/HGivm3b1ztZmcu33s0PAIA8FMUGQAgliIDAMRSZACAWIoMABBLkQEAYikyAEAsRQYAiKXIAACxFBkAIJYiAwDEUmQAgFiKDAAQS5EBAGIpMgBALEUGAIilyAAAsRQZACCWIgMAZCqlvAC39jN1dolr3gAAAABJRU5ErkJggg==),linear-gradient(180deg,#4d5879,#26314e);background-size:contain;padding:30px;transition:all .3s;position:absolute;top:32px;left:100vw}#app .page.active{left:0;z-index:2}#app .page .inner{overflow-y:auto;padding-bottom:65px;position:relative;width:calc(100% + 60px);padding:30px;padding-top:62px;margin:-30px}@media (min-width:1040px){#app .page .inner{display:flex;justify-content:center;overflow-y:visible}#app .page .inner.settings .block{max-width:500px}#app .page .inner .block{flex:1;padding:10px 30px}#app .page .inner .block .details{margin-bottom:15px}#app .page .inner .block .details input{margin-bottom:22px}#app .page .inner .block.history{height:calc(100vh - 75px);padding-bottom:75px;overflow:auto}#app .page .inner .block.pending{height:calc(100vh - 120px);padding-bottom:75px;overflow:auto}}#app #login{justify-content:space-between;top:0}#app #receive,#app #send,#app #settings{z-index:2}#app #receive .qrcode{text-align:center}#app #receive .qrcode img{display:inline-block!important;max-width:100%;height:auto}#app #receive .block{display:flex;flex-direction:column;align-items:center}#app #receive .btn{margin-top:30px;width:100%}#app #receive .address{font-size:18px;margin:0 30px 30px;font-weight:700;line-height:1.8}#app #blockdetails,#app #scan{z-index:3}#app #scan{top:0}#app #settingsdetails{width:100%}#app #genwallet{top:0;justify-content:flex-start}#app .genwallet{color:#a7b0ca;font-size:14px;font-weight:400}#app #wallet{z-index:1;justify-content:flex-start;padding:0;top:0}#app #wallet .menu{position:absolute;bottom:0;height:75px;left:0;width:100%}#app #wallet .menu .bg{position:absolute;bottom:0;top:0;left:0;right:0;background:rgba(31,38,60,.68);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app #wallet .menu .tab{cursor:pointer;flex:1;height:100%;justify-content:center;align-items:center;display:flex;flex-direction:column;font-weight:400;font-size:14px}#app #wallet .menu .tab .menuicon{margin-bottom:4px}#app #wallet .menu .content{position:absolute;bottom:0;top:0;left:0;right:0;display:flex;justify-content:space-evenly;align-items:center}#app #wallet .menu .content a{color:#fff;text-decoration:none}#app .scan-qr-code .page{position:fixed}#output .balance{background:#3e4761;margin:10px 10px 40px;padding:20px 40px;border-radius:10px;word-break:break-all;text-align:center;border:1px solid hsla(0,0%,100%,.07);box-shadow:0 0 11px rgba(0,0,0,.22);position:relative}#output .balance .balanceextra{position:absolute;bottom:8px;right:8px;padding:0 10px;color:#a7b0ca;font-size:12px}#output .balance .value{font-size:44px;color:#d1d5e2;font-weight:700;margin:30px 0;line-height:1;display:flex;justify-content:center;align-items:center}#output .balance .value img{display:inline-block;width:40px;margin-right:10px}#output .balance .value .suffix{font-size:30px;color:rgba(190,195,210,.79);margin-left:6px}#output .balance .raw{font-size:12px;line-height:1;display:flex;justify-content:center;display:none;letter-spacing:2px;font-weight:200}#output .balance .raw.active{display:flex}#output .balance .raw img{width:12px;margin-right:4px}.headingtitle{font-size:16px;font-weight:400;margin:40px 25px 5px;display:flex;justify-content:space-between;text-transform:uppercase;letter-spacing:4px}.headingtitle.top{margin:25px 20px 25px}.address{word-break:break-all;font-size:16px;font-weight:200}.address .highlight{font-weight:700}#breakdown{justify-content:flex-start;height:calc(100% - 30px);overflow:auto;font-weight:200;word-break:break-all;width:100%}#breakdown header{font-size:24px;justify-content:flex-start;margin:0}#breakdown .title{font-weight:400;font-size:18px;display:flex;align-items:baseline;text-transform:uppercase;letter-spacing:2px}#breakdown .label{opacity:.7;font-size:14px;margin-top:5px;word-break:break-word}#breakdown .json{overflow:auto}#breakdown .block{margin-bottom:20px}#breakdown .stateblock,#breakdown .value{word-break:break-all}#breakdown .value{font-weight:200;font-size:16px;margin-left:25px;letter-spacing:0;text-transform:none}#breakdown .value.mla{margin-left:auto}#breakdown .hide{position:absolute;left:-999em}#breakdown .address{position:absolute;top:30px;left:0;font-weight:400}#breakdown .date{font-weight:400;margin-bottom:30px}#breakdown details.uaddress{height:100px}#breakdown .raw{font-size:12px}.mla{margin-left:auto}.sendfunds{width:100%;margin:15px 0 30px}.scan{width:100%}.highlight{color:#59c7f1}#history,#pendingblocks{width:100%;padding:0 10px}.transaction{display:flex;align-items:center;padding:20px;position:relative;border-bottom:1px solid hsla(0,0%,100%,.05)}.transaction:after{content:"";position:absolute;bottom:0;left:0;right:0;border-bottom:1px solid rgba(0,0,0,.32)}.transaction .innerdetails{flex:1}.transaction .address{font-weight:200;font-size:12px;opacity:.7}.transaction .icon{font-size:35px;margin-right:15px;opacity:.85;display:block}.transaction .value{display:flex;align-items:center;line-height:1;font-size:14px}.transaction .value svg{margin-left:5px}.transaction .amount{display:flex;align-items:center;justify-content:space-between}.transaction .amount .icon{margin-left:5px}.transaction .amount .type{color:#fff;font-size:14px}.transaction button.pocket{background:#e2ac39;border:none;padding:3px 20px;border-radius:7px}.transaction.receive .type{color:#59c7f1}.transaction.send .type{color:#af73d2}.transaction.pending .type{color:#e2ac39}#output{width:100%}#output .details{padding:0 40px}label{margin-bottom:10px;display:inline-block}input[type=password],input[type=text]{font-size:22px;padding:15px;background:rgba(0,0,0,.21);color:#a7b0ca;border-radius:5px;border:2px solid #59c7f1;margin-bottom:30px;width:100%}input[type=password]::-webkit-input-placeholder,input[type=text]::-webkit-input-placeholder{color:rgba(167,176,202,.43);font-weight:200}input[type=password]::-moz-placeholder,input[type=text]::-moz-placeholder{color:rgba(167,176,202,.43);font-weight:200}input[type=password]:-ms-input-placeholder,input[type=text]:-ms-input-placeholder{color:rgba(167,176,202,.43);font-weight:200}input[type=password]::-ms-input-placeholder,input[type=text]::-ms-input-placeholder{color:rgba(167,176,202,.43);font-weight:200}input[type=password]::placeholder,input[type=text]::placeholder{color:rgba(167,176,202,.43);font-weight:200}@media (min-width:900px){input[type=password],input[type=text]{font-size:15px;padding:12px}}.login{position:relative}.login .eye,.login .max{position:absolute;display:flex;right:0;top:0;height:60px;width:60px;justify-content:center;align-items:center;font-size:24px}.login .eye span,.login .max span{display:none}.login .eye span.active,.login .max span.active{display:block}.login .max{font-size:14px;color:#59c7f1;cursor:pointer;font-weight:400}.login input[type=password],.login input[type=text]{padding-right:60px}@media (min-width:900px){.login input[type=password],.login input[type=text]{font-size:22px;padding:15px 60px 15px 15px}}.details{margin-bottom:30px;border-bottom:1px solid hsla(0,0%,100%,.13);position:relative}.details:after{position:absolute;content:"";border-bottom:1px solid rgba(0,0,0,.21);bottom:0;left:0;right:0}.details label{display:block}.details .copy{position:absolute;right:0;top:0;color:#59c7f1;text-decoration:underline}.details.smaller{margin-bottom:0;border-bottom:none}.details.smaller:after{display:none}.details.smaller input[type=password],.details.smaller input[type=text]{padding:10px;border:none;margin-bottom:20px}.rpc{margin:-30px 0;width:calc(100% + 60px);position:relative;text-align:center;font-weight:400;padding:10px;background:rgba(0,0,0,.15);font-size:12px;letter-spacing:2px;text-transform:lowercase}.rpc span{color:#59c7f1;letter-spacing:0;text-transform:none;margin-left:10px}#inputs{display:flex;flex-direction:column;width:100%;max-width:500px;padding-top:50px}#inputs label{font-size:16px;font-weight:400;text-transform:uppercase;letter-spacing:2px}#inputs button{padding:15px;margin-bottom:15px}.btn{background:#59c7f1;border-radius:20px;border:none;color:#26314e;cursor:pointer;padding:10px 20px;font-size:16px;display:inline-block;justify-content:center;letter-spacing:3px;text-align:center;max-width:500px}.btn.outline{padding:8px 18px;border:2px solid rgba(89,199,241,.733333);background:transparent;color:rgba(89,199,241,.733333)}.btn.outline:hover{border-color:#59c7f1;color:#59c7f1}.inline-buttons{display:flex}.inline-buttons .btn{flex:1}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:#a7b0ca!important}#buttons button{background:none;color:#ccc;border:none;font-size:14px}.qrcode{max-width:260px;width:100%;height:auto!important;border-radius:50%;padding:40px;border:5px solid #59c7f1;background:#fff}#app .page[data-v-51ce3523]{padding:30px}.print-position{margin-bottom:8px}.posbuttons{display:flex;flex-direction:column;justify-content:space-evenly}.posbuttons button{border-radius:0}.posbuttons button.btn{padding:0}.posbuttons button.outline img{opacity:.1}.posbuttons img{width:220px}.printpos{display:flex}.printpos canvas{background:#fff;max-width:500px;height:auto;margin-right:20px;border-radius:20px;display:none!important}.fdcol{flex-direction:column}@media print{.wallet canvas{max-width:100%!important}.wallet .close{display:none}.wallet>*{padding:0;margin:0}}.btn[data-v-8f803220]{width:100%;margin-bottom:30px}.canvas-bag[data-v-8f803220]{text-align:center;margin-top:20px;display:flex;justify-content:center}
\ No newline at end of file
diff --git a/index.html b/index.html
index 668a5ce..a71b0cc 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
LSIO-Nano-Wallet
\ No newline at end of file
+LSIO-Nano-Wallet
\ No newline at end of file
diff --git a/js/app.c291167b.js b/js/app.c291167b.js
new file mode 100644
index 0000000..4ca3c4a
--- /dev/null
+++ b/js/app.c291167b.js
@@ -0,0 +1,2 @@
+(function(t){function e(e){for(var n,r,o=e[0],c=e[1],l=e[2],u=0,p=[];u-1:t.seed},on:{change:function(e){var a=t.seed,n=e.target,s=!!n.checked;if(Array.isArray(a)){var i=null,r=t._i(a,i);n.checked?r<0&&(t.seed=a.concat([i])):r>-1&&(t.seed=a.slice(0,r).concat(a.slice(r+1)))}else t.seed=s}}}):"radio"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.seed,expression:"seed"}],attrs:{placeholder:"Seed",id:"seed",name:"seed",type:"radio"},domProps:{checked:t._q(t.seed,null)},on:{change:function(e){t.seed=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:t.seed,expression:"seed"}],attrs:{placeholder:"Seed",id:"seed",name:"seed",type:t.logintype},domProps:{value:t.seed},on:{input:function(e){e.target.composing||(t.seed=e.target.value)}}}),a("span",{staticClass:"eye",on:{click:t.togglevisibility}},[a("span",{class:{active:"password"===t.logintype}},[a("i",{staticClass:"far fa-eye"})]),a("span",{class:{active:"text"===t.logintype}},[a("i",{staticClass:"far fa-eye-slash"})])])]):t._e(),!1===t.seedtab?a("div",{staticClass:"login"},["checkbox"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{placeholder:"Private key",id:"key",name:"key",type:"checkbox"},domProps:{checked:Array.isArray(t.key)?t._i(t.key,null)>-1:t.key},on:{change:function(e){var a=t.key,n=e.target,s=!!n.checked;if(Array.isArray(a)){var i=null,r=t._i(a,i);n.checked?r<0&&(t.key=a.concat([i])):r>-1&&(t.key=a.slice(0,r).concat(a.slice(r+1)))}else t.key=s}}}):"radio"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{placeholder:"Private key",id:"key",name:"key",type:"radio"},domProps:{checked:t._q(t.key,null)},on:{change:function(e){t.key=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:t.key,expression:"key"}],attrs:{placeholder:"Private key",id:"key",name:"key",type:t.logintype},domProps:{value:t.key},on:{input:function(e){e.target.composing||(t.key=e.target.value)}}}),a("span",{staticClass:"eye",on:{click:t.togglevisibility}},[a("span",{class:{active:"password"===t.logintype}},[a("i",{staticClass:"far fa-eye"})]),a("span",{class:{active:"text"===t.logintype}},[a("i",{staticClass:"far fa-eye-slash"})])])]):t._e(),!0===t.showadvanced?a("div",[a("label",{attrs:{for:"seedindex"}},[t._v("Seed Index")]),a("div",{staticClass:"login"},["checkbox"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.seedindex,expression:"seedindex"}],attrs:{id:"seedindex",name:"seedindex",type:"checkbox"},domProps:{checked:Array.isArray(t.seedindex)?t._i(t.seedindex,null)>-1:t.seedindex},on:{change:function(e){var a=t.seedindex,n=e.target,s=!!n.checked;if(Array.isArray(a)){var i=null,r=t._i(a,i);n.checked?r<0&&(t.seedindex=a.concat([i])):r>-1&&(t.seedindex=a.slice(0,r).concat(a.slice(r+1)))}else t.seedindex=s}}}):"radio"===t.logintype?a("input",{directives:[{name:"model",rawName:"v-model",value:t.seedindex,expression:"seedindex"}],attrs:{id:"seedindex",name:"seedindex",type:"radio"},domProps:{checked:t._q(t.seedindex,null)},on:{change:function(e){t.seedindex=null}}}):a("input",{directives:[{name:"model",rawName:"v-model",value:t.seedindex,expression:"seedindex"}],attrs:{id:"seedindex",name:"seedindex",type:t.logintype},domProps:{value:t.seedindex},on:{input:function(e){e.target.composing||(t.seedindex=e.target.value)}}})])]):t._e(),a("button",{staticClass:"openwallet btn",attrs:{type:"button"},on:{click:t.openWallet}},[t._v("Open Wallet")]),a("scan-qr",{on:{scanned:t.scanDone}})],1),a("div",{attrs:{id:"buttons"}},[a("router-link",{staticClass:"genwallet",attrs:{to:t.$store.getters["app/nodeLink"]+"generate"}},[t._v("Generate Wallet")])],1)]),a("div",{staticClass:"page",class:{active:!0===t.open},attrs:{id:"wallet"}},[a("div",{attrs:{id:"powstatus"}},[a("div",{staticClass:"status busy",class:{active:!1===t.ready}},[t._v("Calculating Work "),a("i",{staticClass:"fas fa-spinner fa-spin"})]),a("div",{staticClass:"status ready",class:{active:!0===t.ready}},[t._v("Ready "),a("i",{staticClass:"fas fa-check"})])]),a("div",{staticClass:"inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"headingtitle top"},[a("span",{attrs:{id:"closewallet"},on:{click:t.logout}},[a("i",{staticClass:"fal fa-sign-out fa-flip-horizontal"})]),a("span",[t._v("Wallet")]),a("span",{staticClass:"refresh rotate",class:{down:t.isActive},on:{click:t.refresh}},[a("i",{staticClass:"fal fa-sync"})])]),a("simplebar",{staticClass:"block pending"},[a("div",{attrs:{id:"output"}},[a("div",{staticClass:"balance"},[a("div",{staticClass:"raw",class:{active:t.balanceextra},on:{click:function(e){return t.copyToClipboard(t.address)}}},[t._v(t._s(t.address))]),a("div",{staticClass:"value",domProps:{innerHTML:t._s(t.abbreviateNumber(t.balance))}}),a("div",{staticClass:"raw",class:{active:t.balanceextra}},[t._v(t._s(t.balance))]),a("a",{staticClass:"balanceextra",attrs:{href:""},on:{click:function(e){e.preventDefault(),t.balanceextra=!t.balanceextra}}},[a("i",{staticClass:"fal fa-ellipsis-h",attrs:{"data-fa-transform":"grow-20"}})])])]),a("div",{staticClass:"headingtitle showmobile"},[t._v("History")]),t._l(t.pending,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:"pending"},on:{blockdetails:function(e){t.blockdetails=e},receive:t.refreshDetails}})}))],2)],1),a("simplebar",{staticClass:"block history"},[a("div",{staticClass:"headingtitle hidemobile"},[t._v("History")]),t._l(t.history,(function(e,n){return a("transaction",{key:n,attrs:{index:n,transaction:e,type:e.type},on:{blockdetails:function(e){t.blockdetails=e}}})}))],2)],1),a("div",{staticClass:"menu",attrs:{id:"walletmenu"}},[a("div",{staticClass:"bg"}),a("div",{staticClass:"content"},[a("div",{staticClass:"tab",attrs:{"data-tab":"#receive"},on:{click:function(e){t.receive=!0}}},[t._m(0),a("span",[t._v("Receive")])]),a("div",{staticClass:"tab",attrs:{"data-tab":"#send"},on:{click:function(e){t.send=!0}}},[t._m(1),a("span",[t._v("Send")])]),a("div",{staticClass:"tab",attrs:{"data-tab":"#settings"},on:{click:function(e){t.settings=!0}}},[t._m(2),a("span",[t._v("Settings")])])])])]),a("div",{staticClass:"page",class:{active:!1!==t.send},attrs:{id:"send"}},[a("a",{staticClass:"close",on:{click:function(e){t.send=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("send",{attrs:{open:t.send},on:{close:function(e){t.send=!1}}})],1),a("div",{staticClass:"page",class:{active:!1!==t.settings},attrs:{id:"settings"}},[a("a",{staticClass:"close",on:{click:function(e){t.settings=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("settings",{attrs:{open:t.settings,representative:t.representative},on:{change:t.repChange}})],1),a("div",{staticClass:"page",class:{active:!1!==t.receive},attrs:{id:"receive"}},[a("a",{staticClass:"close",on:{click:function(e){t.receive=!1}}},[a("i",{staticClass:"fal fa-times"})]),a("receive",{attrs:{address:t.address}})],1),a("div",{staticClass:"page",class:{active:null!==t.blockdetails},attrs:{id:"blockdetails"}},[a("a",{staticClass:"close",on:{click:function(e){t.blockdetails=null}}},[a("i",{staticClass:"fal fa-times"})]),a("block-state",{attrs:{details:t.blockdetails}})],1)])},m=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-wallet",attrs:{"data-fa-transform":"grow-8"}})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-coins",attrs:{"data-fa-transform":"grow-8"}})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticClass:"menuicon"},[a("i",{staticClass:"fal fa-cog",attrs:{"data-fa-transform":"grow-8"}})])}],b=(a("ac1f"),a("5319"),a("2ca0"),a("96cf"),a("1da1")),g=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"transaction",class:t.type},[a("div",{staticClass:"type icon",attrs:{value:t.hash},on:{click:function(e){return t.$emit("blockdetails",t.hash)}}},["send"===t.type?a("i",{staticClass:"fal fa-minus-circle"}):"pending"===t.type?a("i",{staticClass:"fal fa-exclamation-circle"}):a("i",{staticClass:"fal fa-plus-circle"})]),a("div",{staticClass:"innerdetails"},[a("div",{staticClass:"amount"},[a("div",{staticClass:"value",attrs:{title:t.rawValue},domProps:{innerHTML:t._s(t.formattedValue)}},[a("i",{staticClass:"fal fa-coin"})]),"pending"!==t.type?a("div",{staticClass:"type"},[t._v(t._s(t.transactionStatus(t.transaction.type)))]):t._e(),"pending"===t.type?a("div",{staticClass:"type"},[null!==t.privatekey?a("button",{staticClass:"pocket",on:{click:t.receive}},[t._v("Receive")]):a("div",{},[t._v("Pending")])]):t._e()]),a("div",{staticClass:"address"},["pending"!==t.type?a("span",{on:{click:function(e){return t.link("address",t.transaction.account)}}},[t._v(t._s(t.formattedDate)+" "+t._s(t.abbreviateAddress(t.transaction.account)))]):t._e(),"pending"===t.type?a("span",{on:{click:function(e){return t.link("address",t.transaction.source)}}},[t._v(t._s(t.abbreviateAddress(t.transaction.source)))]):t._e()])])])},y=[],k=(a("a9e3"),a("b680"),a("174c")),w=(a("fb6a"),a("8722")),C={data:function(){return{rawconv:{from:"raw",to:"Nano"},nanoconv:{from:"Nano",to:"raw"}}},computed:{},mounted:function(){},methods:{abbreviateNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 2===e?w(t).format({trimMantissa:!0,mantissa:2,average:!0}):w(t).format({trimMantissa:!0,mantissa:10,average:!0})},copyToClipboard:function(t){var e=document.createElement("textarea");e.innerHTML=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),alert("Copied to clipboard")},link:function(t,e){var a=window.location.origin;"address"==t&&window.open(a+"/#"+this.$store.getters["app/nodeLink"]+"address/"+e),"block"==t&&window.open(a+"/#"+this.$store.getters["app/nodeLink"]+"block/"+e)},abbreviateAddress:function(t){return t.substring(0,11)+"..."+t.slice(t.length-6)},highlightAddress:function(t){if(null!==t&&void 0!==t){var e=t.length-6;return''+t.substring(0,11)+""+t.substring(11,e)+''+t.slice(t.length-6)+""}return null},transactionStatus:function(t){return"send"===t?"Sent":"receive"===t?"Received":void 0}}},x=a("901e"),_=a.n(x),T={name:"Transaction",props:{transaction:Object,type:String,index:[Number,String]},mixins:[C],computed:{rawValue:function(){return k["d"](this.transaction.amount,this.rawconv)},formattedValue:function(){return("send"===this.transaction.type?"-":"+")+this.abbreviateNumber(k["d"](this.transaction.amount,this.rawconv),5)},formattedDate:function(){var t=new Date(1e3*this.transaction.local_timestamp);return t.getDate()+" "+t.toLocaleString("default",{month:"short"})+" "+t.getFullYear()},pow:function(){return this.$store.state.app.pow},ready:function(){return this.$store.state.app.ready},privatekey:function(){return this.$store.state.app.privatekey},hash:function(){return"pending"===this.type?this.index:this.transaction.hash}},methods:{receive:function(){var t=this;return Object(b["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l,u,d,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return a=k["g"](t.privatekey),n=k["f"](a,{useNanoPrefix:!0}),s={},s["action"]="account_info",s["representative"]="true",s["account"]=n,e.next=10,t.$store.dispatch("app/rpCall",s);case 10:return i=e.sent,r="0",o="open",c="0000000000000000000000000000000000000000000000000000000000000000",l=n,"balance"in i&&(r=i.balance,o="receive",c=i.frontier,l=i.representative),u=new _.a(r).plus(new _.a(t.transaction.amount)).toFixed(),d=k["e"](t.privatekey,{work:t.pow,previous:c,representative:l,balance:u,link:t.index}),p={},p["action"]="process",p["json_block"]="true",p["subtype"]=o,p["block"]=d.block,e.next=25,t.$store.dispatch("app/rpCall",p);case 25:t.$emit("receive",!0);case 26:case"end":return e.stop()}}),e)})))()}}},S=T,A=Object(d["a"])(S,g,y,!1,null,"14a1a37d",null),R=A.exports,$=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"send"},[a("div",{attrs:{id:"sendform"}},[a("label",{attrs:{for:"amount"}},[t._v("Amount:")]),a("div",{staticClass:"login"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.amount,expression:"amount"}],attrs:{type:"text",id:"amount",name:"amount"},domProps:{value:t.amount},on:{input:function(e){e.target.composing||(t.amount=e.target.value)}}}),a("span",{staticClass:"max",on:{click:t.setmax}},[t._v("MAX")])]),a("label",{attrs:{for:"destination"}},[t._v("Destination:")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.destination,expression:"destination"}],attrs:{type:"text",id:"destination",name:"destination"},domProps:{value:t.destination},on:{input:function(e){e.target.composing||(t.destination=e.target.value)}}})]),a("button",{staticClass:"sendfunds btn",attrs:{type:"button"},on:{click:t.send}},[t._v("Send")]),a("scan-qr",{on:{scanned:t.scanDone}})],1)},j=[],E=(a("1276"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"scan-qr-code"},[a("button",{staticClass:"scan btn outline",attrs:{type:"button"},on:{click:t.scanQR}},[t._v("Scan QR")]),a("div",{staticClass:"page",class:{active:!1!==t.scan},staticStyle:{"z-index":"9"}},[a("a",{staticClass:"close",on:{click:t.closeScan}},[a("i",{staticClass:"fal fa-times"})]),t.loadingMsg?a("div",[t._v(t._s(t.loadingMsg))]):t._e(),a("canvas",{attrs:{id:"scan_"+t._uid}})])])}),B=[],O=(a("4160"),a("159b"),a("ecec")),P=a.n(O),D=document.createElement("video"),F={name:"ScanQr",props:{},data:function(){return{amount:"",destination:"",scan:!1,scanner:null,canvas:null,stream:null,continue:!0,loadingMsg:"Unable to access video stream (please make sure you have a webcam enabled)"}},methods:{closeScan:function(){D.srcObject&&D.srcObject.getTracks().forEach((function(t){t.stop()})),this.scan=!1,this.continue=!1},scanQR:function(){var t=this;return Object(b["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=function(){if(n.loadingMsg="Loading video...",D.readyState===D.HAVE_ENOUGH_DATA){n.loadingMsg=null,a.height=D.videoHeight,a.width=D.videoWidth,n.canvas.drawImage(D,0,0,a.width,a.height);var t=n.canvas.getImageData(0,0,a.width,a.height),e=P()(t.data,t.width,t.height,{inversionAttempts:"dontInvert"});e&&(s(e.location.topLeftCorner,e.location.topRightCorner,"#0cd21a"),s(e.location.topRightCorner,e.location.bottomRightCorner,"#0cd21a"),s(e.location.bottomRightCorner,e.location.bottomLeftCorner,"#0cd21a"),s(e.location.bottomLeftCorner,e.location.topLeftCorner,"#0cd21a"),n.$emit("scanned",e.data),D.srcObject.getTracks().forEach((function(t){t.stop()})),n.continue=!1,setTimeout((function(){n.scan=!1}),1200))}!0===n.continue&&requestAnimationFrame(i)},s=function(t,e,a){n.canvas.beginPath(),n.canvas.moveTo(t.x,t.y),n.canvas.lineTo(e.x,e.y),n.canvas.lineWidth=4,n.canvas.strokeStyle=a,n.canvas.stroke()},t.scan=!0,t.continue=!0,a=document.getElementById("scan_"+t._uid),t.canvas=a.getContext("2d"),n=t,navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then((function(t){D.srcObject=t,D.setAttribute("playsinline",!0),D.play(),requestAnimationFrame(i)}));case 8:case"end":return e.stop()}}),e)})))()}}},I=F,L=Object(d["a"])(I,E,B,!1,null,null,null),N=L.exports,M={name:"Send",mixins:[C],components:{ScanQr:N},props:{address:String,open:Boolean},data:function(){return{amount:"",destination:""}},computed:{pow:function(){return this.$store.state.app.pow},ready:function(){return this.$store.state.app.ready},privatekey:function(){return this.$store.state.app.privatekey}},watch:{open:function(t,e){!0===t&&!1===e&&(this.amount="",this.destination="")}},methods:{scanDone:function(t){this.destination=t.replace("nano:","").split("?")[0]},send:function(){var t=this;return Object(b["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return t.amount.startsWith(".")&&(t.amount="0"+t.amount),a=k["d"](t.amount,t.nanoconv),n=k["g"](t.privatekey),s=k["f"](n,{useNanoPrefix:!0}),i={},i["action"]="account_info",i["representative"]="true",i["account"]=s,e.next=12,t.$store.dispatch("app/rpCall",i);case 12:return r=e.sent,o=new _.a(r.balance).minus(new _.a(a)).toFixed(),c=k["e"](t.privatekey,{work:t.pow,previous:r.frontier,representative:r.representative,balance:o,link:t.destination}),console.log(c),l={},l["action"]="process",l["json_block"]="true",l["subtype"]="send",l["block"]=c.block,e.next=23,t.$store.dispatch("app/rpCall",l);case 23:t.$store.commit("app/pow",null),t.amount="",t.destination="",t.$emit("close","true");case 27:case"end":return e.stop()}}),e)})))()},setmax:function(){this.amount=this.$store.state.app.balance}}},G=M,W=Object(d["a"])(G,$,j,!1,null,null,null),H=W.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"receive inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"address",domProps:{innerHTML:t._s(t.highlightAddress(t.address))},on:{click:function(e){return t.link("address",t.address)}}}),a("qr-block",{attrs:{address:"nano:"+t.address}}),a("a",{staticClass:"btn",on:{click:function(e){return t.copyToClipboard(t.address)}}},[t._v("Copy Address")])],1)])},q=[],V=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"qrcode",attrs:{id:t._uid}})},Q=[],K=a("6ffa"),z=a.n(K),J={name:"QrBlock",props:{address:String},data:function(){return{}},watch:{address:function(t){if(null!==t){var e=new z.a({width:512,height:512,data:t,image:"qr_logo.png",dotsOptions:{type:"rounded"},imageOptions:{hideBackgroundDots:!1},qrOptions:{}});e.append(document.getElementById(this._uid))}}},methods:{}},Y=J,X=(a("ae55"),Object(d["a"])(Y,V,Q,!1,null,null,null)),Z=X.exports,tt={name:"Receive",mixins:[C],components:{QrBlock:Z},props:{address:String},data:function(){return{newrep:""}},watch:{}},et=tt,at=Object(d["a"])(et,U,q,!1,null,null,null),nt=at.exports,st=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"settings inner"},[a("div",{staticClass:"block"},[a("div",{staticClass:"details"},[a("label",{attrs:{for:"representative"}},[t._v("Current Representative")]),a("a",{staticClass:"copy",attrs:{href:"#"},on:{click:function(e){return t.copyToClipboard(t.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),a("div",{staticClass:"address",staticStyle:{"margin-bottom":"30px",background:"#00000014",padding:"4px 14px"},domProps:{innerHTML:t._s(t.highlightAddress(t.representative))}})]),t.change?a("div",{staticClass:"details"},[null!==t.error?a("div",{staticClass:"error"},[t._v(t._s(t.error))]):t._e(),a("label",{attrs:{for:"newrep"}},[t._v("Change Representative")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.newrep,expression:"newrep"}],staticClass:"newrep",attrs:{type:"text",name:"newrep"},domProps:{value:t.newrep},on:{input:function(e){e.target.composing||(t.newrep=e.target.value)}}})]):t._e(),t.change?a("scan-qr",{staticStyle:{"margin-bottom":"20px"},on:{scanned:t.scanDone}}):t._e(),a("div",{staticClass:"inline-buttons"},[t.change?t._e():a("button",{staticClass:"repchange btn",on:{click:function(e){t.change=!0}}},[t._v("Change Representative")]),t.change?a("button",{staticClass:"repchange btn",on:{click:t.changeRep}},[t._v("Confirm")]):t._e(),t.change?a("button",{staticClass:"repchange btn outline",on:{click:function(e){t.change=!1}}},[t._v("Cancel")]):t._e()])],1)])},it=[],rt={name:"Settings",components:{ScanQr:N},props:{representative:String,open:Boolean},mixins:[C],data:function(){return{newrep:"",change:!1,error:null}},computed:{pow:function(){return this.$store.state.app.pow},privatekey:function(){return this.$store.state.app.privatekey}},watch:{open:function(t,e){!1===t&&!0===e&&(this.newrep="",this.change=!1,this.error=null)}},methods:{changeRep:function(){var t=this;return Object(b["a"])(regeneratorRuntime.mark((function e(){var a,n,s,i,r,o,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null!==t.pow){e.next=2;break}return e.abrupt("return",alert("Please wait for the status to be ready"));case 2:return a=k["g"](t.privatekey),n=k["f"](a,{useNanoPrefix:!0}),s={},s["action"]="account_info",s["representative"]="true",s["account"]=n,e.next=10,t.$store.dispatch("app/rpCall",s);case 10:return i=e.sent,r="change",o=i.frontier,c=i.balance,l=k["e"](t.privatekey,{work:t.pow,previous:o,representative:t.newrep,balance:c,link:"0000000000000000000000000000000000000000000000000000000000000000"}),u={},u["action"]="process",u["json_block"]="true",u["subtype"]=r,u["block"]=l.block,e.next=22,t.$store.dispatch("app/rpCall",u);case 22:t.$emit("change",!0);case 23:case"end":return e.stop()}}),e)})))()},scanDone:function(t){t.startsWith("nanorep:")?this.newrep=t.replace("nanorep:","").split("?")[0]:this.error="Invalid QR"}}},ot=rt,ct=Object(d["a"])(ot,st,it,!1,null,null,null),lt=ct.exports,ut=function(){var t=this,e=t.$createElement,a=t._self._c||e;return null!==t.blockstate?a("simplebar",{attrs:{id:"breakdown"}},[a("header",{staticClass:"headingtitle"},[t._v("State Block "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.hash)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("block",t.hash)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",{staticClass:"stateblock block"},[t._v(t._s(t.hash))]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Block subtype "),a("span",{staticClass:"subtype value"},[t._v(t._s(t.blockstate.subtype))])]),a("div",{staticClass:"label"},[t._v("The type of transaction that created this state block")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Account "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.account)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.account)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",{staticClass:"account"},[t._v(t._s(t.blockstate.contents.account))]),a("div",{staticClass:"label"},[t._v("The account represented by this state block")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Amount "),a("span",{staticClass:"amount value",domProps:{innerHTML:t._s(t.formattedValue(t.blockstate.amount))}})]),a("div",{staticClass:"raw"},[a("span",{staticClass:"amount_raw"},[t._v(t._s(t.blockstate.amount))]),t._v(" raw")]),a("div",{staticClass:"label"},[t._v("The amount of NANO that was sent in this transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Balance "),a("span",{staticClass:"balance value",domProps:{innerHTML:t._s(t.formattedValue(t.blockstate.balance))}})]),a("div",{staticClass:"raw"},[a("span",{staticClass:"balance_raw"},[t._v(t._s(t.blockstate.balance))]),t._v(" raw")]),a("div",{staticClass:"label"},[t._v("The amount of NANO that was sent in this transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Representative "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[a("span",{staticClass:"rep_raw"},[t._v(t._s(t.blockstate.contents.representative))])]),a("div",{staticClass:"label"},[t._v("The account's representative")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Recipient "),a("span",{staticClass:"value",on:{click:function(e){return t.copyToClipboard(t.blockstate.contents.representative)}}},[a("i",{staticClass:"fad fa-clone"})]),t._v(" "),a("span",{staticClass:"value",on:{click:function(e){return t.link("address",t.blockstate.contents.link_as_account)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[a("span",{staticClass:"rec_raw"},[t._v(t._s(t.blockstate.contents.link_as_account))])]),a("div",{staticClass:"label"},[t._v("The account that is receiving the transaction")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Date "),a("span",{staticClass:"value"},[t._v(t._s(t.formattedDate))])]),a("div",{staticClass:"label"},[t._v("The date and time this block was discovered (converted to your local time)")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Previous Block "),a("span",{staticClass:"value",on:{click:function(e){return t.link("block",t.blockstate.contents.previous)}}},[a("i",{staticClass:"fad fa-external-link"})])]),a("div",[t._v(" "+t._s(t.blockstate.contents.previous)+" ")]),a("div",{staticClass:"label"},[t._v("The previous block in this account's chain")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Link")]),a("div",[t._v(t._s(t.blockstate.contents.link))]),a("div",{staticClass:"label"},[t._v("The destination address encoded in hex format or the block hash if open")])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Proof of Work")]),a("div",[t._v(t._s(t.blockstate.contents.work))])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("Signature")]),a("div",[t._v(t._s(t.blockstate.contents.signature))])]),a("div",{staticClass:"block"},[a("div",{staticClass:"title"},[t._v("JSON "),a("span",{staticClass:"value",on:{click:function(e){t.copyToClipboard(JSON.stringify(t.blockstate))}}},[a("i",{staticClass:"fad fa-clone"})])]),a("div",{staticClass:"json"},[a("pre",[t._v(t._s(JSON.stringify(t.blockstate,null,4)))])])])]):t._e()},dt=[],pt=a("8d3b"),vt=(a("f138"),{name:"BlockState",components:{simplebar:pt["a"]},props:{details:{default:null,type:String},static:{default:!1,type:Boolean}},mixins:[C],data:function(){return{hash:null,blockstate:null}},mounted:function(){this.static&&this.getDetails(this.$route.params.hash)},watch:{details:function(t){var e=this;return Object(b["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:null!==t?e.getDetails(t):e.blockstate=null;case 1:case"end":return a.stop()}}),a)})))()}},methods:{getDetails:function(t){var e=this;return Object(b["a"])(regeneratorRuntime.mark((function a(){var n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={action:"block_info",json_block:"true",hash:t},e.hash=t,a.next=4,e.$store.dispatch("app/rpCall",n);case 4:e.blockstate=a.sent;case 5:case"end":return a.stop()}}),a)})))()},formattedValue:function(t){return this.abbreviateNumber(k["d"](t,this.rawconv),5)}},computed:{formattedDate:function(){var t=new Date(1e3*this.blockstate.local_timestamp);return t.getDate()+" "+t.toLocaleString("default",{month:"short"})+" "+t.getFullYear()+" - "+t.toLocaleTimeString()}}}),ft=vt,ht=(a("2dca"),Object(d["a"])(ft,ut,dt,!1,null,"51ce3523",null)),mt=ht.exports;a("99af"),a("a630"),a("25f0"),a("3ca3"),a("cfc3"),a("5cc6"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7");function bt(t,e,a){for(var n="",s=a-1;s>-1;s--)n+=(t[s]>15?"":"0")+t[s].toString(16);return n}function gt(t){for(var e="",a=t.length;a>0;a-=2)e+=t.slice(a-2,a);return e}function yt(t,e,a,n,s,i){var r=document.createElement("canvas");r.width=a,r.height=n;var o=r.getContext("webgl2");if(!o)throw new Error("webgl2_required");if(!/^[A-F-a-f0-9]{64}$/.test(t))throw new Error("invalid_hash");o.clearColor(0,0,0,1);var c=gt(t),l="#version 300 es\n precision highp float;\n layout (location=0) in vec4 position;\n layout (location=1) in vec2 uv;\n\n out vec2 uv_pos;\n\n void main() {\n uv_pos = uv;\n gl_Position = position;\n }",u="#version 300 es\n precision highp float;\n precision highp int;\n\n in vec2 uv_pos;\n out vec4 fragColor;\n\n // Random work values\n // First 2 bytes will be overwritten by texture pixel position\n // Second 2 bytes will be modified if the canvas size is greater than 256x256\n uniform uvec4 u_work0;\n // Last 4 bytes remain as generated externally\n uniform uvec4 u_work1;\n\n // Defined separately from uint v[32] below as the original value is required\n // to calculate the second uint32 of the digest for threshold comparison\n #define BLAKE2B_IV32_1 0x6A09E667u\n\n // Both buffers represent 16 uint64s as 32 uint32s\n // because that's what GLSL offers, just like Javascript\n\n // Compression buffer, intialized to 2 instances of the initialization vector\n // The following values have been modified from the BLAKE2B_IV:\n // OUTLEN is constant 8 bytes\n // v[0] ^= 0x01010000u ^ uint(OUTLEN);\n // INLEN is constant 40 bytes: work value (8) + block hash (32)\n // v[24] ^= uint(INLEN);\n // It's always the \"last\" compression at this INLEN\n // v[28] = ~v[28];\n // v[29] = ~v[29];\n uint v[32] = uint[32](\n 0xF2BDC900u, 0x6A09E667u, 0x84CAA73Bu, 0xBB67AE85u,\n 0xFE94F82Bu, 0x3C6EF372u, 0x5F1D36F1u, 0xA54FF53Au,\n 0xADE682D1u, 0x510E527Fu, 0x2B3E6C1Fu, 0x9B05688Cu,\n 0xFB41BD6Bu, 0x1F83D9ABu, 0x137E2179u, 0x5BE0CD19u,\n 0xF3BCC908u, 0x6A09E667u, 0x84CAA73Bu, 0xBB67AE85u,\n 0xFE94F82Bu, 0x3C6EF372u, 0x5F1D36F1u, 0xA54FF53Au,\n 0xADE682F9u, 0x510E527Fu, 0x2B3E6C1Fu, 0x9B05688Cu,\n 0x04BE4294u, 0xE07C2654u, 0x137E2179u, 0x5BE0CD19u\n );\n // Input data buffer\n uint m[32];\n\n // These are offsets into the input data buffer for each mixing step.\n // They are multiplied by 2 from the original SIGMA values in\n // the C reference implementation, which refered to uint64s.\n const int SIGMA82[192] = int[192](\n 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,2,24,\n 0,4,22,14,10,6,22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8,14,18,6,2,26,\n 24,22,28,4,12,10,20,8,0,30,16,18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,\n 26,4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18,24,10,2,30,28,26,8,20,0,\n 14,12,6,18,4,16,22,26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20,12,30,28,\n 18,22,6,0,16,24,4,26,14,2,8,20,10,20,4,16,8,14,12,2,10,30,22,18,28,6,24,\n 26,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,28,20,8,16,18,30,26,12,\n 2,24,0,4,22,14,10,6\n );\n\n // 64-bit unsigned addition within the compression buffer\n // Sets v[a,a+1] += b\n // b0 is the low 32 bits of b, b1 represents the high 32 bits\n void add_uint64 (int a, uint b0, uint b1) {\n uint o0 = v[a] + b0;\n uint o1 = v[a + 1] + b1;\n if (v[a] > 0xFFFFFFFFu - b0) { // did low 32 bits overflow?\n o1++;\n }\n v[a] = o0;\n v[a + 1] = o1;\n }\n // Sets v[a,a+1] += v[b,b+1]\n void add_uint64 (int a, int b) {\n add_uint64(a, v[b], v[b+1]);\n }\n\n // G Mixing function\n void B2B_G (int a, int b, int c, int d, int ix, int iy) {\n add_uint64(a, b);\n add_uint64(a, m[ix], m[ix + 1]);\n\n // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated to the right by 32 bits\n uint xor0 = v[d] ^ v[a];\n uint xor1 = v[d + 1] ^ v[a + 1];\n v[d] = xor1;\n v[d + 1] = xor0;\n\n add_uint64(c, d);\n\n // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 24 bits\n xor0 = v[b] ^ v[c];\n xor1 = v[b + 1] ^ v[c + 1];\n v[b] = (xor0 >> 24) ^ (xor1 << 8);\n v[b + 1] = (xor1 >> 24) ^ (xor0 << 8);\n\n add_uint64(a, b);\n add_uint64(a, m[iy], m[iy + 1]);\n\n // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated right by 16 bits\n xor0 = v[d] ^ v[a];\n xor1 = v[d + 1] ^ v[a + 1];\n v[d] = (xor0 >> 16) ^ (xor1 << 16);\n v[d + 1] = (xor1 >> 16) ^ (xor0 << 16);\n\n add_uint64(c, d);\n\n // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 63 bits\n xor0 = v[b] ^ v[c];\n xor1 = v[b + 1] ^ v[c + 1];\n v[b] = (xor1 >> 31) ^ (xor0 << 1);\n v[b + 1] = (xor0 >> 31) ^ (xor1 << 1);\n }\n\n void main() {\n int i;\n uint uv_x = uint(uv_pos.x * ".concat(r.width-1,".);\n uint uv_y = uint(uv_pos.y * ").concat(r.height-1,".);\n uint x_pos = uv_x % 256u;\n uint y_pos = uv_y % 256u;\n uint x_index = (uv_x - x_pos) / 256u;\n uint y_index = (uv_y - y_pos) / 256u;\n\n // First 2 work bytes are the x,y pos within the 256x256 area, the next\n // two bytes are modified from the random generated value, XOR'd with\n // the x,y area index of where this pixel is located\n m[0] = (x_pos ^ (y_pos << 8) ^ ((u_work0.b ^ x_index) << 16) ^ ((u_work0.a ^ y_index) << 24));\n // Remaining bytes are un-modified from the random generated value\n m[1] = (u_work1.r ^ (u_work1.g << 8) ^ (u_work1.b << 16) ^ (u_work1.a << 24));\n\n // Block hash\n m[2] = 0x").concat(c.slice(56,64),"u;\n m[3] = 0x").concat(c.slice(48,56),"u;\n m[4] = 0x").concat(c.slice(40,48),"u;\n m[5] = 0x").concat(c.slice(32,40),"u;\n m[6] = 0x").concat(c.slice(24,32),"u;\n m[7] = 0x").concat(c.slice(16,24),"u;\n m[8] = 0x").concat(c.slice(8,16),"u;\n m[9] = 0x").concat(c.slice(0,8),"u;\n\n // twelve rounds of mixing\n for(i=0;i<12;i++) {\n B2B_G(0, 8, 16, 24, SIGMA82[i * 16 + 0], SIGMA82[i * 16 + 1]);\n B2B_G(2, 10, 18, 26, SIGMA82[i * 16 + 2], SIGMA82[i * 16 + 3]);\n B2B_G(4, 12, 20, 28, SIGMA82[i * 16 + 4], SIGMA82[i * 16 + 5]);\n B2B_G(6, 14, 22, 30, SIGMA82[i * 16 + 6], SIGMA82[i * 16 + 7]);\n B2B_G(0, 10, 20, 30, SIGMA82[i * 16 + 8], SIGMA82[i * 16 + 9]);\n B2B_G(2, 12, 22, 24, SIGMA82[i * 16 + 10], SIGMA82[i * 16 + 11]);\n B2B_G(4, 14, 16, 26, SIGMA82[i * 16 + 12], SIGMA82[i * 16 + 13]);\n B2B_G(6, 8, 18, 28, SIGMA82[i * 16 + 14], SIGMA82[i * 16 + 15]);\n }\n\n // Threshold test, first 4 bytes not significant,\n // only calculate digest of the second 4 bytes\n if((BLAKE2B_IV32_1 ^ v[1] ^ v[17]) > ")+e+"u) {\n // Success found, return pixel data so work value can be constructed\n fragColor = vec4(\n float(x_index + 1u)/255., // +1 to distinguish from 0 (unsuccessful) pixels\n float(y_index + 1u)/255., // Same as previous\n float(x_pos)/255., // Return the 2 custom bytes used in work value\n float(y_pos)/255. // Second custom byte\n );\n }\n }",d=o.createShader(o.VERTEX_SHADER);if(o.shaderSource(d,l),o.compileShader(d),!o.getShaderParameter(d,o.COMPILE_STATUS))throw o.getShaderInfoLog(d);var p=o.createShader(o.FRAGMENT_SHADER);if(o.shaderSource(p,u),o.compileShader(p),!o.getShaderParameter(p,o.COMPILE_STATUS))throw o.getShaderInfoLog(p);var v=o.createProgram();if(o.attachShader(v,d),o.attachShader(v,p),o.linkProgram(v),!o.getProgramParameter(v,o.LINK_STATUS))throw o.getProgramInfoLog(v);o.useProgram(v);var f=o.createVertexArray();o.bindVertexArray(f);var h=new Float32Array([-1,-1,0,-1,1,0,1,1,0,1,-1,0,1,1,0,-1,-1,0]),m=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,m),o.bufferData(o.ARRAY_BUFFER,h,o.STATIC_DRAW),o.vertexAttribPointer(0,3,o.FLOAT,!1,0,0),o.enableVertexAttribArray(0);var b=new Float32Array([1,1,1,0,0,0,0,1,0,0,1,1]),g=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,g),o.bufferData(o.ARRAY_BUFFER,b,o.STATIC_DRAW),o.vertexAttribPointer(1,2,o.FLOAT,!1,0,0),o.enableVertexAttribArray(1);var y=o.getUniformLocation(v,"u_work0"),k=o.getUniformLocation(v,"u_work1"),w=new Uint8Array(4),C=new Uint8Array(4),x=0;function _(){if(x++,window.crypto.getRandomValues(w),window.crypto.getRandomValues(C),o.uniform4uiv(y,Array.from(w)),o.uniform4uiv(k,Array.from(C)),x%100!==0||"function"!==typeof i||!i(x)){o.clear(o.COLOR_BUFFER_BIT),o.drawArrays(o.TRIANGLES,0,6);var t=new Uint8Array(o.drawingBufferWidth*o.drawingBufferHeight*4);o.readPixels(0,0,o.drawingBufferWidth,o.drawingBufferHeight,o.RGBA,o.UNSIGNED_BYTE,t);for(var e=0;e0&&void 0!==t[0]&&t[0],s=null,"frontier"in e.details&&(s=e.details.frontier),a.prev=3,a.next=6,e.getDetails(e.privatekey);case 6:s===e.details.frontier&&!0!==n||e.genWork(e.privatekey,e.details),e.$store.dispatch("app/history",e.address),e.$store.dispatch("app/pending",e.address),e.details.balance?(e.balance=k["d"](e.details.balance,e.rawconv),e.$store.commit("app/balance",e.balance)):e.balance=0,e.representative=e.details.representative,a.next=17;break;case 13:a.prev=13,a.t0=a["catch"](3),e.error="Could not connect to RPC",e.open=!1;case 17:case"end":return a.stop()}}),a,null,[[3,13]])})))()},genWork:function(t,e){var a=this;return Object(b["a"])(regeneratorRuntime.mark((function n(){var s,i,r,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a.$store.commit("app/pow",null),a.$store.commit("app/ready",!1),"frontier"in e?(console.log("Frontier in details"),s=e.frontier):(console.log("Frontier NOT in details"),s=k["g"](t)),i=document.createElement("canvas").getContext("webgl2"),!i){n.next=9;break}console.log("Calculating pow for "+s+" using WebGL this may take some time"),yt(s,"0xFFFFFFC0",2048,256,(function(t){a.$store.commit("app/pow",t),a.$store.commit("app/ready",!0)})),n.next=22;break;case 9:if(!window.Worker){n.next=16;break}return console.log("Calculating pow for "+s+" this may take some time"),r=function(){return new Promise((function(t){_t=[];for(var e=0;e"," "," ",' ','
'," ","