aboutsummaryrefslogtreecommitdiffstats
path: root/dist/ethereum.min.js
diff options
context:
space:
mode:
authorMarian Oancea <contact@siteshop.ro>2014-11-07 04:51:37 +0800
committerMarian Oancea <contact@siteshop.ro>2014-11-07 04:51:37 +0800
commit3270b432bcb007944e3b6e17329b062cb6b7da78 (patch)
tree197238043b4e4e7e5b20c2d985961e863fe52a92 /dist/ethereum.min.js
parentbd14b4d23e5eaaf5359b73a2744727df5624ab97 (diff)
downloadgo-tangerine-3270b432bcb007944e3b6e17329b062cb6b7da78.tar.gz
go-tangerine-3270b432bcb007944e3b6e17329b062cb6b7da78.tar.zst
go-tangerine-3270b432bcb007944e3b6e17329b062cb6b7da78.zip
Refactoring
Removed browser fixes Updated gulp to bypass native browser objects Added source map for dist
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 f5fadf79a..ac88d8f7a 100644
--- a/dist/ethereum.min.js
+++ b/dist/ethereum.min.js
@@ -1 +1 @@
-require=function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){function n(t){var e;return e=new r(t)}var r=(function(){return this}(),window.XMLHttpRequest);e.exports.XMLHttpRequest=r?n:null,r&&(n.prototype=r.prototype)},{}],2:[function(t,e){function n(t){return{jsonrpc:"2.0",method:t.call,params:t.args,id:t._id}}function r(t){var e=JSON.parse(t);return{_id:e.id,data:e.result}}var o=t("xmlhttprequest").XMLHttpRequest,i=function(t){this.handlers=[],this.host=t};i.prototype.sendRequest=function(t,e){var r=n(t),i=new o;i.open("POST",this.host,!0),i.send(JSON.stringify(r)),i.onreadystatechange=function(){4===i.readyState&&e&&e(i)}},i.prototype.send=function(t){var e=this;this.sendRequest(t,function(t){e.handlers.forEach(function(n){n.call(e,r(t.responseText))})})},i.prototype.poll=function(t,e){var n=this;this.sendRequest(t,function(r){var o=JSON.parse(r.responseText);(o.result instanceof Array?0!==o.result.length:o.result)&&n.handlers.forEach(function(r){r.call(n,{_event:t.call,_id:e,data:o.result})})})},Object.defineProperty(i.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=i},{xmlhttprequest:1}],3:[function(t,e){function n(t){return t instanceof Promise?Promise.resolve(t):t instanceof Array?new Promise(function(e){var r=t.map(function(t){return n(t)});return Promise.all(r).then(function(n){for(var r=0;r<t.length;r++)t[r]=n[r];e(t)})}):t instanceof Object?new Promise(function(e){var r=Object.keys(t),o=r.map(function(e){return n(t[e])});return Promise.all(o).then(function(n){for(var o=0;o<r.length;o++)t[r[o]]=n[o];e(t)})}):Promise.resolve(t)}function r(t){if(void 0!==t._event)return void f.trigger(t._event,t._id,t.data);if(t._id){var e=f._callbacks[t._id];e&&(e.call(this,t.data),delete f._callbacks[t._id])}}var o=function(){var t=function(t){return"string"==typeof t[0]?"blockByHash":"blockByNumber"},e=function(t){return"string"==typeof t[0]?"transactionByHash":"transactionByNumber"},n=function(t){return"string"==typeof t[0]?"uncleByHash":"uncleByNumber"},r=[{name:"balanceAt",call:"balanceAt"},{name:"stateAt",call:"stateAt"},{name:"countAt",call:"countAt"},{name:"codeAt",call:"codeAt"},{name:"transact",call:"transact"},{name:"call",call:"call"},{name:"block",call:t},{name:"transaction",call:e},{name:"uncle",call:n},{name:"compile",call:"compile"}];return r},i=function(){return[{name:"coinbase",getter:"coinbase",setter:"setCoinbase"},{name:"listening",getter:"listening",setter:"setListening"},{name:"mining",getter:"mining",setter:"setMining"},{name:"gasPrice",getter:"gasPrice"},{name:"account",getter:"account"},{name:"accounts",getter:"accounts"},{name:"peerCount",getter:"peerCount"},{name:"defaultBlock",getter:"defaultBlock",setter:"setDefaultBlock"},{name:"number",getter:"number"}]},s=function(){return[{name:"put",call:"put"},{name:"get",call:"get"},{name:"putString",call:"putString"},{name:"getString",call:"getString"}]},a=function(){return[{name:"post",call:"post"},{name:"newIdentity",call:"newIdentity"},{name:"haveIdentity",call:"haveIdentity"},{name:"newGroup",call:"newGroup"},{name:"addToGroup",call:"addToGroup"}]},c=function(){var t=function(t){return"string"==typeof t[0]?"newFilterString":"newFilter"};return[{name:"newFilter",call:t},{name:"uninstallFilter",call:"uninstallFilter"},{name:"getMessages",call:"getMessages"}]},l=function(){return[{name:"newFilter",call:"shhNewFilter"},{name:"uninstallFilter",call:"shhUninstallFilter"},{name:"getMessage",call:"shhGetMessages"}]},u=function(t,e){e.forEach(function(e){t[e.name]=function(){return n(Array.prototype.slice.call(arguments)).then(function(t){var n="function"==typeof e.call?e.call(t):e.call;return{call:n,args:t}}).then(function(t){return new Promise(function(e,n){f.provider.send(t,function(t){return t||"boolean"==typeof t?void e(t):void n(t)})})}).catch(function(t){console.error(t)})}})},p=function(t,e){e.forEach(function(e){var r={};r.get=function(){return new Promise(function(t){f.provider.send({call:e.getter},function(e){t(e)})})},e.setter&&(r.set=function(t){return n([t]).then(function(t){return new Promise(function(n){f.provider.send({call:e.setter,args:t},function(t){t?n(t):reject(t)})})}).catch(function(t){console.error(t)})}),Object.defineProperty(t,e.name,r)})},f={_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){for(var e="",n=0,r=t.length;r>n;n+=2){var o=t.charCodeAt(n);if(0===o)break;e+=String.fromCharCode(parseInt(t.substr(n,2),16))}return e},toDecimal:function(t){return parseInt(t,16)},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return n},eth:{prototype:Object(),watch:function(t){return new m(t,d)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(t){return new m(t,v)}},on:function(t,e,n){return void 0===f._events[t]&&(f._events[t]={}),f._events[t][e]=n,this},off:function(t,e){return void 0!==f._events[t]&&delete f._events[t][e],this},trigger:function(t,e,n){var r=f._events[t];if(r&&r[e]){var o=r[e];o(n)}}},h=f.eth;u(h,o()),p(h,i()),u(f.db,s()),u(f.shh,a());var d={changed:"changed"};u(d,c());var v={changed:"shhChanged"};u(v,l());var g=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()};g.prototype.send=function(t,e){t._id=this.id,e&&(f._callbacks[t._id]=e),t.args=t.args||[],this.id++,void 0!==this.provider?this.provider.send(t):(console.warn("provider is not set"),this.queued.push(t))},g.prototype.set=function(t){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=t,this.ready=!0},g.prototype.sendQueued=function(){for(var t=0;this.queued.length;t++)this.send(this.queued[t])},g.prototype.installed=function(){return void 0!==this.provider},g.prototype.startPolling=function(t,e){this.provider&&this.provider.poll&&this.polls.push({data:t,id:e})},g.prototype.stopPolling=function(t){for(var e=this.polls.length;e--;){var n=this.polls[e];n.id===t&&this.polls.splice(e,1)}},f.provider=new g,f.setProvider=function(t){t.onmessage=r,f.provider.set(t),f.provider.sendQueued()};var m=function(t,e){this.impl=e,this.callbacks=[];var n=this;this.promise=e.newFilter(t),this.promise.then(function(t){n.id=t,f.on(e.changed,t,n.trigger.bind(n)),f.provider.startPolling({call:e.changed,args:[t]},t)})};m.prototype.arrived=function(t){this.changed(t)},m.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},m.prototype.trigger=function(t){for(var e=0;e<this.callbacks.length;e++)this.callbacks[e].call(this,t)},m.prototype.uninstall=function(){var t=this;this.promise.then(function(e){t.impl.uninstallFilter(e),f.provider.stopPolling(e),f.off(impl.changed,e)})},m.prototype.messages=function(){var t=this;return this.promise.then(function(e){return t.impl.getMessages(e)})},e.exports=f},{}],4:[function(t,e){var n=function(){this.handlers=[];var t=this;navigator.qt.onmessage=function(e){t.handlers.forEach(function(n){n.call(t,JSON.parse(e.data))})}};n.prototype.send=function(t){navigator.qt.postMessage(JSON.stringify(t))},Object.defineProperty(n.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=n},{}],5:[function(t,e){var n=t("ws"),r=function(t){this.handlers=[],this.queued=[],this.ready=!1,this.ws=new n(t);var e=this;this.ws.onmessage=function(t){for(var n=0;n<e.handlers.length;n++)e.handlers[n].call(e,JSON.parse(t.data),t)},this.ws.onopen=function(){e.ready=!0;for(var t=0;t<e.queued.length;t++)e.send(e.queued[t])}};r.prototype.send=function(t){if(this.ready){var e=JSON.stringify(t);this.ws.send(e)}else this.queued.push(t)},r.prototype.onMessage=function(t){this.handlers.push(t)},r.prototype.unload=function(){this.ws.close()},Object.defineProperty(r.prototype,"onmessage",{set:function(t){this.onMessage(t)}}),e.exports=r},{ws:6}],6:[function(t,e){function n(t,e){var n;return n=e?new o(t,e):new o(t)}var r=function(){return this}(),o=r.WebSocket||r.MozWebSocket;e.exports=o?n:null,o&&(n.prototype=o.prototype)},{}],web3:[function(t,e){var n=t("./lib/main");n.providers.WebSocketProvider=t("./lib/websocket"),n.providers.HttpRpcProvider=t("./lib/httprpc"),n.providers.QtProvider=t("./lib/qt"),e.exports=n},{"./lib/httprpc":2,"./lib/main":3,"./lib/qt":4,"./lib/websocket":5}]},{},[]); \ No newline at end of file
+require=function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return i(n?n:t)},u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e){function n(t){return{jsonrpc:"2.0",method:t.call,params:t.args,id:t._id}}function r(t){var e=JSON.parse(t);return{_id:e.id,data:e.result}}var i=function(t){this.handlers=[],this.host=t};i.prototype.sendRequest=function(t,e){var r=n(t),i=new XMLHttpRequest;i.open("POST",this.host,!0),i.send(JSON.stringify(r)),i.onreadystatechange=function(){4===i.readyState&&e&&e(i)}},i.prototype.send=function(t){var e=this;this.sendRequest(t,function(t){e.handlers.forEach(function(n){n.call(e,r(t.responseText))})})},i.prototype.poll=function(t,e){var n=this;this.sendRequest(t,function(r){var i=JSON.parse(r.responseText);(i.result instanceof Array?0!==i.result.length:i.result)&&n.handlers.forEach(function(r){r.call(n,{_event:t.call,_id:e,data:i.result})})})},Object.defineProperty(i.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=i},{}],2:[function(t,e){function n(t){return t instanceof Promise?Promise.resolve(t):t instanceof Array?new Promise(function(e){var r=t.map(function(t){return n(t)});return Promise.all(r).then(function(n){for(var r=0;r<t.length;r++)t[r]=n[r];e(t)})}):t instanceof Object?new Promise(function(e){var r=Object.keys(t),i=r.map(function(e){return n(t[e])});return Promise.all(i).then(function(n){for(var i=0;i<r.length;i++)t[r[i]]=n[i];e(t)})}):Promise.resolve(t)}function r(t){if(void 0!==t._event)return void v.trigger(t._event,t._id,t.data);if(t._id){var e=v._callbacks[t._id];e&&(e.call(this,t.data),delete v._callbacks[t._id])}}var i,o,s,a,c=function(){var t=function(t){return"string"==typeof t[0]?"blockByHash":"blockByNumber"},e=function(t){return"string"==typeof t[0]?"transactionByHash":"transactionByNumber"},n=function(t){return"string"==typeof t[0]?"uncleByHash":"uncleByNumber"},r=[{name:"balanceAt",call:"balanceAt"},{name:"stateAt",call:"stateAt"},{name:"countAt",call:"countAt"},{name:"codeAt",call:"codeAt"},{name:"transact",call:"transact"},{name:"call",call:"call"},{name:"block",call:t},{name:"transaction",call:e},{name:"uncle",call:n},{name:"compile",call:"compile"}];return r},l=function(){return[{name:"coinbase",getter:"coinbase",setter:"setCoinbase"},{name:"listening",getter:"listening",setter:"setListening"},{name:"mining",getter:"mining",setter:"setMining"},{name:"gasPrice",getter:"gasPrice"},{name:"account",getter:"account"},{name:"accounts",getter:"accounts"},{name:"peerCount",getter:"peerCount"},{name:"defaultBlock",getter:"defaultBlock",setter:"setDefaultBlock"},{name:"number",getter:"number"}]},u=function(){return[{name:"put",call:"put"},{name:"get",call:"get"},{name:"putString",call:"putString"},{name:"getString",call:"getString"}]},p=function(){return[{name:"post",call:"post"},{name:"newIdentity",call:"newIdentity"},{name:"haveIdentity",call:"haveIdentity"},{name:"newGroup",call:"newGroup"},{name:"addToGroup",call:"addToGroup"}]},d=function(){var t=function(t){return"string"==typeof t[0]?"newFilterString":"newFilter"};return[{name:"newFilter",call:t},{name:"uninstallFilter",call:"uninstallFilter"},{name:"getMessages",call:"getMessages"}]},h=function(){return[{name:"newFilter",call:"shhNewFilter"},{name:"uninstallFilter",call:"shhUninstallFilter"},{name:"getMessage",call:"shhGetMessages"}]},f=function(t,e){e.forEach(function(e){t[e.name]=function(){return n(Array.prototype.slice.call(arguments)).then(function(t){var n="function"==typeof e.call?e.call(t):e.call;return{call:n,args:t}}).then(function(t){return new Promise(function(e,n){v.provider.send(t,function(t){return t||"boolean"==typeof t?void e(t):void n(t)})})}).catch(function(t){console.error(t)})}})},g=function(t,e){e.forEach(function(e){var r={};r.get=function(){return new Promise(function(t){v.provider.send({call:e.getter},function(e){t(e)})})},e.setter&&(r.set=function(t){return n([t]).then(function(t){return new Promise(function(n){v.provider.send({call:e.setter,args:t},function(t){t?n(t):reject(t)})})}).catch(function(t){console.error(t)})}),Object.defineProperty(t,e.name,r)})},v={_callbacks:{},_events:{},providers:{},toHex:function(t){var e,n,r="";for(e=0;e<t.length;e++)n=t.charCodeAt(e).toString(16),r+=n.length<2?"0"+n:n;return r},toAscii:function(t){for(var e,n="",r=0,i=t.length;i>r&&(e=t.charCodeAt(r),0!==e);r+=2)n+=String.fromCharCode(parseInt(t.substr(r,2),16));return n},toDecimal:function(t){return parseInt(t,16)},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return n},eth:{prototype:Object(),watch:function(t){return new a(t,i)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(t){return new a(t,o)}},on:function(t,e,n){return void 0===v._events[t]&&(v._events[t]={}),v._events[t][e]=n,this},off:function(t,e){return void 0!==v._events[t]&&delete v._events[t][e],this},trigger:function(t,e,n){var r,i=v._events[t];i&&i[e]&&(r=i[e])(n)}},m=v.eth;f(m,c()),g(m,l()),f(v.db,u()),f(v.shh,p()),i={changed:"changed"},f(i,d()),o={changed:"shhChanged"},f(o,h()),s=function(){var t,e;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,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)})()},s.prototype.send=function(t,e){t._id=this.id,e&&(v._callbacks[t._id]=e),t.args=t.args||[],this.id++,void 0!==this.provider?this.provider.send(t):(console.warn("provider is not set"),this.queued.push(t))},s.prototype.set=function(t){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=t,this.ready=!0},s.prototype.sendQueued=function(){for(var t=0;this.queued.length;t++)this.send(this.queued[t])},s.prototype.installed=function(){return void 0!==this.provider},s.prototype.startPolling=function(t,e){this.provider&&this.provider.poll&&this.polls.push({data:t,id:e})},s.prototype.stopPolling=function(t){var e,n;for(e=this.polls.length;e--;)n=this.polls[e],n.id===t&&this.polls.splice(e,1)},v.provider=new s,v.setProvider=function(t){t.onmessage=r,v.provider.set(t),v.provider.sendQueued()},a=function(t,e){this.impl=e,this.callbacks=[];var n=this;this.promise=e.newFilter(t),this.promise.then(function(t){n.id=t,v.on(e.changed,t,n.trigger.bind(n)),v.provider.startPolling({call:e.changed,args:[t]},t)})},a.prototype.arrived=function(t){this.changed(t)},a.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},a.prototype.trigger=function(t){for(var e=0;e<this.callbacks.length;e++)this.callbacks[e].call(this,t)},a.prototype.uninstall=function(){var t=this;this.promise.then(function(e){t.impl.uninstallFilter(e),v.provider.stopPolling(e),v.off(impl.changed,e)})},a.prototype.messages=function(){var t=this;return this.promise.then(function(e){return t.impl.getMessages(e)})},e.exports=v},{}],3:[function(t,e){var n=function(){this.handlers=[];var t=this;navigator.qt.onmessage=function(e){t.handlers.forEach(function(n){n.call(t,JSON.parse(e.data))})}};n.prototype.send=function(t){navigator.qt.postMessage(JSON.stringify(t))},Object.defineProperty(n.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=n},{}],4:[function(t,e){var n=function(t){this.handlers=[],this.queued=[],this.ready=!1,this.ws=new WebSocket(t);var e=this;this.ws.onmessage=function(t){for(var n=0;n<e.handlers.length;n++)e.handlers[n].call(e,JSON.parse(t.data),t)},this.ws.onopen=function(){e.ready=!0;for(var t=0;t<e.queued.length;t++)e.send(e.queued[t])}};n.prototype.send=function(t){if(this.ready){var e=JSON.stringify(t);this.ws.send(e)}else this.queued.push(t)},n.prototype.onMessage=function(t){this.handlers.push(t)},n.prototype.unload=function(){this.ws.close()},Object.defineProperty(n.prototype,"onmessage",{set:function(t){this.onMessage(t)}}),e.exports=n},{}],web3:[function(t,e){var n=t("./lib/main");n.providers.WebSocketProvider=t("./lib/websocket"),n.providers.HttpRpcProvider=t("./lib/httprpc"),n.providers.QtProvider=t("./lib/qt"),e.exports=n},{"./lib/httprpc":1,"./lib/main":2,"./lib/qt":3,"./lib/websocket":4}]},{},[]); \ No newline at end of file