2018-08-02 19:17:40 +00:00
|
|
|
var _typeof2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){ return typeof e; }:function(e){ return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e; },_typeof=typeof Symbol=="function"&&_typeof2(Symbol.iterator)==="symbol"?function(e){ return void 0===e?"undefined":_typeof2(e); }:function(e){ return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e); }; !(function(e){ if((typeof exports=="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!="undefined")module.exports=e(); else if(typeof define=="function"&&define.amd)define([],e); else{ (typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).Web3=e(); } }(function(){ var define,module,exports; return (function e(t,n,i){ function r(a,s){ if(!n[a]){ if(!t[a]){ var c=typeof require=="function"&&require; if(!s&&c)return c(a,!0); if(o)return o(a,!0); var u=new Error("Cannot find module '"+a+"'"); throw u.code="MODULE_NOT_FOUND",u;}var l=n[a]={exports:{}}; t[a][0].call(l.exports,function(e){ var n=t[a][1][e]; return r(n||e);},l,l.exports,e,t,n,i) }return n[a].exports }for(var o=typeof require=="function"&&require,a=0; a<i.length; a++)r(i[a]); return r }({1:[function(e,t,n){ var i=n; i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders") },{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":"BN"}],2:[function(e,t,n){ function i(e,t){ this.name=e,this.body=t,this.decoders={},this.encoders={} }var r=e("../asn1"),o=e("inherits"); n.define=function(e,t){ return new i(e,t);},i.prototype._createNamed=function(t){ var n; try{ n=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})") }catch(e){ n=function(e){ this._initNamed(e);};}return o(n,t),n.prototype._initNamed=function(e){ t.call(this,e);},new n(this) },i.prototype._getDecoder=function(e){ return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r.decoders[e])),this.decoders[e] },i.prototype.decode=function(e,t,n){ return this._getDecoder(t).decode(e,n);},i.prototype._getEncoder=function(e){ return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r.encoders[e])),this.encoders[e] },i.prototype.encode=function(e,t,n){ return this._getEncoder(t).encode(e,n) } },{"../asn1":1,inherits:101,vm:157}],3:[function(e,t,n){ function i(e,t){ a.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer") }function r(e,t){ if(Array.isArray(e))this.length=0,this.value=e.map(function(e){ return e instanceof r||(e=new r(e,t)),this.length+=e.length,e },this); else if(typeof e=="number"){ if(!(e>=0&&e<=255))return t.error("non-byte EncoderBuffer value"); this.value=e,this.length=1 }else if(typeof e=="string")this.value=e,this.length=s.byteLength(e); else{ if(!s.isBuffer(e))return t.error("Unsupported type: "+(void 0===e?"undefined":_typeof(e))); this.value=e,this.length=e.length;} }var o=e("inherits"),a=e("../base").Reporter,s=e("buffer").Buffer; o(i,a),n.DecoderBuffer=i,i.prototype.save=function(){ return{offset:this.offset,reporter:a.prototype.save.call(this)} },i.prototype.restore=function(e){ var t=new i(this.base); return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,a.prototype.restore.call(this,e.reporter),t },i.prototype.isEmpty=function(){ return this.offset===this.length },i.prototype.readUInt8=function(e){ return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun") },i.prototype.skip=function(e,t){ if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun"); var n=new i(this.base); return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n;},i.prototype.raw=function(e){ return this.base.slice(e?e.offse
|