web3.js/dist/ethereum.min.js
2015-02-25 17:01:23 +01:00

6 lines
40 KiB
JavaScript

<<<<<<< HEAD
require=function t(e,n,r){function a(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[o]={exports:{}};e[o][0].call(f.exports,function(t){var n=e[o][1][t];return a(n?n:t)},f,f.exports,t,e,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(t,e){var n=t("./web3"),r=t("./utils"),a=t("./types"),i=t("./const"),o=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?o.formatInputInt(e.length):""},f=a.inputTypes(),l=function(t,e){{var n="";2*i.ETH_PADDING}return t.forEach(function(t,r){n+=c(t.type,e[r])}),t.forEach(function(r,a){for(var i=!1,o=0;o<f.length&&!i;o++)i=f[o].type(t[a].type,e[a]);i||s(t[a].type);var c=f[o-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*i.ETH_PADDING:0},m=a.outputTypes(),d=function(t,e){e=e.slice(2);var n=[],r=2*i.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(i,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 d=m[p-1].format;if(u(t[c].type)){var h=o.formatOutputUInt(f.slice(0,r));f=f.slice(r);for(var g=[],y=0;h>y;y++)g.push(d(e.slice(0,r))),e=e.slice(r);n.push(g)}else a.prefixedType("string")(t[c].type)?(f=f.slice(r),n.push(d(e.slice(0,r))),e=e.slice(r)):(n.push(d(e.slice(0,r))),e=e.slice(r))}),n},h=function(t){var e={};return t.forEach(function(t){var n=r.extractDisplayName(t.name),a=r.extractTypeName(t.name),i=function(){var e=Array.prototype.slice.call(arguments);return l(t.inputs,e)};void 0===e[n]&&(e[n]=i),e[n][a]=i}),e},g=function(t){var e={};return t.forEach(function(t){var n=r.extractDisplayName(t.name),a=r.extractTypeName(t.name),i=function(e){return d(t.outputs,e)};void 0===e[n]&&(e[n]=i),e[n][a]=i}),e},y=function(t){return n.sha3(n.fromAscii(t)).slice(0,2+2*i.ETH_SIGNATURE_LENGTH)},b=function(t){return n.sha3(n.fromAscii(t))};e.exports={inputParser:h,outputParser:g,formatInput:l,formatOutput:d,signatureFromAscii:y,eventSignatureFromAscii:b}},{"./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){function n(t,e){t.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 u(n),c(n,t,e),f(n,t,e),l(n,t,e),n}var r=t("./web3"),a=t("./abi"),i=t("./utils"),o=t("./event"),s=(t("./filter"),function(t){r._currentContractAbi=t.abi,r._currentContractAddress=t.address,r._currentContractMethodName=t.method,r._currentContractMethodParams=t.params}),u=function(t){t.call=function(e){return t._isTransaction=!1,t._options=e,t},t.sendTransaction=function(e){return t._isTransaction=!0,t._options=e,t},t.transact=function(e){return console.warn("myContract.transact() is deprecated please use myContract.sendTransaction() instead."),t.sendTransaction(e)},t._options={},["gas","gasPrice","value","from"].forEach(function(e){t[e]=function(n){return t._options[e]=n,t}})},c=function(t,e,n){var o=a.inputParser(e),u=a.outputParser(e);i.filterFunctions(e).forEach(function(c){var f=i.extractDisplayName(c.name),l=i.extractTypeName(c.name),p=function(){var i=Array.prototype.slice.call(arguments),p=a.signatureFromAscii(c.name),m=o[f][l].apply(null,i),d=t._options||{};d.to=n,d.data=p+m;var h=t._isTransaction===!0||t._isTransaction!==!1&&!c.constant,g=d.collapse!==!1;if(t._options={},t._isTransaction=null,h)return s({abi:e,address:n,method:c.name,params:i}),void r.eth.sendTransaction(d);var y=r.eth.call(d),b=u[f][l](y);return g&&(1===b.length?b=b[0]:0===b.length&&(b=null)),b};void 0===t[f]&&(t[f]=p),t[f][l]=p})},f=function(t,e,n){t.address=n,t._onWatchEventResult=function(t){var n=event.getMatchingEvent(i.filterEvents(e)),r=o.outputParser(n);return r(t)},Object.defineProperty(t,"topic",{get:function(){return i.filterEvents(e).map(function(t){return a.eventSignatureFromAscii(t.name)})}})},l=function(t,e,n){i.filterEvents(e).forEach(function(e){var s=function(){var t=Array.prototype.slice.call(arguments),i=a.eventSignatureFromAscii(e.name),s=o.inputParser(n,i,e),u=s.apply(null,t),c=function(t){var n=o.outputParser(e);return n(t)};return r.eth.filter(u,void 0,void 0,c)};s._isEvent=!0;var u=i.extractDisplayName(e.name),c=i.extractTypeName(e.name);void 0===t[u]&&(t[u]=s),t[u][c]=s})},p=function(t){return t instanceof Array&&1===arguments.length?n.bind(null,t):(console.warn("Initiating a contract like this is deprecated please use var MyContract = eth.contract(abi); new MyContract(address); instead."),new n(arguments[1],arguments[0]))};e.exports=p},{"./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"},i=function(t){return"string"==typeof t[0]?"eth_uncleByHash":"eth_uncleByNumber"},o=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:"getData",call:"eth_codeAt"},{name:"getBlock",call:r,outputFormatter:n.outputBlockFormatter},{name:"getUncle",call:i,outputFormatter:n.outputBlockFormatter},{name:"getCompilers",call:"eth_compilers"},{name:"getBlockTransactionCount",call:o},{name:"getBlockUncleCount",call:s},{name:"getTransaction",call:a,outputFormatter:n.outputTransactionFormatter},{name:"getTransactionCount",call:"eth_countAt"},{name:"sendTransaction",call:"eth_transact",inputFormatter:n.inputTransactionFormatter},{name:"call",call:"eth_call"},{name:"compile.solidity",call:"eth_solidity"},{name:"compile.lll",call:"eth_lll"},{name:"compile.serpent",call:"eth_serpent"},{name:"flush",call:"eth_flush"},{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:"getData"},{name:"transact",call:"eth_transact",newMethod:"sendTransaction"},{name:"block",call:r,newMethod:"getBlock"},{name:"transaction",call:a,newMethod:"getTransaction"},{name:"uncle",call:i,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:o,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})},i=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]},o=function(t,e){return Object.keys(e).map(function(r){var o=[i(a(t.inputs,!0),r)],s=e[r];return s instanceof Array?s.map(function(t){return n.formatInput(o,[t])}):n.formatInput(o,[s])})},s=function(t,e,n){return function(r,a){var i=a||{};return i.address=t,i.topic=[],i.topic.push(e),r&&(i.topic=i.topic.concat(o(n,r))),i}},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 i={event:r.extractDisplayName(t.name),number:e.number,args:{}};if(e.topics=e.topic,!e.topic)return i;var o=a(t.inputs,!0),s="0x"+e.topic.slice(1,e.topic.length).map(function(t){return t.slice(2)}).join(""),c=n.formatOutput(o,s),f=a(t.inputs,!1),l=n.formatOutput(f,e.data);return i.args=u(t.inputs,c,l),i}},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 i=[],o=e.newFilter(t),s=function(t){t.forEach(function(t){t=a?a(t):t,i.forEach(function(e){e(t)})})};e.startPolling(o,s,e.uninstallFilter);var u=function(t){i.push(t)},c=function(){e.stopPolling(o),e.uninstallFilter(o),i=[]},f=function(){return e.getLogs(o)};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},i=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?i(new BigNumber(t)):(+t).toString(16),a(t,e)},o=function(t){return n.fromAscii(t,r.ETH_PADDING).substr(2)},s=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},u=function(t){return i(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))},d=function(t){return"0x"+t},h=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)},b=function(t){return"string"==typeof t&&(t=t.replace("0x","")),t=t||"0",new BigNumber(t,16)},v=function(t){return t.code&&(t.data=t.code,delete t.code),t.endowment&&(t.value=t.endowment,delete t.endowment),["gasPrice","value"].forEach(function(e){"string"==typeof t[e]?-1===t[e].indexOf("0x")&&(t[e]=n.fromDecimal(t[e])):"number"==typeof t[e]?t[e]=n.fromDecimal(t[e]):t[e]instanceof BigNumber&&(t[e]="0x"+t[e].toString(16))}),t.gas=Number(t.gas),t},w=function(t){return t.gas=Number(t.gas),t.gasPrice="string"==typeof t.gasPrice&&0===t.gasPrice.indexOf("0x")?new BigNumber(t.gasPrice,16):new BigNumber(t.gasPrice.toString(10),10),t.value="string"==typeof t.value&&0===t.value.indexOf("0x")?new BigNumber(t.value,16):new BigNumber(t.value.toString(10),10),t},_=function(t){return t.gasLimit=Number(t.gasLimit),t.gasUsed=Number(t.gasUsed),t.size=Number(t.size),t.timestamp=Number(t.timestamp),t.number=Number(t.number),t.minGasPrice&&(t.minGasPrice="string"==typeof t.minGasPrice&&0===t.minGasPrice.indexOf("0x")?new BigNumber(t.minGasPrice,16):new BigNumber(t.minGasPrice.toString(10),10)),t.difficulty&&(t.difficulty="string"==typeof t.difficulty&&0===t.difficulty.indexOf("0x")?new BigNumber(t.difficulty,16):new BigNumber(t.difficulty.toString(10),10)),t.totalDifficulty&&(t.totalDifficulty="string"==typeof t.totalDifficulty&&0===t.totalDifficulty.indexOf("0x")?new BigNumber(t.totalDifficulty,16):new BigNumber(t.totalDifficulty.toString(10),10)),t};e.exports={formatInputInt:i,formatInputString:o,formatInputBool:s,formatInputReal:u,formatOutputInt:f,formatOutputUInt:l,formatOutputReal:p,formatOutputUReal:m,formatOutputHash:d,formatOutputBool:h,formatOutputString:g,formatOutputAddress:y,convertToBigNumber:b,inputTransactionFormatter:v,outputTransactionFormatter:w,outputBlockFormatter:_}},{"./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},i=function(t){return t.map(function(t){return r(t.method,t.params)})};e.exports={toPayload:r,isValidResponse:a,toBatchPayload:i}},{}],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){"function"==typeof e.inputFormatter&&(e.params=Array.prototype.map.call(e.params,function(t){return e.inputFormatter(t)}));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)},i=function(e){t=e},o=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:i,startPolling:o,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}},i=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}]},o=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:i,outputTypes:o}},{"./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},i=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},o=function(t,e){e=void 0===e?0:e;for(var n=i(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 i=e.toString().length<e.toFixed(2).length?e.toString():e.toFixed(2),o=function(t,e,n){return e+","+n};;){var s=i;if(i=i.replace(/(\d)(\d\d\d[\.\,])/,o),s===i)break}return i+" "+a[r]},p=function(t){return t=t.length>2?t.substring(2):"0",new BigNumber(t,16).toString(10)},m=function(t){return"0x"+new BigNumber(t).toString(16)},d=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(10),10)),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")&&(n=!1,t=new BigNumber(t,16)),t instanceof BigNumber||(n=!1,t=new BigNumber(t.toString(10),10)),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)},g=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,fromDecimal:m,toAscii:a,fromAscii:o,extractDisplayName:s,extractTypeName:u,filterFunctions:c,filterEvents:f,toEth:l,toWei:h,fromWei:d,isAddress:g}},{"./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"),i=t("./watches"),o=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,inputFormatter:e.inputFormatter})};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],inputFormatter:e.inputFormatter})}),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)},d={startPolling:p.bind(null,"eth_changed"),stopPolling:m},h={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:s.fromDecimal,toEth:s.toEth,toWei:s.toWei,fromWei:s.fromWei,isAddress:s.isAddress,eth:{contractFromAbi:function(t){return console.warn("Initiating a contract like this is deprecated please use var MyContract = eth.contract(abi); new MyContract(address); instead."),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):o(t,d,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 o(t,h)},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(d,i.eth()),f(h,i.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"]);
=======
require=function t(n,e,r){function o(i,u){if(!e[i]){if(!n[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[i]={exports:{}};n[i][0].call(c.exports,function(t){var e=n[i][1][t];return o(e?e:t)},c,c.exports,t,n,e,r)}return e[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(t,n){var e=t("./web3"),r=t("./utils"),o=t("./types"),a=t("./const"),i=t("./formatters"),u=function(t){console.error("parser does not support type: "+t)},f=function(t){return"[]"===t.slice(-2)},s=function(t,n){return f(t)||"string"===t?i.formatInputInt(n.length):""},c=o.inputTypes(),l=function(t,n){var e="";return t.forEach(function(t,r){e+=s(t.type,n[r])}),t.forEach(function(r,o){for(var a=!1,i=0;i<c.length&&!a;i++)a=c[i].type(t[o].type,n[o]);a||u(t[o].type);var s=c[i-1].format,l="";l=f(t[o].type)?n[o].reduce(function(t,n){return t+s(n)},""):s(n[o]),e+=l}),e},p=function(t){return f(t)||"string"===t?2*a.ETH_PADDING:0},m=o.outputTypes(),h=function(t,n){n=n.slice(2);var e=[],r=2*a.ETH_PADDING,s=t.reduce(function(t,n){return t+p(n.type)},0),c=n.slice(0,s);return n=n.slice(s),t.forEach(function(a,s){for(var l=!1,p=0;p<m.length&&!l;p++)l=m[p].type(t[s].type);l||u(t[s].type);var h=m[p-1].format;if(f(t[s].type)){var d=i.formatOutputUInt(c.slice(0,r));c=c.slice(r);for(var g=[],v=0;d>v;v++)g.push(h(n.slice(0,r))),n=n.slice(r);e.push(g)}else o.prefixedType("string")(t[s].type)?(c=c.slice(r),e.push(h(n.slice(0,r))),n=n.slice(r)):(e.push(h(n.slice(0,r))),n=n.slice(r))}),e},d=function(t){var n={};return t.forEach(function(t){var e=r.extractDisplayName(t.name),o=r.extractTypeName(t.name),a=function(){var n=Array.prototype.slice.call(arguments);return l(t.inputs,n)};void 0===n[e]&&(n[e]=a),n[e][o]=a}),n},g=function(t){var n={};return t.forEach(function(t){var e=r.extractDisplayName(t.name),o=r.extractTypeName(t.name),a=function(n){return h(t.outputs,n)};void 0===n[e]&&(n[e]=a),n[e][o]=a}),n},v=function(t){return e.sha3(e.fromAscii(t)).slice(0,2+2*a.ETH_SIGNATURE_LENGTH)},y=function(t){return e.sha3(e.fromAscii(t))};n.exports={inputParser:d,outputParser:g,formatInput:l,formatOutput:h,signatureFromAscii:v,eventSignatureFromAscii:y}},{"./const":2,"./formatters":8,"./types":14,"./utils":15,"./web3":17}],2:[function(t,n){var e=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];n.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:e,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:BigNumber.ROUND_DOWN},ETH_POLLING_TIMEOUT:1e3}},{}],3:[function(t,n){var e=t("./web3"),r=t("./abi"),o=t("./utils"),a=t("./event"),i=function(t){e._currentContractAbi=t.abi,e._currentContractAddress=t.address,e._currentContractMethodName=t.method,e._currentContractMethodParams=t.params},u=function(t){t.call=function(n){return t._isTransact=!1,t._options=n,t},t.transact=function(n){return t._isTransact=!0,t._options=n,t},t._options={},["gas","gasPrice","value","from"].forEach(function(n){t[n]=function(e){return t._options[n]=e,t}})},f=function(t,n,a){var u=r.inputParser(n),f=r.outputParser(n);o.filterFunctions(n).forEach(function(s){var c=o.extractDisplayName(s.name),l=o.extractTypeName(s.name),p=function(){var o=Array.prototype.slice.call(arguments),p=r.signatureFromAscii(s.name),m=u[c][l].apply(null,o),h=t._options||{};h.to=a,h.data=p+m;var d=t._isTransact===!0||t._isTransact!==!1&&!s.constant,g=h.collapse!==!1;if(t._options={},t._isTransact=null,d)return i({abi:n,address:a,method:s.name,params:o}),void e.eth.transact(h);var v=e.eth.call(h),y=f[c][l](v);return g&&(1===y.length?y=y[0]:0===y.length&&(y=null)),y};void 0===t[c]&&(t[c]=p),t[c][l]=p})},s=function(t,n,e){t.address=e,t._onWatchEventResult=function(t){var e=event.getMatchingEvent(o.filterEvents(n)),r=a.outputParser(e);return r(t)},Object.defineProperty(t,"topic",{get:function(){return o.filterEvents(n).map(function(t){return r.eventSignatureFromAscii(t.name)})}})},c=function(t,n,i){o.filterEvents(n).forEach(function(n){var u=function(){var t=Array.prototype.slice.call(arguments),o=r.eventSignatureFromAscii(n.name),u=a.inputParser(i,o,n),f=u.apply(null,t),s=function(t){var e=a.outputParser(n);return e(t)};return e.eth.watch(f,void 0,void 0,s)};u._isEvent=!0;var f=o.extractDisplayName(n.name),s=o.extractTypeName(n.name);void 0===t[f]&&(t[f]=u),t[f][s]=u})},l=function(t,n){n.forEach(function(t){if(-1===t.name.indexOf("(")){var n=t.name,e=t.inputs.map(function(t){return t.type}).join();t.name=n+"("+e+")"}});var e={};return u(e),f(e,n,t),s(e,n,t),c(e,n,t),e};n.exports=l},{"./abi":1,"./event":6,"./utils":15,"./web3":17}],4:[function(t,n){var e=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]};n.exports={methods:e}},{}],5:[function(t,n){var e=function(){var t=function(t){return"string"==typeof t[0]?"eth_blockByHash":"eth_blockByNumber"},n=function(t){return"string"==typeof t[0]?"eth_transactionByHash":"eth_transactionByNumber"},e=function(t){return"string"==typeof t[0]?"eth_uncleByHash":"eth_uncleByNumber"},r=function(t){return"string"==typeof t[0]?"eth_transactionCountByHash":"eth_transactionCountByNumber"},o=function(t){return"string"==typeof t[0]?"eth_uncleCountByHash":"eth_uncleCountByNumber"};return[{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:n},{name:"uncle",call:e},{name:"compilers",call:"eth_compilers"},{name:"flush",call:"eth_flush"},{name:"lll",call:"eth_lll"},{name:"solidity",call:"eth_solidity"},{name:"serpent",call:"eth_serpent"},{name:"logs",call:"eth_logs"},{name:"transactionCount",call:r},{name:"uncleCount",call:o}]},r=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:"accounts",getter:"eth_accounts"},{name:"peerCount",getter:"eth_peerCount"},{name:"defaultBlock",getter:"eth_defaultBlock",setter:"eth_setDefaultBlock"},{name:"number",getter:"eth_number"}]};n.exports={methods:e,properties:r}},{}],6:[function(t,n){var e=t("./abi"),r=t("./utils"),o=function(t,n){return t.filter(function(t){return t.indexed===n})},a=function(t,n){var e=r.findIndex(t,function(t){return t.name===n});return-1===e?void console.error("indexed param with name "+n+" not found"):t[e]},i=function(t,n){return Object.keys(n).map(function(r){var i=[a(o(t.inputs,!0),r)],u=n[r];return u instanceof Array?u.map(function(t){return e.formatInput(i,[t])}):e.formatInput(i,[u])})},u=function(t,n,e){return function(r,o){var a=o||{};return a.address=t,a.topic=[],a.topic.push(n),r&&(a.topic=a.topic.concat(i(e,r))),a}},f=function(t,n,e){var r=n.slice(),o=e.slice();return t.reduce(function(t,n){var e;return e=n.indexed?r.splice(0,1)[0]:o.splice(0,1)[0],t[n.name]=e,t},{})},s=function(t){return function(n){var a={event:r.extractDisplayName(t.name),number:n.number,args:{}};if(n.topics=n.topic,!n.topic)return a;var i=o(t.inputs,!0),u="0x"+n.topic.slice(1,n.topic.length).map(function(t){return t.slice(2)}).join(""),s=e.formatOutput(i,u),c=o(t.inputs,!1),l=e.formatOutput(c,n.data);return a.args=f(t.inputs,s,l),a}},c=function(t,n){for(var r=0;r<t.length;r++){var o=e.eventSignatureFromAscii(t[r].name);if(o===n.topic[0])return t[r]}return void 0};n.exports={inputParser:u,outputParser:s,getMatchingEvent:c}},{"./abi":1,"./utils":15}],7:[function(t,n){var e=function(t){return!!t&&"function"==typeof t.newFilter&&"function"==typeof t.getMessages&&"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})},o=function(t,n,o){if(!e(n))return void console.error("filter implemenation is invalid");t=r(t);var a=[],i=n.newFilter(t),u=function(t){t.forEach(function(t){t=o?o(t):t,a.forEach(function(n){n(t)})})};n.startPolling(i,u,n.uninstallFilter);var f=function(t){a.push(t)},s=function(){return n.getMessages(i)},c=function(){n.stopPolling(i),n.uninstallFilter(i),a=[]};return{changed:f,arrived:f,happened:f,messages:s,logs:s,uninstall:c}};n.exports=o},{}],8:[function(t,n){var e=t("./utils"),r=t("./const"),o=function(t,n,e){return new Array(n-t.length+1).join(e?e:"0")+t},a=function(t){var n=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?a(new BigNumber(t)):(+t).toString(16),o(t,n)},i=function(t){return e.fromAscii(t,r.ETH_PADDING).substr(2)},u=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},f=function(t){return a(new BigNumber(t).times(new BigNumber(2).pow(128)))},s=function(t){return"1"===new BigNumber(t.substr(0,1),16).toString(2).substr(0,1)},c=function(t){return t=t||"0",s(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 c(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 e.toAscii(t)},v=function(t){return"0x"+t.slice(t.length-40,t.length)};n.exports={formatInputInt:a,formatInputString:i,formatInputBool:u,formatInputReal:f,formatOutputInt:c,formatOutputUInt:l,formatOutputReal:p,formatOutputUReal:m,formatOutputHash:h,formatOutputBool:d,formatOutputString:g,formatOutputAddress:v}},{"./const":2,"./utils":15}],9:[function(t,n){var e=function(t){this.handlers=[],this.host=t||"http://localhost:8080"};e.prototype.send=function(t){var n=new XMLHttpRequest;n.open("POST",this.host,!1),n.send(JSON.stringify(t));var e=n.responseText;return 200===n.status?JSON.parse(e):void 0},n.exports=e},{}],10:[function(t,n){var e=1,r=function(t,n){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:n||[],id:e++}},o=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},a=function(t){return t.map(function(t){return r(t.method,t.params)})};n.exports={toPayload:r,isValidResponse:o,toBatchPayload:a}},{}],11:[function(t,n){var e=function(){};e.prototype.send=function(t){var n=navigator.qt.callMethod(JSON.stringify(t));return JSON.parse(n)},n.exports=e},{}],12:[function(t,n){var e=t("./jsonrpc"),r=t("./const"),o=function(){var t,n=[],o=function(n){var r=e.toPayload(n.method,n.params);if(!t)return console.error("provider is not set"),null;var o=t.send(r);return e.isValidResponse(o)?o.result:(console.log(o),null)},a=function(n){t=n},i=function(t,e,r,o){n.push({data:t,id:e,callback:r,uninstall:o})},u=function(t){for(var e=n.length;e--;){var r=n[e];r.id===t&&n.splice(e,1)}},f=function(){n.forEach(function(t){t.uninstall(t.id)}),n=[]},s=function(){n.forEach(function(t){var n=o(t.data);n instanceof Array&&0!==n.length&&t.callback(n)}),setTimeout(s,r.ETH_POLLING_TIMEOUT)};return s(),{send:o,setProvider:a,startPolling:i,stopPolling:u,reset:f}};n.exports=o},{"./const":2,"./jsonrpc":10}],13:[function(t,n){var e=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"}]};n.exports={methods:e}},{}],14:[function(t,n){var e=t("./formatters"),r=function(t){return function(n){return 0===n.indexOf(t)}},o=function(t){return function(n){return t===n}},a=function(){return[{type:r("uint"),format:e.formatInputInt},{type:r("int"),format:e.formatInputInt},{type:r("hash"),format:e.formatInputInt},{type:r("string"),format:e.formatInputString},{type:r("real"),format:e.formatInputReal},{type:r("ureal"),format:e.formatInputReal},{type:o("address"),format:e.formatInputInt},{type:o("bool"),format:e.formatInputBool}]},i=function(){return[{type:r("uint"),format:e.formatOutputUInt},{type:r("int"),format:e.formatOutputInt},{type:r("hash"),format:e.formatOutputHash},{type:r("string"),format:e.formatOutputString},{type:r("real"),format:e.formatOutputReal},{type:r("ureal"),format:e.formatOutputUReal},{type:o("address"),format:e.formatOutputAddress},{type:o("bool"),format:e.formatOutputBool}]};n.exports={prefixedType:r,namedType:o,inputTypes:a,outputTypes:i}},{"./formatters":8}],15:[function(t,n){var e=t("./const"),r=function(t,n){for(var e=!1,r=0;r<t.length&&!e;r++)e=n(t[r]);return e?r-1:-1},o=function(t){var n="",e=0,r=t.length;for("0x"===t.substring(0,2)&&(e=2);r>e;e+=2){var o=parseInt(t.substr(e,2),16);if(0===o)break;n+=String.fromCharCode(o)}return n},a=function(t){for(var n="",e=0;e<t.length;e++){var r=t.charCodeAt(e).toString(16);n+=r.length<2?"0"+r:r}return n},i=function(t,n){n=void 0===n?0:n;for(var e=a(t);e.length<2*n;)e+="00";return"0x"+e},u=function(t){var n=t.indexOf("(");return-1!==n?t.substr(0,n):t},f=function(t){var n=t.indexOf("(");return-1!==n?t.substr(n+1,t.length-1-(n+1)).replace(" ",""):""},s=function(t){return t.filter(function(t){return"function"===t.type})},c=function(t){return t.filter(function(t){return"event"===t.type})},l=function(t){for(var n="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,r=0,o=e.ETH_UNITS;n>3e3&&r<o.length-1;)n/=1e3,r++;for(var a=n.toString().length<n.toFixed(2).length?n.toString():n.toFixed(2),i=function(t,n,e){return n+","+e};;){var u=a;if(a=a.replace(/(\d)(\d\d\d[\.\,])/,i),u===a)break}return a+" "+o[r]};n.exports={findIndex:r,toAscii:o,fromAscii:i,extractDisplayName:u,extractTypeName:f,filterFunctions:s,filterEvents:c,toEth:l}},{"./const":2}],16:[function(t,n){var e=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"}]},r=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getMessages",call:"shh_getMessages"}]};n.exports={eth:e,shh:r}},{}],17:[function(t,n){var e=t("./eth"),r=t("./db"),o=t("./shh"),a=t("./watches"),i=t("./filter"),u=t("./utils"),f=t("./requestmanager"),s=function(){return[{name:"sha3",call:"web3_sha3"}]},c=function(t,n){n.forEach(function(n){t[n.name]=function(){var t=Array.prototype.slice.call(arguments),e="function"==typeof n.call?n.call(t):n.call;return g.manager.send({method:e,params:t})}})},l=function(t,n){n.forEach(function(n){var e={};e.get=function(){return g.manager.send({method:n.getter})},n.setter&&(e.set=function(t){return g.manager.send({method:n.setter,params:[t]})}),Object.defineProperty(t,n.name,e)})},p=function(t,n,e,r){g.manager.startPolling({method:t,params:[n]},n,e,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:f(),providers:{},toAscii:u.toAscii,fromAscii:u.fromAscii,toDecimal:function(t){return t=t.length>2?t.substring(2):"0",new BigNumber(t,16).toString(10)},fromDecimal:function(t){return"0x"+new BigNumber(t).toString(16)},toEth:u.toEth,eth:{contractFromAbi:function(t){return function(n){n=n||"0xc6d9d2cd449a754c494264e1809c50e34d64562b";var e=g.eth.contract(n,t);return e.address=n,e}},watch:function(t,n,e,r){return t._isEvent?t(n,e):i(t,h,r)}},db:{},shh:{watch:function(t){return i(t,d)}},setProvider:function(t){g.manager.setProvider(t)},reset:function(){g.manager.reset()}};c(g,s()),c(g.eth,e.methods()),l(g.eth,e.properties()),c(g.db,r.methods()),c(g.shh,o.methods()),c(h,a.eth()),c(d,a.shh()),n.exports=g},{"./db":4,"./eth":5,"./filter":7,"./requestmanager":12,"./shh":13,"./utils":15,"./watches":16}],web3:[function(t,n){var e=t("./lib/web3");e.providers.HttpSyncProvider=t("./lib/httpsync"),e.providers.QtSyncProvider=t("./lib/qtsync"),e.eth.contract=t("./lib/contract"),e.abi=t("./lib/abi"),n.exports=e},{"./lib/abi":1,"./lib/contract":3,"./lib/httpsync":9,"./lib/qtsync":11,"./lib/web3":17}]},{},["web3"]);
>>>>>>> 72d7a0c7ac38b99d248a64ab3c02f76bea72c766