web3.js/dist/ethereum.min.js

1 line
21 KiB
JavaScript

require=function t(e,n,r){function a(i,s){if(!n[i]){if(!e[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[i]={exports:{}};e[i][0].call(f.exports,function(t){var n=e[i][1][t];return a(n?n:t)},f,f.exports,t,e,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i<r.length;i++)a(r[i]);return a}({1:[function(t,e){var n=t("./web3"),r=t("./utils"),a=t("./types"),o=t("./const"),i=t("./formatters"),s=function(t){console.error("parser does not support type: "+t)},u=function(t){return"[]"===t.slice(-2)},c=function(t,e){return u(t)||"string"===t?i.formatInputInt(e.length):""},f=a.inputTypes(),l=function(t,e){{var n="";2*o.ETH_PADDING}return t.forEach(function(t,r){n+=c(t.type,e[r])}),t.forEach(function(r,a){for(var o=!1,i=0;i<f.length&&!o;i++)o=f[i].type(t[a].type,e[a]);o||s(t[a].type);var c=f[i-1].format,l="";l=u(t[a].type)?e[a].reduce(function(t,e){return t+c(e)},""):c(e[a]),n+=l}),n},p=function(t){return u(t)||"string"===t?2*o.ETH_PADDING:0},m=a.outputTypes(),h=function(t,e){e=e.slice(2);var n=[],r=2*o.ETH_PADDING,c=t.reduce(function(t,e){return t+p(e.type)},0),f=e.slice(0,c);return e=e.slice(c),t.forEach(function(o,c){for(var l=!1,p=0;p<m.length&&!l;p++)l=m[p].type(t[c].type);l||s(t[c].type);var h=m[p-1].format;if(u(t[c].type)){var d=i.formatOutputUInt(f.slice(0,r));f=f.slice(r);for(var g=[],y=0;d>y;y++)g.push(h(e.slice(0,r))),e=e.slice(r);n.push(g)}else a.prefixedType("string")(t[c].type)?(f=f.slice(r),n.push(h(e.slice(0,r))),e=e.slice(r)):(n.push(h(e.slice(0,r))),e=e.slice(r))}),n},d=function(t){var e={};return t.forEach(function(t){var n=r.extractDisplayName(t.name),a=r.extractTypeName(t.name),o=function(){var e=Array.prototype.slice.call(arguments);return l(t.inputs,e)};void 0===e[n]&&(e[n]=o),e[n][a]=o}),e},g=function(t){var e={};return t.forEach(function(t){var n=r.extractDisplayName(t.name),a=r.extractTypeName(t.name),o=function(e){return h(t.outputs,e)};void 0===e[n]&&(e[n]=o),e[n][a]=o}),e},y=function(t){return n.sha3(n.fromAscii(t)).slice(0,2+2*o.ETH_SIGNATURE_LENGTH)},v=function(t){return n.sha3(n.fromAscii(t))};e.exports={inputParser:d,outputParser:g,formatInput:l,formatOutput:h,signatureFromAscii:y,eventSignatureFromAscii:v}},{"./const":2,"./formatters":8,"./types":14,"./utils":15,"./web3":17}],2:[function(t,e){var n=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:n,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:BigNumber.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}},{}],3:[function(t,e){var n=t("./web3"),r=t("./abi"),a=t("./utils"),o=t("./event"),i=(t("./filter"),function(t){n._currentContractAbi=t.abi,n._currentContractAddress=t.address,n._currentContractMethodName=t.method,n._currentContractMethodParams=t.params}),s=function(t){t.call=function(e){return t._isTransact=!1,t._options=e,t},t.transact=function(e){return t._isTransact=!0,t._options=e,t},t._options={},["gas","gasPrice","value","from"].forEach(function(e){t[e]=function(n){return t._options[e]=n,t}})},u=function(t,e,o){var s=r.inputParser(e),u=r.outputParser(e);a.filterFunctions(e).forEach(function(c){var f=a.extractDisplayName(c.name),l=a.extractTypeName(c.name),p=function(){var a=Array.prototype.slice.call(arguments),p=r.signatureFromAscii(c.name),m=s[f][l].apply(null,a),h=t._options||{};h.to=o,h.data=p+m;var d=t._isTransact===!0||t._isTransact!==!1&&!c.constant,g=h.collapse!==!1;if(t._options={},t._isTransact=null,d)return i({abi:e,address:o,method:c.name,params:a}),void n.eth.sendTransaction(h);var y=n.eth.call(h),v=u[f][l](y);return g&&(1===v.length?v=v[0]:0===v.length&&(v=null)),v};void 0===t[f]&&(t[f]=p),t[f][l]=p})},c=function(t,e,n){t.address=n,t._onWatchEventResult=function(t){var n=event.getMatchingEvent(a.filterEvents(e)),r=o.outputParser(n);return r(t)},Object.defineProperty(t,"topic",{get:function(){return a.filterEvents(e).map(function(t){return r.eventSignatureFromAscii(t.name)})}})},f=function(t,e,i){a.filterEvents(e).forEach(function(e){var s=function(){var t=Array.prototype.slice.call(arguments),a=r.eventSignatureFromAscii(e.name),s=o.inputParser(i,a,e),u=s.apply(null,t),c=function(t){var n=o.outputParser(e);return n(t)};return n.eth.filter(u,void 0,void 0,c)};s._isEvent=!0;var u=a.extractDisplayName(e.name),c=a.extractTypeName(e.name);void 0===t[u]&&(t[u]=s),t[u][c]=s})},l=function(t,e){e.forEach(function(t){if(-1===t.name.indexOf("(")){var e=t.name,n=t.inputs.map(function(t){return t.type}).join();t.name=e+"("+n+")"}});var n={};return s(n),u(n,e,t),c(n,e,t),f(n,e,t),n};e.exports=l},{"./abi":1,"./event":6,"./filter":7,"./utils":15,"./web3":17}],4:[function(t,e){var n=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]};e.exports={methods:n}},{}],5:[function(t,e){var n=t("./formatters"),r=function(t){return"string"==typeof t[0]?"eth_blockByHash":"eth_blockByNumber"},a=function(t){return"string"==typeof t[0]?"eth_transactionByHash":"eth_transactionByNumber"},o=function(t){return"string"==typeof t[0]?"eth_uncleByHash":"eth_uncleByNumber"},i=function(t){return"string"==typeof t[0]?"eth_transactionCountByHash":"eth_transactionCountByNumber"},s=function(t){return"string"==typeof t[0]?"eth_uncleCountByHash":"eth_uncleCountByNumber"},u=[{name:"getBalance",call:"eth_balanceAt",outputFormatter:n.convertToBigNumber},{name:"getState",call:"eth_stateAt"},{name:"getStorage",call:"eth_storageAt"},{name:"getTransactionCount",call:"eth_countAt"},{name:"getCode",call:"eth_codeAt"},{name:"sendTransaction",call:"eth_transact"},{name:"call",call:"eth_call"},{name:"getBlock",call:r},{name:"getTransaction",call:a},{name:"getUncle",call:o},{name:"getCompilers",call:"eth_compilers"},{name:"flush",call:"eth_flush"},{name:"compile.solidity",call:"eth_solidity"},{name:"compile.lll",call:"eth_lll"},{name:"compile.serpent",call:"eth_serpent"},{name:"getBlockTransactionCount",call:i},{name:"getBlockUncleCount",call:s},{name:"balanceAt",call:"eth_balanceAt",newMethod:"getBalance"},{name:"stateAt",call:"eth_stateAt",newMethod:"getState"},{name:"storageAt",call:"eth_storageAt",newMethod:"getStorage"},{name:"countAt",call:"eth_countAt",newMethod:"getTransactionCount"},{name:"codeAt",call:"eth_codeAt",newMethod:"getCode"},{name:"transact",call:"eth_transact",newMethod:"sendTransaction"},{name:"block",call:r,newMethod:"getBlock"},{name:"transaction",call:a,newMethod:"getTransaction"},{name:"uncle",call:o,newMethod:"getUncle"},{name:"compilers",call:"eth_compilers",newMethod:"getCompilers"},{name:"solidity",call:"eth_solidity",newMethod:"compile.solidity"},{name:"lll",call:"eth_lll",newMethod:"compile.lll"},{name:"serpent",call:"eth_serpent",newMethod:"compile.serpent"},{name:"transactionCount",call:i,newMethod:"getBlockTransactionCount"},{name:"uncleCount",call:s,newMethod:"getBlockUncleCount"},{name:"logs",call:"eth_logs"}],c=[{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",outputFormatter:n.convertToBigNumber},{name:"accounts",getter:"eth_accounts"},{name:"peerCount",getter:"eth_peerCount"},{name:"defaultBlock",getter:"eth_defaultBlock",setter:"eth_setDefaultBlock"},{name:"blockNumber",getter:"eth_number"},{name:"number",getter:"eth_number",newProperty:"blockNumber"}];e.exports={methods:u,properties:c}},{"./formatters":8}],6:[function(t,e){var n=t("./abi"),r=t("./utils"),a=function(t,e){return t.filter(function(t){return t.indexed===e})},o=function(t,e){var n=r.findIndex(t,function(t){return t.name===e});return-1===n?void console.error("indexed param with name "+e+" not found"):t[n]},i=function(t,e){return Object.keys(e).map(function(r){var i=[o(a(t.inputs,!0),r)],s=e[r];return s instanceof Array?s.map(function(t){return n.formatInput(i,[t])}):n.formatInput(i,[s])})},s=function(t,e,n){return function(r,a){var o=a||{};return o.address=t,o.topic=[],o.topic.push(e),r&&(o.topic=o.topic.concat(i(n,r))),o}},u=function(t,e,n){e.slice(),n.slice();return t.reduce(function(t,r){var a;return a=r.indexed?e.splice(0,1)[0]:n.splice(0,1)[0],t[r.name]=a,t},{})},c=function(t){return function(e){var o={event:r.extractDisplayName(t.name),number:e.number,args:{}};if(e.topics=e.topic,!e.topic)return o;var i=a(t.inputs,!0),s="0x"+e.topic.slice(1,e.topic.length).map(function(t){return t.slice(2)}).join(""),c=n.formatOutput(i,s),f=a(t.inputs,!1),l=n.formatOutput(f,e.data);return o.args=u(t.inputs,c,l),o}},f=function(t,e){for(var r=0;r<t.length;r++){var a=n.eventSignatureFromAscii(t[r].name);if(a===e.topic[0])return t[r]}return void 0};e.exports={inputParser:s,outputParser:c,getMatchingEvent:f}},{"./abi":1,"./utils":15}],7:[function(t,e){var n=function(t){return!!t&&"function"==typeof t.newFilter&&"function"==typeof t.getLogs&&"function"==typeof t.uninstallFilter&&"function"==typeof t.startPolling&&"function"==typeof t.stopPolling},r=function(t){return"string"==typeof t?t:(t=t||{},t.topics&&console.warn('"topics" is deprecated, is "topic" instead'),{to:t.to,topic:t.topic,earliest:t.earliest,latest:t.latest,max:t.max,skip:t.skip,address:t.address})},a=function(t,e,a){if(!n(e))return void console.error("filter implemenation is invalid");t=r(t);var o=[],i=e.newFilter(t),s=function(t){t.forEach(function(t){t=a?a(t):t,o.forEach(function(e){e(t)})})};e.startPolling(i,s,e.uninstallFilter);var u=function(t){o.push(t)},c=function(){e.stopPolling(i),e.uninstallFilter(i),o=[]},f=function(){return e.getLogs(i)};return{watch:u,stopWatching:c,get:f,changed:function(){return console.warn("eth.watch().changed() is deprecated please use eth.filter().watch() instead."),u.apply(this,arguments)},arrived:function(){return console.warn("eth.watch().arrived() is deprecated please use eth.filter().watch() instead."),u.apply(this,arguments)},happened:function(){return console.warn("eth.watch().happened() is deprecated please use eth.filter().watch() instead."),u.apply(this,arguments)},uninstall:function(){return console.warn("eth.watch().uninstall() is deprecated please use eth.filter().stopWatching() instead."),c.apply(this,arguments)},messages:function(){return console.warn("eth.watch().messages() is deprecated please use eth.filter().get() instead."),f.apply(this,arguments)},logs:function(){return console.warn("eth.watch().logs() is deprecated please use eth.filter().get() instead."),f.apply(this,arguments)}}};e.exports=a},{}],8:[function(t,e){var n=t("./utils"),r=t("./const"),a=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},o=function(t){var e=2*r.ETH_PADDING;return t instanceof BigNumber||"number"==typeof t?("number"==typeof t&&(t=new BigNumber(t)),BigNumber.config(r.ETH_BIGNUMBER_ROUNDING_MODE),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?o(new BigNumber(t)):(+t).toString(16),a(t,e)},i=function(t){return n.fromAscii(t,r.ETH_PADDING).substr(2)},s=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},u=function(t){return o(new BigNumber(t).times(new BigNumber(2).pow(128)))},c=function(t){return"1"===new BigNumber(t.substr(0,1),16).toString(2).substr(0,1)},f=function(t){return t=t||"0",c(t)?new BigNumber(t,16).minus(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new BigNumber(t,16)},l=function(t){return t=t||"0",new BigNumber(t,16)},p=function(t){return f(t).dividedBy(new BigNumber(2).pow(128))},m=function(t){return l(t).dividedBy(new BigNumber(2).pow(128))},h=function(t){return"0x"+t},d=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},g=function(t){return n.toAscii(t)},y=function(t){return"0x"+t.slice(t.length-40,t.length)},v=function(t){return"string"==typeof t&&(t=t.replace("0x","")),t=t||"0",new BigNumber(t,16)};e.exports={formatInputInt:o,formatInputString:i,formatInputBool:s,formatInputReal:u,formatOutputInt:f,formatOutputUInt:l,formatOutputReal:p,formatOutputUReal:m,formatOutputHash:h,formatOutputBool:d,formatOutputString:g,formatOutputAddress:y,convertToBigNumber:v}},{"./const":2,"./utils":15}],9:[function(t,e){var n=function(t){this.handlers=[],this.host=t||"http://localhost:8080"};n.prototype.send=function(t){var e=new XMLHttpRequest;e.open("POST",this.host,!1),e.send(JSON.stringify(t));var n=e.responseText;return 200===e.status?JSON.parse(n):void 0},e.exports=n},{}],10:[function(t,e){var n=1,r=function(t,e){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:n++}},a=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},o=function(t){return t.map(function(t){return r(t.method,t.params)})};e.exports={toPayload:r,isValidResponse:a,toBatchPayload:o}},{}],11:[function(t,e){var n=function(){};n.prototype.send=function(t){var e=navigator.qt.callMethod(JSON.stringify(t));return JSON.parse(e)},e.exports=n},{}],12:[function(t,e){var n=t("./jsonrpc"),r=t("./const"),a=function(){var t,e=[],a=function(e){var r=n.toPayload(e.method,e.params);if(!t)return console.error("provider is not set"),null;var a=t.send(r);return n.isValidResponse(a)?"function"==typeof e.outputFormatter?e.outputFormatter(a.result):a.result:(console.log(a),"object"==typeof a&&a.error&&a.error.message&&console.error(a.error.message),null)},o=function(e){t=e},i=function(t,n,r,a){e.push({data:t,id:n,callback:r,uninstall:a})},s=function(t){for(var n=e.length;n--;){var r=e[n];r.id===t&&e.splice(n,1)}},u=function(){e.forEach(function(t){t.uninstall(t.id)}),e=[]},c=function(){e.forEach(function(t){var e=a(t.data);e instanceof Array&&0!==e.length&&t.callback(e)}),setTimeout(c,r.ETH_POLLING_TIMEOUT)};return c(),{send:a,setProvider:o,startPolling:i,stopPolling:s,reset:u}};e.exports=a},{"./const":2,"./jsonrpc":10}],13:[function(t,e){var n=function(){return[{name:"post",call:"shh_post"},{name:"newIdentity",call:"shh_newIdentity"},{name:"hasIdentity",call:"shh_haveIdentity"},{name:"newGroup",call:"shh_newGroup"},{name:"addToGroup",call:"shh_addToGroup"},{name:"haveIdentity",call:"shh_haveIdentity",newMethod:"hasIdentity"}]};e.exports={methods:n}},{}],14:[function(t,e){var n=t("./formatters"),r=function(t){return function(e){return 0===e.indexOf(t)}},a=function(t){return function(e){return t===e}},o=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("hash"),format:n.formatInputInt},{type:r("string"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:a("address"),format:n.formatInputInt},{type:a("bool"),format:n.formatInputBool}]},i=function(){return[{type:r("uint"),format:n.formatOutputUInt},{type:r("int"),format:n.formatOutputInt},{type:r("hash"),format:n.formatOutputHash},{type:r("string"),format:n.formatOutputString},{type:r("real"),format:n.formatOutputReal},{type:r("ureal"),format:n.formatOutputUReal},{type:a("address"),format:n.formatOutputAddress},{type:a("bool"),format:n.formatOutputBool}]};e.exports={prefixedType:r,namedType:a,inputTypes:o,outputTypes:i}},{"./formatters":8}],15:[function(t,e){var n=t("./const"),r=function(t,e){for(var n=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);return n?r-1:-1},a=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var a=parseInt(t.substr(n,2),16);if(0===a)break;e+=String.fromCharCode(a)}return e},o=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},i=function(t,e){e=void 0===e?0:e;for(var n=o(t);n.length<2*e;)n+="00";return"0x"+n},s=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},u=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},c=function(t){return t.filter(function(t){return"function"===t.type})},f=function(t){return t.filter(function(t){return"event"===t.type})},l=function(t){console.warn("This method is deprecated please use eth.fromWei(number, unit) instead.");for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,r=0,a=n.ETH_UNITS;e>3e3&&r<a.length-1;)e/=1e3,r++;for(var o=e.toString().length<e.toFixed(2).length?e.toString():e.toFixed(2),i=function(t,e,n){return e+","+n};;){var s=o;if(o=o.replace(/(\d)(\d\d\d[\.\,])/,i),s===o)break}return o+" "+a[r]},p=function(t){return t=t.length>2?t.substring(2):"0",new BigNumber(t,16).toString(10)},m=function(t,e){var n=!0;if(!t)return t;switch("string"==typeof t&&0===t.indexOf("0x")&&(t=p(t)),t instanceof BigNumber||(n=!1,t=new BigNumber(t.toString())),e=e.toLowerCase()){case"kwei":case"ada":t=t.dividedBy(1e3);break;case"mwei":case"babbage":t=t.dividedBy(1e6);break;case"gwei":case"schannon":t=t.dividedBy(1e9);break;case"szabo":t=t.dividedBy(1e12);break;case"finney":t=t.dividedBy(1e15);break;case"ether":t=t.dividedBy(1e18);break;case"kether":case"grand":case"einstein":t=t.dividedBy(1e21);break;case"mether":t=t.dividedBy(1e24);break;case"gether":t=t.dividedBy(1e27);break;case"tether":t=t.dividedBy(1e30)}return n?t:t.toString(10)},h=function(t,e){var n=!0;if(!t)return t;switch("string"==typeof t&&0===t.indexOf("0x")&&(t=p(t)),t instanceof BigNumber||(n=!1,t=new BigNumber(t.toString())),e=e.toLowerCase()){case"kwei":case"ada":t=t.times(1e3);break;case"mwei":case"babbage":t=t.times(1e6);break;case"gwei":case"schannon":t=t.times(1e9);break;case"szabo":t=t.times(1e12);break;case"finney":t=t.times(1e15);break;case"ether":t=t.times(1e18);break;case"kether":case"grand":case"einstein":t=t.times(1e21);break;case"mether":t=t.times(1e24);break;case"gether":t=t.times(1e27);break;case"tether":t=t.times(1e30)}return n?t:t.toString(10)},d=function(t){return 0===t.indexOf("0x")&&42!==t.length?!1:-1===t.indexOf("0x")&&40!==t.length?!1:/^\w+$/.test(t)};e.exports={findIndex:r,toDecimal:p,toAscii:a,fromAscii:i,extractDisplayName:s,extractTypeName:u,filterFunctions:c,filterEvents:f,toEth:l,toWei:h,fromWei:m,isAddress:d}},{"./const":2}],16:[function(t,e){var n=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:"getLogs",call:"eth_filterLogs"}]},r=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getLogs",call:"shh_getMessages"}]};e.exports={eth:n,shh:r}},{}],17:[function(t,e){var n=t("./eth"),r=t("./db"),a=t("./shh"),o=t("./watches"),i=t("./filter"),s=t("./utils"),u=t("./requestmanager"),c=function(){return[{name:"sha3",call:"web3_sha3"}]},f=function(t,e){e.forEach(function(e){var n=e.name.split("."),r=function(){var t=Array.prototype.slice.call(arguments),n="function"==typeof e.call?e.call(t):e.call;return e.newMethod&&console.warn("This method is deprecated please use eth."+e.newMethod+"() instead."),g.manager.send({method:n,params:t,outputFormatter:e.outputFormatter})};n.length>1?(t[n[0]]||(t[n[0]]={}),t[n[0]][n[1]]=r):t[n[0]]=r})},l=function(t,e){e.forEach(function(e){var n={};n.get=function(){return e.newProperty&&console.warn("This property is deprecated please use eth."+e.newProperty+" instead."),g.manager.send({method:e.getter,outputFormatter:e.outputFormatter})},e.setter&&(n.set=function(t){return e.newProperty&&console.warn("This property is deprecated please use eth."+e.newProperty+" instead."),g.manager.send({method:e.setter,params:[t]})}),n.enumerable=!e.newProperty,Object.defineProperty(t,e.name,n)})},p=function(t,e,n,r){g.manager.startPolling({method:t,params:[e]},e,n,r)},m=function(t){g.manager.stopPolling(t)},h={startPolling:p.bind(null,"eth_changed"),stopPolling:m},d={startPolling:p.bind(null,"shh_changed"),stopPolling:m},g={manager:u(),providers:{},setProvider:function(t){g.manager.setProvider(t)},reset:function(){g.manager.reset()},toAscii:s.toAscii,fromAscii:s.fromAscii,toDecimal:s.toDecimal,fromDecimal:function(t){return"0x"+new BigNumber(t).toString(16)},toEth:s.toEth,toWei:s.toWei,fromWei:s.fromWei,isAddress:s.isAddress,eth:{contractFromAbi:function(t){return function(e){e=e||"0xc6d9d2cd449a754c494264e1809c50e34d64562b";var n=g.eth.contract(e,t);return n.address=e,n}},filter:function(t,e,n,r){return t._isEvent?t(e,n):i(t,h,r)},watch:function(t,e,n,r){return console.warn("eth.watch() is deprecated please use eth.filter() instead."),this.filter(t,e,n,r)}},db:{},shh:{filter:function(t){return i(t,d)},watch:function(t){return console.warn("shh.watch() is deprecated please use shh.filter() instead."),this.filter(t)}}};f(g,c()),f(g.eth,n.methods),l(g.eth,n.properties),f(g.db,r.methods()),f(g.shh,a.methods()),f(h,o.eth()),f(d,o.shh()),e.exports=g},{"./db":4,"./eth":5,"./filter":7,"./requestmanager":12,"./shh":13,"./utils":15,"./watches":16}],web3:[function(t,e){var n=t("./lib/web3");n.providers.HttpSyncProvider=t("./lib/httpsync"),n.providers.QtSyncProvider=t("./lib/qtsync"),n.eth.contract=t("./lib/contract"),n.abi=t("./lib/abi"),e.exports=n},{"./lib/abi":1,"./lib/contract":3,"./lib/httpsync":9,"./lib/qtsync":11,"./lib/web3":17}]},{},["web3"]);