aboutsummaryrefslogtreecommitdiffstats
path: root/dist/ethereum.min.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-22 03:30:32 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-22 03:30:32 +0800
commitfc986a3fbee02a4fcfbd4e74d9881fc25d5538b4 (patch)
tree17edc9184149a391835bbee8fc8dd1768aa931cd /dist/ethereum.min.js
parent0d2cccc2ce88753a22ed60b74f50a376750d6483 (diff)
downloadgo-tangerine-fc986a3fbee02a4fcfbd4e74d9881fc25d5538b4.tar.gz
go-tangerine-fc986a3fbee02a4fcfbd4e74d9881fc25d5538b4.tar.zst
go-tangerine-fc986a3fbee02a4fcfbd4e74d9881fc25d5538b4.zip
removed unused providers
Diffstat (limited to 'dist/ethereum.min.js')
-rw-r--r--dist/ethereum.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/ethereum.min.js b/dist/ethereum.min.js
index c38f2b12f..264ae2b5b 100644
--- a/dist/ethereum.min.js
+++ b/dist/ethereum.min.js
@@ -1 +1 @@
-require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t){var r=e("./web3");BigNumber.config({ROUNDING_MODE:BigNumber.ROUND_DOWN});var n=32,i=function(e,t){for(var r=!1,n=0;n<e.length&&!r;n++)r=t(e[n]);return r?n-1:-1},o=function(e,t){return i(e,function(e){return e.name===t})},s=function(e,t,r){return new Array(t-e.length+1).join(r?r:"0")+e},a=function(e){return function(t){return 0===t.indexOf(e)}},u=function(e){return function(t){return e===t}},f=function(e){return"[]"===e.slice(-2)},c=function(e){var t=2*n;return e instanceof BigNumber||"number"==typeof e?("number"==typeof e&&(e=new BigNumber(e)),e=e.round(),e.lessThan(0)&&(e=new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(e).plus(1)),e=e.toString(16)):e=0===e.indexOf("0x")?e.substr(2):"string"==typeof e?c(new BigNumber(e)):(+e).toString(16),s(e,t)},l=function(e){return r.fromAscii(e,n).substr(2)},p=function(e){return"000000000000000000000000000000000000000000000000000000000000000"+(e?"1":"0")},h=function(e){return c(new BigNumber(e).times(new BigNumber(2).pow(128)))},d=function(e,t){return f(e)||a("string")(e)?c(t.length):""},v=function(){return[{type:a("uint"),format:c},{type:a("int"),format:c},{type:a("hash"),format:c},{type:a("string"),format:l},{type:a("real"),format:h},{type:a("ureal"),format:h},{type:u("address"),format:c},{type:u("bool"),format:p}]},g=v(),m=function(e,t,r){var n="",i=o(e,t);if(-1!==i){var s=e[i];return s.inputs.forEach(function(e,t){n+=d(e.type,r[t])}),s.inputs.forEach(function(e,t){for(var i=!1,o=0;o<g.length&&!i;o++)i=g[o].type(s.inputs[t].type,r[t]);i||console.error("input parser does not support type: "+s.inputs[t].type);var a=g[o-1].format,u="";u=f(s.inputs[t].type)?r[t].reduce(function(e,t){return e+a(t)},""):a(r[t]),n+=u}),n}},b=function(e){return"1"===new BigNumber(e.substr(0,1),16).toString(2).substr(0,1)},y=function(e){return b(e)?new BigNumber(e,16).minus(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new BigNumber(e,16)},_=function(e){return new BigNumber(e,16)},w=function(e){return y(e).dividedBy(new BigNumber(2).pow(128))},N=function(e){return _(e).dividedBy(new BigNumber(2).pow(128))},S=function(e){return"0x"+e},x=function(e){return"0000000000000000000000000000000000000000000000000000000000000001"===e?!0:!1},O=function(e){return r.toAscii(e)},P=function(e){return"0x"+e.slice(e.length-40,e.length)},B=function(e){return f(e)||a("string")(e)?2*n:0},k=function(){return[{type:a("uint"),format:_},{type:a("int"),format:y},{type:a("hash"),format:S},{type:a("string"),format:O},{type:a("real"),format:w},{type:a("ureal"),format:N},{type:u("address"),format:P},{type:u("bool"),format:x}]},A=k(),q=function(e,t,r){var i=o(e,t);if(-1!==i){r=r.slice(2);var s=[],u=e[i],c=2*n,l=u.outputs.reduce(function(e,t){return e+B(t.type)},0),p=r.slice(0,l);return r=r.slice(l),u.outputs.forEach(function(e,t){for(var n=!1,i=0;i<A.length&&!n;i++)n=A[i].type(u.outputs[t].type);n||console.error("output parser does not support type: "+u.outputs[t].type);var o=A[i-1].format;if(f(u.outputs[t].type)){var l=_(p.slice(0,c));p=p.slice(c);for(var h=[],d=0;l>d;d++)h.push(o(r.slice(0,c))),r=r.slice(c);s.push(h)}else a("string")(u.outputs[t].type)?(p=p.slice(c),s.push(o(r.slice(0,c))),r=r.slice(c)):(s.push(o(r.slice(0,c))),r=r.slice(c))}),s}},E=function(e){var t=e.indexOf("(");return-1!==t?e.substr(0,t):e},F=function(e){var t=e.indexOf("(");return-1!==t?e.substr(t+1,e.length-1-(t+1)):""},M=function(e){var t={};return e.forEach(function(r){var n=E(r.name),i=F(r.name),o=function(){var t=Array.prototype.slice.call(arguments);return m(e,r.name,t)};void 0===t[n]&&(t[n]=o),t[n][i]=o}),t},T=function(e){var t={};return e.forEach(function(r){var n=E(r.name),i=F(r.name),o=function(t){return q(e,r.name,t)};void 0===t[n]&&(t[n]=o),t[n][i]=o}),t},D=function(e,t){return r.sha3(r.fromAscii(t))};t.exports={inputParser:M,outputParser:T,methodSignature:D,methodDisplayName:E,methodTypeName:F}},{"./web3":9}],2:[function(e,t){var r=e("./web3"),n=function(e){if(!r.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new r.providers.QtProvider);e=e||{};var t={httprpc:e.httprpc||"http://localhost:8080",websockets:e.websockets||"ws://localhost:40404/eth"},n=this,i=function(e){o.close(),e?n.provider=new r.providers.WebSocketProvider(t.websockets):(n.provider=new r.providers.HttpRpcProvider(t.httprpc),n.poll=n.provider.poll.bind(n.provider)),n.sendQueue.forEach(function(e){n.provider.send(e)}),n.onmessageQueue.forEach(function(e){n.provider.onmessage=e})},o=new WebSocket(t.websockets);o.onopen=function(){i(!0)},o.onerror=function(){i(!1)}}};n.prototype.send=function(e){return this.provider?void this.provider.send(e):void this.sendQueue.push(e)},Object.defineProperty(n.prototype,"onmessage",{set:function(e){return this.provider?void(this.provider.onmessage=e):void this.onmessageQueue.push(e)}}),t.exports=n},{"./web3":9}],3:[function(e,t){var r=e("./web3"),n=e("./abi"),i=4,o=function(e,t){var o=n.inputParser(t),s=n.outputParser(t),a={};return t.forEach(function(u){var f=n.methodDisplayName(u.name),c=n.methodTypeName(u.name),l=function(){var a=Array.prototype.slice.call(arguments),l=o[f][c].apply(null,a),p=function(e){return s[f][c](e)};return{call:function(o){return o=o||{},o.to=e,n.methodSignature(t,u.name).then(function(e){return o.data=e.slice(0,2+2*i)+l,r.eth.call(o).then(p)})},transact:function(o){return o=o||{},o.to=e,n.methodSignature(t,u.name).then(function(n){return o.data=n.slice(0,2+2*i)+l,r._currentContractAbi=t,r._currentContractAddress=e,r.eth.transact(o).then(p)})}}};void 0===a[f]&&(a[f]=l),a[f][c]=l}),a};t.exports=o},{"./abi":1,"./web3":9}],4:[function(e,t){var r=e("./web3"),n=function(e,t){this.impl=t,this.callbacks=[];var n=this;this.promise=t.newFilter(e),this.promise.then(function(e){n.id=e,r.on(t.changed,e,n.trigger.bind(n)),r.provider.startPolling({call:t.changed,args:[e]},e)})};n.prototype.arrived=function(e){this.changed(e)},n.prototype.changed=function(e){var t=this;this.promise.then(function(){t.callbacks.push(e)})},n.prototype.trigger=function(e){for(var t=0;t<this.callbacks.length;t++)this.callbacks[t].call(this,e)},n.prototype.uninstall=function(){var e=this;this.promise.then(function(t){e.impl.uninstallFilter(t),r.provider.stopPolling(t),r.off(impl.changed,t)})},n.prototype.messages=function(){var e=this;return this.promise.then(function(t){return e.impl.getMessages(t)})},n.prototype.logs=function(){return this.messages()},t.exports=n},{"./web3":9}],5:[function(e,t){function r(e){return{jsonrpc:"2.0",method:e.call,params:e.args,id:e._id}}function n(e){var t=JSON.parse(e);return{_id:t.id,data:t.result,error:t.error}}var i=function(e){this.handlers=[],this.host=e};i.prototype.sendRequest=function(e,t){var n=r(e),i=new XMLHttpRequest;i.open("POST",this.host,!0),i.send(JSON.stringify(n)),i.onreadystatechange=function(){4===i.readyState&&t&&t(i)}},i.prototype.send=function(e){var t=this;this.sendRequest(e,function(e){t.handlers.forEach(function(r){r.call(t,n(e.responseText))})})},i.prototype.poll=function(e,t){var r=this;this.sendRequest(e,function(n){var i=JSON.parse(n.responseText);!i.error&&(i.result instanceof Array?0!==i.result.length:i.result)&&r.handlers.forEach(function(n){n.call(r,{_event:e.call,_id:t,data:i.result})})})},Object.defineProperty(i.prototype,"onmessage",{set:function(e){this.handlers.push(e)}}),t.exports=i},{}],6:[function(e,t){function r(e){return{jsonrpc:"2.0",method:e.call,params:e.args,id:e._id}}var n=function(e){this.handlers=[],this.host=e};n.prototype.send=function(e){var t=r(e),n=new XMLHttpRequest;return n.open("POST",this.host,!1),n.send(JSON.stringify(t)),n.responseText},t.exports=n},{}],7:[function(e,t){var r=(e("./web3"),function(){this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1;var e=this,t=function(){e.provider&&e.provider.poll&&e.polls.forEach(function(t){t.data._id=e.id,e.id++,e.provider.poll(t.data,t.id)}),setTimeout(t,12e3)};t()});r.prototype.send=function(e){return e._id=this.id,e.args=e.args||[],this.id++,void 0===this.provider&&console.error("provider is not set"),this.provider.send(e)},r.prototype.set=function(e){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=e,this.ready=!0},r.prototype.sendQueued=function(){for(var e=0;this.queued.length;e++)this.send(this.queued[e])},r.prototype.installed=function(){return void 0!==this.provider},r.prototype.startPolling=function(e,t){this.provider&&this.provider.poll&&this.polls.push({data:e,id:t})},r.prototype.stopPolling=function(e){for(var t=this.polls.length;t--;){var r=this.polls[t];r.id===e&&this.polls.splice(t,1)}},t.exports=r},{"./web3":9}],8:[function(e,t){var r=function(){this.handlers=[];var e=this;navigator.qt.onmessage=function(t){e.handlers.forEach(function(r){r.call(e,JSON.parse(t.data))})}};r.prototype.send=function(e){navigator.qt.postMessage(JSON.stringify(e))},Object.defineProperty(r.prototype,"onmessage",{set:function(e){this.handlers.push(e)}}),t.exports=r},{}],9:[function(e,t){function r(e){if(void 0!==e._event)return void d.trigger(e._event,e._id,e.data);if(e._id){var t=d._callbacks[e._id];t&&(t.call(this,e.error,e.data),delete d._callbacks[e._id])}}var n=function(){return[{name:"sha3",call:"web3_sha3"}]},i=function(){var e=function(e){return"string"==typeof e[0]?"eth_blockByHash":"eth_blockByNumber"},t=function(e){return"string"==typeof e[0]?"eth_transactionByHash":"eth_transactionByNumber"},r=function(e){return"string"==typeof e[0]?"eth_uncleByHash":"eth_uncleByNumber"},n=[{name:"balanceAt",call:"eth_balanceAt"},{name:"stateAt",call:"eth_stateAt"},{name:"storageAt",call:"eth_storageAt"},{name:"countAt",call:"eth_countAt"},{name:"codeAt",call:"eth_codeAt"},{name:"transact",call:"eth_transact"},{name:"call",call:"eth_call"},{name:"block",call:e},{name:"transaction",call:t},{name:"uncle",call:r},{name:"compilers",call:"eth_compilers"},{name:"lll",call:"eth_lll"},{name:"solidity",call:"eth_solidity"},{name:"serpent",call:"eth_serpent"},{name:"logs",call:"eth_logs"}];return n},o=function(){return[{name:"coinbase",getter:"eth_coinbase",setter:"eth_setCoinbase"},{name:"listening",getter:"eth_listening",setter:"eth_setListening"},{name:"mining",getter:"eth_mining",setter:"eth_setMining"},{name:"gasPrice",getter:"eth_gasPrice"},{name:"account",getter:"eth_account"},{name:"accounts",getter:"eth_accounts"},{name:"peerCount",getter:"eth_peerCount"},{name:"defaultBlock",getter:"eth_defaultBlock",setter:"eth_setDefaultBlock"},{name:"number",getter:"eth_number"}]},s=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]},a=function(){return[{name:"post",call:"shh_post"},{name:"newIdentity",call:"shh_newIdentity"},{name:"haveIdentity",call:"shh_haveIdentity"},{name:"newGroup",call:"shh_newGroup"},{name:"addToGroup",call:"shh_addToGroup"}]},u=function(){var e=function(e){return"string"==typeof e[0]?"eth_newFilterString":"eth_newFilter"};return[{name:"newFilter",call:e},{name:"uninstallFilter",call:"eth_uninstallFilter"},{name:"getMessages",call:"eth_filterLogs"}]},f=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getMessage",call:"shh_getMessages"}]},c=function(e,t){t.forEach(function(t){e[t.name]=function(){var e=Array.prototype.slice.call(arguments),r="function"==typeof t.call?t.call(e):t.call,n=d.provider.send({call:r,args:e});return n=JSON.parse(n),n.result}})},l=function(e,t){t.forEach(function(t){var r={};r.get=function(){var e=d.provider.send({call:t.getter});return e=JSON.parse(e),e.result},t.setter&&(r.set=function(e){var r=d.provider.send({call:t.setter,args:[e]});return r=JSON.parse(r),r.result}),Object.defineProperty(e,t.name,r)})},p=function(e){return parseInt(e,16).toString()},h=function(e){return parseInt(e).toString(16)},d={_callbacks:{},_events:{},providers:{},toHex:function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r).toString(16);t+=n.length<2?"0"+n:n}return t},toAscii:function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);n>r;r+=2){var i=parseInt(e.substr(r,2),16);if(0===i)break;t+=String.fromCharCode(i)}return t},fromAscii:function(e,t){t=void 0===t?0:t;for(var r=this.toHex(e);r.length<2*t;)r+="00";return"0x"+r},toDecimal:function(e){return p(e.substring(2))},fromDecimal:function(e){return"0x"+h(e)},toEth:function(e){for(var t="string"==typeof e?0===e.indexOf("0x")?parseInt(e.substr(2),16):parseInt(e):e,r=0,n=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];t>3e3&&r<n.length-1;)t/=1e3,r++;for(var i=t.toString().length<t.toFixed(2).length?t.toString():t.toFixed(2),o=function(e,t,r){return t+","+r};;){var s=i;if(i=i.replace(/(\d)(\d\d\d[\.\,])/,o),s===i)break}return i+" "+n[r]},eth:{watch:function(e){return new d.filter(e,v)}},db:{},shh:{watch:function(e){return new d.filter(e,g)}},on:function(e,t,r){return void 0===d._events[e]&&(d._events[e]={}),d._events[e][t]=r,this},off:function(e,t){return void 0!==d._events[e]&&delete d._events[e][t],this},trigger:function(e,t,r){var n=d._events[e];if(n&&n[t]){var i=n[t];i(r)}},haveProvider:function(){return!!d.provider.provider}};c(d,n()),c(d.eth,i()),l(d.eth,o()),c(d.db,s()),c(d.shh,a());var v={changed:"eth_changed"};c(v,u());var g={changed:"shh_changed"};c(g,f()),d.setProvider=function(e){e.onmessage=r,d.provider.set(e),d.provider.sendQueued()},t.exports=d},{}],10:[function(e,t){var r=function(e){this.handlers=[],this.queued=[],this.ready=!1,this.ws=new WebSocket(e);var t=this;this.ws.onmessage=function(e){for(var r=0;r<t.handlers.length;r++)t.handlers[r].call(t,JSON.parse(e.data),e)},this.ws.onopen=function(){t.ready=!0;for(var e=0;e<t.queued.length;e++)t.send(t.queued[e])}};r.prototype.send=function(e){if(this.ready){var t=JSON.stringify(e);this.ws.send(t)}else this.queued.push(e)},r.prototype.onMessage=function(e){this.handlers.push(e)},r.prototype.unload=function(){this.ws.close()},Object.defineProperty(r.prototype,"onmessage",{set:function(e){this.onMessage(e)}}),"undefined"!=typeof t&&(t.exports=r)},{}],web3:[function(e,t){var r=e("./lib/web3"),n=e("./lib/providermanager");r.provider=new n,r.filter=e("./lib/filter"),r.providers.WebSocketProvider=e("./lib/websocket"),r.providers.HttpRpcProvider=e("./lib/httprpc"),r.providers.QtProvider=e("./lib/qt"),r.providers.HttpSyncProvider=e("./lib/httpsync"),r.providers.AutoProvider=e("./lib/autoprovider"),r.eth.contract=e("./lib/contract"),r.abi=e("./lib/abi"),t.exports=r},{"./lib/abi":1,"./lib/autoprovider":2,"./lib/contract":3,"./lib/filter":4,"./lib/httprpc":5,"./lib/httpsync":6,"./lib/providermanager":7,"./lib/qt":8,"./lib/web3":9,"./lib/websocket":10}]},{},["web3"]); \ No newline at end of file
+require=function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e){var n=t("./web3");BigNumber.config({ROUNDING_MODE:BigNumber.ROUND_DOWN});var r=32,i=function(t,e){for(var n=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);return n?r-1:-1},o=function(t,e){return i(t,function(t){return t.name===e})},a=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},u=function(t){return function(e){return 0===e.indexOf(t)}},f=function(t){return function(e){return t===e}},s=function(t){return"[]"===t.slice(-2)},c=function(t){var e=2*r;return t instanceof BigNumber||"number"==typeof t?("number"==typeof t&&(t=new BigNumber(t)),t=t.round(),t.lessThan(0)&&(t=new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeof t?c(new BigNumber(t)):(+t).toString(16),a(t,e)},l=function(t){return n.fromAscii(t,r).substr(2)},h=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},p=function(t){return c(new BigNumber(t).times(new BigNumber(2).pow(128)))},d=function(t,e){return s(t)||u("string")(t)?c(e.length):""},g=function(){return[{type:u("uint"),format:c},{type:u("int"),format:c},{type:u("hash"),format:c},{type:u("string"),format:l},{type:u("real"),format:p},{type:u("ureal"),format:p},{type:f("address"),format:c},{type:f("bool"),format:h}]},m=g(),v=function(t,e,n){var r="",i=o(t,e);if(-1!==i){var a=t[i];return a.inputs.forEach(function(t,e){r+=d(t.type,n[e])}),a.inputs.forEach(function(t,e){for(var i=!1,o=0;o<m.length&&!i;o++)i=m[o].type(a.inputs[e].type,n[e]);i||console.error("input parser does not support type: "+a.inputs[e].type);var u=m[o-1].format,f="";f=s(a.inputs[e].type)?n[e].reduce(function(t,e){return t+u(e)},""):u(n[e]),r+=f}),r}},b=function(t){return"1"===new BigNumber(t.substr(0,1),16).toString(2).substr(0,1)},y=function(t){return b(t)?new BigNumber(t,16).minus(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new BigNumber(t,16)},_=function(t){return new BigNumber(t,16)},w=function(t){return y(t).dividedBy(new BigNumber(2).pow(128))},N=function(t){return _(t).dividedBy(new BigNumber(2).pow(128))},x=function(t){return"0x"+t},B=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},S=function(t){return n.toAscii(t)},A=function(t){return"0x"+t.slice(t.length-40,t.length)},O=function(t){return s(t)||u("string")(t)?2*r:0},P=function(){return[{type:u("uint"),format:_},{type:u("int"),format:y},{type:u("hash"),format:x},{type:u("string"),format:S},{type:u("real"),format:w},{type:u("ureal"),format:N},{type:f("address"),format:A},{type:f("bool"),format:B}]},k=P(),E=function(t,e,n){var i=o(t,e);if(-1!==i){n=n.slice(2);var a=[],f=t[i],c=2*r,l=f.outputs.reduce(function(t,e){return t+O(e.type)},0),h=n.slice(0,l);return n=n.slice(l),f.outputs.forEach(function(t,e){for(var r=!1,i=0;i<k.length&&!r;i++)r=k[i].type(f.outputs[e].type);r||console.error("output parser does not support type: "+f.outputs[e].type);var o=k[i-1].format;if(s(f.outputs[e].type)){var l=_(h.slice(0,c));h=h.slice(c);for(var p=[],d=0;l>d;d++)p.push(o(n.slice(0,c))),n=n.slice(c);a.push(p)}else u("string")(f.outputs[e].type)?(h=h.slice(c),a.push(o(n.slice(0,c))),n=n.slice(c)):(a.push(o(n.slice(0,c))),n=n.slice(c))}),a}},F=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},D=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},I=function(t){var e={};return t.forEach(function(n){var r=F(n.name),i=D(n.name),o=function(){var e=Array.prototype.slice.call(arguments);return v(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},M=function(t){var e={};return t.forEach(function(n){var r=F(n.name),i=D(n.name),o=function(e){return E(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},T=function(t,e){return n.sha3(n.fromAscii(e))};e.exports={inputParser:I,outputParser:M,methodSignature:T,methodDisplayName:F,methodTypeName:D}},{"./web3":6}],2:[function(t,e){var n=t("./web3"),r=t("./abi"),i=4,o=function(t,e){var o=r.inputParser(e),a=r.outputParser(e),u={};return e.forEach(function(f){var s=r.methodDisplayName(f.name),c=r.methodTypeName(f.name),l=function(){var u=Array.prototype.slice.call(arguments),l=o[s][c].apply(null,u),h=function(t){return a[s][c](t)};return{call:function(o){return o=o||{},o.to=t,r.methodSignature(e,f.name).then(function(t){return o.data=t.slice(0,2+2*i)+l,n.eth.call(o).then(h)})},transact:function(o){return o=o||{},o.to=t,r.methodSignature(e,f.name).then(function(r){return o.data=r.slice(0,2+2*i)+l,n._currentContractAbi=e,n._currentContractAddress=t,n.eth.transact(o).then(h)})}}};void 0===u[s]&&(u[s]=l),u[s][c]=l}),u};e.exports=o},{"./abi":1,"./web3":6}],3:[function(t,e){var n=t("./web3"),r=function(t,e){this.impl=e,this.callbacks=[];var r=this;this.promise=e.newFilter(t),this.promise.then(function(t){r.id=t,n.on(e.changed,t,r.trigger.bind(r)),n.provider.startPolling({call:e.changed,args:[t]},t)})};r.prototype.arrived=function(t){this.changed(t)},r.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},r.prototype.trigger=function(t){for(var e=0;e<this.callbacks.length;e++)this.callbacks[e].call(this,t)},r.prototype.uninstall=function(){var t=this;this.promise.then(function(e){t.impl.uninstallFilter(e),n.provider.stopPolling(e),n.off(impl.changed,e)})},r.prototype.messages=function(){var t=this;return this.promise.then(function(e){return t.impl.getMessages(e)})},r.prototype.logs=function(){return this.messages()},e.exports=r},{"./web3":6}],4:[function(t,e){function n(t){return{jsonrpc:"2.0",method:t.call,params:t.args,id:t._id}}var r=function(t){this.handlers=[],this.host=t};r.prototype.send=function(t){var e=n(t),r=new XMLHttpRequest;return r.open("POST",this.host,!1),r.send(JSON.stringify(e)),r.responseText},e.exports=r},{}],5:[function(t,e){var n=(t("./web3"),function(){this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1;var t=this,e=function(){t.provider&&t.provider.poll&&t.polls.forEach(function(e){e.data._id=t.id,t.id++,t.provider.poll(e.data,e.id)}),setTimeout(e,12e3)};e()});n.prototype.send=function(t){return t._id=this.id,t.args=t.args||[],this.id++,void 0===this.provider&&console.error("provider is not set"),this.provider.send(t)},n.prototype.set=function(t){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=t,this.ready=!0},n.prototype.sendQueued=function(){for(var t=0;this.queued.length;t++)this.send(this.queued[t])},n.prototype.installed=function(){return void 0!==this.provider},n.prototype.startPolling=function(t,e){this.provider&&this.provider.poll&&this.polls.push({data:t,id:e})},n.prototype.stopPolling=function(t){for(var e=this.polls.length;e--;){var n=this.polls[e];n.id===t&&this.polls.splice(e,1)}},e.exports=n},{"./web3":6}],6:[function(t,e){function n(t){if(void 0!==t._event)return void d.trigger(t._event,t._id,t.data);if(t._id){var e=d._callbacks[t._id];e&&(e.call(this,t.error,t.data),delete d._callbacks[t._id])}}var r=function(){return[{name:"sha3",call:"web3_sha3"}]},i=function(){var t=function(t){return"string"==typeof t[0]?"eth_blockByHash":"eth_blockByNumber"},e=function(t){return"string"==typeof t[0]?"eth_transactionByHash":"eth_transactionByNumber"},n=function(t){return"string"==typeof t[0]?"eth_uncleByHash":"eth_uncleByNumber"},r=[{name:"balanceAt",call:"eth_balanceAt"},{name:"stateAt",call:"eth_stateAt"},{name:"storageAt",call:"eth_storageAt"},{name:"countAt",call:"eth_countAt"},{name:"codeAt",call:"eth_codeAt"},{name:"transact",call:"eth_transact"},{name:"call",call:"eth_call"},{name:"block",call:t},{name:"transaction",call:e},{name:"uncle",call:n},{name:"compilers",call:"eth_compilers"},{name:"lll",call:"eth_lll"},{name:"solidity",call:"eth_solidity"},{name:"serpent",call:"eth_serpent"},{name:"logs",call:"eth_logs"}];return r},o=function(){return[{name:"coinbase",getter:"eth_coinbase",setter:"eth_setCoinbase"},{name:"listening",getter:"eth_listening",setter:"eth_setListening"},{name:"mining",getter:"eth_mining",setter:"eth_setMining"},{name:"gasPrice",getter:"eth_gasPrice"},{name:"account",getter:"eth_account"},{name:"accounts",getter:"eth_accounts"},{name:"peerCount",getter:"eth_peerCount"},{name:"defaultBlock",getter:"eth_defaultBlock",setter:"eth_setDefaultBlock"},{name:"number",getter:"eth_number"}]},a=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]},u=function(){return[{name:"post",call:"shh_post"},{name:"newIdentity",call:"shh_newIdentity"},{name:"haveIdentity",call:"shh_haveIdentity"},{name:"newGroup",call:"shh_newGroup"},{name:"addToGroup",call:"shh_addToGroup"}]},f=function(){var t=function(t){return"string"==typeof t[0]?"eth_newFilterString":"eth_newFilter"};return[{name:"newFilter",call:t},{name:"uninstallFilter",call:"eth_uninstallFilter"},{name:"getMessages",call:"eth_filterLogs"}]},s=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getMessage",call:"shh_getMessages"}]},c=function(t,e){e.forEach(function(e){t[e.name]=function(){var t=Array.prototype.slice.call(arguments),n="function"==typeof e.call?e.call(t):e.call,r=d.provider.send({call:n,args:t});return r=JSON.parse(r),r.result}})},l=function(t,e){e.forEach(function(e){var n={};n.get=function(){var t=d.provider.send({call:e.getter});return t=JSON.parse(t),t.result},e.setter&&(n.set=function(t){var n=d.provider.send({call:e.setter,args:[t]});return n=JSON.parse(n),n.result}),Object.defineProperty(t,e.name,n)})},h=function(t){return parseInt(t,16).toString()},p=function(t){return parseInt(t).toString(16)},d={_callbacks:{},_events:{},providers:{},toHex:function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n).toString(16);e+=r.length<2?"0"+r:r}return e},toAscii:function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},fromAscii:function(t,e){e=void 0===e?0:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return h(t.substring(2))},fromDecimal:function(t){return"0x"+p(t)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e>3e3&&n<r.length-1;)e/=1e3,n++;for(var i=e.toString().length<e.toFixed(2).length?e.toString():e.toFixed(2),o=function(t,e,n){return e+","+n};;){var a=i;if(i=i.replace(/(\d)(\d\d\d[\.\,])/,o),a===i)break}return i+" "+r[n]},eth:{watch:function(t){return new d.filter(t,g)}},db:{},shh:{watch:function(t){return new d.filter(t,m)}},on:function(t,e,n){return void 0===d._events[t]&&(d._events[t]={}),d._events[t][e]=n,this},off:function(t,e){return void 0!==d._events[t]&&delete d._events[t][e],this},trigger:function(t,e,n){var r=d._events[t];if(r&&r[e]){var i=r[e];i(n)}},haveProvider:function(){return!!d.provider.provider}};c(d,r()),c(d.eth,i()),l(d.eth,o()),c(d.db,a()),c(d.shh,u());var g={changed:"eth_changed"};c(g,f());var m={changed:"shh_changed"};c(m,s()),d.setProvider=function(t){t.onmessage=n,d.provider.set(t),d.provider.sendQueued()},e.exports=d},{}],web3:[function(t,e){var n=t("./lib/web3"),r=t("./lib/providermanager");n.provider=new r,n.filter=t("./lib/filter"),n.providers.HttpSyncProvider=t("./lib/httpsync"),n.eth.contract=t("./lib/contract"),n.abi=t("./lib/abi"),e.exports=n},{"./lib/abi":1,"./lib/contract":2,"./lib/filter":3,"./lib/httpsync":4,"./lib/providermanager":5,"./lib/web3":6}]},{},["web3"]); \ No newline at end of file