").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-
-
-
-jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
-};
-
-
-
-
-
-var docElem = window.document.documentElement;
-
-/**
- * Gets a window from an element
- */
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-
-jQuery.offset = {
- setOffset: function( elem, options, i ) {
- var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
- position = jQuery.css( elem, "position" ),
- curElem = jQuery( elem ),
- props = {};
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- curOffset = curElem.offset();
- curCSSTop = jQuery.css( elem, "top" );
- curCSSLeft = jQuery.css( elem, "left" );
- calculatePosition = ( position === "absolute" || position === "fixed" ) &&
- jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-jQuery.fn.extend({
- offset: function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== strundefined ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
- },
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || docElem;
-
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docElem;
- });
- }
-});
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-// Add the top/left cssHooks using jQuery.fn.position
-// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
-// getComputedStyle returns percent when specified for top/left/bottom/right
-// rather than make the css module depend on the offset module, we just check for it here
-jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
- function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- );
-});
-
-
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
- return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-
-
-
-// Register as a named AMD module, since jQuery can be concatenated with other
-// files that may use define, but not via a proper concatenation script that
-// understands anonymous AMD modules. A named AMD is safest and most robust
-// way to register. Lowercase jquery is used because AMD module names are
-// derived from file names, and jQuery is normally delivered in a lowercase
-// file name. Do this after creating the global so that if an AMD module wants
-// to call noConflict to hide this version of jQuery, it will work.
-
-// Note that for maximum portability, libraries that are not jQuery should
-// declare themselves as anonymous modules, and avoid setting a global if an
-// AMD loader is present. jQuery is a special case. For more information, see
-// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
-
-if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function() {
- return jQuery;
- });
-}
-
-
-
-
-var
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$;
-
-jQuery.noConflict = function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
-};
-
-// Expose jQuery and $ identifiers, even in
-// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
-// and CommonJS for browser emulators (#13566)
-if ( typeof noGlobal === strundefined ) {
- window.jQuery = window.$ = jQuery;
-}
-
-
-
-
-return jQuery;
-
-}));
diff --git a/docs/_build/html/_static/jquery.js b/docs/_build/html/_static/jquery.js
deleted file mode 100644
index ab28a24729b..00000000000
--- a/docs/_build/html/_static/jquery.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="
",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d
b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
-if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:k.htmlSerialize?[0,"",""]:[1,"X","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" a",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
-},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();ca",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/docs/_build/html/_static/minus.png b/docs/_build/html/_static/minus.png
deleted file mode 100644
index 0f22b16b038..00000000000
Binary files a/docs/_build/html/_static/minus.png and /dev/null differ
diff --git a/docs/_build/html/_static/plus.png b/docs/_build/html/_static/plus.png
deleted file mode 100644
index 0cfe084cfc8..00000000000
Binary files a/docs/_build/html/_static/plus.png and /dev/null differ
diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/html/_static/pygments.css
deleted file mode 100644
index 8213e90bed3..00000000000
--- a/docs/_build/html/_static/pygments.css
+++ /dev/null
@@ -1,65 +0,0 @@
-.highlight .hll { background-color: #ffffcc }
-.highlight { background: #eeffcc; }
-.highlight .c { color: #408090; font-style: italic } /* Comment */
-.highlight .err { border: 1px solid #FF0000 } /* Error */
-.highlight .k { color: #007020; font-weight: bold } /* Keyword */
-.highlight .o { color: #666666 } /* Operator */
-.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
-.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #007020 } /* Comment.Preproc */
-.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
-.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
-.highlight .gd { color: #A00000 } /* Generic.Deleted */
-.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #FF0000 } /* Generic.Error */
-.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #333333 } /* Generic.Output */
-.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
-.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0044DD } /* Generic.Traceback */
-.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
-.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { color: #007020 } /* Keyword.Pseudo */
-.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #902000 } /* Keyword.Type */
-.highlight .m { color: #208050 } /* Literal.Number */
-.highlight .s { color: #4070a0 } /* Literal.String */
-.highlight .na { color: #4070a0 } /* Name.Attribute */
-.highlight .nb { color: #007020 } /* Name.Builtin */
-.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
-.highlight .no { color: #60add5 } /* Name.Constant */
-.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
-.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
-.highlight .ne { color: #007020 } /* Name.Exception */
-.highlight .nf { color: #06287e } /* Name.Function */
-.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
-.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
-.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
-.highlight .nv { color: #bb60d5 } /* Name.Variable */
-.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mb { color: #208050 } /* Literal.Number.Bin */
-.highlight .mf { color: #208050 } /* Literal.Number.Float */
-.highlight .mh { color: #208050 } /* Literal.Number.Hex */
-.highlight .mi { color: #208050 } /* Literal.Number.Integer */
-.highlight .mo { color: #208050 } /* Literal.Number.Oct */
-.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
-.highlight .sc { color: #4070a0 } /* Literal.String.Char */
-.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
-.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
-.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
-.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
-.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
-.highlight .sx { color: #c65d09 } /* Literal.String.Other */
-.highlight .sr { color: #235388 } /* Literal.String.Regex */
-.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
-.highlight .ss { color: #517918 } /* Literal.String.Symbol */
-.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
-.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
-.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
-.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js
deleted file mode 100644
index a51e0dc5b6a..00000000000
--- a/docs/_build/html/_static/searchtools.js
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * searchtools.js_t
- * ~~~~~~~~~~~~~~~~
- *
- * Sphinx JavaScript utilities for the full-text search.
- *
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-
-/* Non-minified version JS is _stemmer.js if file is provided */
-/**
- * Porter Stemmer
- */
-var Stemmer = function() {
-
- var step2list = {
- ational: 'ate',
- tional: 'tion',
- enci: 'ence',
- anci: 'ance',
- izer: 'ize',
- bli: 'ble',
- alli: 'al',
- entli: 'ent',
- eli: 'e',
- ousli: 'ous',
- ization: 'ize',
- ation: 'ate',
- ator: 'ate',
- alism: 'al',
- iveness: 'ive',
- fulness: 'ful',
- ousness: 'ous',
- aliti: 'al',
- iviti: 'ive',
- biliti: 'ble',
- logi: 'log'
- };
-
- var step3list = {
- icate: 'ic',
- ative: '',
- alize: 'al',
- iciti: 'ic',
- ical: 'ic',
- ful: '',
- ness: ''
- };
-
- var c = "[^aeiou]"; // consonant
- var v = "[aeiouy]"; // vowel
- var C = c + "[^aeiouy]*"; // consonant sequence
- var V = v + "[aeiou]*"; // vowel sequence
-
- var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
- var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
- var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
- var s_v = "^(" + C + ")?" + v; // vowel in stem
-
- this.stemWord = function (w) {
- var stem;
- var suffix;
- var firstch;
- var origword = w;
-
- if (w.length < 3)
- return w;
-
- var re;
- var re2;
- var re3;
- var re4;
-
- firstch = w.substr(0,1);
- if (firstch == "y")
- w = firstch.toUpperCase() + w.substr(1);
-
- // Step 1a
- re = /^(.+?)(ss|i)es$/;
- re2 = /^(.+?)([^s])s$/;
-
- if (re.test(w))
- w = w.replace(re,"$1$2");
- else if (re2.test(w))
- w = w.replace(re2,"$1$2");
-
- // Step 1b
- re = /^(.+?)eed$/;
- re2 = /^(.+?)(ed|ing)$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- re = new RegExp(mgr0);
- if (re.test(fp[1])) {
- re = /.$/;
- w = w.replace(re,"");
- }
- }
- else if (re2.test(w)) {
- var fp = re2.exec(w);
- stem = fp[1];
- re2 = new RegExp(s_v);
- if (re2.test(stem)) {
- w = stem;
- re2 = /(at|bl|iz)$/;
- re3 = new RegExp("([^aeiouylsz])\\1$");
- re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
- if (re2.test(w))
- w = w + "e";
- else if (re3.test(w)) {
- re = /.$/;
- w = w.replace(re,"");
- }
- else if (re4.test(w))
- w = w + "e";
- }
- }
-
- // Step 1c
- re = /^(.+?)y$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- stem = fp[1];
- re = new RegExp(s_v);
- if (re.test(stem))
- w = stem + "i";
- }
-
- // Step 2
- re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- stem = fp[1];
- suffix = fp[2];
- re = new RegExp(mgr0);
- if (re.test(stem))
- w = stem + step2list[suffix];
- }
-
- // Step 3
- re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- stem = fp[1];
- suffix = fp[2];
- re = new RegExp(mgr0);
- if (re.test(stem))
- w = stem + step3list[suffix];
- }
-
- // Step 4
- re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
- re2 = /^(.+?)(s|t)(ion)$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- stem = fp[1];
- re = new RegExp(mgr1);
- if (re.test(stem))
- w = stem;
- }
- else if (re2.test(w)) {
- var fp = re2.exec(w);
- stem = fp[1] + fp[2];
- re2 = new RegExp(mgr1);
- if (re2.test(stem))
- w = stem;
- }
-
- // Step 5
- re = /^(.+?)e$/;
- if (re.test(w)) {
- var fp = re.exec(w);
- stem = fp[1];
- re = new RegExp(mgr1);
- re2 = new RegExp(meq1);
- re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
- if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
- w = stem;
- }
- re = /ll$/;
- re2 = new RegExp(mgr1);
- if (re.test(w) && re2.test(w)) {
- re = /.$/;
- w = w.replace(re,"");
- }
-
- // and turn initial Y back to y
- if (firstch == "y")
- w = firstch.toLowerCase() + w.substr(1);
- return w;
- }
-}
-
-
-
-/**
- * Simple result scoring code.
- */
-var Scorer = {
- // Implement the following function to further tweak the score for each result
- // The function takes a result array [filename, title, anchor, descr, score]
- // and returns the new score.
- /*
- score: function(result) {
- return result[4];
- },
- */
-
- // query matches the full name of an object
- objNameMatch: 11,
- // or matches in the last dotted part of the object name
- objPartialMatch: 6,
- // Additive scores depending on the priority of the object
- objPrio: {0: 15, // used to be importantResults
- 1: 5, // used to be objectResults
- 2: -5}, // used to be unimportantResults
- // Used when the priority is not in the mapping.
- objPrioDefault: 0,
-
- // query found in title
- title: 15,
- // query found in terms
- term: 5
-};
-
-
-/**
- * Search Module
- */
-var Search = {
-
- _index : null,
- _queued_query : null,
- _pulse_status : -1,
-
- init : function() {
- var params = $.getQueryParameters();
- if (params.q) {
- var query = params.q[0];
- $('input[name="q"]')[0].value = query;
- this.performSearch(query);
- }
- },
-
- loadIndex : function(url) {
- $.ajax({type: "GET", url: url, data: null,
- dataType: "script", cache: true,
- complete: function(jqxhr, textstatus) {
- if (textstatus != "success") {
- document.getElementById("searchindexloader").src = url;
- }
- }});
- },
-
- setIndex : function(index) {
- var q;
- this._index = index;
- if ((q = this._queued_query) !== null) {
- this._queued_query = null;
- Search.query(q);
- }
- },
-
- hasIndex : function() {
- return this._index !== null;
- },
-
- deferQuery : function(query) {
- this._queued_query = query;
- },
-
- stopPulse : function() {
- this._pulse_status = 0;
- },
-
- startPulse : function() {
- if (this._pulse_status >= 0)
- return;
- function pulse() {
- var i;
- Search._pulse_status = (Search._pulse_status + 1) % 4;
- var dotString = '';
- for (i = 0; i < Search._pulse_status; i++)
- dotString += '.';
- Search.dots.text(dotString);
- if (Search._pulse_status > -1)
- window.setTimeout(pulse, 500);
- }
- pulse();
- },
-
- /**
- * perform a search for something (or wait until index is loaded)
- */
- performSearch : function(query) {
- // create the required interface elements
- this.out = $('#search-results');
- this.title = $('
' + _('Searching') + '
').appendTo(this.out);
- this.dots = $('
').appendTo(this.title);
- this.status = $('
').appendTo(this.out);
- this.output = $('
').appendTo(this.out);
-
- $('#search-progress').text(_('Preparing search...'));
- this.startPulse();
-
- // index already loaded, the browser was quick!
- if (this.hasIndex())
- this.query(query);
- else
- this.deferQuery(query);
- },
-
- /**
- * execute search (requires search index to be loaded)
- */
- query : function(query) {
- var i;
- var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
-
- // stem the searchterms and add them to the correct list
- var stemmer = new Stemmer();
- var searchterms = [];
- var excluded = [];
- var hlterms = [];
- var tmp = query.split(/\W+/);
- var objectterms = [];
- for (i = 0; i < tmp.length; i++) {
- if (tmp[i] !== "") {
- objectterms.push(tmp[i].toLowerCase());
- }
-
- if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
- tmp[i] === "") {
- // skip this "word"
- continue;
- }
- // stem the word
- var word = stemmer.stemWord(tmp[i].toLowerCase());
- var toAppend;
- // select the correct list
- if (word[0] == '-') {
- toAppend = excluded;
- word = word.substr(1);
- }
- else {
- toAppend = searchterms;
- hlterms.push(tmp[i].toLowerCase());
- }
- // only add if not already in the list
- if (!$u.contains(toAppend, word))
- toAppend.push(word);
- }
- var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
-
- // console.debug('SEARCH: searching for:');
- // console.info('required: ', searchterms);
- // console.info('excluded: ', excluded);
-
- // prepare search
- var terms = this._index.terms;
- var titleterms = this._index.titleterms;
-
- // array of [filename, title, anchor, descr, score]
- var results = [];
- $('#search-progress').empty();
-
- // lookup as object
- for (i = 0; i < objectterms.length; i++) {
- var others = [].concat(objectterms.slice(0, i),
- objectterms.slice(i+1, objectterms.length));
- results = results.concat(this.performObjectSearch(objectterms[i], others));
- }
-
- // lookup as search terms in fulltext
- results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
-
- // let the scorer override scores with a custom scoring function
- if (Scorer.score) {
- for (i = 0; i < results.length; i++)
- results[i][4] = Scorer.score(results[i]);
- }
-
- // now sort the results by score (in opposite order of appearance, since the
- // display function below uses pop() to retrieve items) and then
- // alphabetically
- results.sort(function(a, b) {
- var left = a[4];
- var right = b[4];
- if (left > right) {
- return 1;
- } else if (left < right) {
- return -1;
- } else {
- // same score: sort alphabetically
- left = a[1].toLowerCase();
- right = b[1].toLowerCase();
- return (left > right) ? -1 : ((left < right) ? 1 : 0);
- }
- });
-
- // for debugging
- //Search.lastresults = results.slice(); // a copy
- //console.info('search results:', Search.lastresults);
-
- // print the results
- var resultCount = results.length;
- function displayNextItem() {
- // results left, load the summary and display it
- if (results.length) {
- var item = results.pop();
- var listItem = $('
');
- if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
- // dirhtml builder
- var dirname = item[0] + '/';
- if (dirname.match(/\/index\/$/)) {
- dirname = dirname.substring(0, dirname.length-6);
- } else if (dirname == 'index/') {
- dirname = '';
- }
- listItem.append($('
').attr('href',
- DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
- highlightstring + item[2]).html(item[1]));
- } else {
- // normal html builders
- listItem.append($('
').attr('href',
- item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
- highlightstring + item[2]).html(item[1]));
- }
- if (item[3]) {
- listItem.append($('
(' + item[3] + ')'));
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
- $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
- dataType: "text",
- complete: function(jqxhr, textstatus) {
- var data = jqxhr.responseText;
- if (data !== '' && data !== undefined) {
- listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
- }
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- }});
- } else {
- // no source available, just display title
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- }
- }
- // search finished, update title and status message
- else {
- Search.stopPulse();
- Search.title.text(_('Search Results'));
- if (!resultCount)
- Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
- else
- Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
- Search.status.fadeIn(500);
- }
- }
- displayNextItem();
- },
-
- /**
- * search for object names
- */
- performObjectSearch : function(object, otherterms) {
- var filenames = this._index.filenames;
- var objects = this._index.objects;
- var objnames = this._index.objnames;
- var titles = this._index.titles;
-
- var i;
- var results = [];
-
- for (var prefix in objects) {
- for (var name in objects[prefix]) {
- var fullname = (prefix ? prefix + '.' : '') + name;
- if (fullname.toLowerCase().indexOf(object) > -1) {
- var score = 0;
- var parts = fullname.split('.');
- // check for different match types: exact matches of full name or
- // "last name" (i.e. last dotted part)
- if (fullname == object || parts[parts.length - 1] == object) {
- score += Scorer.objNameMatch;
- // matches in last name
- } else if (parts[parts.length - 1].indexOf(object) > -1) {
- score += Scorer.objPartialMatch;
- }
- var match = objects[prefix][name];
- var objname = objnames[match[1]][2];
- var title = titles[match[0]];
- // If more than one term searched for, we require other words to be
- // found in the name/title/description
- if (otherterms.length > 0) {
- var haystack = (prefix + ' ' + name + ' ' +
- objname + ' ' + title).toLowerCase();
- var allfound = true;
- for (i = 0; i < otherterms.length; i++) {
- if (haystack.indexOf(otherterms[i]) == -1) {
- allfound = false;
- break;
- }
- }
- if (!allfound) {
- continue;
- }
- }
- var descr = objname + _(', in ') + title;
-
- var anchor = match[3];
- if (anchor === '')
- anchor = fullname;
- else if (anchor == '-')
- anchor = objnames[match[1]][1] + '-' + fullname;
- // add custom score for some objects according to scorer
- if (Scorer.objPrio.hasOwnProperty(match[2])) {
- score += Scorer.objPrio[match[2]];
- } else {
- score += Scorer.objPrioDefault;
- }
- results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
- }
- }
- }
-
- return results;
- },
-
- /**
- * search for full-text terms in the index
- */
- performTermsSearch : function(searchterms, excluded, terms, titleterms) {
- var filenames = this._index.filenames;
- var titles = this._index.titles;
-
- var i, j, file;
- var fileMap = {};
- var scoreMap = {};
- var results = [];
-
- // perform the search on the required terms
- for (i = 0; i < searchterms.length; i++) {
- var word = searchterms[i];
- var files = [];
- var _o = [
- {files: terms[word], score: Scorer.term},
- {files: titleterms[word], score: Scorer.title}
- ];
-
- // no match but word was a required one
- if ($u.every(_o, function(o){return o.files === undefined;})) {
- break;
- }
- // found search word in contents
- $u.each(_o, function(o) {
- var _files = o.files;
- if (_files === undefined)
- return
-
- if (_files.length === undefined)
- _files = [_files];
- files = files.concat(_files);
-
- // set score for the word in each file to Scorer.term
- for (j = 0; j < _files.length; j++) {
- file = _files[j];
- if (!(file in scoreMap))
- scoreMap[file] = {}
- scoreMap[file][word] = o.score;
- }
- });
-
- // create the mapping
- for (j = 0; j < files.length; j++) {
- file = files[j];
- if (file in fileMap)
- fileMap[file].push(word);
- else
- fileMap[file] = [word];
- }
- }
-
- // now check if the files don't contain excluded terms
- for (file in fileMap) {
- var valid = true;
-
- // check if all requirements are matched
- if (fileMap[file].length != searchterms.length)
- continue;
-
- // ensure that none of the excluded terms is in the search result
- for (i = 0; i < excluded.length; i++) {
- if (terms[excluded[i]] == file ||
- titleterms[excluded[i]] == file ||
- $u.contains(terms[excluded[i]] || [], file) ||
- $u.contains(titleterms[excluded[i]] || [], file)) {
- valid = false;
- break;
- }
- }
-
- // if we have still a valid result we can add it to the result list
- if (valid) {
- // select one (max) score for the file.
- // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
- var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
- results.push([filenames[file], titles[file], '', null, score]);
- }
- }
- return results;
- },
-
- /**
- * helper function to return a node containing the
- * search summary for a given text. keywords is a list
- * of stemmed words, hlwords is the list of normal, unstemmed
- * words. the first one is used to find the occurrence, the
- * latter for highlighting it.
- */
- makeSearchSummary : function(text, keywords, hlwords) {
- var textLower = text.toLowerCase();
- var start = 0;
- $.each(keywords, function() {
- var i = textLower.indexOf(this.toLowerCase());
- if (i > -1)
- start = i;
- });
- start = Math.max(start - 120, 0);
- var excerpt = ((start > 0) ? '...' : '') +
- $.trim(text.substr(start, 240)) +
- ((start + 240 - text.length) ? '...' : '');
- var rv = $('
').text(excerpt);
- $.each(hlwords, function() {
- rv = rv.highlightText(this, 'highlighted');
- });
- return rv;
- }
-};
-
-$(document).ready(function() {
- Search.init();
-});
\ No newline at end of file
diff --git a/docs/_build/html/_static/sidebar.js b/docs/_build/html/_static/sidebar.js
deleted file mode 100644
index 4282fe91c1c..00000000000
--- a/docs/_build/html/_static/sidebar.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * sidebar.js
- * ~~~~~~~~~~
- *
- * This script makes the Sphinx sidebar collapsible.
- *
- * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
- * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
- * used to collapse and expand the sidebar.
- *
- * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
- * and the width of the sidebar and the margin-left of the document
- * are decreased. When the sidebar is expanded the opposite happens.
- * This script saves a per-browser/per-session cookie used to
- * remember the position of the sidebar among the pages.
- * Once the browser is closed the cookie is deleted and the position
- * reset to the default (expanded).
- *
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-$(function() {
-
-
-
-
-
-
-
-
- // global elements used by the functions.
- // the 'sidebarbutton' element is defined as global after its
- // creation, in the add_sidebar_button function
- var bodywrapper = $('.bodywrapper');
- var sidebar = $('.sphinxsidebar');
- var sidebarwrapper = $('.sphinxsidebarwrapper');
-
- // for some reason, the document has no sidebar; do not run into errors
- if (!sidebar.length) return;
-
- // original margin-left of the bodywrapper and width of the sidebar
- // with the sidebar expanded
- var bw_margin_expanded = bodywrapper.css('margin-left');
- var ssb_width_expanded = sidebar.width();
-
- // margin-left of the bodywrapper and width of the sidebar
- // with the sidebar collapsed
- var bw_margin_collapsed = '.8em';
- var ssb_width_collapsed = '.8em';
-
- // colors used by the current theme
- var dark_color = $('.related').css('background-color');
- var light_color = $('.document').css('background-color');
-
- function sidebar_is_collapsed() {
- return sidebarwrapper.is(':not(:visible)');
- }
-
- function toggle_sidebar() {
- if (sidebar_is_collapsed())
- expand_sidebar();
- else
- collapse_sidebar();
- }
-
- function collapse_sidebar() {
- sidebarwrapper.hide();
- sidebar.css('width', ssb_width_collapsed);
- bodywrapper.css('margin-left', bw_margin_collapsed);
- sidebarbutton.css({
- 'margin-left': '0',
- 'height': bodywrapper.height()
- });
- sidebarbutton.find('span').text('»');
- sidebarbutton.attr('title', _('Expand sidebar'));
- document.cookie = 'sidebar=collapsed';
- }
-
- function expand_sidebar() {
- bodywrapper.css('margin-left', bw_margin_expanded);
- sidebar.css('width', ssb_width_expanded);
- sidebarwrapper.show();
- sidebarbutton.css({
- 'margin-left': ssb_width_expanded-12,
- 'height': bodywrapper.height()
- });
- sidebarbutton.find('span').text('«');
- sidebarbutton.attr('title', _('Collapse sidebar'));
- document.cookie = 'sidebar=expanded';
- }
-
- function add_sidebar_button() {
- sidebarwrapper.css({
- 'float': 'left',
- 'margin-right': '0',
- 'width': ssb_width_expanded - 28
- });
- // create the button
- sidebar.append(
- ''
- );
- var sidebarbutton = $('#sidebarbutton');
- light_color = sidebarbutton.css('background-color');
- // find the height of the viewport to center the '<<' in the page
- var viewport_height;
- if (window.innerHeight)
- viewport_height = window.innerHeight;
- else
- viewport_height = $(window).height();
- sidebarbutton.find('span').css({
- 'display': 'block',
- 'margin-top': (viewport_height - sidebar.position().top - 20) / 2
- });
-
- sidebarbutton.click(toggle_sidebar);
- sidebarbutton.attr('title', _('Collapse sidebar'));
- sidebarbutton.css({
- 'color': '#FFFFFF',
- 'border-left': '1px solid ' + dark_color,
- 'font-size': '1.2em',
- 'cursor': 'pointer',
- 'height': bodywrapper.height(),
- 'padding-top': '1px',
- 'margin-left': ssb_width_expanded - 12
- });
-
- sidebarbutton.hover(
- function () {
- $(this).css('background-color', dark_color);
- },
- function () {
- $(this).css('background-color', light_color);
- }
- );
- }
-
- function set_position_from_cookie() {
- if (!document.cookie)
- return;
- var items = document.cookie.split(';');
- for(var k=0; k
2;
- if (obj == null) obj = [];
- if (nativeReduce && obj.reduce === nativeReduce) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
- }
- each(obj, function(value, index, list) {
- if (!initial) {
- memo = value;
- initial = true;
- } else {
- memo = iterator.call(context, memo, value, index, list);
- }
- });
- if (!initial) throw new TypeError('Reduce of empty array with no initial value');
- return memo;
- };
-
- // The right-associative version of reduce, also known as `foldr`.
- // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
- var initial = arguments.length > 2;
- if (obj == null) obj = [];
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
- if (context) iterator = _.bind(iterator, context);
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
- }
- var reversed = _.toArray(obj).reverse();
- if (context && !initial) iterator = _.bind(iterator, context);
- return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
- };
-
- // Return the first value which passes a truth test. Aliased as `detect`.
- _.find = _.detect = function(obj, iterator, context) {
- var result;
- any(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) {
- result = value;
- return true;
- }
- });
- return result;
- };
-
- // Return all the elements that pass a truth test.
- // Delegates to **ECMAScript 5**'s native `filter` if available.
- // Aliased as `select`.
- _.filter = _.select = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
- each(obj, function(value, index, list) {
- if (iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
-
- // Return all the elements for which a truth test fails.
- _.reject = function(obj, iterator, context) {
- var results = [];
- if (obj == null) return results;
- each(obj, function(value, index, list) {
- if (!iterator.call(context, value, index, list)) results[results.length] = value;
- });
- return results;
- };
-
- // Determine whether all of the elements match a truth test.
- // Delegates to **ECMAScript 5**'s native `every` if available.
- // Aliased as `all`.
- _.every = _.all = function(obj, iterator, context) {
- var result = true;
- if (obj == null) return result;
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
- each(obj, function(value, index, list) {
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
- });
- return result;
- };
-
- // Determine if at least one element in the object matches a truth test.
- // Delegates to **ECMAScript 5**'s native `some` if available.
- // Aliased as `any`.
- var any = _.some = _.any = function(obj, iterator, context) {
- iterator || (iterator = _.identity);
- var result = false;
- if (obj == null) return result;
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
- each(obj, function(value, index, list) {
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
- });
- return !!result;
- };
-
- // Determine if a given value is included in the array or object using `===`.
- // Aliased as `contains`.
- _.include = _.contains = function(obj, target) {
- var found = false;
- if (obj == null) return found;
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
- found = any(obj, function(value) {
- return value === target;
- });
- return found;
- };
-
- // Invoke a method (with arguments) on every item in a collection.
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- return _.map(obj, function(value) {
- return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
- });
- };
-
- // Convenience version of a common use case of `map`: fetching a property.
- _.pluck = function(obj, key) {
- return _.map(obj, function(value){ return value[key]; });
- };
-
- // Return the maximum element or (element-based computation).
- _.max = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
- if (!iterator && _.isEmpty(obj)) return -Infinity;
- var result = {computed : -Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed >= result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Return the minimum element (or element-based computation).
- _.min = function(obj, iterator, context) {
- if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
- if (!iterator && _.isEmpty(obj)) return Infinity;
- var result = {computed : Infinity};
- each(obj, function(value, index, list) {
- var computed = iterator ? iterator.call(context, value, index, list) : value;
- computed < result.computed && (result = {value : value, computed : computed});
- });
- return result.value;
- };
-
- // Shuffle an array.
- _.shuffle = function(obj) {
- var shuffled = [], rand;
- each(obj, function(value, index, list) {
- if (index == 0) {
- shuffled[0] = value;
- } else {
- rand = Math.floor(Math.random() * (index + 1));
- shuffled[index] = shuffled[rand];
- shuffled[rand] = value;
- }
- });
- return shuffled;
- };
-
- // Sort the object's values by a criterion produced by an iterator.
- _.sortBy = function(obj, iterator, context) {
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value : value,
- criteria : iterator.call(context, value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }), 'value');
- };
-
- // Groups the object's values by a criterion. Pass either a string attribute
- // to group by, or a function that returns the criterion.
- _.groupBy = function(obj, val) {
- var result = {};
- var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
- each(obj, function(value, index) {
- var key = iterator(value, index);
- (result[key] || (result[key] = [])).push(value);
- });
- return result;
- };
-
- // Use a comparator function to figure out at what index an object should
- // be inserted so as to maintain order. Uses binary search.
- _.sortedIndex = function(array, obj, iterator) {
- iterator || (iterator = _.identity);
- var low = 0, high = array.length;
- while (low < high) {
- var mid = (low + high) >> 1;
- iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
- }
- return low;
- };
-
- // Safely convert anything iterable into a real, live array.
- _.toArray = function(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) return iterable.toArray();
- if (_.isArray(iterable)) return slice.call(iterable);
- if (_.isArguments(iterable)) return slice.call(iterable);
- return _.values(iterable);
- };
-
- // Return the number of elements in an object.
- _.size = function(obj) {
- return _.toArray(obj).length;
- };
-
- // Array Functions
- // ---------------
-
- // Get the first element of an array. Passing **n** will return the first N
- // values in the array. Aliased as `head`. The **guard** check allows it to work
- // with `_.map`.
- _.first = _.head = function(array, n, guard) {
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
- };
-
- // Returns everything but the last entry of the array. Especcialy useful on
- // the arguments object. Passing **n** will return all the values in
- // the array, excluding the last N. The **guard** check allows it to work with
- // `_.map`.
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
- };
-
- // Get the last element of an array. Passing **n** will return the last N
- // values in the array. The **guard** check allows it to work with `_.map`.
- _.last = function(array, n, guard) {
- if ((n != null) && !guard) {
- return slice.call(array, Math.max(array.length - n, 0));
- } else {
- return array[array.length - 1];
- }
- };
-
- // Returns everything but the first entry of the array. Aliased as `tail`.
- // Especially useful on the arguments object. Passing an **index** will return
- // the rest of the values in the array from that index onward. The **guard**
- // check allows it to work with `_.map`.
- _.rest = _.tail = function(array, index, guard) {
- return slice.call(array, (index == null) || guard ? 1 : index);
- };
-
- // Trim out all falsy values from an array.
- _.compact = function(array) {
- return _.filter(array, function(value){ return !!value; });
- };
-
- // Return a completely flattened version of an array.
- _.flatten = function(array, shallow) {
- return _.reduce(array, function(memo, value) {
- if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
- memo[memo.length] = value;
- return memo;
- }, []);
- };
-
- // Return a version of the array that does not contain the specified value(s).
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
-
- // Produce a duplicate-free version of the array. If the array has already
- // been sorted, you have the option of using a faster algorithm.
- // Aliased as `unique`.
- _.uniq = _.unique = function(array, isSorted, iterator) {
- var initial = iterator ? _.map(array, iterator) : array;
- var result = [];
- _.reduce(initial, function(memo, el, i) {
- if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
- memo[memo.length] = el;
- result[result.length] = array[i];
- }
- return memo;
- }, []);
- return result;
- };
-
- // Produce an array that contains the union: each distinct element from all of
- // the passed-in arrays.
- _.union = function() {
- return _.uniq(_.flatten(arguments, true));
- };
-
- // Produce an array that contains every item shared between all the
- // passed-in arrays. (Aliased as "intersect" for back-compat.)
- _.intersection = _.intersect = function(array) {
- var rest = slice.call(arguments, 1);
- return _.filter(_.uniq(array), function(item) {
- return _.every(rest, function(other) {
- return _.indexOf(other, item) >= 0;
- });
- });
- };
-
- // Take the difference between one array and a number of other arrays.
- // Only the elements present in just the first array will remain.
- _.difference = function(array) {
- var rest = _.flatten(slice.call(arguments, 1));
- return _.filter(array, function(value){ return !_.include(rest, value); });
- };
-
- // Zip together multiple lists into a single array -- elements that share
- // an index go together.
- _.zip = function() {
- var args = slice.call(arguments);
- var length = _.max(_.pluck(args, 'length'));
- var results = new Array(length);
- for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
- return results;
- };
-
- // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
- // we need this function. Return the position of the first occurrence of an
- // item in an array, or -1 if the item is not included in the array.
- // Delegates to **ECMAScript 5**'s native `indexOf` if available.
- // If the array is large and already in sort order, pass `true`
- // for **isSorted** to use binary search.
- _.indexOf = function(array, item, isSorted) {
- if (array == null) return -1;
- var i, l;
- if (isSorted) {
- i = _.sortedIndex(array, item);
- return array[i] === item ? i : -1;
- }
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
- for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
- return -1;
- };
-
- // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
- _.lastIndexOf = function(array, item) {
- if (array == null) return -1;
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
- var i = array.length;
- while (i--) if (i in array && array[i] === item) return i;
- return -1;
- };
-
- // Generate an integer Array containing an arithmetic progression. A port of
- // the native Python `range()` function. See
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
- _.range = function(start, stop, step) {
- if (arguments.length <= 1) {
- stop = start || 0;
- start = 0;
- }
- step = arguments[2] || 1;
-
- var len = Math.max(Math.ceil((stop - start) / step), 0);
- var idx = 0;
- var range = new Array(len);
-
- while(idx < len) {
- range[idx++] = start;
- start += step;
- }
-
- return range;
- };
-
- // Function (ahem) Functions
- // ------------------
-
- // Reusable constructor function for prototype setting.
- var ctor = function(){};
-
- // Create a function bound to a given object (assigning `this`, and arguments,
- // optionally). Binding with arguments is also known as `curry`.
- // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
- // We check for `func.bind` first, to fail fast when `func` is undefined.
- _.bind = function bind(func, context) {
- var bound, args;
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
- if (!_.isFunction(func)) throw new TypeError;
- args = slice.call(arguments, 2);
- return bound = function() {
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
- ctor.prototype = func.prototype;
- var self = new ctor;
- var result = func.apply(self, args.concat(slice.call(arguments)));
- if (Object(result) === result) return result;
- return self;
- };
- };
-
- // Bind all of an object's methods to that object. Useful for ensuring that
- // all callbacks defined on an object belong to it.
- _.bindAll = function(obj) {
- var funcs = slice.call(arguments, 1);
- if (funcs.length == 0) funcs = _.functions(obj);
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
- return obj;
- };
-
- // Memoize an expensive function by storing its results.
- _.memoize = function(func, hasher) {
- var memo = {};
- hasher || (hasher = _.identity);
- return function() {
- var key = hasher.apply(this, arguments);
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
- };
- };
-
- // Delays a function for the given number of milliseconds, and then calls
- // it with the arguments supplied.
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function(){ return func.apply(func, args); }, wait);
- };
-
- // Defers a function, scheduling it to run after the current call stack has
- // cleared.
- _.defer = function(func) {
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
- };
-
- // Returns a function, that, when invoked, will only be triggered at most once
- // during a given window of time.
- _.throttle = function(func, wait) {
- var context, args, timeout, throttling, more;
- var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
- return function() {
- context = this; args = arguments;
- var later = function() {
- timeout = null;
- if (more) func.apply(context, args);
- whenDone();
- };
- if (!timeout) timeout = setTimeout(later, wait);
- if (throttling) {
- more = true;
- } else {
- func.apply(context, args);
- }
- whenDone();
- throttling = true;
- };
- };
-
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds.
- _.debounce = function(func, wait) {
- var timeout;
- return function() {
- var context = this, args = arguments;
- var later = function() {
- timeout = null;
- func.apply(context, args);
- };
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- };
- };
-
- // Returns a function that will be executed at most one time, no matter how
- // often you call it. Useful for lazy initialization.
- _.once = function(func) {
- var ran = false, memo;
- return function() {
- if (ran) return memo;
- ran = true;
- return memo = func.apply(this, arguments);
- };
- };
-
- // Returns the first function passed as an argument to the second,
- // allowing you to adjust arguments, run code before and after, and
- // conditionally execute the original function.
- _.wrap = function(func, wrapper) {
- return function() {
- var args = [func].concat(slice.call(arguments, 0));
- return wrapper.apply(this, args);
- };
- };
-
- // Returns a function that is the composition of a list of functions, each
- // consuming the return value of the function that follows.
- _.compose = function() {
- var funcs = arguments;
- return function() {
- var args = arguments;
- for (var i = funcs.length - 1; i >= 0; i--) {
- args = [funcs[i].apply(this, args)];
- }
- return args[0];
- };
- };
-
- // Returns a function that will only be executed after being called N times.
- _.after = function(times, func) {
- if (times <= 0) return func();
- return function() {
- if (--times < 1) { return func.apply(this, arguments); }
- };
- };
-
- // Object Functions
- // ----------------
-
- // Retrieve the names of an object's properties.
- // Delegates to **ECMAScript 5**'s native `Object.keys`
- _.keys = nativeKeys || function(obj) {
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
- var keys = [];
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
- return keys;
- };
-
- // Retrieve the values of an object's properties.
- _.values = function(obj) {
- return _.map(obj, _.identity);
- };
-
- // Return a sorted list of the function names available on the object.
- // Aliased as `methods`
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- };
-
- // Extend a given object with all the properties in passed-in object(s).
- _.extend = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- for (var prop in source) {
- obj[prop] = source[prop];
- }
- });
- return obj;
- };
-
- // Fill in a given object with default properties.
- _.defaults = function(obj) {
- each(slice.call(arguments, 1), function(source) {
- for (var prop in source) {
- if (obj[prop] == null) obj[prop] = source[prop];
- }
- });
- return obj;
- };
-
- // Create a (shallow-cloned) duplicate of an object.
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
-
- // Invokes interceptor with the obj, and then returns obj.
- // The primary purpose of this method is to "tap into" a method chain, in
- // order to perform operations on intermediate results within the chain.
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
-
- // Internal recursive comparison function.
- function eq(a, b, stack) {
- // Identical objects are equal. `0 === -0`, but they aren't identical.
- // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
- if (a === b) return a !== 0 || 1 / a == 1 / b;
- // A strict comparison is necessary because `null == undefined`.
- if (a == null || b == null) return a === b;
- // Unwrap any wrapped objects.
- if (a._chain) a = a._wrapped;
- if (b._chain) b = b._wrapped;
- // Invoke a custom `isEqual` method if one is provided.
- if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
- if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className != toString.call(b)) return false;
- switch (className) {
- // Strings, numbers, dates, and booleans are compared by value.
- case '[object String]':
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
- // equivalent to `new String("5")`.
- return a == String(b);
- case '[object Number]':
- // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
- // other numeric values.
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
- case '[object Date]':
- case '[object Boolean]':
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
- // millisecond representations. Note that invalid dates with millisecond representations
- // of `NaN` are not equivalent.
- return +a == +b;
- // RegExps are compared by their source patterns and flags.
- case '[object RegExp]':
- return a.source == b.source &&
- a.global == b.global &&
- a.multiline == b.multiline &&
- a.ignoreCase == b.ignoreCase;
- }
- if (typeof a != 'object' || typeof b != 'object') return false;
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
- var length = stack.length;
- while (length--) {
- // Linear search. Performance is inversely proportional to the number of
- // unique nested structures.
- if (stack[length] == a) return true;
- }
- // Add the first object to the stack of traversed objects.
- stack.push(a);
- var size = 0, result = true;
- // Recursively compare objects and arrays.
- if (className == '[object Array]') {
- // Compare array lengths to determine if a deep comparison is necessary.
- size = a.length;
- result = size == b.length;
- if (result) {
- // Deep compare the contents, ignoring non-numeric properties.
- while (size--) {
- // Ensure commutative equality for sparse arrays.
- if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
- }
- }
- } else {
- // Objects with different constructors are not equivalent.
- if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
- // Deep compare objects.
- for (var key in a) {
- if (_.has(a, key)) {
- // Count the expected number of properties.
- size++;
- // Deep compare each member.
- if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
- }
- }
- // Ensure that both objects contain the same number of properties.
- if (result) {
- for (key in b) {
- if (_.has(b, key) && !(size--)) break;
- }
- result = !size;
- }
- }
- // Remove the first object from the stack of traversed objects.
- stack.pop();
- return result;
- }
-
- // Perform a deep comparison to check if two objects are equal.
- _.isEqual = function(a, b) {
- return eq(a, b, []);
- };
-
- // Is a given array, string, or object empty?
- // An "empty" object has no enumerable own-properties.
- _.isEmpty = function(obj) {
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
- for (var key in obj) if (_.has(obj, key)) return false;
- return true;
- };
-
- // Is a given value a DOM element?
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType == 1);
- };
-
- // Is a given value an array?
- // Delegates to ECMA5's native Array.isArray
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) == '[object Array]';
- };
-
- // Is a given variable an object?
- _.isObject = function(obj) {
- return obj === Object(obj);
- };
-
- // Is a given variable an arguments object?
- _.isArguments = function(obj) {
- return toString.call(obj) == '[object Arguments]';
- };
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return !!(obj && _.has(obj, 'callee'));
- };
- }
-
- // Is a given value a function?
- _.isFunction = function(obj) {
- return toString.call(obj) == '[object Function]';
- };
-
- // Is a given value a string?
- _.isString = function(obj) {
- return toString.call(obj) == '[object String]';
- };
-
- // Is a given value a number?
- _.isNumber = function(obj) {
- return toString.call(obj) == '[object Number]';
- };
-
- // Is the given value `NaN`?
- _.isNaN = function(obj) {
- // `NaN` is the only value for which `===` is not reflexive.
- return obj !== obj;
- };
-
- // Is a given value a boolean?
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
- };
-
- // Is a given value a date?
- _.isDate = function(obj) {
- return toString.call(obj) == '[object Date]';
- };
-
- // Is the given value a regular expression?
- _.isRegExp = function(obj) {
- return toString.call(obj) == '[object RegExp]';
- };
-
- // Is a given value equal to null?
- _.isNull = function(obj) {
- return obj === null;
- };
-
- // Is a given variable undefined?
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
-
- // Has own property?
- _.has = function(obj, key) {
- return hasOwnProperty.call(obj, key);
- };
-
- // Utility Functions
- // -----------------
-
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
- // previous owner. Returns a reference to the Underscore object.
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
-
- // Keep the identity function around for default iterators.
- _.identity = function(value) {
- return value;
- };
-
- // Run a function **n** times.
- _.times = function (n, iterator, context) {
- for (var i = 0; i < n; i++) iterator.call(context, i);
- };
-
- // Escape a string for HTML interpolation.
- _.escape = function(string) {
- return (''+string).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
- };
-
- // Add your own custom functions to the Underscore object, ensuring that
- // they're correctly added to the OOP wrapper as well.
- _.mixin = function(obj) {
- each(_.functions(obj), function(name){
- addToWrapper(name, _[name] = obj[name]);
- });
- };
-
- // Generate a unique integer id (unique within the entire client session).
- // Useful for temporary DOM ids.
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = idCounter++;
- return prefix ? prefix + id : id;
- };
-
- // By default, Underscore uses ERB-style template delimiters, change the
- // following template settings to use alternative delimiters.
- _.templateSettings = {
- evaluate : /<%([\s\S]+?)%>/g,
- interpolate : /<%=([\s\S]+?)%>/g,
- escape : /<%-([\s\S]+?)%>/g
- };
-
- // When customizing `templateSettings`, if you don't want to define an
- // interpolation, evaluation or escaping regex, we need one that is
- // guaranteed not to match.
- var noMatch = /.^/;
-
- // Within an interpolation, evaluation, or escaping, remove HTML escaping
- // that had been previously added.
- var unescape = function(code) {
- return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
- };
-
- // JavaScript micro-templating, similar to John Resig's implementation.
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
- // and correctly escapes quotes within interpolated code.
- _.template = function(str, data) {
- var c = _.templateSettings;
- var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
- 'with(obj||{}){__p.push(\'' +
- str.replace(/\\/g, '\\\\')
- .replace(/'/g, "\\'")
- .replace(c.escape || noMatch, function(match, code) {
- return "',_.escape(" + unescape(code) + "),'";
- })
- .replace(c.interpolate || noMatch, function(match, code) {
- return "'," + unescape(code) + ",'";
- })
- .replace(c.evaluate || noMatch, function(match, code) {
- return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
- })
- .replace(/\r/g, '\\r')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- + "');}return __p.join('');";
- var func = new Function('obj', '_', tmpl);
- if (data) return func(data, _);
- return function(data) {
- return func.call(this, data, _);
- };
- };
-
- // Add a "chain" function, which will delegate to the wrapper.
- _.chain = function(obj) {
- return _(obj).chain();
- };
-
- // The OOP Wrapper
- // ---------------
-
- // If Underscore is called as a function, it returns a wrapped object that
- // can be used OO-style. This wrapper holds altered versions of all the
- // underscore functions. Wrapped objects may be chained.
- var wrapper = function(obj) { this._wrapped = obj; };
-
- // Expose `wrapper.prototype` as `_.prototype`
- _.prototype = wrapper.prototype;
-
- // Helper function to continue chaining intermediate results.
- var result = function(obj, chain) {
- return chain ? _(obj).chain() : obj;
- };
-
- // A method to easily add functions to the OOP wrapper.
- var addToWrapper = function(name, func) {
- wrapper.prototype[name] = function() {
- var args = slice.call(arguments);
- unshift.call(args, this._wrapped);
- return result(func.apply(_, args), this._chain);
- };
- };
-
- // Add all of the Underscore functions to the wrapper object.
- _.mixin(_);
-
- // Add all mutator Array functions to the wrapper.
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- wrapper.prototype[name] = function() {
- var wrapped = this._wrapped;
- method.apply(wrapped, arguments);
- var length = wrapped.length;
- if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
- return result(wrapped, this._chain);
- };
- });
-
- // Add all accessor Array functions to the wrapper.
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- wrapper.prototype[name] = function() {
- return result(method.apply(this._wrapped, arguments), this._chain);
- };
- });
-
- // Start chaining a wrapped Underscore object.
- wrapper.prototype.chain = function() {
- this._chain = true;
- return this;
- };
-
- // Extracts the result from a wrapped and chained object.
- wrapper.prototype.value = function() {
- return this._wrapped;
- };
-
-}).call(this);
diff --git a/docs/_build/html/_static/underscore.js b/docs/_build/html/_static/underscore.js
deleted file mode 100644
index 5b55f32beac..00000000000
--- a/docs/_build/html/_static/underscore.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// Underscore.js 1.3.1
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the MIT license.
-// Portions of Underscore are inspired or borrowed from Prototype,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore
-(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
-c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
-h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
-b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==
-null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
-function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
-e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
-function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
-c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};
-b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
-1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
-b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
-b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
-function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
-u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
-function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
-true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
diff --git a/docs/_build/html/_static/up-pressed.png b/docs/_build/html/_static/up-pressed.png
deleted file mode 100644
index 99e7210962b..00000000000
Binary files a/docs/_build/html/_static/up-pressed.png and /dev/null differ
diff --git a/docs/_build/html/_static/up.png b/docs/_build/html/_static/up.png
deleted file mode 100644
index 26de002e85d..00000000000
Binary files a/docs/_build/html/_static/up.png and /dev/null differ
diff --git a/docs/_build/html/_static/websupport.js b/docs/_build/html/_static/websupport.js
deleted file mode 100644
index 98e7f40b632..00000000000
--- a/docs/_build/html/_static/websupport.js
+++ /dev/null
@@ -1,808 +0,0 @@
-/*
- * websupport.js
- * ~~~~~~~~~~~~~
- *
- * sphinx.websupport utilities for all documentation.
- *
- * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-(function($) {
- $.fn.autogrow = function() {
- return this.each(function() {
- var textarea = this;
-
- $.fn.autogrow.resize(textarea);
-
- $(textarea)
- .focus(function() {
- textarea.interval = setInterval(function() {
- $.fn.autogrow.resize(textarea);
- }, 500);
- })
- .blur(function() {
- clearInterval(textarea.interval);
- });
- });
- };
-
- $.fn.autogrow.resize = function(textarea) {
- var lineHeight = parseInt($(textarea).css('line-height'), 10);
- var lines = textarea.value.split('\n');
- var columns = textarea.cols;
- var lineCount = 0;
- $.each(lines, function() {
- lineCount += Math.ceil(this.length / columns) || 1;
- });
- var height = lineHeight * (lineCount + 1);
- $(textarea).css('height', height);
- };
-})(jQuery);
-
-(function($) {
- var comp, by;
-
- function init() {
- initEvents();
- initComparator();
- }
-
- function initEvents() {
- $(document).on("click", 'a.comment-close', function(event) {
- event.preventDefault();
- hide($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.vote', function(event) {
- event.preventDefault();
- handleVote($(this));
- });
- $(document).on("click", 'a.reply', function(event) {
- event.preventDefault();
- openReply($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.close-reply', function(event) {
- event.preventDefault();
- closeReply($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.sort-option', function(event) {
- event.preventDefault();
- handleReSort($(this));
- });
- $(document).on("click", 'a.show-proposal', function(event) {
- event.preventDefault();
- showProposal($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.hide-proposal', function(event) {
- event.preventDefault();
- hideProposal($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.show-propose-change', function(event) {
- event.preventDefault();
- showProposeChange($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.hide-propose-change', function(event) {
- event.preventDefault();
- hideProposeChange($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.accept-comment', function(event) {
- event.preventDefault();
- acceptComment($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.delete-comment', function(event) {
- event.preventDefault();
- deleteComment($(this).attr('id').substring(2));
- });
- $(document).on("click", 'a.comment-markup', function(event) {
- event.preventDefault();
- toggleCommentMarkupBox($(this).attr('id').substring(2));
- });
- }
-
- /**
- * Set comp, which is a comparator function used for sorting and
- * inserting comments into the list.
- */
- function setComparator() {
- // If the first three letters are "asc", sort in ascending order
- // and remove the prefix.
- if (by.substring(0,3) == 'asc') {
- var i = by.substring(3);
- comp = function(a, b) { return a[i] - b[i]; };
- } else {
- // Otherwise sort in descending order.
- comp = function(a, b) { return b[by] - a[by]; };
- }
-
- // Reset link styles and format the selected sort option.
- $('a.sel').attr('href', '#').removeClass('sel');
- $('a.by' + by).removeAttr('href').addClass('sel');
- }
-
- /**
- * Create a comp function. If the user has preferences stored in
- * the sortBy cookie, use those, otherwise use the default.
- */
- function initComparator() {
- by = 'rating'; // Default to sort by rating.
- // If the sortBy cookie is set, use that instead.
- if (document.cookie.length > 0) {
- var start = document.cookie.indexOf('sortBy=');
- if (start != -1) {
- start = start + 7;
- var end = document.cookie.indexOf(";", start);
- if (end == -1) {
- end = document.cookie.length;
- by = unescape(document.cookie.substring(start, end));
- }
- }
- }
- setComparator();
- }
-
- /**
- * Show a comment div.
- */
- function show(id) {
- $('#ao' + id).hide();
- $('#ah' + id).show();
- var context = $.extend({id: id}, opts);
- var popup = $(renderTemplate(popupTemplate, context)).hide();
- popup.find('textarea[name="proposal"]').hide();
- popup.find('a.by' + by).addClass('sel');
- var form = popup.find('#cf' + id);
- form.submit(function(event) {
- event.preventDefault();
- addComment(form);
- });
- $('#s' + id).after(popup);
- popup.slideDown('fast', function() {
- getComments(id);
- });
- }
-
- /**
- * Hide a comment div.
- */
- function hide(id) {
- $('#ah' + id).hide();
- $('#ao' + id).show();
- var div = $('#sc' + id);
- div.slideUp('fast', function() {
- div.remove();
- });
- }
-
- /**
- * Perform an ajax request to get comments for a node
- * and insert the comments into the comments tree.
- */
- function getComments(id) {
- $.ajax({
- type: 'GET',
- url: opts.getCommentsURL,
- data: {node: id},
- success: function(data, textStatus, request) {
- var ul = $('#cl' + id);
- var speed = 100;
- $('#cf' + id)
- .find('textarea[name="proposal"]')
- .data('source', data.source);
-
- if (data.comments.length === 0) {
- ul.html('No comments yet.');
- ul.data('empty', true);
- } else {
- // If there are comments, sort them and put them in the list.
- var comments = sortComments(data.comments);
- speed = data.comments.length * 100;
- appendComments(comments, ul);
- ul.data('empty', false);
- }
- $('#cn' + id).slideUp(speed + 200);
- ul.slideDown(speed);
- },
- error: function(request, textStatus, error) {
- showError('Oops, there was a problem retrieving the comments.');
- },
- dataType: 'json'
- });
- }
-
- /**
- * Add a comment via ajax and insert the comment into the comment tree.
- */
- function addComment(form) {
- var node_id = form.find('input[name="node"]').val();
- var parent_id = form.find('input[name="parent"]').val();
- var text = form.find('textarea[name="comment"]').val();
- var proposal = form.find('textarea[name="proposal"]').val();
-
- if (text == '') {
- showError('Please enter a comment.');
- return;
- }
-
- // Disable the form that is being submitted.
- form.find('textarea,input').attr('disabled', 'disabled');
-
- // Send the comment to the server.
- $.ajax({
- type: "POST",
- url: opts.addCommentURL,
- dataType: 'json',
- data: {
- node: node_id,
- parent: parent_id,
- text: text,
- proposal: proposal
- },
- success: function(data, textStatus, error) {
- // Reset the form.
- if (node_id) {
- hideProposeChange(node_id);
- }
- form.find('textarea')
- .val('')
- .add(form.find('input'))
- .removeAttr('disabled');
- var ul = $('#cl' + (node_id || parent_id));
- if (ul.data('empty')) {
- $(ul).empty();
- ul.data('empty', false);
- }
- insertComment(data.comment);
- var ao = $('#ao' + node_id);
- ao.find('img').attr({'src': opts.commentBrightImage});
- if (node_id) {
- // if this was a "root" comment, remove the commenting box
- // (the user can get it back by reopening the comment popup)
- $('#ca' + node_id).slideUp();
- }
- },
- error: function(request, textStatus, error) {
- form.find('textarea,input').removeAttr('disabled');
- showError('Oops, there was a problem adding the comment.');
- }
- });
- }
-
- /**
- * Recursively append comments to the main comment list and children
- * lists, creating the comment tree.
- */
- function appendComments(comments, ul) {
- $.each(comments, function() {
- var div = createCommentDiv(this);
- ul.append($(document.createElement('li')).html(div));
- appendComments(this.children, div.find('ul.comment-children'));
- // To avoid stagnating data, don't store the comments children in data.
- this.children = null;
- div.data('comment', this);
- });
- }
-
- /**
- * After adding a new comment, it must be inserted in the correct
- * location in the comment tree.
- */
- function insertComment(comment) {
- var div = createCommentDiv(comment);
-
- // To avoid stagnating data, don't store the comments children in data.
- comment.children = null;
- div.data('comment', comment);
-
- var ul = $('#cl' + (comment.node || comment.parent));
- var siblings = getChildren(ul);
-
- var li = $(document.createElement('li'));
- li.hide();
-
- // Determine where in the parents children list to insert this comment.
- for(i=0; i < siblings.length; i++) {
- if (comp(comment, siblings[i]) <= 0) {
- $('#cd' + siblings[i].id)
- .parent()
- .before(li.html(div));
- li.slideDown('fast');
- return;
- }
- }
-
- // If we get here, this comment rates lower than all the others,
- // or it is the only comment in the list.
- ul.append(li.html(div));
- li.slideDown('fast');
- }
-
- function acceptComment(id) {
- $.ajax({
- type: 'POST',
- url: opts.acceptCommentURL,
- data: {id: id},
- success: function(data, textStatus, request) {
- $('#cm' + id).fadeOut('fast');
- $('#cd' + id).removeClass('moderate');
- },
- error: function(request, textStatus, error) {
- showError('Oops, there was a problem accepting the comment.');
- }
- });
- }
-
- function deleteComment(id) {
- $.ajax({
- type: 'POST',
- url: opts.deleteCommentURL,
- data: {id: id},
- success: function(data, textStatus, request) {
- var div = $('#cd' + id);
- if (data == 'delete') {
- // Moderator mode: remove the comment and all children immediately
- div.slideUp('fast', function() {
- div.remove();
- });
- return;
- }
- // User mode: only mark the comment as deleted
- div
- .find('span.user-id:first')
- .text('[deleted]').end()
- .find('div.comment-text:first')
- .text('[deleted]').end()
- .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
- ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
- .remove();
- var comment = div.data('comment');
- comment.username = '[deleted]';
- comment.text = '[deleted]';
- div.data('comment', comment);
- },
- error: function(request, textStatus, error) {
- showError('Oops, there was a problem deleting the comment.');
- }
- });
- }
-
- function showProposal(id) {
- $('#sp' + id).hide();
- $('#hp' + id).show();
- $('#pr' + id).slideDown('fast');
- }
-
- function hideProposal(id) {
- $('#hp' + id).hide();
- $('#sp' + id).show();
- $('#pr' + id).slideUp('fast');
- }
-
- function showProposeChange(id) {
- $('#pc' + id).hide();
- $('#hc' + id).show();
- var textarea = $('#pt' + id);
- textarea.val(textarea.data('source'));
- $.fn.autogrow.resize(textarea[0]);
- textarea.slideDown('fast');
- }
-
- function hideProposeChange(id) {
- $('#hc' + id).hide();
- $('#pc' + id).show();
- var textarea = $('#pt' + id);
- textarea.val('').removeAttr('disabled');
- textarea.slideUp('fast');
- }
-
- function toggleCommentMarkupBox(id) {
- $('#mb' + id).toggle();
- }
-
- /** Handle when the user clicks on a sort by link. */
- function handleReSort(link) {
- var classes = link.attr('class').split(/\s+/);
- for (var i=0; iThank you! Your comment will show up '
- + 'once it is has been approved by a moderator. ');
- }
- // Prettify the comment rating.
- comment.pretty_rating = comment.rating + ' point' +
- (comment.rating == 1 ? '' : 's');
- // Make a class (for displaying not yet moderated comments differently)
- comment.css_class = comment.displayed ? '' : ' moderate';
- // Create a div for this comment.
- var context = $.extend({}, opts, comment);
- var div = $(renderTemplate(commentTemplate, context));
-
- // If the user has voted on this comment, highlight the correct arrow.
- if (comment.vote) {
- var direction = (comment.vote == 1) ? 'u' : 'd';
- div.find('#' + direction + 'v' + comment.id).hide();
- div.find('#' + direction + 'u' + comment.id).show();
- }
-
- if (opts.moderator || comment.text != '[deleted]') {
- div.find('a.reply').show();
- if (comment.proposal_diff)
- div.find('#sp' + comment.id).show();
- if (opts.moderator && !comment.displayed)
- div.find('#cm' + comment.id).show();
- if (opts.moderator || (opts.username == comment.username))
- div.find('#dc' + comment.id).show();
- }
- return div;
- }
-
- /**
- * A simple template renderer. Placeholders such as <%id%> are replaced
- * by context['id'] with items being escaped. Placeholders such as <#id#>
- * are not escaped.
- */
- function renderTemplate(template, context) {
- var esc = $(document.createElement('div'));
-
- function handle(ph, escape) {
- var cur = context;
- $.each(ph.split('.'), function() {
- cur = cur[this];
- });
- return escape ? esc.text(cur || "").html() : cur;
- }
-
- return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
- return handle(arguments[2], arguments[1] == '%' ? true : false);
- });
- }
-
- /** Flash an error message briefly. */
- function showError(message) {
- $(document.createElement('div')).attr({'class': 'popup-error'})
- .append($(document.createElement('div'))
- .attr({'class': 'error-message'}).text(message))
- .appendTo('body')
- .fadeIn("slow")
- .delay(2000)
- .fadeOut("slow");
- }
-
- /** Add a link the user uses to open the comments popup. */
- $.fn.comment = function() {
- return this.each(function() {
- var id = $(this).attr('id').substring(1);
- var count = COMMENT_METADATA[id];
- var title = count + ' comment' + (count == 1 ? '' : 's');
- var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
- var addcls = count == 0 ? ' nocomment' : '';
- $(this)
- .append(
- $(document.createElement('a')).attr({
- href: '#',
- 'class': 'sphinx-comment-open' + addcls,
- id: 'ao' + id
- })
- .append($(document.createElement('img')).attr({
- src: image,
- alt: 'comment',
- title: title
- }))
- .click(function(event) {
- event.preventDefault();
- show($(this).attr('id').substring(2));
- })
- )
- .append(
- $(document.createElement('a')).attr({
- href: '#',
- 'class': 'sphinx-comment-close hidden',
- id: 'ah' + id
- })
- .append($(document.createElement('img')).attr({
- src: opts.closeCommentImage,
- alt: 'close',
- title: 'close'
- }))
- .click(function(event) {
- event.preventDefault();
- hide($(this).attr('id').substring(2));
- })
- );
- });
- };
-
- var opts = {
- processVoteURL: '/_process_vote',
- addCommentURL: '/_add_comment',
- getCommentsURL: '/_get_comments',
- acceptCommentURL: '/_accept_comment',
- deleteCommentURL: '/_delete_comment',
- commentImage: '/static/_static/comment.png',
- closeCommentImage: '/static/_static/comment-close.png',
- loadingImage: '/static/_static/ajax-loader.gif',
- commentBrightImage: '/static/_static/comment-bright.png',
- upArrow: '/static/_static/up.png',
- downArrow: '/static/_static/down.png',
- upArrowPressed: '/static/_static/up-pressed.png',
- downArrowPressed: '/static/_static/down-pressed.png',
- voting: false,
- moderator: false
- };
-
- if (typeof COMMENT_OPTIONS != "undefined") {
- opts = jQuery.extend(opts, COMMENT_OPTIONS);
- }
-
- var popupTemplate = '\
- ';
-
- var commentTemplate = '\
- \
- ';
-
- var replyTemplate = '\
- \
- \
- \
-
\
- ';
-
- $(document).ready(function() {
- init();
- });
-})(jQuery);
-
-$(document).ready(function() {
- // add comment anchors for all paragraphs that are commentable
- $('.sphinx-has-comment').comment();
-
- // highlight search words in search results
- $("div.context").each(function() {
- var params = $.getQueryParameters();
- var terms = (params.q) ? params.q[0].split(/\s+/) : [];
- var result = $(this);
- $.each(terms, function() {
- result.highlightText(this.toLowerCase(), 'highlighted');
- });
- });
-
- // directly open comment window if requested
- var anchor = document.location.hash;
- if (anchor.substring(0, 9) == '#comment-') {
- $('#ao' + anchor.substring(9)).click();
- document.location.hash = '#s' + anchor.substring(9);
- }
-});
diff --git a/docs/_build/html/callbacks-promises-events.html b/docs/_build/html/callbacks-promises-events.html
deleted file mode 100644
index 74ff79508fd..00000000000
--- a/docs/_build/html/callbacks-promises-events.html
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-
-
-
-
- Callbacks Promises Events — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Callbacks Promises Events
-
To help web3 integrate into all kind of projects with different standards
-we provide multiple ways to act on asynchronous functions.
-
Most web3.js objects allow a callback as the last parameter, as well as returning promises to chain functions.
-
Ethereum as a blockchain has different levels of finality and therefore needs to return multiple “stages” of an action.
-To cope with requirement we return a “promiEvent” for functions like web3.eth.sendTransaction or contract methods.
-This “promiEvent” is a promise combined with an event emitter to allow acting on different stages of action on the blockchain, like a transaction.
-
PromiEvents work like a normal promises with added on, once and off functions.
-This way developers can watch for additional events like on “receipt” or “transactionHash”.
-
web3.eth.sendTransaction({from: '0x123...', data: '0x432...'})
-.once('transactionHash', function(hash){ ... })
-.once('receipt', function(receipt){ ... })
-.on('confirmation', function(confNumber, receipt){ ... })
-.on('error', function(error){ ... })
-.then(function(receipt){
- // will be fired once the receipt its mined
-});
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html
deleted file mode 100644
index 1e23027372f..00000000000
--- a/docs/_build/html/genindex.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
- Index — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index
-
-
-
B
- |
C
- |
J
- |
M
- |
N
-
-
-
B
-
-
-
C
-
-
-
J
-
-
-
M
-
-
-
N
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/getting-started.html b/docs/_build/html/getting-started.html
deleted file mode 100644
index f418a50d151..00000000000
--- a/docs/_build/html/getting-started.html
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
- Getting Started — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Getting Started
-
The web3.js library is a collection of modules which contain specific functionality for the ethereum ecosystem.
-
-- The
web3-eth is for the ethereum blockchain and smart contracts
-- The
web3-shh is for the whisper protocol to communicate p2p and broadcast
-- The
web3-bzz is for the swarm protocol, the decentralized file storage
-- The
web3-utils contains useful helper functions for Dapp developers.
-
-
-
Adding web3.js
-
First you need to get web3.js into your project. This can be done using the following methods:
-
-- npm:
npm install web3
-- meteor:
meteor add ethereum:web3
-- pure js: link the
dist/web3.min.js
-
-
After that you need to create a web3 instance and set a provider.
-Ethereum supported Browsers like Mist or MetaMask will have a ethereumProvider or web3.currentProvider available, web3.js is setting this one to Web3.givenProvider.
-If this property is null you need to connect to a remote/local node.
-
// in node.js use: var Web3 = require('web3');
-
-var web3 = new Web3(Web3.givenProvider || "ws://localhost:8546");
-
-
-
That’s it! now you can use the web3 object.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/glossary.html b/docs/_build/html/glossary.html
deleted file mode 100644
index 59d65742eda..00000000000
--- a/docs/_build/html/glossary.html
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
- Glossary — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Glossary
-
-
-
json interface
-
The json interface is a json object describing the Application Binary Interface (ABI) for an Ethereum smart contract.
-
Using this json interface web3.js is able to create JavaScript object representing the smart contract and its methods and events using the web3.eth.Contract object.
-
-
Specification
-
Functions:
-
-type: "function", "constructor" (can be omitted, defaulting to "function"; "fallback" also possible but not relevant in web3.js);
-name: the name of the function (only present for function types);
-constant: true if function is specified to not modify the blockchain state;
-payable: true if function accepts ether, defaults to false;
-stateMutability: a string with one of the following values: pure (specified to not read blockchain state), view (same as constant above), nonpayable and payable (same as payable above);
-inputs: an array of objects, each of which contains:
-name: the name of the parameter;
-type: the canonical type of the parameter.
-
-
-outputs: an array of objects same as inputs, can be omitted if no outputs exist.
-
-
Events:
-
-type: always "event"
-name: the name of the event;
-inputs: an array of objects, each of which contains:
-name: the name of the parameter;
-type: the canonical type of the parameter.
-indexed: true if the field is part of the log’s topics, false if it one of the log’s data segment.
-
-
-anonymous: true if the event was declared as anonymous.
-
-
-
-
Example
-
contract Test {
- uint a;
- address d = 0x12345678901234567890123456789012;
-
- function Test(uint testInt) { a = testInt;}
-
- event Event(uint indexed b, bytes32 c);
-
- event Event2(uint indexed b, bytes32 c);
-
- function foo(uint b, bytes32 c) returns(address) {
- Event(b, c);
- return d;
- }
-}
-
-// would result in the JSON:
-[{
- "type":"constructor",
- "payable":false,
- "stateMutability":"nonpayable"
- "inputs":[{"name":"testInt","type":"uint256"}],
- },{
- "type":"function",
- "name":"foo",
- "constant":false,
- "payable":false,
- "stateMutability":"nonpayable",
- "inputs":[{"name":"b","type":"uint256"}, {"name":"c","type":"bytes32"}],
- "outputs":[{"name":"","type":"address"}]
- },{
- "type":"event",
- "name":"Event",
- "inputs":[{"indexed":true,"name":"b","type":"uint256"}, {"indexed":false,"name":"c","type":"bytes32"}],
- "anonymous":false
- },{
- "type":"event",
- "name":"Event2",
- "inputs":[{"indexed":true,"name":"b","type":"uint256"},{"indexed":false,"name":"c","type":"bytes32"}],
- "anonymous":false
-}]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/include_announcement.html b/docs/_build/html/include_announcement.html
deleted file mode 100644
index 120e36307e0..00000000000
--- a/docs/_build/html/include_announcement.html
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
- <no title> — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/include_package-core.html b/docs/_build/html/include_package-core.html
deleted file mode 100644
index 23f6949b015..00000000000
--- a/docs/_build/html/include_package-core.html
+++ /dev/null
@@ -1,375 +0,0 @@
-
-
-
-
-
-
-
- setProvider — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setProvider
-
web3.setProvider(myProvider)
-web3.eth.setProvider(myProvider)
-web3.shh.setProvider(myProvider)
-web3.bzz.setProvider(myProvider)
-...
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-var web3 = new Web3('http://localhost:8545');
-// or
-var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
-
-// change provider
-web3.setProvider('ws://localhost:8546');
-// or
-web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
providers
-
web3.providers
-web3.eth.providers
-web3.shh.providers
-web3.bzz.providers
-...
-
-
-
Contains the current available providers.
-
-
Value
-
Object with the following providers:
-
-
-Object - HttpProvider: The HTTP provider is deprecated, as it won’t work for subscriptions.
-Object - WebsocketProvider: The Websocket provider is the standard for usage in legacy browsers.
-Object - IpcProvider: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-// use the given Provider, e.g in Mist, or instantiate a new websocket provider
-var web3 = new Web3(Web3.givenProvider || 'ws://remotenode.com:8546');
-// or
-var web3 = new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://remotenode.com:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
givenProvider
-
web3.givenProvider
-web3.eth.givenProvider
-web3.shh.givenProvider
-web3.bzz.givenProvider
-...
-
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
-
-
-
-
currentProvider
-
web3.currentProvider
-web3.eth.currentProvider
-web3.shh.currentProvider
-web3.bzz.currentProvider
-...
-
-
-
Will return the current provider, otherwise null.
-
-
Returns
-
Object: The current provider set or null;
-
-
-
Example
-
-
-
-
-
BatchRequest
-
new web3.BatchRequest()
-new web3.eth.BatchRequest()
-new web3.shh.BatchRequest()
-new web3.bzz.BatchRequest()
-
-
-
Class to create and execute batch requests.
-
-
-
Returns
-
Object: With the following methods:
-
-
-add(request): To add a request object to the batch call.
-execute(): Will execute the batch request.
-
-
-
-
-
Example
-
var contract = new web3.eth.Contract(abi, address);
-
-var batch = new web3.BatchRequest();
-batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
-batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
-batch.execute();
-
-
-
-
-
-
-
extend
-
web3.extend(methods)
-web3.eth.extend(methods)
-web3.shh.extend(methods)
-web3.bzz.extend(methods)
-...
-
-
-
Allows extending the web3 modules.
-
-
Note
-
You also have *.extend.formatters as additional formatter functions to be used for in and output formatting. Please see the source file for function details.
-
-
-
Parameters
-
-
-methods - Object: Extension object with array of methods description objects as follows:
--
-
-
-
-
-
-
-
Returns
-
Object: The extended module.
-
-
-
Example
-
web3.extend({
- property: 'myModule',
- methods: [{
- name: 'getBalance',
- call: 'eth_getBalance',
- params: 2,
- inputFormatter: [web3.extend.formatters.inputAddressFormatter, web3.extend.formatters.inputDefaultBlockNumberFormatter],
- outputFormatter: web3.utils.hexToNumberString
- },{
- name: 'getGasPriceSuperFunction',
- call: 'eth_gasPriceSuper',
- params: 2,
- inputFormatter: [null, web3.utils.numberToHex]
- }]
-});
-
-web3.extend({
- methods: [{
- name: 'directCall',
- call: 'eth_callForFun',
- }]
-});
-
-console.log(web3);
-> Web3 {
- myModule: {
- getBalance: function(){},
- getGasPriceSuperFunction: function(){}
- },
- directCall: function(){},
- eth: Eth {...},
- bzz: Bzz {...},
- ...
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/include_package-net.html b/docs/_build/html/include_package-net.html
deleted file mode 100644
index 215472957a8..00000000000
--- a/docs/_build/html/include_package-net.html
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
- getId — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
getId
-
web3.eth.net.getId([callback])
-web3.bzz.net.getId([callback])
-web3.shh.net.getId([callback])
-
-
-
Gets the current network ID.
-
-
-
Returns
-
Promise returns Number: The network ID.
-
-
-
Example
-
web3.eth.net.getId()
-.then(console.log);
-> 1
-
-
-
-
-
-
-
isListening
-
web3.eth.net.isListening([callback])
-web3.bzz.net.isListening([callback])
-web3.shh.net.isListening([callback])
-
-
-
Checks if the node is listening for peers.
-
-
-
Returns
-
Promise returns Boolean
-
-
-
Example
-
web3.eth.isListening()
-.then(console.log);
-> true
-
-
-
-
-
-
-
getPeerCount
-
web3.eth.net.getPeerCount([callback])
-web3.bzz.net.getPeerCount([callback])
-web3.shh.net.getPeerCount([callback])
-
-
-
Get the number of peers connected to.
-
-
-
Returns
-
Promise returns Number
-
-
-
Example
-
web3.eth.getPeerCount()
-.then(console.log);
-> 25
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html
deleted file mode 100644
index f01e04385f6..00000000000
--- a/docs/_build/html/index.html
+++ /dev/null
@@ -1,365 +0,0 @@
-
-
-
-
-
-
-
- web3.js - Ethereum JavaScript API — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.js - Ethereum JavaScript API
-
web3.js is a collection of libraries which allow you to interact with a local or remote ethereum node,
-using a HTTP or IPC connection.
-
The following documentation will guide you through installing and running web3.js,
-as well as providing a API reference documentation with examples.
-
Contents:
-
Keyword Index, Search Page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv
deleted file mode 100644
index badbffca114..00000000000
Binary files a/docs/_build/html/objects.inv and /dev/null differ
diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html
deleted file mode 100644
index 1e7acb45e47..00000000000
--- a/docs/_build/html/search.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
- Search — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Search
-
-
-
- Please activate JavaScript to enable the search
- functionality.
-
-
-
- From here you can search these documents. Enter your search
- words into the box below and click "search". Note that the search
- function will automatically search for all of the words. Pages
- containing fewer words won't appear in the result list.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js
deleted file mode 100644
index d701d46068e..00000000000
--- a/docs/_build/html/searchindex.js
+++ /dev/null
@@ -1 +0,0 @@
-Search.setIndex({envversion:49,filenames:["callbacks-promises-events","getting-started","glossary","include_announcement","include_package-core","include_package-net","index","web3","web3-bzz","web3-eth","web3-eth-abi","web3-eth-accounts","web3-eth-contract","web3-eth-iban","web3-eth-net","web3-eth-personal","web3-eth-subscribe","web3-net","web3-shh","web3-utils"],objects:{},objnames:{},objtypes:{},terms:{"00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002df32340000000000000000000000000000000000000000000000000000000000fdfd000000000000000000000000000000000000000000000000000000000000":10,"0062a853de302513c57bfe3108ab493733034bf3cb313326f42cf26ea2619cf9":11,"04e9bcbb":11,"06f702337909c06c82b09b7a22f0a2f0855d1f68":11,"08ba6736363c5586434cd5b895e6fe41ea7db4785bd9b901dedce77a1514e8b8":11,"0c5f3b849289":11,"0de804dc63940820f6b3334e5a4bfc8214e27fb30bb7e9b7b74b25cd7eb5c604":11,"0f3ef79f7cf0":11,"0x0":9,"0x00":[9,16],"0x0000000000000000000000000000000000000000":[4,7,9,15,18],"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000":9,"0x0000000000000000000000000000000000000000000000000000000000000001":19,"0x000000000000000000000000000000000000000000000000000000000000000a":9,"0x0000000000000000000000000000000000000000000000000000000000000010":10,"0x0000000000000000000000000000000000000000000000000000000000000015":9,"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003df32340000000000000000000000000000000000000000000000000000000000":10,"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000748656c6c6f252100000000000000000000000000000000000000000000000000":10,"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000":10,"0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000ea000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000":10,"0x0000000000000000000000000000000000000000000000000000000000000040324567fff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000001b2":10,"0x000000000000000000000000000000000000000000000000000000000000f310":10,"0x000000000000000000000000000000000000000000000000000000008bd02b7b":10,"0x000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000":10,"0x0000000000000001":9,"0x000000000000003456ff":19,"0x000000ea":19,"0x00c5496aee77c1ba1f0854206a26dda82a81d6d8":13,"0x01020304":18,"0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234":9,"0x04d1574d4eab8f3dde4d2dc7ed2c4d699d77cbbdd09167b8fffa099652ce4df00c4c6e0263eafe05007a46fdf0c8d32b11aeabcd3abbc7b2bc2bb967368a68e9c6":18,"0x09184e72a000":9,"0x09ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9c":[],"0x1":19,"0x11f4d0a3c12e86b4b5f39b213f7e19d048276da":[9,12,15],"0x12":9,"0x123":0,"0x1234":12,"0x12345":[12,16],"0x123456":16,"0x123456789":12,"0x12345678901234567890123456789012":2,"0x1234567890123456789012345678901234567891":12,"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef":9,"0x1234567891011121314151617181920212223456":15,"0x1234ffdd":12,"0x1c":11,"0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655":11,"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347":9,"0x2302e1c0b972d00932deb5dab9eb2982f570597d9d42504c05d9c2147eaf9c88":9,"0x234":12,"0x234234e22b9ffc2387e18636e0534534a3d0c56b0243567432453264c16e78a2adc":18,"0x24ee0097":10,"0x24ee0097000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000":10,"0x25":[9,11],"0x2710":9,"0x2c7536e3605d9c16a7a3d7b1898e529396a65c23":11,"0x2f20677459120677484f7104c76deb6846a2c071f9b3152c103bb12cd54d1a4a":19,"0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400":[9,15],"0x324567fff":10,"0x3456ff":19,"0x3456ff00000000000000":19,"0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709":11,"0x3535353535353535353535353535353535353535":9,"0x3a1b03875115b79539e5bd33fb00d8f7b7cd61929d5a3c574f507b8acf415be":9,"0x3c69a194aaf415ba5d6afca734660d0a3d45acdc05d54cd1ca89a8988e7625b4":19,"0x3e27a893dc40ef8a7f0841d96639de2f58a132be5ae466d40087a2cfa83b7179":19,"0x407d73d8a49eeb85d32cf465507dd71d507100c1":[9,19],"0x4158eb81ad8e30cfcee67f20b1372983d388f1243a96e39f94fd2797b1e9c78":18,"0x432":0,"0x440ffd775ce91a833ab410777204d5341a6f9fa91216a6f3ee2c051fea6a0428":11,"0x4534534534":9,"0x48656c6c6f2125":19,"0x4920686176652031303021":19,"0x49206861766520313030e282ac":19,"0x4a817c800":9,"0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318":11,"0x4e8ebbefa452077428f93c9520d3edd60594ff452a29ac7d2ccc11d47f3ab95b":19,"0x4f4c17305743700648bc4f6cd3038ec6f6af0df73e31757007b7f59df7bee88d":9,"0x5208":9,"0x57cb2fc4":9,"0x58cf5f10":12,"0x58cf5f1000000000000000000000000000000000000000000000000000000000000007b":12,"0x5e11b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f":18,"0x5eed00000000000000000000000000005eed0000000000000000000000000000":9,"0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056":9,"0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029":11,"0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056":9,"0x605280600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b60376004356041565b8060005260206000f35b6000600782029050604d565b91905056":9,"0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2":19,"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f":9,"0x661136a4267dba9ccdf6bfddb7c00e714de936674c4bdb065a531cf1cb15c7fc":19,"0x6892ffc6":19,"0x6893a6ee8df79b0f5d64a180cd1ef35d030f3e296a5361cf04d02ce720d32ec5":11,"0x727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68":11,"0x7e1941b264348e80c78c4027afc65a87b0a5e43e86742b8ca0823584c6788fd0":9,"0x7f7465737432000000000000000000000000000000000000000000000000000000600057":9,"0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385":[9,12],"0x85f43d8a49eeb85d32cf465507dd71d507100c1d":[9,19],"0x8888f1f195afa192cfee860698584c030f4c9db1":9,"0x88cfbd7e51c7a40540b233cf68b62ad1df3e92462f1c6018d6d67eae0f3b08f5":11,"0x8bda3abeb454847b515fa9b404cede50b1cc63cfdeddd4999d074284b4c21e15":18,"0x99d6":19,"0x9a":19,"0x9ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9c":11,"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b":[9,12],"0xa13b31627c1ed7aaded5aecec71baf02fe123797fffd45e662eac8e06fbe4955":19,"0xa1de988600a42c4b4ab089b619297c17d53cffae5d5120d82d8a92d0bb3b78f2":11,"0xa5b9d60f32436310afebcfda832817a68921beb782fabf7915cc0460b443116a":19,"0xa82a520aff70f7a989098376e48ec128f25f767085e84d7fb995a9815eebff0a":18,"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b":9,"0xb8ce9ab6943e0eced004cde8e3bbed6568b2fa01":11,"0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd":11,"0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c":11,"0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a":19,"0xc15f786f34e5cef0fef6ce7c1185d799ecdb5ebca72b3310648c5588db2e99a0d73301c7a8d90115a91213f0bc9c72295fbaf584bf14dc97800550ea53577c9fb57c0249caeb081733b4e605cdb1a6011cee8b6d8fddb972c2b90157e23ba3baae6c68d4f0b5822242bb2c4cd821b9568d3033f10ec1114f641668fc1083bf79ebb9f5c15457b538249a97b22a4bcc4f02f06dec7318c16758f7c008001c2e14eba67d26218ec7502ad6ba81b2402159d7c29b068b8937892e3d4f0d4ad1fb9be5e66fb61d3d21a1c3163bce74c0a9d16891e2573146aa92ecd7b91ea96a6987ece052edc5ffb620a8987a83ac5b8b6140d8df6e92e64251bf3a2cec0cca":18,"0xc1912":19,"0xc1912fee45d61c87cc5ea59dae311904cd86b84fee17cc96966216f811ce6a79":19,"0xc1912fee45d61c87cc5ea59dae31190fffff2323":19,"0xc1912fee45d61c87cc5ea59dae31190fffff232d":19,"0xc6888fa10000000000000000000000000000000000000000000000000000000000000003":9,"0xc9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895":11,"0xcc505ee6067fba3f6fc2050643379e190e087aeffe5d958ab9f2f3ed3800fa4":11,"0xd0122fc8df283027b6285cc889f5aa624eac1d23":11,"0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000":9,"0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000":9,"0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8":9,"0xd7325de5c2c1cf0009fac77d3d04a9c004b038883446b065871bc3e831dcd098":11,"0xda3be87732110de6c1354c83770aae630ede9ac308d9f7b399ecfba23d923384":9,"0xdcc6960376d6c6dea93647383ffb245cfced97cf":9,"0xde0b295669a9fd93d5f28d9ec85e40f4cb697ba":[9,12],"0xde0b6b3a7640000":9,"0xdeadbeaf":18,"0xdf3234":10,"0xdf32340000000000000000000000000000000000000000000000000000000000":10,"0xe78150facd36e8eb00291e251424a0515aa1ff05":11,"0xea":19,"0xeb014f8c8b418db6b45774c326a0e64c78914dc0":9,"0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46":[9,12],"0xf0109fc8df283027b6285cc889f5aa624eac1f55":11,"0xf1133199d44695dfa8fd1bcfe424d82854b5cebef75bddd7e40ea94cda515bcb":9,"0xf2cd2aa0c7926743b1d4310b2bc984a0a453c3d4":11,"0xf2eeb729e636a8cb783be044acf6b7b1e2c5863735b60d6daae84c366ee87d97":10,"0xf86180808401ef364594f0109fc8df283027b6285cc889f5aa624eac1f5580801ca031573280d608f75137e33fc14655f097867d691d5c4c44ebe5ae186070ac3d5ea0524410802cdc025034daefcdfa08e7d2ee3f0b9d9ae184b2001fe0aff07603d9":11,"0xf869808504e3b29200831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68":11,"0xf86a8086d55698372431831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a009ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9ca0440ffd775ce91a833ab410777204d5341a6f9fa91216a6f3ee2c051fea6a0428":11,"0xf86c808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a04f4c17305743700648bc4f6cd3038ec6f6af0df73e31757007b7f59df7bee88da07e1941b264348e80c78c4027afc65a87b0a5e43e86742b8ca0823584c6788fd0":9,"0xf889808609184e72a00082271094000000000000000000000000000000000000000080a47f74657374320000000000000000000000000000000000000000000000000000006000571ca08a8bbf888cfa37bbf0bb965423625641fc956967b81d12e23709cead01446075a01ce999b56a8a88504be365442ea61239198e23d1fce7d00fcfc5cd3b44b7215f":9,"0xfb6e1a62d119228b":9,"0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7":[9,12],"0xfdfd":10,"0xffaadd11":18,"0xffddaa11":18,"0xfff23243":19,"0xfff456":19,"0xffffffdddddd1122":18,"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1":19,"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff":19,"0xz1912":19,"12th":9,"14df4cd20af6":11,"208dd732a27aa4803bb760228dff18515d5313fd085bbce60594a3919ae2d88d":11,"24th":12,"2885df2b63f7ef247d753c82fa20038a":11,"2b47fbafb3cce24570812a82e6e93cd9e2551bbc4823f6548ff0d82d2206b326":18,"2c7536e3605d9c16a7a3d7b1898e529396a65c23":11,"2e57b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f":18,"348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709":11,"396efb28f97":11,"3e22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f":18,"407b":11,"451f":11,"4531b3c174cc3ff32a6a7a85d6761b410db674807b2d216d022318ceee50be10":11,"497b":11,"497f4d26997a84d570778eae874b2333":11,"4e37":11,"5e57b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f":18,"603d80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463c6888fa18114602d57005b6007600435028060005260206000f3":9,"7d34deae112841fba86e3e6cf08f5398dda323a8e4d29332621534e2c4069e8d":11,"7d6b91fa":11,"7e980476df218c05ecfcb0a2ca73597193a34c5a9d6da84d54e295ecd8e0c641":8,"83191a81":11,"8cccb91cb84e435437f7282ec2ffd2db":11,"94d1":11,"96fa":11,"9e1c7d24":11,"boolean":[4,5,7,8,9,11,13,14,15,16,17,18,19],"byte":[9,10,11,12,16,18,19],"case":[9,12,18,19],"catch":[8,12],"class":[4,7,9,15,18,19],"default":[2,4,7,9,11,12,15,16,18,19],"false":16,"final":[0,9,16],"float":18,"function":[0,1,2,4,7,8,9,10,11,12,13,14,15,16,18,19],"import":[9,16,18],"new":[],"null":[1,4,7,8,9,11,12,15,16,18,19],"public":[11,18],"return":[],"throw":9,"true":[2,5,8,9,10,11,12,13,14,16,17,18,19],"var":[1,4,7,8,9,11,12,13,15,16,17,18,19],_iban:13,a1c25da3ecde4e6a24f3697251dd15d6208520efc84ad97397e906e6df24d251:11,a314:11,a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23:8,aaca:11,abi:[],abidefinit:9,abl:[2,7],about:[12,14,18],abov:[2,12,16,19],accept:2,account:[],accur:14,act:0,action:0,actual:[10,12],add:[],addit:[0,4,7,9,11,12,15,16,18],addition:[9,12],addprivatekei:[],address2:12,address:[],addsymkei:[],adjust:18,af33b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f:18,af9eca5eb01b0f70e909f824f0e7cdb90c350a802f04a9f6afe056602b92272b:11,after:[1,9,11,12],alias:19,all:[0,4,7,8,9,11,12,15,16,18,19],allevent:[],allow:[0,4,6,7,8,9,11,12,15,16,17,18],allowp2p:18,alon:9,along:9,alreadi:[9,11,12],also:[2,4,7,8,9,11,12,13,15,16,18,19],alter:12,alwai:[2,12,19],amount:[9,12,19],ani:[12,14,18,19],anonym:[2,10,12],anoth:[8,12,16],any:[9,19],api:[],app:16,appear:[9,16],applicat:[2,10],arbitrari:[11,18],argument:[9,12,16,19],arrai:[2,4,7,9,10,11,12,15,16,18,19],ascii:19,asciitohex:[],assign:13,associ:18,asymmetr:18,asynchron:0,audit:11,auto:[12,19],autodetect:[8,19],automat:[11,12],avail:[1,4,7,9,12,15,18],b10e:11,b16b:11,b2aac1485bd6ee1928665642bf8eae9ddfbc039c3a673658933d320bac6952e3:11,b5d89661b59a9af0b34f58d19138baa2de48baaf:11,b63d:11,b8b010fff37f9ae5559a352a185e86f9b9c1d7f7a9f1bd4e82a5dd35468fc7f6:11,b919:11,b972:11,babbag:19,balanc:[4,7,9,15,18],bar:8,base:[9,10],basic:19,batch:[4,7,9,15,18],bban:13,bbanaddress:13,becaus:[13,18],been:11,befor:[11,12,19],behaviour:19,below:[9,11,12,15,18],beneficiari:[9,16],between:18,bf31b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f:18,bf9b86f91372:11,big:[9,19],bignumb:[9,12,19],binari:[2,10],bit:9,block:[9,12,14,16],blockchain:[0,1,2,9,12,16],blockhash:[9,12],blockhashorblocknumb:9,blockhead:16,blocknumb:[9,12],bloom:[9,16],bool:19,both:18,boundari:9,broadcast:[1,18],browser:[1,4,7,8,9,11,15,17,18],buffer:[8,9],bytearrai:19,bytes10:10,bytes32:[2,10,12,19],bytestohex:[],bzz:[],bzzhash:8,c1912:19,c1912fee45d61c87cc5ea59dae31190fffff232d:19,calcul:[9,19],call:[],callback2:[4,7,9,15,18],callobject:9,can:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19],canon:2,care:19,cb9712d1982ff89f571fa5dbef447f14b7e5f142232bd2a913aac833730eeb43:11,cec94d139ff51d7df1d228812b90c23ec1f909afa0840ed80f1e04030bb681e4:18,certain:9,chain:[0,9,11,12,14],chainid:11,chang:[4,7,8,9,12,15,16,18],charact:[11,19],characteramount:19,check:[5,9,13,14,16,17,18,19],checkaddresschecksum:[],checksum:[],cipher:11,cipherparam:11,ciphertext:11,circumv:9,clear:[],clearsubscript:[],client:[],clone:[],code:[9,10,12],coinbas:9,collat:[9,16],collect:[1,6],com:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19],combin:[0,9,12],come:12,commun:[1,18],compar:14,compat:[4,7,8,9,15,18],compil:[],compilervers:9,complement:19,condit:9,confirm:[0,9,12],confirmationnumb:[9,12],confnumb:0,connect:[1,4,5,6,7,8,9,14,15,17,18],consol:[4,5,7,8,9,11,12,14,15,16,17,18],constant:[2,9,12],constructor:[2,12],contain:[1,2,4,7,9,10,11,12,14,15,18],content:[6,8],contracrt:9,contract1:12,contract2:12,contract:[],contractaddress:[9,12],control:9,conveni:19,convers:[13,19],conversta:[],convert:[9,11,12,13,15,19],cope:0,correct:9,could:[8,14],couldn:11,creat:[],createindirect:[],creation:[9,18],criteria:18,crypto:11,cryptograph:19,ctr:11,cumulativegasus:[9,12],current:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],currentblock:9,currentprovid:[],d2eb068b37e2df55f56fa97a2bf4f55e072bef0dd703bfd917717d9dc54510f0:11,d705ebed2a136d9e4db7e5ae70ed1f69d6a57370d5fbe06281eb07615f404410:11,dag:9,dapp:[1,4,7,9,15,18,19],data:[0,2,8,9,10,11,12,15,16,18],databas:12,datathatwassign:15,datatosign:[9,15],dcf8ab05:11,deal:9,decentr:[1,8],declar:2,decod:[10,11],decodelog:[],decodeparamet:[],decrypt:[],defaultaccount:[],defaultblock:[],defaultfil:8,defin:12,delet:18,deletekeypair:[],deletemessagefilt:[],deletesymkei:[],denomin:[],depend:[9,12,16],deploi:[],deploy:12,deployemnt:[],deprec:[4,7,9,15,18,19],deriv:[12,18],describ:2,descript:[4,7,9,15,18],destin:9,detail:[4,7,9,12,15,18,19],deteac:[],detect:[12,19],determin:9,develop:[0,1],developerdoc:9,differ:[0,9,12,16,19],difficulti:9,digest:9,dir:8,direct:[13,18],directcal:[4,7,9,15,18],directli:[4,7,9,15,18],directori:8,dirhash:8,disk:8,displai:19,dist:1,dklen:11,doc:8,doesn:9,don:[],done:1,doubl:18,download:[],dure:[9,12],dynam:18,e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109:9,each:[2,4,7,9,12,15,16,18,19],earliest:[9,16],easi:12,ecosystem:1,ecrecov:6,either:[8,9,11,18],els:16,emitt:[0,9,12,16],empti:11,encod:[9,10,11,12],encode:[10,12],encodeabi:[],encodeeventsignatur:[],encodefunctioncal:[],encodefunctionsignatur:[],encodeparamet:[],encrypt:[],encryptedprivatekei:11,endow:9,enod:18,enode:18,entri:[9,16],entropi:11,envelop:[11,18],envelov:[],environ:[4,7,8,9,15,18],err:12,error:[0,9,11,12,15,16,18],estim:[9,12],estimatega:[],etc:[4,7,8,9,15,18],eth:[],eth_callforfun:[4,7,9,15,18],eth_gaspricesup:[4,7,9,15,18],eth_getbal:[4,7,9,15,18],ether:[2,19],ethereum:[],ethereumj:9,ethereumprovid:1,etheruem:[],ethxreggavofyork:13,event2:2,eventemitt:[12,16],eventnam:10,everi:[9,12],evm:[10,12],exce:18,except:[4,7,8,9,15,18],execut:[4,7,9,12,15,18],exist:[2,11,13,18],expect:19,experiment:18,expir:18,expos:7,extension:[4,7,9,15,18],extra:[9,16],extradata:[9,16],f6dcf21ed6a17bd78d8c4c63195ab997b3b65ea683705501eae82d32667adc92:18,fail:16,failur:18,fallback:[2,12],fals:[2,9,11,12,13,16,18,19],fe22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f:18,fea94d139ff51d7df1d228812b90c23ec1f909afa0840ed80f1e04030bb681e4:18,femtoeth:19,few:9,field:[2,9,10,16],file:[1,4,7,8,9,15,18],filehash:8,filter:[9,12,16,18],find:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],finish:16,finnei:19,finsih:16,fire:[0,9,12,16],first:[1,9,10,11,12,15,16,18,19],folder:8,follow:[1,2,4,6,7,8,9,11,12,13,15,16,18,19],foo:[2,8,12],form:10,format:[4,7,9,15,18],formatt:[4,7,9,15,18],forward:18,found:[9,11],from:[0,4,7,8,9,10,11,12,13,15,16,18,19],fromaddress:12,fromascii:19,frombban:[],fromblock:[9,12,16],fromdecim:19,fromethereumaddress:[],fromutf8:19,fromwei:[],front:19,frozeman:[],functionnam:10,further:18,futur:18,gasamount:12,gaslimit:[9,16],gaspric:[9,11,12],gasus:[9,12,16],gatewai:8,gavofyork:13,gener:[9,11,12,13,16,18,19],generatesymkeyfrompassword:[],genert:18,genesi:[9,14],getaccount:[],getbal:[],getblock:[],getblocknumb:[],getblocktransactioncount:[],getcod:[],getcoinbas:[],getcompil:[],getfiltermessag:[],getgaspric:[],getgaspricesuperfunct:[4,7,9,15,18],geth:[4,7,9,15,18],gethashr:[],gether:19,getinfo:[],getpastev:[],getpastlog:[],getprivatekei:[],getprotocolvers:[],getpublickei:[],getstorageat:[],getsymkei:[],gettransact:[],gettransactioncount:[],gettransactionfromblock:[],gettransactionreceipt:[],getuncl:[],getvers:[],getwork:[],github:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],give:[4,7,8,9,12,15,18],given:[4,7,8,9,10,11,12,15,16,18,19],givenprovid:[],grand:19,guess:14,guid:6,gwei:[12,19],handl:19,hash:[0,8,9,10,11,12,14,16,18,19],hashmessag:[],hashstringornumb:9,haskeypair:[],hassymkei:[],have:[1,4,7,9,12,15,16,18,19],head:9,header:[9,16],hello:[9,10,11,12,15,19],helloxxxxxxxxxxxxxxx:19,help:[0,12],helper:1,here:[11,12],hex:[9,11,18,19],hexstr:[10,19],hextoascii:[],hextobyt:[],hextonumb:[],hextonumberstr:[],hextostr:19,hextoutf8:[],highestblock:9,highli:15,histor:18,hous:7,html:8,http:[4,6,7,8,9,15,18],httpprovid:[4,7,9,15,18],iban:[],ibanaddress:13,ident:18,identifi:[13,16],immedi:12,impos:18,incl:19,includ:[9,10,19],incom:[12,16,18],income:18,incorrect:[9,13],increas:11,index:[2,6,8,9,10,11,12],indexnumb:9,indic:12,indicat:18,indirect:13,individu:9,indutni:[],info:9,inform:[14,15,18],initialis:9,input:[2,9,10,12,19],inputaddressformatt:[4,7,9,15,18],inputdefaultblocknumberformatt:[4,7,9,15,18],inputformatt:[4,7,9,15,18],instal:[1,6],instanc:[1,12,13,16,19],instanti:[4,7,9,12,13,15,18],instead:[4,7,9,12,15,18,19],institut:[],int256:19,int8:19,integer:[9,12],integr:0,intend:18,interact:[6,7,8,9,12,15,17,18],interpret:19,introduc:18,invalid:19,ipc:[4,6,7,9,15,18],ipcprovid:[4,7,9,15,18],isaddress:[],isbignumb:[],isbn:[],isdirect:[],ishex:[],ishexstrict:6,isindirect:[],ismin:[],issync:[],isvalid:[],item:[4,7,9,15,18],itself:[12,16,18],javascript:[],jsoninterfac:[],just:19,kdf:11,kdfparam:11,keccak256:[11,19],keep:[16,18],kei:[8,9,11,12,18,19],kept:8,kether:19,keynam:11,keypair:18,keysor:[],keystor:[9,11],keystorearrai:11,keystorejsonv3:11,keyword:6,kind:[0,8],know:12,known:18,knownstat:9,kwei:19,languag:9,languagevers:9,larger:18,last:[0,9,18],later:12,latest:[4,7,9,12,15,18],launch:8,lead:19,least:11,leav:[9,11,16],left:[9,19],leftpad:[],legaci:[4,7,9,15,18],length:[11,18],let:[10,12,13,16],letter:[9,19],level:[0,12],librari:[1,4,6,7,9,15,18,19],like:[0,1,13,15,16,18],limit:[12,18],link:1,linux:[4,7,9,15,18],list:[7,9,10,16],listen:[5,14,17,18],live:18,lll:[],load:[],local:[1,4,6,7,8,9,11,12,15,17,18],localhost:[1,4,7,8,9,11,15,18],localpath:8,localstorag:11,lockaccount:15,log:[],logindex:[9,12],logsbloom:[9,16],look:[9,12],lovelac:19,low:12,lower:9,lowercas:[9,11,12,19],mac:[4,7,9,11,15,18],machin:10,made:[9,12],mai:9,mailserv:18,main:14,mainnet:14,major:7,make:[9,11,12,19],mandatori:18,mani:[15,19],manifest:8,manual:[7,8,12],mark:18,marktrustedp:[],match:[9,12,18],max:[9,12],maxim:18,maximum:[9,12,16],maxmessages:18,mean:[9,10,12,19],median:9,memori:[11,18],messag:[9,11,18],messagehash:11,met:9,metamask:1,meteor:1,mether:19,method:[],micro:19,microeth:19,might:[8,11,18],mikemcl:[],milli:19,millieth:19,mime:8,mimic:19,mimick:[],min:1,mind:[9,12],mine:[0,9,16],miner:[9,16],minim:18,minimum:18,minpow:18,mist:[1,4,7,9,15,18],mix:[8,9,10,12,16,19],modifi:2,modul:[],morden:14,more:[7,8,9,11,16,18],most:[0,4,7,9,15,18],multi:[12,19],multipl:[0,8,11,12],multipli:9,must:[8,9,16,18],mwei:19,mybyt:10,mycontract:[9,12],myevent:[10,12],myfunct:[10,12],myindexedparam:12,mymethod:[],mymodul:[4,7,9,15,18],mymultipleev:12,mynonindexparam:12,mynumb:[10,12],myotherev:12,myotherindexedparam:12,myprovid:[4,7,8,9,15,18],mysmallnumb:10,mystr:[10,12],myuser:[4,7,9,15,18],myvar2:12,myvar:12,mywalletkei:11,name:[2,4,7,8,9,10,12,15,18],nano:19,nanoeth:19,nativ:[4,7,8,9,15,18],necessari:[8,11],need:[0,1,4,7,8,9,15,18],neg:19,net:[],network:[5,7,9,14,17,18],never:[9,11,15,18],newaccount:[],newblockhead:[],newcontractinst:12,newkeypair:[],newli:15,newmessagefilt:[],newsymkei:[],next:11,node:[1,4,5,6,7,8,9,14,15,16,17,18],noether:19,non:[9,10,12,19],nonc:[9,11,16],none:[4,5,7,8,9,11,12,13,14,15,17,18],nonpay:2,normal:0,note:[],notifi:18,now:[1,18],npm:1,number:[4,5,7,9,11,12,14,15,16,17,18,19],numberofaccount:11,numbertohex:[],numer:19,object:[0,1,2,4,7,8,9,10,11,12,13,15,16,18,19],obtain:18,occour:12,occur:[9,12,16],off:0,old:18,omit:2,onc:[],onli:[2,8,9,11,12,16,18,19],open:8,oper:16,option1:[9,16],option2:[9,16],option:[],optional:[8,9,11,12,15,16,18],oracl:9,order:[9,16],org:9,origin:[9,12],other:[16,18,19],otherwis:[4,7,8,9,10,15,18,19],out:[9,12,16],outgo:18,output:[2,4,7,9,10,12,15,18],outputformatt:[4,7,9,15,18],over:[8,12,15],overrid:9,overridden:11,overview:18,overwhelm:18,overwrit:9,own:[8,9,16,18],p2p:[1,18],pack:19,packag:[4,7,8,9,11,15,16,17,18,19],pad:[18,19],padleft:[],padright:[],page:6,pair:18,param1:[12,19],param2:[12,19],param:[4,7,9,15,18],paramat:10,paramet:[],paramx:19,parent:[9,16],parenthash:[9,16],part:2,parti:18,particular:[9,16],pass:[9,11,12,16],password:[11,15,18],past:[9,12],path:[4,7,8,9,15,18],payabl:2,payload:18,peer:[5,14,17,18],pend:[9,12,16],pendingtransact:[],per:9,person:[],pick:[],picker:8,picoeth:19,pipe:[4,7,9,15,18],plain:[8,15],pleas:[4,7,9,15,18],poll:18,posit:[9,11,12,19],possibl:[2,19],post:[],potenti:11,pow:[9,18],powhash:9,powtarget:18,powtim:18,precaut:11,prefic:19,prefix:19,present:[2,8,18],price:[9,11,12],prior:9,privat:[9,11,14,18],privatekei:[9,11,18],privatekeyid:18,privatekeytoaccount:[],process:18,product:11,progress:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],project:[0,1],promiev:[0,9,12],proof:[9,16,18],properli:11,properti:[],protocol:[1,7,9,18],prove:9,provid:[],pseudo:19,pubkei:18,pulledst:9,pure:[1,2],push:18,question:[],rais:18,ran:12,random:[11,18,19],randomhex:[],rare:18,rather:19,raw:[8,9,12,18],rawtransact:11,rawtx:9,read:2,readi:11,reason:19,receipt:[0,9,12,16],receiptroot:16,receiv:[9,11,12,14,18],recent:9,recevi:11,recipi:18,recipientpublickei:18,recov:[],recoveri:11,recovertransact:[],refer:[6,9,19],refund:9,regain:16,regener:12,reject:18,rel:18,relat:7,releas:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],relev:2,remix:9,remot:[1,6,7,8,9,15,17,18],remotenod:[4,7,9,15,18],remov:[],repres:2,represent:[10,19],request:[4,7,9,15,18],requestmanag:[16,18],requir:[0,1,4,7,8,9,11,15,17,18],requr:8,reset:[16,18],resolv:[9,12],respect:12,respond:[4,7,9,15,18],result:[2,9,10,11,12,15,16,18,19],retriev:[11,18],returnsignatur:11,returntransactionobject:9,returnvalu:12,reward:[9,16],right:[9,12,19],rightpad:[],rlp:[9,11],root:[9,16],ropsten:14,rpc:[4,7,9,12,15,18],run:[4,6,7,9,15,18],safe:[11,19],safli:19,salt:11,same:[2,8,9,11,12,15,16,19],sampl:8,save:[],scrypt:11,search:6,second:[9,11,12,15,16,18],secur:[4,7,9,11,15,18],see:[4,7,8,9,10,11,12,15,16,18,19],seed:9,seedhash:9,seen:11,segment:2,select:8,send:[],sender:9,sendsignedtransact:[],sendtransact:[],sensit:15,sent:[9,12],separ:[4,7,8,9,11,15,18],serial:9,serializedtx:9,serpent:[],set:[1,4,7,8,9,11,12,15,17,18],setmaxmessages:[],setminpow:[],sha3:[],sha3uncl:[9,16],shannon:19,share:11,shh:[],should:[9,11,12,18,19],show:[16,19],sig:18,sign:[],signatur:[9,10,11,12,15,18],signatureobject:11,signedtransactiondata:9,signtransact:[],simpl:11,simpli:12,simul:9,singl:12,single:12,singleton:13,size:[9,18,19],smallest:19,smart:[1,2,9,12],solid:[],soliditysah3:[],soliditysha3:[],solut:9,some:[4,7,8,9,11,12,15,16,17,18],somecontract:12,sourc:[4,7,8,9,15,18],sourcecod:9,specif:[],specifi:[2,9,18],spent:18,stackexchang:[],stage:0,standalon:[11,12],standard:[0,4,7,9,11,15,18],startingblock:9,stat:16,state:[2,9,12,16],statemut:2,stateroot:[9,16],ste:[],still:[9,12],stop:16,storag:[1,9,11],store:[8,11,12,18],string:[2,4,7,8,9,10,11,12,13,14,15,16,18,19],stringtohex:19,strong:19,structur:[8,9,11,12,16],sub:[4,7,8,9,15,18],submit:9,submitwork:[],subscrib:[],subscript:[4,7,9,12,15,16,18],success:[12,16,18],successful:16,successfulli:16,superpassword:15,support:[1,7,9,15,17,18],sure:11,swarm:[1,7,8],sym:18,symkei:18,symkeyid:18,symmetr:18,sync:[],synchron:[],synchronis:16,szabo:19,take:[11,12],taken:19,target:[8,9,18],targetp:18,test:[2,8,9,11,14,15],testint:2,testnet:14,tether:19,text:[8,15,19],tfunction:9,thei:[11,12,16,18],them:7,therefor:0,thi:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],thing:8,those:12,through:[6,12],tightli:19,time:[4,7,8,9,12,15,18],timer:16,timestamp:[9,16,18],toaddress:[],toascii:19,toblock:[9,12],tobn:[],tochecksumaddress:[],todecim:19,todo:15,tohex:[],toiban:[],topic:[2,9,10,12,16,18],tostr:[],total:[9,16,19],totaldifficulti:9,totwoscompl:[],toutf8:19,towei:[],transact:[0,9,11,12,16],transactionhash:[0,9,12],transactionindex:[9,12],transactionobject:9,transactionsroot:[9,16],transfer:[9,11,12],treturn:9,tricki:19,trie:[9,16],trust:18,ttl:18,two:19,txt:8,type:[2,8,9,10,12,16,18,19],typesarrai:10,uint256:[2,9,10,12,19],uint32:10,uint8:10,uint8arrai:8,uint:[2,9,19],umbrella:[4,7,8,9,15,17,18],uncl:[9,16],uncleindex:9,undefin:[9,12],under:18,underli:18,underscor:19,underscorej:[],undetect:14,unencrypt:11,union:19,unit:19,unitmap:[],unix:[9,16,18],unlock:9,unlockaccount:15,unsaf:11,unsecur:15,unsubscrib:[12,16],until:9,unus:9,upload:[],upper:19,uppercas:[9,19],url:8,usag:[4,7,9,11,15,18],use:9,used:[9,12],useful:19,user:[4,6,7,9,15,18],userdoc:9,using:[2,4,7,9,12,15,18],utf8:11,utf8tohex:[],utf:[11,19],util:[],utiliti:7,vailid:13,valid:[4,7,8,9,13,15,18,19],veri:18,verifi:18,version:[],via:[9,12,18],view:2,virtual:10,wai:[0,19],wallet:[],want:[4,7,9,15,16,18],watch:0,web3js_wallet:11,websocket:[4,7,9,15,18],websocketprovid:[4,7,9,15,18],wei:[9,11,12,19],well:[0,6,9],were:[9,12,16],what:[],when:[4,7,8,9,11,12,15,16,18,19],where:[8,9,12,18],whether:9,which:[1,2,4,6,7,8,9,10,11,12,15,16,18],whisper:[1,7,18],who:[],whom:[9,16],wiki:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],window:[4,7,9,15,18],within:18,without:[10,12],won:[4,7,9,15,18],work:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19],world:[9,11,15],would:[2,12,19],wrong:19,x19ethereum:11,xe7338o073kygtwwzn0f2wz0r8px5zppzs:13,xe81ethxreggavofyork:13,xe82ethxreggavofyork:13,xreg:13,xxxxxxxxxxxxxxxhello:19,yet:[0,1,2,3,6,7,8,9,10,11,12,13,14,15,16,17,18,19],you:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19],your:[1,8,9,15]},titles:["Callbacks Promises Events","Getting Started","Glossary","<no title>","setProvider","getId","web3.js - Ethereum JavaScript API","web3","web3.bzz","web3.eth","web3.eth.abi","web3.eth.accounts","web3.eth.Contract","web3.eth.Iban","web3.eth.net","web3.eth.personal","web3.eth.subscribe","web3.*.net","web3.shh","web3.utils"],titleterms:{"new":12,"return":[4,5,7,8,9,10,11,12,13,14,15,16,17,18,19],abi:[9,10],account:[9,11],add:11,adding:1,addprivatekei:18,address:[9,12],addsymkei:18,allevent:12,api:6,asciitohex:19,batchrequest:[4,7,9,15,18],bytestohex:19,bzz:8,call:[9,12],callback:0,checkaddresschecksum:19,checksum:[9,13],clear:11,clearsubscript:[16,18],client:13,clone:12,compil:9,contract:[9,12],creat:11,createindirect:13,currentprovid:[4,7,8,9,15,18],decodelog:10,decodeparamet:10,decrypt:11,defaultaccount:9,defaultblock:9,deletekeypair:18,deletemessagefilt:18,deletesymkei:18,deploi:12,document:[],download:8,ecrecov:15,encodeabi:12,encodeeventsignatur:10,encodefunctioncal:10,encodefunctionsignatur:10,encodeparamet:10,encrypt:11,estimatega:[9,12],eth:[9,10,11,12,13,14,15,16],ethereum:6,event:[0,12],exampl:[2,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19],extend:[4,7,9,15,18],frombban:13,fromethereumaddress:13,fromwei:19,generatesymkeyfrompassword:18,get:1,getaccount:9,getbal:9,getblock:9,getblocknumb:9,getblocktransactioncount:9,getcod:9,getcoinbas:9,getcompil:9,getfiltermessag:18,getgaspric:9,gethashr:9,getid:[5,14,17,18],getinfo:18,getnetworktyp:14,getpastev:12,getpastlog:9,getpeercount:[5,14,17,18],getprivatekei:18,getprotocolvers:9,getpublickei:18,getstorageat:9,getsymkei:18,gettransact:9,gettransactioncount:9,gettransactionfromblock:9,gettransactionreceipt:9,getuncl:9,getvers:18,getwork:9,givenprovid:[4,7,8,9,15,18],glossari:2,hashmessag:11,haskeypair:18,hassymkei:18,hextoascii:19,hextobyt:19,hextonumb:19,hextonumberstr:19,hextoutf8:19,iban:[9,13],indice:[],institut:13,interfac:2,isaddress:19,isbignumb:19,isbn:19,isdirect:13,ishex:19,ishexstrict:19,isindirect:13,islisten:[5,14,17,18],ismin:9,issync:9,isvalid:13,javascript:6,json:2,jsoninterfac:12,leftpad:[],lll:9,load:11,log:16,marktrustedp:18,method:12,modul:7,mymethod:12,net:[9,14,17],newaccount:15,newblockhead:16,newkeypair:18,newmessagefilt:18,newsymkei:18,note:9,notif:[16,18],numbertohex:19,onc:12,option:12,padleft:19,padright:19,paramet:[4,5,7,8,9,10,11,12,13,14,15,16,17,18,19],pendingtransact:16,person:[9,15],pick:8,post:18,privatekeytoaccount:11,promis:0,properti:[9,12],provid:[4,7,9,15,18],randomhex:19,recov:11,recovertransact:11,remov:11,retrun:19,rightpad:[],save:11,send:12,sendsignedtransact:9,sendtransact:9,serpent:9,setmaxmessages:18,setminpow:18,setprovid:[4,7,8,9,15,18],sha3:19,shh:18,sign:[9,11,15],signtransact:[9,11],solid:9,soliditysha3:19,specif:2,start:1,submitwork:9,subscrib:[9,16,18],sync:16,tabl:[],toaddress:13,tobn:19,tochecksumaddress:19,tohex:19,toiban:13,tostr:13,totwoscompl:19,towei:19,unitmap:19,upload:8,utf8tohex:19,util:[7,19],valu:[4,7,9,15,18,19],version:7,wallet:11,web3:[1,6,7,8,9,10,11,12,13,14,15,16,17,18,19],welcom:[]}})
\ No newline at end of file
diff --git a/docs/_build/html/web3-bzz.html b/docs/_build/html/web3-bzz.html
deleted file mode 100644
index ee5acdcf5e1..00000000000
--- a/docs/_build/html/web3-bzz.html
+++ /dev/null
@@ -1,439 +0,0 @@
-
-
-
-
-
-
-
- web3.bzz — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.bzz
-
-
Note
-
This API might change over time.
-
-
The web3-bzz package allows you to interact swarm the decentralized file store.
-For more see the Swarm Docs.
-
var Bzz = require('web3-bzz');
-
-// will autodetect if the "ethereum" object is present and will either connect to the local swarm node, or the swarm-gateways.net.
-// Optional you can give your own provider URL; If no provider URL is given it will use "http://swarm-gateways.net"
-var bzz = new Bzz(Bzz.givenProvider || 'http://swarm-gateways.net');
-
-
-// or using the web3 umbrella package
-
-var Web3 = require('web3');
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-// -> web3.bzz.currentProvider // if Web3.givenProvider was an ethereum provider it will set: "http://localhost:8500" otherwise it will set: "http://swarm-gateways.net"
-
-// set the provider manually if necessary
-web3.bzz.setProvider("http://localhost:8500");
-
-
-
-
-
setProvider
-
web3.bzz.setProvider(myProvider)
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Bzz = require('web3-bzz');
-var bzz = new Bzz('http://localhost:8500');
-
-// change provider
-bzz.setProvider('http://swarm-gateways.net');
-
-
-
-
-
-
-
givenProvider
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
bzz.givenProvider;
-> {
- send: function(),
- on: function(),
- bzz: "http://localhost:8500",
- shh: true,
- ...
-}
-
-bzz.setProvider(bzz.givenProvider || "http://swarm-gateways.net");
-
-
-
-
-
-
-
currentProvider
-
-
Will return the current provider URL, otherwise null.
-
-
Returns
-
Object: The current provider URL or null;
-
-
-
Example
-
bzz.currentProvider;
-> "http://localhost:8500"
-
-
-if(!bzz.currentProvider) {
- bzz.setProvider("http://swarm-gateways.net");
-}
-
-
-
-
-
-
-
upload
-
-
Uploads files folders or raw data to swarm.
-
-
Parameters
-
-
-mixed - String|Buffer|Uint8Array|Object: The data to upload, can be a file content, file Buffer/Uint8Array, multiple files, or a directory or file (only in node.js). The following types are allowed:
--
-
-
-
-
-
-
-
Returns
-
Promise returning String: Returns the content hash of the manifest.
-
-
-
Example
-
var bzz = web3.bzz;
-
-// raw data
-bzz.upload("test file").then(function(hash) {
- console.log("Uploaded file. Address:", hash);
-})
-
-// raw directory
-var dir = {
- "/foo.txt": {type: "text/plain", data: "sample file"},
- "/bar.txt": {type: "text/plain", data: "another file"}
-};
-bzz.upload(dir).then(function(hash) {
- console.log("Uploaded directory. Address:", hash);
-});
-
-// upload from disk in node.js
-bzz.upload({
- path: "/path/to/thing", // path to data / file / directory
- kind: "directory", // could also be "file" or "data"
- defaultFile: "/index.html" // optional, and only for kind === "directory"
-})
-.then(console.log)
-.catch(console.log);
-
-// upload from disk in the browser
-bzz.upload({pick: "file"}) // could also be "directory" or "data"
-.then(console.log);
-
-
-
-
-
-
-
download
-
web3.bzz.download(bzzHash [, localpath])
-
-
-
Downloads files and folders from swarm, as buffer or to disk (only node.js).
-
-
Parameters
-
-bzzHash - String: The file or directory to download. If the hash is a raw file it will return a Buffer, if a manifest file, it will return the directory structure. If the localpath is given, it will return that path where it downloaded the files to.
-localpath - String: The local folder to download the content into. (only node.js)
-
-
-
-
Returns
-
Promise returning Buffer|Object|String: The Buffer of the file downloaded, an object with the directory structure, or the path where it was downloaded to.
-
-
-
Example
-
var bzz = web3.bzz;
-
-// download raw file
-var fileHash = "a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23";
-bzz.download(fileHash).then(function(buffer) {
- console.log("Downloaded file:", buffer.toString());
-});
-
-// download directory, if the hash is manifest file.
-var dirHash = "7e980476df218c05ecfcb0a2ca73597193a34c5a9d6da84d54e295ecd8e0c641";
-bzz.download(dirHash).then(function(dir) {
- console.log("Downloaded directory:");
- > {
- 'bar.txt': { type: 'text/plain', data: <Buffer 61 6e 6f 74 68 65 72 20 66 69 6c 65> },
- 'foo.txt': { type: 'text/plain', data: <Buffer 73 61 6d 70 6c 65 20 66 69 6c 65> }
- }
-});
-
-// download file/directory to disk (only node.js)
-var dirHash = "a5c10851ef054c268a2438f10a21f6efe3dc3dcdcc2ea0e6a1a7a38bf8c91e23";
-bzz.download(dirHash, "/target/dir")
-.then(path => console.log(`Downloaded directory to ${path}.`))
-.catch(console.log);
-
-
-
-
-
-
-
pick
-
web3.bzz.pick.file()
-web3.bzz.pick.directory()
-web3.bzz.pick.data()
-
-
-
Opens a file picker in the browser to select file(s), directory or data.
-
-
-
Returns
-
Promise returning Object: Returns the file or multiple files.
-
-
-
Example
-
web3.bzz.pick.file()
-.then(console.log);
-> {
- ...
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-abi.html b/docs/_build/html/web3-eth-abi.html
deleted file mode 100644
index 33257d88cfa..00000000000
--- a/docs/_build/html/web3-eth-abi.html
+++ /dev/null
@@ -1,467 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.abi — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.abi
-
The web3.eth.abi functions let you de- and encode parameters to ABI (Application Binary Interface) for function calls to the EVM (Ethereum Virtual Machine).
-
-
-
encodeFunctionSignature
-
web3.eth.abi.encodeFunctionSignature(functionName);
-
-
-
Encodes the function name to its ABI signature, which are the first 4 bytes of the sha3 hash of the function name including types.
-
-
Parameters
-
1. functionName - String|Object: The function name to encode.
-or the JSON interface object of the function. If string it has to be in the form function(type,type,...), e.g: myFunction(uint256,uint32[],bytes10,bytes)
-
-
-
Returns
-
String - The ABI signature of the function.
-
-
-
Example
-
// From a JSON interface object
-web3.eth.abi.encodeFunctionSignature({
- name: 'myMethod',
- type: 'function',
- inputs: [{
- type: 'uint256',
- name: 'myNumber'
- },{
- type: 'string',
- name: 'myString'
- }]
-})
-> 0x24ee0097
-
-// Or string
-web3.eth.abi.encodeFunctionSignature('myMethod(uint256,string)')
-> '0x24ee0097'
-
-
-
-
-
-
-
encodeEventSignature
-
web3.eth.abi.encodeEventSignature(eventName);
-
-
-
Encodes the event name to its ABI signature, which are the sha3 hash of the event name including input types.
-
-
Parameters
-
1. eventName - String|Object: The event name to encode.
-or the JSON interface object of the event. If string it has to be in the form event(type,type,...), e.g: myEvent(uint256,uint32[],bytes10,bytes)
-
-
-
Returns
-
String - The ABI signature of the event.
-
-
-
Example
-
web3.eth.abi.encodeEventSignature('myEvent(uint256,bytes32)')
-> 0xf2eeb729e636a8cb783be044acf6b7b1e2c5863735b60d6daae84c366ee87d97
-
-// or from a json interface object
-web3.eth.abi.encodeEventSignature({
- name: 'myEvent',
- type: 'event',
- inputs: [{
- type: 'uint256',
- name: 'myNumber'
- },{
- type: 'bytes32',
- name: 'myBytes'
- }]
-})
-> 0xf2eeb729e636a8cb783be044acf6b7b1e2c5863735b60d6daae84c366ee87d97
-
-
-
-
-
-
-
encodeParameter
-
web3.eth.abi.encodeParameter(type, parameter);
-
-
-
Encodes a parameter based on its type to its ABI representation.
-
-
Parameters
-
-type - String: The type of the parameter, see the solidity documentation for a list of types.
-parameter - Mixed: The actual parameter to encode.
-
-
-
-
Returns
-
String - The ABI encoded parameter.
-
-
-
Example
-
web3.eth.abi.encodeParameter('uint256', '2345675643');
-> "0x000000000000000000000000000000000000000000000000000000008bd02b7b"
-
-web3.eth.abi.encodeParameter('uint256', '2345675643');
-> "0x000000000000000000000000000000000000000000000000000000008bd02b7b"
-
-web3.eth.abi.encodeParameter('bytes32', '0xdf3234');
-> "0xdf32340000000000000000000000000000000000000000000000000000000000"
-
-web3.eth.abi.encodeParameter('bytes', '0xdf3234');
-> "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003df32340000000000000000000000000000000000000000000000000000000000"
-
-web3.eth.abi.encodeParameter('bytes32[]', ['0xdf3234', '0xfdfd']);
-> "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002df32340000000000000000000000000000000000000000000000000000000000fdfd000000000000000000000000000000000000000000000000000000000000"
-
-
-
-
-
-
-
encodeParameters
-
web3.eth.abi.encodeParameters(typesArray, parameters);
-
-
-
Encodes a function parameters based on its JSON interface object.
-
-
Parameters
-
-typesArray - Array|Object: An array with types or a JSON interface of a function. See the solidity documentation for a list of types.
-parameters - Array: The parameters to encode.
-
-
-
-
Returns
-
String - The ABI encoded parameters.
-
-
-
Example
-
web3.eth.abi.encodeParameters(['uint256','string'], ['2345675643', 'Hello!%']);
-> "0x000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000"
-
-web3.eth.abi.encodeParameters(['uint8[]','bytes32'], [['34','434'], '0x324567fff']);
-> "0x0000000000000000000000000000000000000000000000000000000000000040324567fff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000001b2"
-
-
-
-
-
-
-
encodeFunctionCall
-
web3.eth.abi.encodeFunctionCall(jsonInterface, parameters);
-
-
-
Encodes a function call using its JSON interface object and given paramaters.
-
-
Parameters
-
-jsonInterface - Object: The JSON interface object of a function.
-parameters - Array: The parameters to encode.
-
-
-
-
Returns
-
String - The ABI encoded function call. Means function signature + parameters.
-
-
-
Example
-
web3.eth.abi.encodeFunctionCall({
- name: 'myMethod',
- type: 'function',
- inputs: [{
- type: 'uint256',
- name: 'myNumber'
- },{
- type: 'string',
- name: 'myString'
- }]
-}, ['2345675643', 'Hello!%']);
-> "0x24ee0097000000000000000000000000000000000000000000000000000000008bd02b7b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000748656c6c6f212500000000000000000000000000000000000000000000000000"
-
-
-
-
-
-
-
decodeParameter
-
web3.eth.abi.decodeParameter(type, hexString);
-
-
-
Decodes an ABI encoded parameter to its JavaScript type.
-
-
Parameters
-
-type - String: The type of the parameter, see the solidity documentation for a list of types.
-hexString - String: The ABI byte code to decode.
-
-
-
-
Returns
-
Mixed - The decoded parameter.
-
-
-
Example
-
web3.eth.abi.decodeParameter('uint256', '0x0000000000000000000000000000000000000000000000000000000000000010');
-> "16"
-
-web3.eth.abi.decodeParameter('string', '0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000');
-> "Hello!%!"
-
-
-
-
-
-
-
decodeParameters
-
web3.eth.abi.decodeParameters(typesArray, hexString);
-
-
-
Decodes ABI encoded parameters to its JavaScript types.
-
-
Parameters
-
-typesArray - Array|Object: An array with types or a JSON interface outputs array. See the solidity documentation for a list of types.
-hexString - String: The ABI byte code to decode.
-
-
-
-
Returns
-
Object - The result object containing the decoded parameters.
-
-
-
Example
-
web3.eth.abi.decodeParameters(['string', 'uint256'], '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000ea000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000');
-> Result { '0': 'Hello!%!', '1': '234' }
-
-web3.eth.abi.decodeParameters([{
- type: 'string',
- name: 'myString'
-},{
- type: 'uint256',
- name: 'myNumber'
-}], '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000ea000000000000000000000000000000000000000000000000000000000000000848656c6c6f212521000000000000000000000000000000000000000000000000');
-> Result {
- '0': 'Hello!%!',
- '1': '234',
- myString: 'Hello!%!',
- myNumber: '234'
-}
-
-
-
-
-
-
-
decodeLog
-
web3.eth.abi.decodeLog(inputs, hexString, topics);
-
-
-
Decodes ABI encoded log data and indexed topic data.
-
-
Parameters
-
-inputs - Object: A JSON interface inputs array. See the solidity documentation for a list of types.
-hexString - String: The ABI byte code in the data field of a log.
-topics - Array: An array with the index parameter topics of the log, without the topic[0] if its a non-anonymous event, otherwise with topic[0].
-
-
-
-
Returns
-
Object - The result object containing the decoded parameters.
-
-
-
Example
-
web3.eth.abi.decodeLog([{
- type: 'string',
- name: 'myString'
-},{
- type: 'uint256',
- name: 'myNumber',
- indexed: true
-},{
- type: 'uint8',
- name: 'mySmallNumber',
- indexed: true
-}],
-'0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000748656c6c6f252100000000000000000000000000000000000000000000000000',
-['0x000000000000000000000000000000000000000000000000000000000000f310', '0x0000000000000000000000000000000000000000000000000000000000000010']);
-> Result {
- '0': 'Hello%!',
- '1': '62224',
- '2': '16',
- myString: 'Hello%!',
- myNumber: '62224',
- mySmallNumber: '16'
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-accounts.html b/docs/_build/html/web3-eth-accounts.html
deleted file mode 100644
index a010a3dd23d..00000000000
--- a/docs/_build/html/web3-eth-accounts.html
+++ /dev/null
@@ -1,1006 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.accounts — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.accounts
-
The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.
-
-
Note
-
This package has NOT been audited and might potentially be unsafe. Take precautions to clear memory properly, store the private keys safely, and test transaction receiving and sending functionality properly before using in production!
-
-
To use this package standalone use:
-
var Accounts = require('web3-eth-accounts');
-
-// Passing in the eth or web3 package is necessary to allow retrieving chainId, gasPrice and nonce automatically
-// for accounts.signTransaction().
-var accounts = new Accounts('ws://localhost:8546');
-
-
-
-
-
create
-
web3.eth.accounts.create([entropy]);
-
-
-
Generates an account object with private key and public key.
-
-
Parameters
-
-entropy - String (optional): A random string to increase entropy. If given it should be at least 32 characters. If none is given a random string will be generated using randomhex.
-
-
-
-
Returns
-
Object - The account object with the following structure:
-
-
-address - string: The account address.
-privateKey - string: The accounts private key. This should never be shared or stored unencrypted in localstorage! Also make sure to null the memory after usage.
-signTransaction(tx [, callback]) - Function: The function to sign transactions. See web3.eth.accounts.signTransaction() for more.
-sign(data) - Function: The function to sign transactions. See web3.eth.accounts.sign() for more.
-
-
-
-
-
Example
-
web3.eth.accounts.create();
-> {
- address: "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01",
- privateKey: "0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709",
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-web3.eth.accounts.create('2435@#@#@±±±±!!!!678543213456764321§34567543213456785432134567');
-> {
- address: "0xF2CD2AA0c7926743B1D4310b2BC984a0a453c3d4",
- privateKey: "0xd7325de5c2c1cf0009fac77d3d04a9c004b038883446b065871bc3e831dcd098",
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-web3.eth.accounts.create(web3.utils.randomHex(32));
-> {
- address: "0xe78150FaCD36E8EB00291e251424a0515AA1FF05",
- privateKey: "0xcc505ee6067fba3f6fc2050643379e190e087aeffe5d958ab9f2f3ed3800fa4e",
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-
-
-
-
-
-
privateKeyToAccount
-
web3.eth.accounts.privateKeyToAccount(privateKey);
-
-
-
Creates an account object from a private key.
-
-
Parameters
-
-privateKey - String: The private key to convert.
-
-
-
-
-
Example
-
web3.eth.accounts.privateKeyToAccount('0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709');
-> {
- address: '0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01',
- privateKey: '0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-web3.eth.accounts.privateKeyToAccount('348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709');
-> {
- address: '0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01',
- privateKey: '0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-
-
-
-
-
-
signTransaction
-
web3.eth.accounts.signTransaction(tx, privateKey [, callback]);
-
-
-
Signs an Ethereum transaction with a given private key.
-
-
Parameters
-
-
-tx - Object: The transaction object as follows:
-
-nonce - String: (optional) The nonce to use when signing this transaction. Default will use web3.eth.getTransactionCount().
-chainId - String: (optional) The chain id to use when signing this transaction. Default will use web3.eth.net.getId().
-to - String: (optional) The recevier of the transaction, can be empty when deploying a contract.
-data - String: (optional) The call data of the transaction, can be empty for simple value transfers.
-value - String: (optional) The value of the transaction in wei.
-gasPrice - String: (optional) The gas price set by this transaction, if empty, it will use web3.eth.gasPrice()
-gas - String: The gas provided by the transaction.
-
-
-
-
-privateKey - String: The private key to sign with.
-
-callback - Function: (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
-
Returns
-
-Promise returning Object: The signed data RLP encoded transaction, or if returnSignature is true the signature values as follows:
-
-messageHash - String: The hash of the given message.
-r - String: First 32 bytes of the signature
-s - String: Next 32 bytes of the signature
-v - String: Recovery value + 27
-rawTransaction - String: The RLP encoded transaction, ready to be send using web3.eth.sendSignedTransaction.
-
-
-
-
-
-
Example
-
web3.eth.accounts.signTransaction({
- to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
- value: '1000000000',
- gas: 2000000
-}, '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')
-.then(console.log);
-> {
- messageHash: '0x88cfbd7e51c7a40540b233cf68b62ad1df3e92462f1c6018d6d67eae0f3b08f5',
- v: '0x25',
- r: '0xc9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895',
- s: '0x727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68',
- rawTransaction: '0xf869808504e3b29200831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a0c9cf86333bcb065d140032ecaab5d9281bde80f21b9687b3e94161de42d51895a0727a108a0b8d101465414033c3f705a9c7b826e596766046ee1183dbc8aeaa68'
-}
-
-web3.eth.accounts.signTransaction({
- to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
- value: '1000000000',
- gas: 2000000,
- gasPrice: '234567897654321',
- nonce: 0,
- chainId: 1
-}, '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')
-.then(console.log);
-> {
- messageHash: '0x6893a6ee8df79b0f5d64a180cd1ef35d030f3e296a5361cf04d02ce720d32ec5',
- r: '0x9ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9c',
- s: '0x440ffd775ce91a833ab410777204d5341a6f9fa91216a6f3ee2c051fea6a0428',
- v: '0x25',
- rawTransaction: '0xf86a8086d55698372431831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a009ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9ca0440ffd775ce91a833ab410777204d5341a6f9fa91216a6f3ee2c051fea6a0428'
-}
-
-
-
-
-
-
-
recoverTransaction
-
web3.eth.accounts.recoverTransaction(rawTransaction);
-
-
-
Recovers the Ethereum address which was used to sign the given RLP encoded transaction.
-
-
Parameters
-
-signature - String: The RLP encoded transaction.
-
-
-
-
Returns
-
String: The Ethereum address used to sign this transaction.
-
-
-
Example
-
web3.eth.accounts.recoverTransaction('0xf86180808401ef364594f0109fc8df283027b6285cc889f5aa624eac1f5580801ca031573280d608f75137e33fc14655f097867d691d5c4c44ebe5ae186070ac3d5ea0524410802cdc025034daefcdfa08e7d2ee3f0b9d9ae184b2001fe0aff07603d9');
-> "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55"
-
-
-
-
-
-
-
hashMessage
-
web3.eth.accounts.hashMessage(message);
-
-
-
Hashes the given message to be passed web3.eth.accounts.recover() function. The data will be UTF-8 HEX decoded and enveloped as follows: "\x19Ethereum Signed Message:\n" + message.length + message and hashed using keccak256.
-
-
Parameters
-
-message - String: A message to hash, if its HEX it will be UTF8 decoded before.
-
-
-
-
Returns
-
String: The hashed message
-
-
-
Example
-
web3.eth.accounts.hashMessage("Hello World")
-> "0xa1de988600a42c4b4ab089b619297c17d53cffae5d5120d82d8a92d0bb3b78f2"
-
-// the below results in the same hash
-web3.eth.accounts.hashMessage(web3.utils.utf8ToHex("Hello World"))
-> "0xa1de988600a42c4b4ab089b619297c17d53cffae5d5120d82d8a92d0bb3b78f2"
-
-
-
-
-
-
-
sign
-
web3.eth.accounts.sign(data, privateKey);
-
-
-
Signs arbitrary data. This data is before UTF-8 HEX decoded and enveloped as follows: "\x19Ethereum Signed Message:\n" + message.length + message.
-
-
Parameters
-
-data - String: The data to sign. If its a string it will be
-privateKey - String: The private key to sign with.
-
-
-
-
Returns
-
-String|Object: The signed data RLP encoded signature, or if returnSignature is true the signature values as follows:
-
-message - String: The the given message.
-messageHash - String: The hash of the given message.
-r - String: First 32 bytes of the signature
-s - String: Next 32 bytes of the signature
-v - String: Recovery value + 27
-
-
-
-
-
-
Example
-
web3.eth.accounts.sign('Some data', '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318');
-> {
- message: 'Some data',
- messageHash: '0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655',
- v: '0x1c',
- r: '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd',
- s: '0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029',
- signature: '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c'
-}
-
-
-
-
-
-
-
recover
-
web3.eth.accounts.recover(signatureObject);
-web3.eth.accounts.recover(hash, signature);
-web3.eth.accounts.recover(hash, v, r, s);
-
-
-
Recovers the Ethereum address which was used to sign the given data.
-
-
Parameters
-
-
-signature - String|Object: Either the encoded signature, the v, r, s values as separate parameters, or an object with the following values:
-
-messageHash - String: The hash of the given message.
-r - String: First 32 bytes of the signature
-s - String: Next 32 bytes of the signature
-v - String: Recovery value + 27
-
-
-
-
-
-
-
-
Returns
-
String: The Ethereum address used to sign this data.
-
-
-
Example
-
web3.eth.accounts.recover({
- messageHash: '0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655',
- v: '0x1c',
- r: '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd',
- s: '0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029'
-})
-> "0x2c7536E3605D9C16a7a3D7b1898e529396a65c23"
-
-// hash signature
-web3.eth.accounts.recover('0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655', '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c');
-> "0x2c7536E3605D9C16a7a3D7b1898e529396a65c23"
-
-// hash, v, r, s
-web3.eth.accounts.recover('0x1da44b586eb0729ff70a73c326926f6ed5a25f5b056e7f47fbc6e58d86871655', '0x1c', '0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd', '0x6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a029');
-> "0x2c7536E3605D9C16a7a3D7b1898e529396a65c23"
-
-
-
-
-
-
-
encrypt
-
web3.eth.accounts.encrypt(privateKey, password);
-
-
-
Encrypts a private key to the web3 keystore v3 standard.
-
-
Parameters
-
-privateKey - String: The private key to encrypt.
-password - String: The password used for encryption.
-
-
-
-
Returns
-
Object: The encrypted keystore v3 JSON.
-
-
-
Example
-
web3.eth.accounts.encrypt('0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318', 'test!')
-> {
- version: 3,
- id: '04e9bcbb-96fa-497b-94d1-14df4cd20af6',
- address: '2c7536e3605d9c16a7a3d7b1898e529396a65c23',
- crypto: {
- ciphertext: 'a1c25da3ecde4e6a24f3697251dd15d6208520efc84ad97397e906e6df24d251',
- cipherparams: { iv: '2885df2b63f7ef247d753c82fa20038a' },
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams: {
- dklen: 32,
- salt: '4531b3c174cc3ff32a6a7a85d6761b410db674807b2d216d022318ceee50be10',
- n: 262144,
- r: 8,
- p: 1
- },
- mac: 'b8b010fff37f9ae5559a352a185e86f9b9c1d7f7a9f1bd4e82a5dd35468fc7f6'
- }
-}
-
-
-
-
-
-
-
decrypt
-
web3.eth.accounts.decrypt(keystoreJsonV3, password);
-
-
-
Decrypts a keystore v3 JSON, and creates the account.
-
-
Parameters
-
-encryptedPrivateKey - String: The encrypted private key to decrypt.
-password - String: The password used for encryption.
-
-
-
-
Returns
-
Object: The decrypted account.
-
-
-
Example
-
web3.eth.accounts.decrypt({
- version: 3,
- id: '04e9bcbb-96fa-497b-94d1-14df4cd20af6',
- address: '2c7536e3605d9c16a7a3d7b1898e529396a65c23',
- crypto: {
- ciphertext: 'a1c25da3ecde4e6a24f3697251dd15d6208520efc84ad97397e906e6df24d251',
- cipherparams: { iv: '2885df2b63f7ef247d753c82fa20038a' },
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams: {
- dklen: 32,
- salt: '4531b3c174cc3ff32a6a7a85d6761b410db674807b2d216d022318ceee50be10',
- n: 262144,
- r: 8,
- p: 1
- },
- mac: 'b8b010fff37f9ae5559a352a185e86f9b9c1d7f7a9f1bd4e82a5dd35468fc7f6'
- }
-}, 'test!');
-> {
- address: "0x2c7536E3605D9C16a7a3D7b1898e529396a65c23",
- privateKey: "0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318",
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-
-
-
-
-
wallet
-
web3.eth.accounts.wallet;
-
-
-
Contains an in memory wallet with multiple accounts. These accounts can be used when using web3.eth.sendTransaction().
-
-
Example
-
web3.eth.accounts.wallet;
-> Wallet {
- 0: {...}, // account by index
- "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55": {...}, // same account by address
- "0xf0109fc8df283027b6285cc889f5aa624eac1f55": {...}, // same account by address lowercase
- 1: {...},
- "0xD0122fC8DF283027b6285cc889F5aA624EaC1d23": {...},
- "0xd0122fc8df283027b6285cc889f5aa624eac1d23": {...},
-
- add: function(){},
- remove: function(){},
- save: function(){},
- load: function(){},
- clear: function(){},
-
- length: 2,
-}
-
-
-
-
-
-
-
wallet.create
-
web3.eth.accounts.wallet.create(numberOfAccounts [, entropy]);
-
-
-
Generates one or more accounts in the wallet. If wallets already exist they will not be overridden.
-
-
Parameters
-
-numberOfAccounts - Number: Number of accounts to create. Leave empty to create an empty wallet.
-entropy - String (optional): A string with random characters as additional entropy when generating accounts. If given it should be at least 32 characters.
-
-
-
-
Returns
-
Object: The wallet object.
-
-
-
Example
-
web3.eth.accounts.wallet.create(2, '54674321§3456764321§345674321§3453647544±±±§±±±!!!43534534534534');
-> Wallet {
- 0: {...},
- "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55": {...},
- "0xf0109fc8df283027b6285cc889f5aa624eac1f55": {...},
- ...
-}
-
-
-
-
-
-
-
wallet.add
-
web3.eth.accounts.wallet.add(account);
-
-
-
Adds an account using a private key or account object to the wallet.
-
-
-
Returns
-
Object: The added account.
-
-
-
Example
-
web3.eth.accounts.wallet.add('0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318');
-> {
- index: 0,
- address: '0x2c7536E3605D9C16a7a3D7b1898e529396a65c23',
- privateKey: '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318',
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-web3.eth.accounts.wallet.add({
- privateKey: '0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',
- address: '0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01'
-});
-> {
- index: 0,
- address: '0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01',
- privateKey: '0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709',
- signTransaction: function(tx){...},
- sign: function(data){...},
- encrypt: function(password){...}
-}
-
-
-
-
-
-
-
wallet.remove
-
web3.eth.accounts.wallet.remove(account);
-
-
-
Removes an account from the wallet.
-
-
Parameters
-
-account - String|Number: The account address, or index in the wallet.
-
-
-
-
Returns
-
Boolean: true if the wallet was removed. false if it couldn’t be found.
-
-
-
Example
-
web3.eth.accounts.wallet;
-> Wallet {
- 0: {...},
- "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55": {...}
- 1: {...},
- "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01": {...}
- ...
-}
-
-web3.eth.accounts.wallet.remove('0xF0109fC8DF283027b6285cc889F5aA624EaC1F55');
-> true
-
-web3.eth.accounts.wallet.remove(3);
-> false
-
-
-
-
-
-
-
wallet.clear
-
web3.eth.accounts.wallet.clear();
-
-
-
Securely empties the wallet and removes all its accounts.
-
-
-
Returns
-
Object: The wallet object.
-
-
-
Example
-
web3.eth.accounts.wallet.clear();
-> Wallet {
- add: function(){},
- remove: function(){},
- save: function(){},
- load: function(){},
- clear: function(){},
-
- length: 0
-}
-
-
-
-
-
-
-
wallet.encrypt
-
web3.eth.accounts.wallet.encrypt(password);
-
-
-
Encrypts all wallet accounts to and array of encrypted keystore v3 objects.
-
-
Parameters
-
-password - String: The password which will be used for encryption.
-
-
-
-
Returns
-
Array: The encrypted keystore v3.
-
-
-
Example
-
web3.eth.accounts.wallet.encrypt('test');
-> [ { version: 3,
- id: 'dcf8ab05-a314-4e37-b972-bf9b86f91372',
- address: '06f702337909c06c82b09b7a22f0a2f0855d1f68',
- crypto:
- { ciphertext: '0de804dc63940820f6b3334e5a4bfc8214e27fb30bb7e9b7b74b25cd7eb5c604',
- cipherparams: [Object],
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams: [Object],
- mac: 'b2aac1485bd6ee1928665642bf8eae9ddfbc039c3a673658933d320bac6952e3' } },
- { version: 3,
- id: '9e1c7d24-b919-4428-b10e-0f3ef79f7cf0',
- address: 'b5d89661b59a9af0b34f58d19138baa2de48baaf',
- crypto:
- { ciphertext: 'd705ebed2a136d9e4db7e5ae70ed1f69d6a57370d5fbe06281eb07615f404410',
- cipherparams: [Object],
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams: [Object],
- mac: 'af9eca5eb01b0f70e909f824f0e7cdb90c350a802f04a9f6afe056602b92272b' } }
-]
-
-
-
-
-
-
-
wallet.decrypt
-
web3.eth.accounts.wallet.decrypt(keystoreArray, password);
-
-
-
Decrypts keystore v3 objects.
-
-
Parameters
-
-keystoreArray - Array: The encrypted keystore v3 objects to decrypt.
-password - String: The password which will be used for encryption.
-
-
-
-
Returns
-
Object: The wallet object.
-
-
-
Example
-
web3.eth.accounts.wallet.decrypt([
- { version: 3,
- id: '83191a81-aaca-451f-b63d-0c5f3b849289',
- address: '06f702337909c06c82b09b7a22f0a2f0855d1f68',
- crypto:
- { ciphertext: '7d34deae112841fba86e3e6cf08f5398dda323a8e4d29332621534e2c4069e8d',
- cipherparams: { iv: '497f4d26997a84d570778eae874b2333' },
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams:
- { dklen: 32,
- salt: '208dd732a27aa4803bb760228dff18515d5313fd085bbce60594a3919ae2d88d',
- n: 262144,
- r: 8,
- p: 1 },
- mac: '0062a853de302513c57bfe3108ab493733034bf3cb313326f42cf26ea2619cf9' } },
- { version: 3,
- id: '7d6b91fa-3611-407b-b16b-396efb28f97e',
- address: 'b5d89661b59a9af0b34f58d19138baa2de48baaf',
- crypto:
- { ciphertext: 'cb9712d1982ff89f571fa5dbef447f14b7e5f142232bd2a913aac833730eeb43',
- cipherparams: { iv: '8cccb91cb84e435437f7282ec2ffd2db' },
- cipher: 'aes-128-ctr',
- kdf: 'scrypt',
- kdfparams:
- { dklen: 32,
- salt: '08ba6736363c5586434cd5b895e6fe41ea7db4785bd9b901dedce77a1514e8b8',
- n: 262144,
- r: 8,
- p: 1 },
- mac: 'd2eb068b37e2df55f56fa97a2bf4f55e072bef0dd703bfd917717d9dc54510f0' } }
-], 'test');
-> Wallet {
- 0: {...},
- 1: {...},
- "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55": {...},
- "0xD0122fC8DF283027b6285cc889F5aA624EaC1d23": {...}
- ...
-}
-
-
-
-
-
-
-
wallet.save
-
web3.eth.accounts.wallet.save(password [, keyName]);
-
-
-
Stores the wallet encrypted and as string in local storage.
-
-
-
Parameters
-
-password - String: The password to encrypt the wallet.
-keyName - String: (optional) The key used for the local storage position, defaults to "web3js_wallet".
-
-
-
-
-
Example
-
web3.eth.accounts.wallet.save('test#!$');
-> true
-
-
-
-
-
-
-
wallet.load
-
web3.eth.accounts.wallet.load(password [, keyName]);
-
-
-
Loads a wallet from local storage and decrypts it.
-
-
-
Parameters
-
-password - String: The password to decrypt the wallet.
-keyName - String: (optional) The key used for the localstorage position, defaults to "web3js_wallet".
-
-
-
-
Returns
-
Object: The wallet object.
-
-
-
Example
-
web3.eth.accounts.wallet.load('test#!$', 'myWalletKey');
-> Wallet {
- 0: {...},
- 1: {...},
- "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55": {...},
- "0xD0122fC8DF283027b6285cc889F5aA624EaC1d23": {...}
- ...
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-contract.html b/docs/_build/html/web3-eth-contract.html
deleted file mode 100644
index 273e9dc38ab..00000000000
--- a/docs/_build/html/web3-eth-contract.html
+++ /dev/null
@@ -1,1016 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.Contract — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.Contract
-
The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockchain.
-When you create a new contract object you give it the json interface of the respective smart contract
-and web3 will auto convert all calls into low level ABI calls over RPC for you.
-
This allows you to interact with smart contracts as if they were JavaScript objects.
-
To use it standalone:
-
-
-
new contract
-
new web3.eth.Contract(jsonInterface[, address][, options])
-
-
-
Creates a new contract instance with all its methods and events defined in its json interface object.
-
-
Parameters
-
-jsonInterface - Object: The json interface for the contract to instantiate
-
-address - String (optional): The address of the smart contract to call, can be added later using myContract.options.address = '0x1234..'
-
-
-options - Object (optional): The options of the contract. Some are used as fallbacks for calls and transactions:
-
-from - String: The address transactions should be made from.
-gasPrice - String: The gas price in wei to use for transactions.
-gas - Number: The maximum gas provided for a transaction (gas limit).
-data - String: The byte code of the contract. Used when the contract gets deployed.
-
-
-
-
-
-
-
-
Returns
-
Object: The contract instance with all its methods and events.
-
-
-
Example
-
var myContract = new web3.eth.Contract([...], '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', {
- from: '0x1234567890123456789012345678901234567891', // default from address
- gasPrice: '20000000000' // default gas price in wei, 20 gwei in this case
-});
-
-
-
-
-
-
-
= Properties =
-
-
-
-
options
-
-
The options object for the contract instance. from, gas and gasPrice are used as fallback values when sending transactions.
-
-
Properties
-
Object - options:
-
-address - String: The address where the contract is deployed. See options.address.
-jsonInterface - Array: The json interface of the contract. See options.jsonInterface.
-data - String: The byte code of the contract. Used when the contract gets deployed.
-from - String: The address transactions should be made from.
-gasPrice - String: The gas price in wei to use for transactions.
-gas - Number: The maximum gas provided for a transaction (gas limit).
-
-
-
-
Example
-
myContract.options;
-> {
- address: '0x1234567890123456789012345678901234567891',
- jsonInterface: [...],
- from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
- gasPrice: '10000000000000',
- gas: 1000000
-}
-
-myContract.options.from = '0x1234567890123456789012345678901234567891'; // default from address
-myContract.options.gasPrice = '20000000000000'; // default gas price in wei
-myContract.options.gas = 5000000; // provide as fallback always 5M gas
-
-
-
-
-
-
-
options.address
-
myContract.options.address
-
-
-
The address used for this contract instance.
-All transactions generated by web3.js from this contract will contain this address as the “to”.
-
The address will be stored in lowercase.
-
-
Property
-
address - String|null: The address for this contract, or null if it’s not yet set.
-
-
-
Example
-
myContract.options.address;
-> '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae'
-
-// set a new address
-myContract.options.address = '0x1234FFDD...';
-
-
-
-
-
-
-
options.jsonInterface
-
myContract.options.jsonInterface
-
-
-
The json interface object derived from the ABI of this contract.
-
-
Property
-
jsonInterface - Array: The json interface for this contract. Re-setting this will regenerate the methods and events of the contract instance.
-
-
-
Example
-
myContract.options.jsonInterface;
-> [{
- "type":"function",
- "name":"foo",
- "inputs": [{"name":"a","type":"uint256"}],
- "outputs": [{"name":"b","type":"address"}]
-},{
- "type":"event",
- "name":"Event"
- "inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
-}]
-
-// set a new interface
-myContract.options.jsonInterface = [...];
-
-
-
-
-
-
-
= Methods =
-
-
-
-
clone
-
-
Clones the current contract instance.
-
-
-
Returns
-
Object: The new contract instance.
-
-
-
Example
-
var contract1 = new eth.Contract(abi, address, {gasPrice: '12345678', from: fromAddress});
-
-var contract2 = contract1.clone();
-contract2.options.address = address2;
-
-(contract1.options.address !== contract2.options.address);
-> true
-
-
-
-
-
-
-
deploy
-
myContract.deploy(options)
-
-
-
Call this function to deploy the contract to the blockchain.
-After successful deployment the promise will resolve with a new contract instance.
-
-
Parameters
-
-
-options - Object: The options used for deployment.
-
-data - String: The byte code of the contract.
-arguments - Array (optional): The arguments which get passed to the constructor on deployment.
-
-
-
-
-
-
-
-
Returns
-
Object: The transaction object:
-
-Array - arguments: The arguments passed to the method before. They can be changed.
-Function - send: Will deploy the contract. The promise will resolve with the new contract instance, instead of the receipt!
-Function - estimateGas: Will estimate the gas used for deploying.
-Function - encodeABI: Encodes the ABI of the deployment, which is contract data + constructor parameters
-
-
-For details to the methods see the documentation below.
-
-
-
Example
-
myContract.deploy({
- data: '0x12345...',
- arguments: [123, 'My String']
-})
-.send({
- from: '0x1234567890123456789012345678901234567891',
- gas: 1500000,
- gasPrice: '30000000000000'
-}, function(error, transactionHash){ ... })
-.on('error', function(error){ ... })
-.on('transactionHash', function(transactionHash){ ... })
-.on('receipt', function(receipt){
- console.log(receipt.contractAddress) // contains the new contract address
-})
-.on('confirmation', function(confirmationNumber, receipt){ ... })
-.then(function(newContractInstance){
- console.log(newContractInstance.options.address) // instance with the new contract address
-});
-
-
-// When the data is already set as an option to the contract itself
-myContract.options.data = '0x12345...';
-
-myContract.deploy({
- arguments: [123, 'My String']
-})
-.send({
- from: '0x1234567890123456789012345678901234567891',
- gas: 1500000,
- gasPrice: '30000000000000'
-})
-.then(function(newContractInstance){
- console.log(newContractInstance.options.address) // instance with the new contract address
-});
-
-
-// Simply encoding
-myContract.deploy({
- data: '0x12345...',
- arguments: [123, 'My String']
-})
-.encodeABI();
-> '0x12345...0000012345678765432'
-
-
-// Gas estimation
-myContract.deploy({
- data: '0x12345...',
- arguments: [123, 'My String']
-})
-.estimateGas(function(err, gas){
- console.log(gas);
-});
-
-
-
-
-
-
-
methods
-
myContract.methods.myMethod([param1[, param2[, ...]]])
-
-
-
Creates a transaction object for that method, which then can be called, send, estimated.
-
The methods of this smart contract are available through:
-
-- The name:
myContract.methods.myMethod(123)
-- The name with parameters:
myContract.methods['myMethod(uint256)'](123)
-- The signature:
myContract.methods['0x58cf5f10'](123)
-
-
This allows calling functions with same name but different parameters from the JavaScript contract object.
-
-
Parameters
-
Parameters of any method depend on the smart contracts methods, defined in the JSON interface.
-
-
-
Returns
-
Object: The transaction object:
-
-Array - arguments: The arguments passed to the method before. They can be changed.
-Function - call: Will call the “constant” method and execute its smart contract method in the EVM without sending a transaction (Can’t alter the smart contract state).
-Function - send: Will send a transaction to the smart contract and execute its method (Can alter the smart contract state).
-Function - estimateGas: Will estimate the gas used when the method would be executed on chain.
-Function - encodeABI: Encodes the ABI for this method. This can be send using a transaction, call the method or passing into another smart contracts method as argument.
-
-
-For details to the methods see the documentation below.
-
-
-
Example
-
// calling a method
-
-myContract.methods.myMethod(123).call({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'}, function(error, result){
- ...
-});
-
-// or sending and using a promise
-myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.then(function(receipt){
- // receipt can also be a new contract instance, when coming from a "contract.deploy({...}).send()"
-});
-
-// or sending and using the events
-
-myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.on('transactionHash', function(hash){
- ...
-})
-.on('receipt', function(receipt){
- ...
-})
-.on('confirmation', function(confirmationNumber, receipt){
- ...
-})
-.on('error', console.error);
-
-
-
-
-
-
-
methods.myMethod.call
-
myContract.methods.myMethod([param1[, param2[, ...]]]).call(options[, callback])
-
-
-
Will call a “constant” method and execute its smart contract method in the EVM without sending any transaction. Note calling can not alter the smart contract state.
-
-
Parameters
-
-
-options - Object (optional): The options used for calling.
-
-from - String (optional): The address the call “transaction” should be made from.
-gasPrice - String (optional): The gas price in wei to use for this call “transaction”.
-gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit).
-
-
-
-
-callback - Function (optional): This callback will be fired with the result of the smart contract method execution as the second argument, or with an error object as the first argument.
-
-
-
-
-
Returns
-
Promise returns Mixed: The return value(s) of the smart contract method.
-If it returns a single value, it’s returned as is. If it has multiple return values they are returned as an object with properties and indices:
-
-
-
Example
-
// using the callback
-myContract.methods.myMethod(123).call({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'}, function(error, result){
- ...
-});
-
-// using the promise
-myContract.methods.myMethod(123).call({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.then(function(result){
- ...
-});
-
-
-// MULTI-ARGUMENT RETURN:
-
-// Solidity
-contract MyContract {
- function myFunction() returns(uint256 myNumber, string myString) {
- return (23456, "Hello!%");
- }
-}
-
-// web3.js
-var MyContract = new web3.eth.contract(abi, address);
-MyContract.methods.myFunction().call()
-.then(console.log);
-> Result {
- myNumber: '23456',
- myString: 'Hello!%',
- 0: '23456', // these are here as fallbacks if the name is not know or given
- 1: 'Hello!%'
-}
-
-
-// SINGLE-ARGUMENT RETURN:
-
-// Solidity
-contract MyContract {
- function myFunction() returns(string myString) {
- return "Hello!%";
- }
-}
-
-// web3.js
-var MyContract = new web3.eth.contract(abi, address);
-MyContract.methods.myFunction().call()
-.then(console.log);
-> "Hello!%"
-
-
-
-
-
-
-
methods.myMethod.send
-
myContract.methods.myMethod([param1[, param2[, ...]]]).send(options[, callback])
-
-
-
Will send a transaction to the smart contract and execute its method. Note this can alter the smart contract state.
-
-
Parameters
-
-
-options - Object: The options used for sending.
-
-from - String: The address the transaction should be sent from.
-gasPrice - String (optional): The gas price in wei to use for this transaction.
-gas - Number (optional): The maximum gas provided for this transaction (gas limit).
-value - ``Number|String|BN|BigNumber``(optional): The value transferred for the transaction in wei.
-
-
-
-
-callback - Function (optional): This callback will be fired first with the “transactionHash”, or with an error object as the first argument.
-
-
-
-
-
Returns
-
The callback will return the 32 bytes transaction hash.
-
PromiEvent: A promise combined event emitter. Will be resolved when the transaction receipt is available, OR if this send() is called from a someContract.deploy(), then the promise will resolve with the new contract instance. Additionally the following events are available:
-
-"transactionHash" returns String: is fired right after the transaction is sent and a transaction hash is available.
-"receipt" returns Object: is fired when the transaction receipt is available. Receipts from contracts will have no logs property, but instead an events property with event names as keys and events as properties. See getPastEvents return values for details about the returned event object.
-"confirmation" returns Number, Object: is fired for every confirmation up to the 24th confirmation. Receives the confirmation number as the first and the receipt as the second argument. Fired from confirmation 0 on, which is the block where it’s minded.
-"error" returns Error: is fired if an error occurs during sending. If a out of gas error, the second parameter is the receipt.
-
-
-
-
Example
-
// using the callback
-myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'}, function(error, transactionHash){
- ...
-});
-
-// using the promise
-myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.then(function(receipt){
- // receipt can also be a new contract instance, when coming from a "contract.deploy({...}).send()"
-});
-
-
-// using the event emitter
-myContract.methods.myMethod(123).send({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.on('transactionHash', function(hash){
- ...
-})
-.on('confirmation', function(confirmationNumber, receipt){
- ...
-})
-.on('receipt', function(receipt){
- // receipt example
- console.log(receipt);
- > {
- "transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
- "transactionIndex": 0,
- "blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "blockNumber": 3,
- "contractAddress": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
- "cumulativeGasUsed": 314159,
- "gasUsed": 30234,
- "events": {
- "MyEvent": {
- returnValues: {
- myIndexedParam: 20,
- myOtherIndexedParam: '0x123456789...',
- myNonIndexParam: 'My String'
- },
- raw: {
- data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
- },
- event: 'MyEvent',
- signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- logIndex: 0,
- transactionIndex: 0,
- transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- blockNumber: 1234,
- address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
- },
- "MyOtherEvent": {
- ...
- },
- "MyMultipleEvent":[{...}, {...}] // If there are multiple of the same event, they will be in an array
- }
- }
-})
-.on('error', console.error); // If there's an out of gas error the second parameter is the receipt.
-
-
-
-
-
-
-
methods.myMethod.estimateGas
-
myContract.methods.myMethod([param1[, param2[, ...]]]).estimateGas(options[, callback])
-
-
-
Will call estimate the gas a method execution will take when executed in the EVM without.
-The estimation can differ from the actual gas used when later sending a transaction, as the state of the smart contract can be different at that time.
-
-
Parameters
-
-
-options - Object (optional): The options used for calling.
-
-from - String (optional): The address the call “transaction” should be made from.
-gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit). Setting a specific value helps to detect out of gas errors. If all gas is used it will return the same number.
-
-
-
-
-callback - Function (optional): This callback will be fired with the result of the gas estimation as the second argument, or with an error object as the first argument.
-
-
-
-
-
Returns
-
Promise returns Number: The gas amount estimated.
-
-
-
Example
-
// using the callback
-myContract.methods.myMethod(123).estimateGas({gas: 5000000}, function(error, gasAmount){
- if(gasAmount == 5000000)
- console.log('Method ran out of gas');
-});
-
-// using the promise
-myContract.methods.myMethod(123).estimateGas({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'})
-.then(function(gasAmount){
- ...
-})
-.catch(function(error){
- ...
-});
-
-
-
-
-
-
-
methods.myMethod.encodeABI
-
myContract.methods.myMethod([param1[, param2[, ...]]]).encodeABI()
-
-
-
Encodes the ABI for this method. This can be used to send a transaction, call a method, or pass it into another smart contracts method as arguments.
-
-
-
Returns
-
String: The encoded ABI byte code to send via a transaction or call.
-
-
-
Example
-
myContract.methods.myMethod(123).encodeABI();
-> '0x58cf5f1000000000000000000000000000000000000000000000000000000000000007B'
-
-
-
-
-
-
-
= Events =
-
-
-
-
once
-
myContract.once(event[, options], callback)
-
-
-
Subscribes to an event and unsubscribes immediately after the first event or error. Will only fire for a single event.
-
-
Parameters
-
-event - String: The name of the event in the contract, or "allEvents" to get all events.
-
-
-options - Object (optional): The options used for deployment.
-
-filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where “myNumber” is 12 or 13.
-topics - Array (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.
-
-
-
-
-callback - Function: This callback will be fired for the first event as the second argument, or an error as the first argument. See getPastEvents return values for details about the event structure.
-
-
-
-
-
-
Example
-
myContract.once('MyEvent', {
- filter: {myIndexedParam: [20,23], myOtherIndexedParam: '0x123456789...'}, // Using an array means OR: e.g. 20 or 23
- fromBlock: 0
-}, function(error, event){ console.log(event); });
-
-// event output example
-> {
- returnValues: {
- myIndexedParam: 20,
- myOtherIndexedParam: '0x123456789...',
- myNonIndexParam: 'My String'
- },
- raw: {
- data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
- },
- event: 'MyEvent',
- signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- logIndex: 0,
- transactionIndex: 0,
- transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- blockNumber: 1234,
- address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
-}
-
-
-
-
-
-
-
events
-
myContract.events.MyEvent([options][, callback])
-
-
-
Subscribe to an event
-
-
Parameters
-
-
-options - Object (optional): The options used for deployment.
-
-filter - Object (optional): Let you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where “myNumber” is 12 or 13.
-fromBlock - Number (optional): The block number from which to get events on.
-topics - Array (optional): This allows to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.
-
-
-
-
-callback - Function (optional): This callback will be fired for each event as the second argument, or an error as the first argument.
-
-
-
-
-
Returns
-
EventEmitter: The event emitter has the following events:
-
-"data" returns Object: Fires on each incoming event with the event object as argument.
-"changed" returns Object: Fires on each event which was removed from the blockchain. The event will have the additional property "removed: true".
-"error" returns Object: Fires when an error in the subscription occours.
-
-
The structure of the returned event Object looks as follows:
-
-event - String: The event name.
-signature - String|Null: The event signature, null if it’s an anonymous event.
-address - String: Address this event originated from.
-returnValues - Object: The return values coming from the event, e.g. {myVar: 1, myVar2: '0x234...'}.
-logIndex - Number: Integer of the event index position in the block.
-transactionIndex - Number: Integer of the transaction’s index position the event was created in.
-transactionHash 32 Bytes - String: Hash of the transaction this event was created in.
-blockHash 32 Bytes - String: Hash of the block this event was created in. null when it’s still pending.
-blockNumber - Number: The block number this log was created in. null when still pending.
-raw.data - String: The data containing non-indexed log parameter.
-raw.topics - Array: An array with max 4 32 Byte topics, topic 1-3 contains indexed parameters of the event.
-
-
-
-
Example
-
myContract.events.MyEvent({
- filter: {myIndexedParam: [20,23], myOtherIndexedParam: '0x123456789...'}, // Using an array means OR: e.g. 20 or 23
- fromBlock: 0
-}, function(error, event){ console.log(event); })
-.on('data', function(event){
- console.log(event); // same results as the optional callback above
-})
-.on('changed', function(event){
- // remove event from local database
-})
-.on('error', console.error);
-
-// event output example
-> {
- returnValues: {
- myIndexedParam: 20,
- myOtherIndexedParam: '0x123456789...',
- myNonIndexParam: 'My String'
- },
- raw: {
- data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
- },
- event: 'MyEvent',
- signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- logIndex: 0,
- transactionIndex: 0,
- transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- blockNumber: 1234,
- address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
-}
-
-
-
-
-
-
-
events.allEvents
-
myContract.events.allEvents([options][, callback])
-
-
-
Same as events but receives all events from this smart contract.
-Optionally the filter property can filter those events.
-
-
-
-
getPastEvents
-
myContract.getPastEvents(event[, options][, callback])
-
-
-
Gets past events for this contract.
-
-
Parameters
-
-event - String: The name of the event in the contract, or "allEvents" to get all events.
-
-
-options - Object (optional): The options used for deployment.
-
-filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where “myNumber” is 12 or 13.
-fromBlock - Number (optional): The block number from which to get events on.
-toBlock - Number (optional): The block number to get events up to (Defaults to "latest").
-topics - Array (optional): This allows manually setting the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.
-
-
-
-
-callback - Function (optional): This callback will be fired with an array of event logs as the second argument, or an error as the first argument.
-
-
-
-
-
Returns
-
Promise returns Array: An array with the past event Objects, matching the given event name and filter.
-
For the structure of a returned event Object see getPastEvents return values.
-
-
-
Example
-
myContract.getPastEvents('MyEvent', {
- filter: {myIndexedParam: [20,23], myOtherIndexedParam: '0x123456789...'}, // Using an array means OR: e.g. 20 or 23
- fromBlock: 0,
- toBlock: 'latest'
-}, function(error, events){ console.log(events); })
-.then(function(events){
- console.log(events) // same results as the optional callback above
-});
-
-> [{
- returnValues: {
- myIndexedParam: 20,
- myOtherIndexedParam: '0x123456789...',
- myNonIndexParam: 'My String'
- },
- raw: {
- data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
- },
- event: 'MyEvent',
- signature: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- logIndex: 0,
- transactionIndex: 0,
- transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- blockNumber: 1234,
- address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
-},{
- ...
-}]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-iban.html b/docs/_build/html/web3-eth-iban.html
deleted file mode 100644
index 51bfec27698..00000000000
--- a/docs/_build/html/web3-eth-iban.html
+++ /dev/null
@@ -1,581 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.Iban — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.Iban
-
The web3.eth.Iban function lets convert ethereum addresses from and to IBAN and BBAN.
-
-
-
Iban
-
new web3.eth.Iban(ibanAddress)
-
-
-
Generates a iban object with conversion methods and vailidity checks. Also has singleton functions for conversion like
-Iban.toAddress(),
-Iban.toIban(),
-Iban.fromEthereumAddress(),
-Iban.fromBban(),
-Iban.createIndirect(),
-Iban.isValid().
-
-
Parameters
-
-String: the IBAN address to instantiate an Iban instance from.
-
-
-
-
Returns
-
Object - The Iban instance.
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-
-
-
-
-
-
-
toAddress
-
web3.eth.Iban.toAddress(ibanAddress)
-
-
-
Singleton: Converts a direct IBAN address into an ethereum address.
-
-
Note
-
This method also exists on the IBAN instance.
-
-
-
Parameters
-
-String: the IBAN address to convert.
-
-
-
-
Returns
-
String - The ethereum address.
-
-
-
Example
-
web3.eth.Iban.toAddress("XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS");
-> "0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8"
-
-
-
-
-
-
-
toIban
-
web3.eth.Iban.toIban(address)
-
-
-
Singleton: Converts an ethereum address to a direct IBAN address.
-
-
Parameters
-
-String: the ethereum address to convert.
-
-
-
-
Returns
-
String - The IBAN address.
-
-
-
Example
-
web3.eth.Iban.toIban("0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8");
-> "XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"
-
-
-
-
-
-
-
fromEthereumAddress
-
web3.eth.Iban.fromEthereumAddress(address)
-
-
-
Singleton: Converts an ethereum address to a direct IBAN instance.
-
-
Parameters
-
-String: the ethereum address to convert.
-
-
-
-
Returns
-
Object - The IBAN instance.
-
-
-
Example
-
web3.eth.Iban.fromEthereumAddress("0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8");
-> Iban {_iban: "XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}
-
-
-
-
-
-
-
fromBban
-
web3.eth.Iban.fromBban(bbanAddress)
-
-
-
Singleton: Converts an BBAN address to a direct IBAN instance.
-
-
Parameters
-
-String: the BBAN address to convert.
-
-
-
-
Returns
-
Object - The IBAN instance.
-
-
-
Example
-
web3.eth.Iban.fromBban('ETHXREGGAVOFYORK');
-> Iban {_iban: "XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}
-
-
-
-
-
-
-
createIndirect
-
web3.eth.Iban.createIndirect(options)
-
-
-
Singleton: Creates an indirect IBAN address from a institution and identifier.
-
-
Parameters
-
-
-Object: the options object as follows:
-
-institution - String: the institution to be assigned
-identifier - String: the identifier to be assigned
-
-
-
-
-
-
-
-
Returns
-
Object - The IBAN instance.
-
-
-
Example
-
web3.eth.Iban.createIndirect({
- institution: "XREG",
- identifier: "GAVOFYORK"
-});
-> Iban {_iban: "XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS"}
-
-
-
-
-
-
-
isValid
-
web3.eth.Iban.isValid(address)
-
-
-
Singleton: Checks if an IBAN address is valid.
-
-
Note
-
This method also exists on the IBAN instance.
-
-
-
Parameters
-
-String: the IBAN address to check.
-
-
-
-
-
Example
-
web3.eth.Iban.isValid("XE81ETHXREGGAVOFYORK");
-> true
-
-web3.eth.Iban.isValid("XE82ETHXREGGAVOFYORK");
-> false // because the checksum is incorrect
-
-var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.isValid();
-> true
-
-
-
-
-
-
-
isDirect
-
web3.eth.Iban.isDirect()
-
-
-
Checks if the IBAN instance is direct.
-
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.isDirect();
-> false
-
-
-
-
-
-
-
isIndirect
-
web3.eth.Iban.isIndirect()
-
-
-
Checks if the IBAN instance is indirect.
-
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.isIndirect();
-> true
-
-
-
-
-
-
-
checksum
-
web3.eth.Iban.checksum()
-
-
-
Returns the checksum of the IBAN instance.
-
-
-
Returns
-
String: The checksum of the IBAN
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.checksum();
-> "81"
-
-
-
-
-
-
-
institution
-
web3.eth.Iban.institution()
-
-
-
Returns the institution of the IBAN instance.
-
-
-
Returns
-
String: The institution of the IBAN
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.institution();
-> 'XREG'
-
-
-
-
-
-
-
client
-
-
Returns the client of the IBAN instance.
-
-
-
Returns
-
String: The client of the IBAN
-
-
-
Example
-
var iban = new web3.eth.Iban("XE81ETHXREGGAVOFYORK");
-iban.client();
-> 'GAVOFYORK'
-
-
-
-
-
-
-
toAddress
-
web3.eth.Iban.toAddress()
-
-
-
Returns the ethereum address of the IBAN instance.
-
-
-
Returns
-
String: The ethereum address of the IBAN
-
-
-
Example
-
var iban = new web3.eth.Iban('XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS');
-iban.toAddress();
-> '0x00c5496aEe77C1bA1f0854206A26DdA82a81D6D8'
-
-
-
-
-
-
-
toString
-
web3.eth.Iban.toString()
-
-
-
Returns the IBAN address of the IBAN instance.
-
-
-
Returns
-
String: The IBAN address.
-
-
-
Example
-
var iban = new web3.eth.Iban('XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS');
-iban.toString();
-> 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-net.html b/docs/_build/html/web3-eth-net.html
deleted file mode 100644
index f4bd5930f0f..00000000000
--- a/docs/_build/html/web3-eth-net.html
+++ /dev/null
@@ -1,237 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.net — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.net
-
Contains functions to receive information about the current network.
-
-
-
getId
-
web3.eth.net.getId([callback])
-web3.bzz.net.getId([callback])
-web3.shh.net.getId([callback])
-
-
-
Gets the current network ID.
-
-
-
Returns
-
Promise returns Number: The network ID.
-
-
-
Example
-
web3.eth.net.getId()
-.then(console.log);
-> 1
-
-
-
-
-
-
-
isListening
-
web3.eth.net.isListening([callback])
-web3.bzz.net.isListening([callback])
-web3.shh.net.isListening([callback])
-
-
-
Checks if the node is listening for peers.
-
-
-
Returns
-
Promise returns Boolean
-
-
-
Example
-
web3.eth.isListening()
-.then(console.log);
-> true
-
-
-
-
-
-
-
getPeerCount
-
web3.eth.net.getPeerCount([callback])
-web3.bzz.net.getPeerCount([callback])
-web3.shh.net.getPeerCount([callback])
-
-
-
Get the number of peers connected to.
-
-
-
Returns
-
Promise returns Number
-
-
-
Example
-
web3.eth.getPeerCount()
-.then(console.log);
-> 25
-
-
-
-
-
-
-
getNetworkType
-
web3.eth.net.getNetworkType([callback])
-
-
-
Guesses the chain the node is connected by comparing the genesis hashes.
-
-
Note
-
This is not a 100% accurate guess as any private network could use testnet and mainnet genesis blocks and network IDs.
-
-
-
Returns
-
-Promise returns String:
-
-"main" for main network
-"morden" for the morden test network
-"ropsten" for the morden test network
-"private" for undetectable networks.
-
-
-
-
-
-
Example
-
web3.eth.net.getNetworkType()
-.then(console.log);
-> "main"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-personal.html b/docs/_build/html/web3-eth-personal.html
deleted file mode 100644
index 39a73544ee8..00000000000
--- a/docs/_build/html/web3-eth-personal.html
+++ /dev/null
@@ -1,541 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.personal — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.personal
-
The web3-eth-personal package allows you to interact with the Ethereum node’s accounts.
-
-
Note
-
Many of these functions send sensitive information, like password. Never call these functions over a unsecured Websocket or HTTP provider, as your password will be send in plain text!
-
-
var Personal = require('web3-eth-personal');
-
-// "Personal.providers.givenProvider" will be set if in an Ethereum supported browser.
-var personal = new Personal(Personal.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-
-// or using the web3 umbrella package
-
-var Web3 = require('web3');
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-// -> web3.eth.personal
-
-
-
-
-
setProvider
-
web3.setProvider(myProvider)
-web3.eth.setProvider(myProvider)
-web3.shh.setProvider(myProvider)
-web3.bzz.setProvider(myProvider)
-...
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-var web3 = new Web3('http://localhost:8545');
-// or
-var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
-
-// change provider
-web3.setProvider('ws://localhost:8546');
-// or
-web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
providers
-
web3.providers
-web3.eth.providers
-web3.shh.providers
-web3.bzz.providers
-...
-
-
-
Contains the current available providers.
-
-
Value
-
Object with the following providers:
-
-
-Object - HttpProvider: The HTTP provider is deprecated, as it won’t work for subscriptions.
-Object - WebsocketProvider: The Websocket provider is the standard for usage in legacy browsers.
-Object - IpcProvider: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-// use the given Provider, e.g in Mist, or instantiate a new websocket provider
-var web3 = new Web3(Web3.givenProvider || 'ws://remotenode.com:8546');
-// or
-var web3 = new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://remotenode.com:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
givenProvider
-
web3.givenProvider
-web3.eth.givenProvider
-web3.shh.givenProvider
-web3.bzz.givenProvider
-...
-
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
-
-
-
-
currentProvider
-
web3.currentProvider
-web3.eth.currentProvider
-web3.shh.currentProvider
-web3.bzz.currentProvider
-...
-
-
-
Will return the current provider, otherwise null.
-
-
Returns
-
Object: The current provider set or null;
-
-
-
Example
-
-
-
-
-
BatchRequest
-
new web3.BatchRequest()
-new web3.eth.BatchRequest()
-new web3.shh.BatchRequest()
-new web3.bzz.BatchRequest()
-
-
-
Class to create and execute batch requests.
-
-
-
Returns
-
Object: With the following methods:
-
-
-add(request): To add a request object to the batch call.
-execute(): Will execute the batch request.
-
-
-
-
-
Example
-
var contract = new web3.eth.Contract(abi, address);
-
-var batch = new web3.BatchRequest();
-batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
-batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
-batch.execute();
-
-
-
-
-
-
-
extend
-
web3.extend(methods)
-web3.eth.extend(methods)
-web3.shh.extend(methods)
-web3.bzz.extend(methods)
-...
-
-
-
Allows extending the web3 modules.
-
-
Note
-
You also have *.extend.formatters as additional formatter functions to be used for in and output formatting. Please see the source file for function details.
-
-
-
Parameters
-
-
-methods - Object: Extension object with array of methods description objects as follows:
--
-
-
-
-
-
-
-
Returns
-
Object: The extended module.
-
-
-
Example
-
web3.extend({
- property: 'myModule',
- methods: [{
- name: 'getBalance',
- call: 'eth_getBalance',
- params: 2,
- inputFormatter: [web3.extend.formatters.inputAddressFormatter, web3.extend.formatters.inputDefaultBlockNumberFormatter],
- outputFormatter: web3.utils.hexToNumberString
- },{
- name: 'getGasPriceSuperFunction',
- call: 'eth_gasPriceSuper',
- params: 2,
- inputFormatter: [null, web3.utils.numberToHex]
- }]
-});
-
-web3.extend({
- methods: [{
- name: 'directCall',
- call: 'eth_callForFun',
- }]
-});
-
-console.log(web3);
-> Web3 {
- myModule: {
- getBalance: function(){},
- getGasPriceSuperFunction: function(){}
- },
- directCall: function(){},
- eth: Eth {...},
- bzz: Bzz {...},
- ...
-}
-
-
-
-
-
-
-
-
newAccount
-
web3.eth.personal.newAccount(password, [callback])
-
-
-
Creates a new account.
-
-
Note
-
Never call this function over a unsecured Websocket or HTTP provider, as your password will be send in plain text!
-
-
-
Parameters
-
-password - String: The password to encrypt this account with.
-
-
-
-
Returns
-
Promise returns String: The address of the newly created account.
-
-
-
Example
-
web3.eth.personal.newAccount('!@superpassword')
-.then(console.log);
-> '0x1234567891011121314151617181920212223456'
-
-
-
-
-
-
-
sign
-
web3.eth.personal.sign(dataToSign, address, password [, callback])
-
-
-
Signs data using a specific account.
-
-
Note
-
Sending your account password over an unsecured HTTP RPC connection is highly unsecure.
-
-
-
Parameters
-
-String - Data to sign. If String it will be converted using web3.utils.utf8ToHex.
-String - Address to sign data with.
-String - The password of the account to sign data with.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The signature.
-
-
-
Example
-
web3.eth.personal.sign("Hello world", "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", "test password!")
-.then(console.log);
-> "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
-
-// the below is the same
-web3.eth.personal.sign(web3.utils.utf8ToHex("Hello world"), "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", "test password!")
-.then(console.log);
-> "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
-
-
-
-
-
-
-
ecRecover
-
web3.eth.personal.ecRecover(dataThatWasSigned, signature [, callback])
-
-
-
Recovers the account that signed the data.
-
-
Parameters
-
-String - Data that was signed. If String it will be converted using web3.utils.utf8ToHex.
-String - The signature.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The account.
-
-
-
Example
-
web3.eth.personal.ecRecover("Hello world", "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400").then(console.log);
-> "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe"
-
-
-
-
// TODO
-
getAccounts, unlockAccount, lockAccount, sendTransaction
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth-subscribe.html b/docs/_build/html/web3-eth-subscribe.html
deleted file mode 100644
index 38a027c565a..00000000000
--- a/docs/_build/html/web3-eth-subscribe.html
+++ /dev/null
@@ -1,486 +0,0 @@
-
-
-
-
-
-
-
- web3.eth.subscribe — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth.subscribe
-
The web3.eth.subscribe function lets you subscribe to specific events in the blockchain.
-
-
subscribe
-
web3.eth.subscribe(type [, options] [, callback]);
-
-
-
-
Parameters
-
-String - The subscription, you want to subscribe to.
-Mixed - (optional) Optional additional parameters, depending on the subscription type.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second. Will be called for each incoming subscription, and the subscription itself as 3 parameter.
-
-
-
-
Returns
-
EventEmitter - A Subscription instance
-
-
-subscription.id: The subscription id, used to identify and unsubscribing the subscription.
-subscription.subscribe([callback]): Can be used to re-subscribe with the same parameters.
-subscription.unsubscribe([callback]): Unsubscribes the subscription and returns TRUE in the callback if successfull.
-subscription.arguments: The subscription arguments, used when re-subscribing.
-on("data") returns Object: Fires on each incoming log with the log object as argument.
-on("changed") returns Object: Fires on each log which was removed from the blockchain. The log will have the additional property "removed: true".
-on("error") returns Object: Fires when an error in the subscription occurs.
-
-
-
-
-
Notification returns
-
-Mixed - depends on the subscription, see the different subscriptions for more.
-
-
-
-
Example
-
var subscription = web3.eth.subscribe('logs', {
- address: '0x123456..',
- topics: ['0x12345...']
-}, function(error, result){
- if (!error)
- console.log(log);
-});
-
-// unsubscribes the subscription
-subscription.unsubscribe(function(error, success){
- if(success)
- console.log('Successfully unsubscribed!');
-});
-
-
-
-
-
-
-
clearSubscriptions
-
web3.eth.clearSubscriptions()
-
-
-
Resets subscriptions.
-
-
Note
-
This will not reset subscriptions from other packages like web3-shh, as they use their own requestManager.
-
-
-
Parameters
-
-Boolean: If true it keeps the "syncing" subscription.
-
-
-
-
-
Example
-
web3.eth.subscribe('logs', {} ,function(){ ... });
-
-...
-
-web3.eth.clearSubscriptions();
-
-
-
-
-
-
-
subscribe(“pendingTransactions”)
-
web3.eth.subscribe('pendingTransactions' [, callback]);
-
-
-
Subscribes to incoming pending transactions.
-
-
Parameters
-
-String - "pendingTransactions", the type of the subscription.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second. Will be called for each incoming subscription.
-
-
-
-
Returns
-
EventEmitter: An subscription instance as an event emitter with the following events:
-
-"data" returns Object: Fires on each incoming pending transaction.
-"error" returns Object: Fires when an error in the subscription occurs.
-
-
For the structure of the returned object see web3.eth.getTransaction() return values.
-
-
-
Notification returns
-
-Object|Null - First parameter is an error object if the subscription failed.
-Object - The block header object like above.
-
-
-
-
Example
-
var subscription = web3.eth.subscribe('pendingTransactions', function(error, result){
- if (!error)
- console.log(result);
-})
-.on("data", function(transaction){
- console.log(transaction);
-});
-
-// unsubscribes the subscription
-subscription.unsubscribe(function(error, success){
- if(success)
- console.log('Successfully unsubscribed!');
-});
-
-
-
-
-
-
-
-
-
subscribe(“syncing”)
-
web3.eth.subscribe('syncing' [, callback]);
-
-
-
Subscribe to syncing events. This will return an object when the node is syncing and when its finished syncing will return FALSE.
-
-
Parameters
-
-String - "syncing", the type of the subscription.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second. Will be called for each incoming subscription.
-
-
-
-
Returns
-
EventEmitter: An subscription instance as an event emitter with the following events:
-
-"data" returns Object: Fires on each incoming sync object as argument.
-"changed" returns Object: Fires when the synchronisation is started with true and when finsihed with false.
-"error" returns Object: Fires when an error in the subscription occurs.
-
-
For the structure of a returned event Object see web3.eth.isSyncing return values.
-
-
-
Notification returns
-
-Object|Null - First parameter is an error object if the subscription failed.
-Object|Boolean - The syncing object, when started it will return true once or when finished it will return false once.
-
-
-
-
Example
-
var subscription = web3.eth.subscribe('syncing', function(error, sync){
- if (!error)
- console.log(sync);
-})
-.on("data", function(sync){
- // show some syncing stats
-})
-.on("changed", function(isSyncing){
- if(isSyncing) {
- // stop app operation
- } else {
- // regain app operation
- }
-});
-
-// unsubscribes the subscription
-subscription.unsubscribe(function(error, success){
- if(success)
- console.log('Successfully unsubscribed!');
-});
-
-
-
-
-
-
-
subscribe(“logs”)
-
web3.eth.subscribe('logs', options [, callback]);
-
-
-
Subscribes to incoming logs, filtered by the given options.
-
-
Parameters
-
-"logs" - String, the type of the subscription.
-Object - The subscription options
-
-
-
-fromBlock - Number: The number of the earliest block. By default null.
-address - String|Array: An address or a list of addresses to only get logs from particular account(s).
-topics - Array: An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x00...']. You can also pass another array for each topic with options for that topic e.g. [null, ['option1', 'option2']]
-
-
-
-callback - Function: (optional) Optional callback, returns an error object as first parameter and the result as second. Will be called for each incoming subscription.
-
-
-
-
Returns
-
EventEmitter: An subscription instance as an event emitter with the following events:
-
-"data" returns Object: Fires on each incoming log with the log object as argument.
-"changed" returns Object: Fires on each log which was removed from the blockchain. The log will have the additional property "removed: true".
-"error" returns Object: Fires when an error in the subscription occurs.
-
-
For the structure of a returned event Object see web3.eth.getPastEvents return values.
-
-
-
-
Example
-
var subscription = web3.eth.subscribe('logs', {
- address: '0x123456..',
- topics: ['0x12345...']
-}, function(error, result){
- if (!error)
- console.log(result);
-})
-.on("data", function(log){
- console.log(log);
-})
-.on("changed", function(log){
-});
-
-// unsubscribes the subscription
-subscription.unsubscribe(function(error, success){
- if(success)
- console.log('Successfully unsubscribed!');
-});
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-eth.html b/docs/_build/html/web3-eth.html
deleted file mode 100644
index 051119ab13e..00000000000
--- a/docs/_build/html/web3-eth.html
+++ /dev/null
@@ -1,1859 +0,0 @@
-
-
-
-
-
-
-
- web3.eth — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.eth
-
The web3-eth package allows you to interact with an Ethereum blockchain and Ethereum smart contracts.
-
var Eth = require('web3-eth');
-
-// "Eth.providers.givenProvider" will be set if in an Ethereum supported browser.
-var eth = new Eth(Eth.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-
-// or using the web3 umbrella package
-
-var Web3 = require('web3');
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-// -> web3.eth
-
-
-
-
Note on checksum addresses
-
All Ethereum addresses returned by functions of this package are returned as checksum addresses.
-This means some letters are uppercase and some are lowercase.
-Based on that it will calculate a checksum for the address and prove its correctness.
-Incorrect checksum address will throw an error when passed into functions.
-If you want to circumvent the checksum check you can make an address all lower- or uppercase.
-
-
Example
-
web3.eth.getAccounts(console.log);
-> ["0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe" ,"0x85F43D8a49eeB85d32Cf465507DD71d507100C1d"]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setProvider
-
web3.setProvider(myProvider)
-web3.eth.setProvider(myProvider)
-web3.shh.setProvider(myProvider)
-web3.bzz.setProvider(myProvider)
-...
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-var web3 = new Web3('http://localhost:8545');
-// or
-var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
-
-// change provider
-web3.setProvider('ws://localhost:8546');
-// or
-web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
providers
-
web3.providers
-web3.eth.providers
-web3.shh.providers
-web3.bzz.providers
-...
-
-
-
Contains the current available providers.
-
-
Value
-
Object with the following providers:
-
-
-Object - HttpProvider: The HTTP provider is deprecated, as it won’t work for subscriptions.
-Object - WebsocketProvider: The Websocket provider is the standard for usage in legacy browsers.
-Object - IpcProvider: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-// use the given Provider, e.g in Mist, or instantiate a new websocket provider
-var web3 = new Web3(Web3.givenProvider || 'ws://remotenode.com:8546');
-// or
-var web3 = new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://remotenode.com:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
givenProvider
-
web3.givenProvider
-web3.eth.givenProvider
-web3.shh.givenProvider
-web3.bzz.givenProvider
-...
-
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
-
-
-
-
currentProvider
-
web3.currentProvider
-web3.eth.currentProvider
-web3.shh.currentProvider
-web3.bzz.currentProvider
-...
-
-
-
Will return the current provider, otherwise null.
-
-
Returns
-
Object: The current provider set or null;
-
-
-
Example
-
-
-
-
-
BatchRequest
-
new web3.BatchRequest()
-new web3.eth.BatchRequest()
-new web3.shh.BatchRequest()
-new web3.bzz.BatchRequest()
-
-
-
Class to create and execute batch requests.
-
-
-
Returns
-
Object: With the following methods:
-
-
-add(request): To add a request object to the batch call.
-execute(): Will execute the batch request.
-
-
-
-
-
Example
-
var contract = new web3.eth.Contract(abi, address);
-
-var batch = new web3.BatchRequest();
-batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
-batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
-batch.execute();
-
-
-
-
-
-
-
extend
-
web3.extend(methods)
-web3.eth.extend(methods)
-web3.shh.extend(methods)
-web3.bzz.extend(methods)
-...
-
-
-
Allows extending the web3 modules.
-
-
Note
-
You also have *.extend.formatters as additional formatter functions to be used for in and output formatting. Please see the source file for function details.
-
-
-
Parameters
-
-
-methods - Object: Extension object with array of methods description objects as follows:
--
-
-
-
-
-
-
-
Returns
-
Object: The extended module.
-
-
-
Example
-
web3.extend({
- property: 'myModule',
- methods: [{
- name: 'getBalance',
- call: 'eth_getBalance',
- params: 2,
- inputFormatter: [web3.extend.formatters.inputAddressFormatter, web3.extend.formatters.inputDefaultBlockNumberFormatter],
- outputFormatter: web3.utils.hexToNumberString
- },{
- name: 'getGasPriceSuperFunction',
- call: 'eth_gasPriceSuper',
- params: 2,
- inputFormatter: [null, web3.utils.numberToHex]
- }]
-});
-
-web3.extend({
- methods: [{
- name: 'directCall',
- call: 'eth_callForFun',
- }]
-});
-
-console.log(web3);
-> Web3 {
- myModule: {
- getBalance: function(){},
- getGasPriceSuperFunction: function(){}
- },
- directCall: function(){},
- eth: Eth {...},
- bzz: Bzz {...},
- ...
-}
-
-
-
-
-
-
-
-
defaultAccount
-
web3.eth.defaultAccount
-
-
-
This default address is used as the default "from" property, if no "from" property is specified in for the following methods:
-
-- web3.eth.sendTransaction()
-- web3.eth.call()
-- new web3.eth.Contract() -> myContract.methods.myMethod().call()
-- new web3.eth.Contract() -> myContract.methods.myMethod().send()
-
-
-
Property
-
String - 20 Bytes: Any ethereum address. You should have the private key for that address in your node or keystore. (Default is undefined)
-
-
-
Example
-
web3.eth.defaultAccount;
-> undefined
-
-// set the default account
-web3.eth.defaultAccount = '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe';
-
-
-
-
-
-
-
defaultBlock
-
-
The default block is used for certain methods. You can override it by passing in the defaultBlock as last parameter.
-The default value is “latest”.
-
-- web3.eth.getBalance()
-- web3.eth.getCode()
-- web3.eth.getTransactionCount()
-- web3.eth.getStorageAt()
-- web3.eth.call()
-- new web3.eth.Contract() -> myContract.methods.myMethod().call()
-
-
-
Property
-
Default block parameters can be one of the following:
-
-Number: A block number
-"genesis" - String: The genesis block
-"latest" - String: The latest block (current head of the blockchain)
-"pending" - String: The currently mined block (including pending transactions)
-
-
Default is "latest"
-
-
-
Example
-
web3.eth.defaultBlock;
-> "latest"
-
-// set the default block
-web3.eth.defaultBlock = 231;
-
-
-
-
-
-
-
getProtocolVersion
-
web3.eth.getProtocolVersion([callback])
-
-
-
Returns the ethereum protocol version of the node.
-
-
Returns
-
Promise returns String: the protocol version.
-
-
-
Example
-
web3.eth.getProtocolVersion()
-.then(console.log);
-> "63"
-
-
-
-
-
-
-
isSyncing
-
web3.eth.isSyncing([callback])
-
-
-
Checks if the node is currently syncing and returns either a syncing object, or false.
-
-
Returns
-
Promise returns Object|Boolean - A sync object when the node is currently syncing or false:
-
-
-startingBlock - Number: The block number where the sync started.
-currentBlock - Number: The block number where at which block the node currently synced to already.
-highestBlock - Number: The estimated block number to sync to.
-knownStates - Number: The estimated states to download
-pulledStates - Number: The already downloaded states
-
-
-
-
-
Example
-
web3.eth.isSyncing()
-.then(console.log);
-
-> {
- startingBlock: 100,
- currentBlock: 312,
- highestBlock: 512,
- knownStates: 234566,
- pulledStates: 123455
-}
-
-
-
-
-
-
-
getCoinbase
-
getCoinbase([callback])
-
-
-
Returns the coinbase address to which mining rewards will go.
-
-
Returns
-
Promise returns String - bytes 20: The coinbase address set in the node for mining rewards.
-
-
-
Example
-
web3.eth.getCoinbase()
-.then(console.log);
-> "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe"
-
-
-
-
-
-
-
isMining
-
web3.eth.isMining([callback])
-
-
-
Checks whether the node is mining or not.
-
-
Returns
-
Promise returns Boolean: true if the node is mining, otherwise false.
-
-
-
Example
-
web3.eth.isMining()
-.then(console.log);
-> true
-
-
-
-
-
-
-
getHashrate
-
web3.eth.getHashrate([callback])
-
-
-
Returns the number of hashes per second that the node is mining with.
-
-
Returns
-
Promise returns Number: Number of hashes per second.
-
-
-
Example
-
web3.eth.getHashrate()
-.then(console.log);
-> 493736
-
-
-
-
-
-
-
getGasPrice
-
web3.eth.getGasPrice([callback])
-
-
-
Returns the current gas price oracle.
-The gas price is determined by the last few blocks median gas price.
-
-
Returns
-
Promise returns String - Number string of the current gas price in wei.
-
See the A note on dealing with big numbers in JavaScript.
-
-
-
Example
-
web3.eth.getGasPrice()
-.then(console.log);
-> "20000000000"
-
-
-
-
-
-
-
getAccounts
-
web3.eth.getAccounts([callback])
-
-
-
Returns a list of accounts the node controls.
-
-
Returns
-
Promise returns Array - An array of addresses controlled by node.
-
-
-
Example
-
web3.eth.getAccounts()
-.then(console.log);
-> ["0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", "0xDCc6960376d6C6dEa93647383FfB245CfCed97Cf"]
-
-
-
-
-
-
-
getBlockNumber
-
web3.eth.getBlockNumber([callback])
-
-
-
Returns the current block number.
-
-
Returns
-
Promise returns Number - The number of the most recent block.
-
-
-
Example
-
web3.eth.getBlockNumber()
-.then(console.log);
-> 2744
-
-
-
-
-
-
-
getBalance
-
web3.eth.getBalance(address [, defaultBlock] [, callback])
-
-
-
Get the balance of an address at a given block.
-
-
Parameters
-
-String - The address to get the balance of.
-Number|String - (optional) If you pass this parameter it will not use the default block set with web3.eth.defaultBlock.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The current balance for the given address in wei.
-
See the A note on dealing with big numbers in JavaScript.
-
-
-
Example
-
web3.eth.getBalance("0x407d73d8a49eeb85d32cf465507dd71d507100c1")
-.then(console.log);
-> "1000000000000"
-
-
-
-
-
-
-
getStorageAt
-
web3.eth.getStorageAt(address, position [, defaultBlock] [, callback])
-
-
-
Get the storage at a specific position of an address.
-
-
Parameters
-
-String - The address to get the storage from.
-Number - The index position of the storage.
-Number|String - (optional) If you pass this parameter it will not use the default block set with web3.eth.defaultBlock.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The value in storage at the given position.
-
-
-
Example
-
web3.eth.getStorageAt("0x407d73d8a49eeb85d32cf465507dd71d507100c1", 0)
-.then(console.log);
-> "0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234"
-
-
-
-
-
-
-
getCode
-
web3.eth.getCode(address [, defaultBlock] [, callback])
-
-
-
Get the code at a specific address.
-
-
Parameters
-
-String - The address to get the code from.
-Number|String - (optional) If you pass this parameter it will not use the default block set with web3.eth.defaultBlock.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The data at given address address.
-
-
-
Example
-
web3.eth.getCode("0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8")
-.then(console.log);
-> "0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"
-
-
-
-
-
-
-
getBlock
-
web3.eth.getBlock(blockHashOrBlockNumber [, returnTransactionObjects] [, callback])
-
-
-
Returns a block matching the block number or block hash.
-
-
Parameters
-
-String|Number - The block number or block hash. Or the string "genesis", "latest" or "pending" as in the default block parameter.
-Boolean - (optional, default false) If true, the returned block will contain all transactions as objects, if false it will only contains the transaction hashes.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - The block object:
-
-
-number - Number: The block number. null when its pending block.
-hash 32 Bytes - String: Hash of the block. null when its pending block.
-parentHash 32 Bytes - String: Hash of the parent block.
-nonce 8 Bytes - String: Hash of the generated proof-of-work. null when its pending block.
-sha3Uncles 32 Bytes - String: SHA3 of the uncles data in the block.
-logsBloom 256 Bytes - String: The bloom filter for the logs of the block. null when its pending block.
-transactionsRoot 32 Bytes - String: The root of the transaction trie of the block
-stateRoot 32 Bytes - String: The root of the final state trie of the block.
-miner - String: The address of the beneficiary to whom the mining rewards were given.
-difficulty - String: Integer of the difficulty for this block.
-totalDifficulty - String: Integer of the total difficulty of the chain until this block.
-extraData - String: The “extra data” field of this block.
-size - Number: Integer the size of this block in bytes.
-gasLimit - Number: The maximum gas allowed in this block.
-gasUsed - Number: The total used gas by all transactions in this block.
-timestamp - Number: The unix timestamp for when the block was collated.
-transactions - Array: Array of transaction objects, or 32 Bytes transaction hashes depending on the returnTransactionObjects parameter.
-uncles - Array: Array of uncle hashes.
-
-
-
-
-
Example
-
web3.eth.getBlock(3150)
-.then(console.log);
-
-> {
- "number": 3,
- "hash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "parentHash": "0x2302e1c0b972d00932deb5dab9eb2982f570597d9d42504c05d9c2147eaf9c88",
- "nonce": "0xfb6e1a62d119228b",
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "transactionsRoot": "0x3a1b03875115b79539e5bd33fb00d8f7b7cd61929d5a3c574f507b8acf415bee",
- "stateRoot": "0xf1133199d44695dfa8fd1bcfe424d82854b5cebef75bddd7e40ea94cda515bcb",
- "miner": "0x8888f1f195afa192cfee860698584c030f4c9db1",
- "difficulty": '21345678965432',
- "totalDifficulty": '324567845321',
- "size": 616,
- "extraData": "0x",
- "gasLimit": 3141592,
- "gasUsed": 21662,
- "timestamp": 1429287689,
- "transactions": [
- "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"
- ],
- "uncles": []
-}
-
-
-
-
-
-
-
getBlockTransactionCount
-
web3.eth.getBlockTransactionCount(blockHashOrBlockNumber [, callback])
-
-
-
Returns the number of transaction in a given block.
-
-
Parameters
-
-String|Number - The block number or hash. Or the string "genesis", "latest" or "pending" as in the default block parameter.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Number - The number of transactions in the given block.
-
-
-
Example
-
web3.eth.getBlockTransactionCount("0x407d73d8a49eeb85d32cf465507dd71d507100c1")
-.then(console.log);
-> 1
-
-
-
-
-
-
-
getUncle
-
web3.eth.getUncle(blockHashOrBlockNumber, uncleIndex [, returnTransactionObjects] [, callback])
-
-
-
Returns a blocks uncle by a given uncle index position.
-
-
Parameters
-
-String|Number - The block number or hash. Or the string "genesis", "latest" or "pending" as in the default block parameter.
-Number - The index position of the uncle.
-Boolean - (optional, default false) If true, the returned block will contain all transactions as objects, if false it will only contains the transaction hashes.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - the returned uncle. For a return value see web3.eth.getBlock().
-
-
Note
-
An uncle doesn’t contain individual transactions.
-
-
-
-
Example
-
web3.eth.getUncle(500, 0)
-.then(console.log);
-> // see web3.eth.getBlock
-
-
-
-
-
-
-
getTransaction
-
web3.eth.getTransaction(transactionHash [, callback])
-
-
-
Returns a transaction matching the given transaction hash.
-
-
Parameters
-
-String - The transaction hash.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - A transaction object its hash transactionHash:
-
-
-hash 32 Bytes - String: Hash of the transaction.
-nonce - Number: The number of transactions made by the sender prior to this one.
-blockHash 32 Bytes - String: Hash of the block where this transaction was in. null when its pending.
-blockNumber - Number: Block number where this transaction was in. null when its pending.
-transactionIndex - Number: Integer of the transactions index position in the block. null when its pending.
-from - String: Address of the sender.
-to - String: Address of the receiver. null when its a contract creation transaction.
-value - String: Value transferred in wei.
-gasPrice - String: Gas price provided by the sender in wei.
-gas - Number: Gas provided by the sender.
-input - String: The data sent along with the transaction.
-
-
-
-
-
Example
-
web3.eth.getTransaction('0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b§234')
-.then(console.log);
-
-> {
- "hash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
- "nonce": 2,
- "blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "blockNumber": 3,
- "transactionIndex": 0,
- "from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
- "to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
- "value": '123450000000000000',
- "gas": 314159,
- "gasPrice": '2000000000000',
- "input": "0x57cb2fc4"
-}
-
-
-
-
-
-
-
getTransactionFromBlock
-
getTransactionFromBlock(hashStringOrNumber, indexNumber [, callback])
-
-
-
Returns a transaction based on a block hash or number and the transactions index position.
-
-
Parameters
-
-String - A block number or hash. Or the string "genesis", "latest" or "pending" as in the default block parameter.
-Number - The transactions index position.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
-
Example
-
var transaction = web3.eth.getTransactionFromBlock('0x4534534534', 2)
-.then(console.log);
-> // see web3.eth.getTransaction
-
-
-
-
-
-
-
getTransactionReceipt
-
web3.eth.getTransactionReceipt(hash [, callback])
-
-
-
Returns the receipt of a transaction by transaction hash.
-
-
Note
-
The receipt is not available for pending transactions and returns null.
-
-
-
Parameters
-
-String - The transaction hash.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - A transaction receipt object, or null when no receipt was found:
-
-
-blockHash 32 Bytes - String: Hash of the block where this transaction was in.
-blockNumber - Number: Block number where this transaction was in.
-transactionHash 32 Bytes - String: Hash of the transaction.
-transactionIndex- Number: Integer of the transactions index position in the block.
-from - String: Address of the sender.
-to - String: Address of the receiver. null when its a contract creation transaction.
-contractAddress - String: The contract address created, if the transaction was a contract creation, otherwise null.
-cumulativeGasUsed - Number: The total amount of gas used when this transaction was executed in the block.
-gasUsed- Number: The amount of gas used by this specific transaction alone.
-logs - Array: Array of log objects, which this transaction generated.
-
-
-
-
-
Example
-
var receipt = web3.eth.getTransactionReceipt('0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b')
-.then(console.log);
-
-> {
- "transactionHash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
- "transactionIndex": 0,
- "blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
- "blockNumber": 3,
- "contractAddress": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
- "cumulativeGasUsed": 314159,
- "gasUsed": 30234,
- "logs": [{
- // logs as returned by getPastLogs, etc.
- }, ...]
-}
-
-
-
-
-
-
-
getTransactionCount
-
web3.eth.getTransactionCount(address [, defaultBlock] [, callback])
-
-
-
Get the numbers of transactions sent from this address.
-
-
Parameters
-
-String - The address to get the numbers of transactions from.
-Number|String - (optional) If you pass this parameter it will not use the default block set with web3.eth.defaultBlock.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Number - The number of transactions sent from the given address.
-
-
-
Example
-
web3.eth.getTransactionCount("0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe")
-.then(console.log);
-> 1
-
-
-
-
-
-
-
sendTransaction
-
web3.eth.sendTransaction(transactionObject [, callback])
-
-
-
Sends a transaction to the network.
-
-
Parameters
-
-Object - The transaction object to send:
-
-
-
-from - String|Number: The address for the sending account. Uses the web3.eth.defaultAccount property, if not specified. Or an address or index of a local wallet in web3.eth.accounts.wallet.
-to - String: (optional) The destination address of the message, left undefined for a contract-creation transaction.
-value - Number|String|BN|BigNumber: (optional) The value transferred for the transaction in wei, also the endowment if it’s a contract-creation transaction.
-gas - Number: (optional, default: To-Be-Determined) The amount of gas to use for the transaction (unused gas is refunded).
-gasPrice - Number|String|BN|BigNumber: (optional) The price of gas for this transaction in wei, defaults to web3.eth.gasPrice.
-data - String: (optional) Either a ABI byte string containing the data of the function call on a contract, or in the case of a contract-creation transaction the initialisation code.
-nonce - Number: (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
-
-
-
-callback - Function: (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
Note
-
The from property can also be an address or index from the web3.eth.accounts.wallet. It will then sign locally using the private key of that account, and send the transaction via web3.eth.sendSignedTransaction().
-
-
-
-
Returns
-
The callback will return the 32 bytes transaction hash.
-
PromiEvent: A promise combined event emitter. Will be resolved when the transaction receipt is available. Additionally the following events are available:
-
-"transactionHash" returns String: Is fired right after the transaction is send and a transaction hash is available.
-"receipt" returns Object: Is fired when the transaction receipt is available.
-"confirmation" returns Number, Object: Is fired for every confirmation up to the 12th confirmation. Receives the confirmation number as the first and the receipt as the second argument. Fired from confirmation 0 on, which is the block where its minded.
-"error" returns Error: Is fired if an error occurs during sending. If a out of gas error, the second parameter is the receipt.
-
-
-
-
Example
-
// compiled solidity source code using https://remix.ethereum.org
-var code = "603d80600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350463c6888fa18114602d57005b6007600435028060005260206000f3";
-
-
-// using the callback
-web3.eth.sendTransaction({
- from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
- data: code // deploying a contracrt
-}, function(error, hash){
- ...
-});
-
-// using the promise
-web3.eth.sendTransaction({
- from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
- to: '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe',
- value: '1000000000000000'
-})
-.then(function(receipt){
- ...
-});
-
-
-// using the event emitter
-web3.eth.sendTransaction({
- from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe',
- to: '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe',
- value: '1000000000000000'
-})
-.on('transactionHash', function(hash){
- ...
-})
-.on('receipt', function(receipt){
- ...
-})
-.on('confirmation', function(confirmationNumber, receipt){ ... })
-.on('error', console.error); // If a out of gas error, the second parameter is the receipt.
-
-
-
-
-
-
-
sendSignedTransaction
-
web3.eth.sendSignedTransaction(signedTransactionData [, callback])
-
-
-
Sends an already signed transaction. For example can be signed using: ethereumjs-accounts
-
-
Parameters
-
-String - Signed transaction data in HEX format
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
-
Example
-
var Tx = require('ethereumjs-tx');
-var privateKey = new Buffer('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex')
-
-var rawTx = {
- nonce: '0x00',
- gasPrice: '0x09184e72a000',
- gasLimit: '0x2710',
- to: '0x0000000000000000000000000000000000000000',
- value: '0x00',
- data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057'
-}
-
-var tx = new Tx(rawTx);
-tx.sign(privateKey);
-
-var serializedTx = tx.serialize();
-
-// console.log(serializedTx.toString('hex'));
-// 0xf889808609184e72a00082271094000000000000000000000000000000000000000080a47f74657374320000000000000000000000000000000000000000000000000000006000571ca08a8bbf888cfa37bbf0bb965423625641fc956967b81d12e23709cead01446075a01ce999b56a8a88504be365442ea61239198e23d1fce7d00fcfc5cd3b44b7215f
-
-web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'))
-.on('receipt', console.log);
-
-> // see eth.getTransactionReceipt() for details
-
-
-
-
-
-
-
sign
-
web3.eth.sign(dataToSign, address [, callback])
-
-
-
Signs data using a specific account. This account needs to be unlocked.
-
-
Parameters
-
-String - Data to sign. If String it will be converted using web3.utils.utf8ToHex.
-String|Number - Address to sign data with. Or an address or index of a local wallet in web3.eth.accounts.wallet.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
Note
-
The 2. address parameter can also be an address or index from the web3.eth.accounts.wallet. It will then sign locally using the private key of this account.
-
-
-
-
Returns
-
Promise returns String - The signature.
-
-
-
Example
-
web3.eth.sign("Hello world", "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe")
-.then(console.log);
-> "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
-
-// the below is the same
-web3.eth.sign(web3.utils.utf8ToHex("Hello world"), "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe")
-.then(console.log);
-> "0x30755ed65396facf86c53e6217c52b4daebe72aa4941d89635409de4c9c7f9466d4e9aaec7977f05e923889b33c0d0dd27d7226b6e6f56ce737465c5cfd04be400"
-
-
-
-
-
-
-
signTransaction
-
web3.eth.signTransaction(transactionObject, address [, callback])
-
-
-
Signs a transaction. This account needs to be unlocked.
-
-
Parameters
-
-Object - The transaction data to sign web3.eth.sendTransaction() for more.
-String - Address to sign transaction with.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - The RLP encoded transaction. The raw property can be used to send the transaction using web3.eth.sendSignedTransaction.
-
-
-
Example
-
web3.eth.signTransaction({
- from: "0xEB014f8c8B418Db6b45774c326A0E64C78914dC0",
- gasPrice: "20000000000",
- gas: "21000",
- to: '0x3535353535353535353535353535353535353535',
- value: "1000000000000000000",
- data: ""
-}).then(console.log);
-> {
- raw: '0xf86c808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a04f4c17305743700648bc4f6cd3038ec6f6af0df73e31757007b7f59df7bee88da07e1941b264348e80c78c4027afc65a87b0a5e43e86742b8ca0823584c6788fd0',
- tx: {
- nonce: '0x0',
- gasPrice: '0x4a817c800',
- gas: '0x5208',
- to: '0x3535353535353535353535353535353535353535',
- value: '0xde0b6b3a7640000',
- input: '0x',
- v: '0x25',
- r: '0x4f4c17305743700648bc4f6cd3038ec6f6af0df73e31757007b7f59df7bee88d',
- s: '0x7e1941b264348e80c78c4027afc65a87b0a5e43e86742b8ca0823584c6788fd0',
- hash: '0xda3be87732110de6c1354c83770aae630ede9ac308d9f7b399ecfba23d923384'
- }
-}
-
-
-
-
-
-
-
call
-
web3.eth.call(callObject [, defaultBlock] [, callback])
-
-
-
Executes a message call transaction, which is directly executed in the VM of the node, but never mined into the blockchain.
-
-
Parameters
-
-Object - A transaction object see web3.eth.sendTransaction, with the difference that for calls the from property is optional as well.
-Number|String - (optional) If you pass this parameter it will not use the default block set with web3.eth.defaultBlock.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String: The returned data of the call, e.g. a smart contract functions return value.
-
-
-
Example
-
web3.eth.call({
- to: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", // contract address
- data: "0xc6888fa10000000000000000000000000000000000000000000000000000000000000003"
-})
-.then(console.log);
-> "0x000000000000000000000000000000000000000000000000000000000000000a"
-
-
-
-
-
-
-
estimateGas
-
web3.eth.estimateGas(callObject [, callback])
-
-
-
Executes a message call or transaction and returns the amount of the gas used.
-
-
Parameters
-
-Object - A transaction object see web3.eth.sendTransaction, with the difference that for calls the from property is optional as well.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Number - the used gas for the simulated call/transaction.
-
-
-
Example
-
web3.eth.estimateGas({
- to: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
- data: "0xc6888fa10000000000000000000000000000000000000000000000000000000000000003"
-})
-.then(console.log);
-> "0x0000000000000000000000000000000000000000000000000000000000000015"
-
-
-
-
-
-
-
getPastLogs
-
web3.eth.getPastLogs(options [, callback])
-
-
-
Gets past logs, matching the given options.
-
-
Parameters
-
-Object - The filter options as follows:
-
-
-
-fromBlock - Number|String: The number of the earliest block ("latest" may be given to mean the most recent and "pending" currently mining, block). By default "latest".
-toBlock - Number|String: The number of the latest block ("latest" may be given to mean the most recent and "pending" currently mining, block). By default "latest".
-address - String|Array: An address or a list of addresses to only get logs from particular account(s).
-topics - Array: An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x12...']. You can also pass an array for each topic with options for that topic e.g. [null, ['option1', 'option2']]
-
-
-
-
-
Returns
-
Promise returns Array - Array of log objects.
-
The structure of the returned event Object in the Array looks as follows:
-
-address - String: From which this event originated from.
-data - String: The data containing non-indexed log parameter.
-topics - Array: An array with max 4 32 Byte topics, topic 1-3 contains indexed parameters of the log.
-logIndex - Number: Integer of the event index position in the block.
-transactionIndex - Number: Integer of the transaction’s index position, the event was created in.
-transactionHash 32 Bytes - String: Hash of the transaction this event was created in.
-blockHash 32 Bytes - String: Hash of the block where this event was created in. null when its still pending.
-blockNumber - Number: The block number where this log was created in. null when still pending.
-
-
-
-
Example
-
web3.eth.getPastLogs({
- address: "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
- topics: ["0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234"]
-})
-.then(console.log);
-
-> [{
- data: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- topics: ['0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7', '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385']
- logIndex: 0,
- transactionIndex: 0,
- transactionHash: '0x7f9fade1c0d57a7af66ab4ead79fade1c0d57a7af66ab4ead7c2c2eb7b11a91385',
- blockHash: '0xfd43ade1c09fade1c0d57a7af66ab4ead7c2c2eb7b11a91ffdd57a7af66ab4ead7',
- blockNumber: 1234,
- address: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe'
-},{...}]
-
-
-
-
-
-
-
getCompilers
-
web3.eth.getCompilers([callback])
-
-
-
Gets a list of available compilers.
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Array - An array of strings of available compilers.
-
-
-
Example
-
web3.eth.getCompilers()
-.then(console.log);
-> ["lll", "solidity", "serpent"]
-
-
-
-
-
-
-
compile.solidity
-
web3.eth.compile.solidity(sourceCode [, callback])
-
-
-
Compiles solidity source code.
-
-
Parameters
-
-String - The solidity source code.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Object - Contract and compiler info.
-
-
-
Example
-
var source = "" +
- "contract test {\n" +
- " function multiply(uint a) returns(uint d) {\n" +
- " return a * 7;\n" +
- " }\n" +
- "}\n";
-
-web3.eth.compile.solidity(source)
-.then(console.log);
-
-> {
- "test": {
- "code": "0x605280600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b60376004356041565b8060005260206000f35b6000600782029050604d565b91905056",
- "info": {
- "source": "contract test {\n\tfunction multiply(uint a) returns(uint d) {\n\t\treturn a * 7;\n\t}\n}\n",
- "language": "Solidity",
- "languageVersion": "0",
- "compilerVersion": "0.8.2",
- "abiDefinition": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "a",
- "type": "uint256"
- }
- ],
- "name": "multiply",
- "outputs": [
- {
- "name": "d",
- "type": "uint256"
- }
- ],
- "type": "function"
- }
- ],
- "userDoc": {
- "methods": {}
- },
- "developerDoc": {
- "methods": {}
- }
- }
- }
-}
-
-
-
-
-
-
-
compile.lll
-
web3. eth.compile.lll(sourceCode [, callback])
-
-
-
Compiles LLL source code.
-
-
Parameters
-
-String - The LLL source code.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The compiled LLL code as HEX string.
-
-
-
Example
-
var source = "...";
-
-web3.eth.compile.lll(source)
-.then(console.log);
-> "0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056"
-
-
-
-
-
-
-
compile.serpent
-
web3.eth.compile.serpent(sourceCode [, callback])
-
-
-
Compiles serpent source code.
-
-
Parameters
-
-String - The serpent source code.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns String - The compiled serpent code as HEX string.
-
var source = "...";
-
-var code = web3.eth.compile.serpent(source)
-.then(console.log);
-> "0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056"
-
-
-
-
-
-
-
getWork
-
web3.eth.getWork([callback])
-
-
-
Gets work for miners to mine on. Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”).
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Array - the mining work with the following structure:
-
-
-String 32 Bytes - at index 0: current block header pow-hash
-String 32 Bytes - at index 1: the seed hash used for the DAG.
-String 32 Bytes - at index 2: the boundary condition (“target”), 2^256 / difficulty.
-
-
-
-
-
Example
-
web3.eth.getWork()
-.then(console.log);
-> [
- "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
- "0x5EED00000000000000000000000000005EED0000000000000000000000000000",
- "0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000"
-]
-
-
-
-
-
-
-
submitWork
-
web3.eth.submitWork(nonce, powHash, digest, [callback])
-
-
-
Used for submitting a proof-of-work solution.
-
-
Parameters
-
-String 8 Bytes: The nonce found (64 bits)
-String 32 Bytes: The header’s pow-hash (256 bits)
-String 32 Bytes: The mix digest (256 bits)
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Promise returns Boolean - Returns TRUE if the provided solution is valid, otherwise false.
-
-
-
Example
-
web3.eth.submitWork([
- "0x0000000000000001",
- "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
- "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
-])
-.then(console.log);
-> true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-net.html b/docs/_build/html/web3-net.html
deleted file mode 100644
index 11d6f62257c..00000000000
--- a/docs/_build/html/web3-net.html
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
-
-
-
-
-
- web3.*.net — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.*.net
-
The web3-net package allows you to interact with the Ethereum nodes network properties.
-
var Net = require('web3-net');
-
-// "Personal.providers.givenProvider" will be set if in an Ethereum supported browser.
-var net = new Net(Net.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-
-// or using the web3 umbrella package
-
-var Web3 = require('web3');
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-// -> web3.eth.net
-// -> web3.bzz.net
-// -> web3.shh.net
-
-
-
-
-
getId
-
web3.eth.net.getId([callback])
-web3.bzz.net.getId([callback])
-web3.shh.net.getId([callback])
-
-
-
Gets the current network ID.
-
-
-
Returns
-
Promise returns Number: The network ID.
-
-
-
Example
-
web3.eth.net.getId()
-.then(console.log);
-> 1
-
-
-
-
-
-
-
isListening
-
web3.eth.net.isListening([callback])
-web3.bzz.net.isListening([callback])
-web3.shh.net.isListening([callback])
-
-
-
Checks if the node is listening for peers.
-
-
-
Returns
-
Promise returns Boolean
-
-
-
Example
-
web3.eth.isListening()
-.then(console.log);
-> true
-
-
-
-
-
-
-
getPeerCount
-
web3.eth.net.getPeerCount([callback])
-web3.bzz.net.getPeerCount([callback])
-web3.shh.net.getPeerCount([callback])
-
-
-
Get the number of peers connected to.
-
-
-
Returns
-
Promise returns Number
-
-
-
Example
-
web3.eth.getPeerCount()
-.then(console.log);
-> 25
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-shh.html b/docs/_build/html/web3-shh.html
deleted file mode 100644
index d67af3e2273..00000000000
--- a/docs/_build/html/web3-shh.html
+++ /dev/null
@@ -1,1395 +0,0 @@
-
-
-
-
-
-
-
- web3.shh — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.shh
-
The web3-shh package allows you to interact with an the whisper protocol for broadcasting.
-For more see Whisper Overview.
-
var Shh = require('web3-shh');
-
-// "Shh.providers.givenProvider" will be set if in an Ethereum supported browser.
-var shh = new Shh(Shh.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-
-// or using the web3 umbrella package
-
-var Web3 = require('web3');
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-// -> web3.shh
-
-
-
-
-
setProvider
-
web3.setProvider(myProvider)
-web3.eth.setProvider(myProvider)
-web3.shh.setProvider(myProvider)
-web3.bzz.setProvider(myProvider)
-...
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-var web3 = new Web3('http://localhost:8545');
-// or
-var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
-
-// change provider
-web3.setProvider('ws://localhost:8546');
-// or
-web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
providers
-
web3.providers
-web3.eth.providers
-web3.shh.providers
-web3.bzz.providers
-...
-
-
-
Contains the current available providers.
-
-
Value
-
Object with the following providers:
-
-
-Object - HttpProvider: The HTTP provider is deprecated, as it won’t work for subscriptions.
-Object - WebsocketProvider: The Websocket provider is the standard for usage in legacy browsers.
-Object - IpcProvider: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-// use the given Provider, e.g in Mist, or instantiate a new websocket provider
-var web3 = new Web3(Web3.givenProvider || 'ws://remotenode.com:8546');
-// or
-var web3 = new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://remotenode.com:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
givenProvider
-
web3.givenProvider
-web3.eth.givenProvider
-web3.shh.givenProvider
-web3.bzz.givenProvider
-...
-
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
-
-
-
-
currentProvider
-
web3.currentProvider
-web3.eth.currentProvider
-web3.shh.currentProvider
-web3.bzz.currentProvider
-...
-
-
-
Will return the current provider, otherwise null.
-
-
Returns
-
Object: The current provider set or null;
-
-
-
Example
-
-
-
-
-
BatchRequest
-
new web3.BatchRequest()
-new web3.eth.BatchRequest()
-new web3.shh.BatchRequest()
-new web3.bzz.BatchRequest()
-
-
-
Class to create and execute batch requests.
-
-
-
Returns
-
Object: With the following methods:
-
-
-add(request): To add a request object to the batch call.
-execute(): Will execute the batch request.
-
-
-
-
-
Example
-
var contract = new web3.eth.Contract(abi, address);
-
-var batch = new web3.BatchRequest();
-batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
-batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
-batch.execute();
-
-
-
-
-
-
-
extend
-
web3.extend(methods)
-web3.eth.extend(methods)
-web3.shh.extend(methods)
-web3.bzz.extend(methods)
-...
-
-
-
Allows extending the web3 modules.
-
-
Note
-
You also have *.extend.formatters as additional formatter functions to be used for in and output formatting. Please see the source file for function details.
-
-
-
Parameters
-
-
-methods - Object: Extension object with array of methods description objects as follows:
--
-
-
-
-
-
-
-
Returns
-
Object: The extended module.
-
-
-
Example
-
web3.extend({
- property: 'myModule',
- methods: [{
- name: 'getBalance',
- call: 'eth_getBalance',
- params: 2,
- inputFormatter: [web3.extend.formatters.inputAddressFormatter, web3.extend.formatters.inputDefaultBlockNumberFormatter],
- outputFormatter: web3.utils.hexToNumberString
- },{
- name: 'getGasPriceSuperFunction',
- call: 'eth_gasPriceSuper',
- params: 2,
- inputFormatter: [null, web3.utils.numberToHex]
- }]
-});
-
-web3.extend({
- methods: [{
- name: 'directCall',
- call: 'eth_callForFun',
- }]
-});
-
-console.log(web3);
-> Web3 {
- myModule: {
- getBalance: function(){},
- getGasPriceSuperFunction: function(){}
- },
- directCall: function(){},
- eth: Eth {...},
- bzz: Bzz {...},
- ...
-}
-
-
-
-
-
-
-
-
getId
-
web3.eth.net.getId([callback])
-web3.bzz.net.getId([callback])
-web3.shh.net.getId([callback])
-
-
-
Gets the current network ID.
-
-
-
Returns
-
Promise returns Number: The network ID.
-
-
-
Example
-
web3.eth.net.getId()
-.then(console.log);
-> 1
-
-
-
-
-
-
-
isListening
-
web3.eth.net.isListening([callback])
-web3.bzz.net.isListening([callback])
-web3.shh.net.isListening([callback])
-
-
-
Checks if the node is listening for peers.
-
-
-
Returns
-
Promise returns Boolean
-
-
-
Example
-
web3.eth.isListening()
-.then(console.log);
-> true
-
-
-
-
-
-
-
getPeerCount
-
web3.eth.net.getPeerCount([callback])
-web3.bzz.net.getPeerCount([callback])
-web3.shh.net.getPeerCount([callback])
-
-
-
Get the number of peers connected to.
-
-
-
Returns
-
Promise returns Number
-
-
-
Example
-
web3.eth.getPeerCount()
-.then(console.log);
-> 25
-
-
-
-
-
-
-
getVersion
-
web3.shh.getVersion([callback])
-
-
-
Returns the version of the running whisper.
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - The version of the current whisper running.
-
-
-
Example
-
web3.shh.getVersion()
-.then(console.log);
-> "5.0"
-
-
-
-
-
-
-
getInfo
-
web3.shh.getInfo([callback])
-
-
-
Gets information about the current whisper node.
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Object - The information of the node with the following properties:
-
-
-messages - Number: Number of currently floating messages.
-maxMessageSize - Number: The current message size limit in bytes.
-memory - Number: The memory size of the floating messages in bytes.
-minPow - Number: The current minimum PoW requirement.
-
-
-
-
-
Example
-
web3.shh.getInfo()
-.then(console.log);
-> {
- "minPow": 0.8,
- "maxMessageSize": 12345,
- "memory": 1234335,
- "messages": 20
-}
-
-
-
-
-
-
-
setMaxMessageSize
-
web3.shh.setMaxMessageSize(size, [callback])
-
-
-
Sets the maximal message size allowed by this node. Incoming and outgoing messages with a larger size will be rejected.
-Whisper message size can never exceed the limit imposed by the underlying P2P protocol (10 Mb).
-
-
Parameters
-
-Number - Message size in bytes.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on success, error on failure.
-
-
-
Example
-
web3.shh.setMaxMessageSize(1234565)
-.then(console.log);
-> true
-
-
-
-
-
-
-
setMinPoW
-
web3.shh.setMinPoW(pow, [callback])
-
-
-
Sets the minimal PoW required by this node.
-
This experimental function was introduced for the future dynamic adjustment of PoW requirement.
-If the node is overwhelmed with messages, it should raise the PoW requirement and notify the peers.
-The new value should be set relative to the old value (e.g. double). The old value can be obtained via web3.shh.getInfo().
-
-
Parameters
-
-Number - The new PoW requirement.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on success, error on failure.
-
-
-
Example
-
web3.shh.setMinPoW(0.9)
-.then(console.log);
-> true
-
-
-
-
-
-
-
markTrustedPeer
-
web3.shh.markTrustedPeer(enode, [callback])
-
-
-
Marks specific peer trusted, which will allow it to send historic (expired) messages.
-
-
Note
-
This function is not adding new nodes, the node needs to be an existing peer.
-
-
-
Parameters
-
-String - Enode of the trusted peer.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on success, error on failure.
-
-
-
Example
-
web3.shh.markTrustedPeer()
-.then(console.log);
-> true
-
-
-
-
-
-
-
newKeyPair
-
web3.shh.newKeyPair([callback])
-
-
-
Generates a new public and private key pair for message decryption and encryption.
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Key ID on success and an error on failure.
-
-
-
Example
-
web3.shh.newKeyPair()
-.then(console.log);
-> "5e57b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f"
-
-
-
-
-
-
-
addPrivateKey
-
web3.shh.addPrivateKey(privateKey, [callback])
-
-
-
Stores a key pair derived from a private key, and returns its ID.
-
-
Parameters
-
-String - The private key as HEX bytes to import.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Key ID on success and an error on failure.
-
-
-
Example
-
web3.shh.addPrivateKey('0x8bda3abeb454847b515fa9b404cede50b1cc63cfdeddd4999d074284b4c21e15')
-.then(console.log);
-> "3e22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f"
-
-
-
-
-
-
-
deleteKeyPair
-
web3.shh.deleteKeyPair(id, [callback])
-
-
-
Deletes the specifies key if it exists.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on success, error on failure.
-
-
-
Example
-
web3.shh.deleteKeyPair('3e22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> true
-
-
-
-
-
-
-
hasKeyPair
-
web3.shh.hasKeyPair(id, [callback])
-
-
-
Checks if the whisper node has a private key of a key pair matching the given ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on if the key pair exist in the node, false if not. Error on failure.
-
-
-
Example
-
web3.shh.hasKeyPair('fe22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> true
-
-
-
-
-
-
-
getPublicKey
-
web3.shh.getPublicKey(id, [callback])
-
-
-
Returns the public key for a key pair ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Public key on success and an error on failure.
-
-
-
Example
-
web3.shh.getPublicKey('3e22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> "0x04d1574d4eab8f3dde4d2dc7ed2c4d699d77cbbdd09167b8fffa099652ce4df00c4c6e0263eafe05007a46fdf0c8d32b11aeabcd3abbc7b2bc2bb967368a68e9c6"
-
-
-
-
-
-
-
getPrivateKey
-
web3.shh.getPrivateKey(id, [callback])
-
-
-
Returns the private key for a key pair ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Private key on success and an error on failure.
-
-
-
Example
-
web3.shh.getPrivateKey('3e22b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> "0x234234e22b9ffc2387e18636e0534534a3d0c56b0243567432453264c16e78a2adc"
-
-
-
-
-
-
-
newSymKey
-
web3.shh.newSymKey([callback])
-
-
-
Generates a random symmetric key and stores it under an ID, which is then returned.
-Will be used for encrypting and decrypting of messages where the sym key is known to both parties.
-
-
Parameters
-
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Key ID on success and an error on failure.
-
-
-
Example
-
web3.shh.newSymKey()
-.then(console.log);
-> "cec94d139ff51d7df1d228812b90c23ec1f909afa0840ed80f1e04030bb681e4"
-
-
-
-
-
-
-
addSymKey
-
web3.shh.addSymKey(symKey, [callback])
-
-
-
Stores the key, and returns its ID.
-
-
Parameters
-
-String - The raw key for symmetric encryption as HEX bytes.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Key ID on success and an error on failure.
-
-
-
Example
-
web3.shh.addSymKey('0x5e11b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> "fea94d139ff51d7df1d228812b90c23ec1f909afa0840ed80f1e04030bb681e4"
-
-
-
-
-
-
-
generateSymKeyFromPassword
-
web3.shh.generateSymKeyFromPassword(password, [callback])
-
-
-
Generates the key from password, stores it, and returns its ID.
-
-
Parameters
-
-String - A password to generate the sym key from.
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - Key ID on success and an error on failure.
-
-
-
Example
-
web3.shh.generateSymKeyFromPassword('Never use this password - password!')
-.then(console.log);
-> "2e57b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f"
-
-
-
-
-
-
-
hasSymKey
-
web3.shh.hasSymKey(id, [callback])
-
-
-
Checks if there is a symmetric key stored with the given ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newSymKey, shh.addSymKey or shh.generateSymKeyFromPassword).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on if the symmetric key exist in the node, false if not. Error on failure.
-
-
-
Example
-
web3.shh.hasSymKey('f6dcf21ed6a17bd78d8c4c63195ab997b3b65ea683705501eae82d32667adc92')
-.then(console.log);
-> true
-
-
-
-
-
-
-
getSymKey
-
web3.shh.getSymKey(id, [callback])
-
-
-
Returns the symmetric key associated with the given ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
String - The raw symmetric key on success and an error on failure.
-
-
-
Example
-
web3.shh.getSymKey('af33b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> "0xa82a520aff70f7a989098376e48ec128f25f767085e84d7fb995a9815eebff0a"
-
-
-
-
-
-
-
deleteSymKey
-
web3.shh.deleteSymKey(id, [callback])
-
-
-
Deletes the symmetric key associated with the given ID.
-
-
Parameters
-
-String - The key pair ID, returned by the creation functions (shh.newKeyPair and shh.addPrivateKey).
-Function - (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
Returns
-
Boolean - true on if the symmetric key was deleted, error on failure.
-
-
-
Example
-
web3.shh.deleteSymKey('bf31b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f')
-.then(console.log);
-> true
-
-
-
-
-
-
-
post
-
web3.shh.post(object [, callback])
-
-
-
This method should be called, when we want to post whisper a message to the network.
-
-
Parameters
-
-
-Object - The post object:
-
-symKeyID - String (optional): ID of symmetric key for message encryption (Either symKeyID or pubKey must be present. Can not be both.).
-pubKey - String (optional): The public key for message encryption (Either symKeyID or pubKey must be present. Can not be both.).
-sig - String (optional): The ID of the signing key.
-ttl - Number: Time-to-live in seconds.
-topic - String: 4 Bytes (mandatory when key is symmetric): Message topic.
-payload - String: The payload of the message to be encrypted.
-padding - Number (optional): Padding (byte array of arbitrary length).
-powTime - Number (optional)?: Maximal time in seconds to be spent on proof of work.
-powTarget - Number (optional)?: Minimal PoW target required for this message.
-targetPeer - Number (optional): Peer ID (for peer-to-peer message only).
-
-
-
-
-callback - Function: (optional) Optional callback, returns an error object as first parameter and the result as second.
-
-
-
-
-
Returns
-
Boolean - returns true if the message was send, otherwise false or error.
-
-
-
Example
-
var identities = [];
-var subscription = null;
-
-Promise.all([
- web3.shh.newSymKey().then((id) => {identities.push(id);}),
- web3.shh.newKeyPair().then((id) => {identities.push(id);})
-
-}).then(() => {
-
- // will receive also its own message send, below
- subscription = shh.subscribe("messages", {
- symKeyID: identities[0],
- topics: ['0xffaadd11']
- }).on('data', console.log);
-
-}).then(() => {
- shh.post({
- symKeyID: identities[0], // encrypts using the sym key ID
- sig: identities[1], // signs the message using the keyPair ID
- ttl: 10,
- topic: '0xffaadd11',
- payload: '0xffffffdddddd1122',
- powTime: 3,
- powTarget: 0.5
- })
-});
-
-
-
-
-
-
-
subscribe
-
web3.shh.subscribe('messages', options [, callback])
-
-
-
Subscribe for incoming whisper messages.
-
-
Parameters
-
-"messages" - String: Type of the subscription.
-
-
-Object - The subscription options:
-
-symKeyID - String: ID of symmetric key for message decryption.
-privateKeyID - String: ID of private (asymmetric) key for message decryption.
-sig - String (optional): Public key of the signature, to verify.
-topics- Array (optional when “privateKeyID” key is given): Filters messages by this topic(s). Each topic must be a 4 bytes HEX string.
-minPow - Number (optional): Minimal PoW requirement for incoming messages.
-allowP2P - Boolean (optional): Indicates if this filter allows processing of direct peer-to-peer messages (which are not to be forwarded any further, because they might be expired). This might be the case in some very rare cases, e.g. if you intend to communicate to MailServers, etc.
-
-
-
-
-callback - Function: (optional) Optional callback, returns an error object as first parameter and the result as second. Will be called for each incoming subscription, and the subscription itself as 3 parameter.
-
-
-
-
-
Notification Returns
-
Object - The incoming message:
-
-
-hash - String: Hash of the enveloped message.
-sig - String: Public key which signed this message.
-recipientPublicKey - String: The recipients public key.
-timestamp - String: Unix timestamp of the message genertion.
-ttl - Number: Time-to-live in seconds.
-topic - String: 4 Bytes HEX string message topic.
-payload - String: Decrypted payload.
-padding - Number: Optional padding (byte array of arbitrary length).
-pow - Number: Proof of work value.
-
-
-
-
-
Example
-
web3.shh.subscribe('messages', {
- symKeyID: 'bf31b9ffc2387e18636e0a3d0c56b023264c16e78a2adcba1303cefc685e610f',
- sig: '0x04d1574d4eab8f3dde4d2dc7ed2c4d699d77cbbdd09167b8fffa099652ce4df00c4c6e0263eafe05007a46fdf0c8d32b11aeabcd3abbc7b2bc2bb967368a68e9c6'
- ttl: 20,
- topics: ['0xffddaa11'],
- minPow: 0.8,
-}, function(error, message, subscription){
-
- console.log(message);
- > {
- "hash": "0x4158eb81ad8e30cfcee67f20b1372983d388f1243a96e39f94fd2797b1e9c78e",
- "padding": "0xc15f786f34e5cef0fef6ce7c1185d799ecdb5ebca72b3310648c5588db2e99a0d73301c7a8d90115a91213f0bc9c72295fbaf584bf14dc97800550ea53577c9fb57c0249caeb081733b4e605cdb1a6011cee8b6d8fddb972c2b90157e23ba3baae6c68d4f0b5822242bb2c4cd821b9568d3033f10ec1114f641668fc1083bf79ebb9f5c15457b538249a97b22a4bcc4f02f06dec7318c16758f7c008001c2e14eba67d26218ec7502ad6ba81b2402159d7c29b068b8937892e3d4f0d4ad1fb9be5e66fb61d3d21a1c3163bce74c0a9d16891e2573146aa92ecd7b91ea96a6987ece052edc5ffb620a8987a83ac5b8b6140d8df6e92e64251bf3a2cec0cca",
- "payload": "0xdeadbeaf",
- "pow": 0.5371803278688525,
- "recipientPublicKey": null,
- "sig": null,
- "timestamp": 1496991876,
- "topic": "0x01020304",
- "ttl": 50
- }
-})
-// or
-.on('data', function(message){ ... });
-
-
-
-
-
-
-
clearSubscriptions
-
web3.shh.clearSubscriptions()
-
-
-
Resets subscriptions.
-
-
Note
-
This will not reset subscriptions from other packages like web3-eth, as they use their own requestManager.
-
-
-
Parameters
-
-Boolean: If true it keeps the "syncing" subscription.
-
-
-
-
-
Example
-
web3.shh.subscribe('messages', {...} ,function(){ ... });
-
-...
-
-web3.shh.clearSubscriptions();
-
-
-
-
-
-
-
newMessageFilter
-
web3.shh.newMessageFilter(options)
-
-
-
Create a new filter within the node. This filter can be used to poll for new messages that match the set of criteria.
-
-
-
Returns
-
String: The filter ID.
-
-
-
Example
-
web3.shh.newMessageFilter()
-.then(console.log);
-> "2b47fbafb3cce24570812a82e6e93cd9e2551bbc4823f6548ff0d82d2206b326"
-
-
-
-
-
-
-
deleteMessageFilter
-
web3.shh.deleteMessageFilter(id)
-
-
-
Deletes a message filter in the node.
-
-
Parameters
-
-String: The filter ID created with shh.newMessageFilter().
-
-
-
-
Returns
-
Boolean: true on success, error on failure.
-
-
-
Example
-
web3.shh.deleteMessageFilter('2b47fbafb3cce24570812a82e6e93cd9e2551bbc4823f6548ff0d82d2206b326')
-.then(console.log);
-> true
-
-
-
-
-
-
-
getFilterMessages
-
web3.shh.getFilterMessages(id)
-
-
-
Retrieve messages that match the filter criteria and are received between the last time this function was called and now.
-
-
Parameters
-
-String: The filter ID created with shh.newMessageFilter().
-
-
-
-
-
Example
-
web3.shh.getFilterMessages('2b47fbafb3cce24570812a82e6e93cd9e2551bbc4823f6548ff0d82d2206b326')
-.then(console.log);
-> [{
- "hash": "0x4158eb81ad8e30cfcee67f20b1372983d388f1243a96e39f94fd2797b1e9c78e",
- "padding": "0xc15f786f34e5cef0fef6ce7c1185d799ecdb5ebca72b3310648c5588db2e99a0d73301c7a8d90115a91213f0bc9c72295fbaf584bf14dc97800550ea53577c9fb57c0249caeb081733b4e605cdb1a6011cee8b6d8fddb972c2b90157e23ba3baae6c68d4f0b5822242bb2c4cd821b9568d3033f10ec1114f641668fc1083bf79ebb9f5c15457b538249a97b22a4bcc4f02f06dec7318c16758f7c008001c2e14eba67d26218ec7502ad6ba81b2402159d7c29b068b8937892e3d4f0d4ad1fb9be5e66fb61d3d21a1c3163bce74c0a9d16891e2573146aa92ecd7b91ea96a6987ece052edc5ffb620a8987a83ac5b8b6140d8df6e92e64251bf3a2cec0cca",
- "payload": "0xdeadbeaf",
- "pow": 0.5371803278688525,
- "recipientPublicKey": null,
- "sig": null,
- "timestamp": 1496991876,
- "topic": "0x01020304",
- "ttl": 50
-},{...}]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3-utils.html b/docs/_build/html/web3-utils.html
deleted file mode 100644
index 95d8b3a641a..00000000000
--- a/docs/_build/html/web3-utils.html
+++ /dev/null
@@ -1,1362 +0,0 @@
-
-
-
-
-
-
-
- web3.utils — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3.utils
-
This package provides utility functions for Ethereum dapps and other web3.js packages.
-
-
-
randomHex
-
web3.utils.randomHex(size)
-
-
-
The randomHex library to generate cryptographically strong pseudo-random HEX strings from a given byte size.
-
-
Parameters
-
-size - Number: The byte size for the HEX string, e.g. 32 will result in a 32 bytes HEX string with 64 characters preficed with “0x”.
-
-
-
-
Returns
-
String: The generated random HEX string.
-
-
-
Example
-
web3.utils.randomHex(32)
-> "0xa5b9d60f32436310afebcfda832817a68921beb782fabf7915cc0460b443116a"
-
-web3.utils.randomHex(4)
-> "0x6892ffc6"
-
-web3.utils.randomHex(2)
-> "0x99d6"
-
-web3.utils.randomHex(1)
-> "0x9a"
-
-web3.utils.randomHex(0)
-> "0x"
-
-
-
-
-
-
-
_
-
-
The underscore library for many convenience JavaScript functions.
-
See the underscore API reference for details.
-
-
Example
-
var _ = web3.utils._;
-
-_.union([1,2],[3]);
-> [1,2,3]
-
-_.each({my: 'object'}, function(value, key){ ... })
-
-...
-
-
-
-
-
-
-
BN
-
-
The BN.js library for calculating with big numbers in JavaScript.
-See the BN.js documentation for details.
-
-
-
Parameters
-
-mixed - String|Number: A number, number string or HEX string to convert to a BN object.
-
-
-
-
Returns
-
Object: The BN.js instance.
-
-
-
Example
-
var BN = web3.utils.BN;
-
-new BN(1234).toString();
-> "1234"
-
-new BN('1234').add(new BN('1')).toString();
-> "1235"
-
-new BN('0xea').toString();
-> "234"
-
-
-
-
-
-
-
isBN
-
-
Checks if a given value is a BN.js instance.
-
-
Parameters
-
-bn - Object: An BN.js instance.
-
-
-
-
-
Example
-
var number = new BN(10);
-
-web3.utils.isBN(number);
-> true
-
-
-
-
-
-
-
isBigNumber
-
web3.utils.isBigNumber(bignumber)
-
-
-
Checks if a given value is a BigNumber.js instance.
-
-
Parameters
-
-bignumber - Object: A BigNumber.js instance.
-
-
-
-
-
Example
-
var number = new BigNumber(10);
-
-web3.utils.isBigNumber(number);
-> true
-
-
-
-
-
-
-
sha3
-
web3.utils.sha3(string)
-web3.utils.keccak256(string) // ALIAS
-
-
-
Will calculate the sha3 of the input.
-
-
Note
-
To mimic the sha3 behaviour of solidity use soliditySha3
-
-
-
Parameters
-
-string - String: A string to hash.
-
-
-
-
Returns
-
String: the result hash.
-
-
-
Example
-
web3.utils.sha3('234'); // taken as string
-> "0xc1912fee45d61c87cc5ea59dae311904cd86b84fee17cc96966216f811ce6a79"
-
-web3.utils.sha3(new BN('234'));
-> "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a"
-
-web3.utils.sha3(234);
-> null // can't calculate the has of a number
-
-web3.utils.sha3(0xea); // same as above, just the HEX representation of the number
-> null
-
-web3.utils.sha3('0xea'); // will be converted to a byte array first, and then hashed
-> "0x2f20677459120677484f7104c76deb6846a2c071f9b3152c103bb12cd54d1a4a"
-
-
-
-
-
-
-
soliditySha3
-
web3.utils.soliditySha3(param1 [, param2, ...])
-
-
-
Will calculate the sha3 of given input parameters in the same way solidity would.
-This means arguments will be ABI converted and tightly packed before being hashed.
-
-
Parameters
-
-paramX - Mixed: Any type, or an object with {type: 'uint', value: '123456'} or {t: 'bytes', v: '0xfff456'}. Basic types are autodetected as follows:
-
-
-String non numerical UTF-8 string is interpreted as string.
-String|Number|BN|HEX positive number is interpreted as uint256.
-String|Number|BN negative number is interpreted as int256.
-Boolean as bool.
-String HEX string with leading 0x is interpreted as bytes.
-HEX HEX number representation is interpreted as uint256.
-
-
-
-
-
-
-
Returns
-
String: the result hash.
-
-
-
Example
-
web3.utils.soliditySha3('234564535', '0xfff23243', true, -10);
-// auto detects: uint256, bytes, bool, int256
-> "0x3e27a893dc40ef8a7f0841d96639de2f58a132be5ae466d40087a2cfa83b7179"
-
-
-web3.utils.soliditySha3('Hello!%'); // auto detects: string
-> "0x661136a4267dba9ccdf6bfddb7c00e714de936674c4bdb065a531cf1cb15c7fc"
-
-
-web3.utils.soliditySha3('234'); // auto detects: uint256
-> "0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2"
-
-web3.utils.soliditySha3(0xea); // same as above
-> "0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2"
-
-web3.utils.soliditySha3(new BN('234')); // same as above
-> "0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2"
-
-web3.utils.soliditySha3({type: 'uint256', value: '234'})); // same as above
-> "0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2"
-
-web3.utils.soliditySha3({t: 'uint', v: new BN('234')})); // same as above
-> "0x61c831beab28d67d1bb40b5ae1a11e2757fa842f031a2d0bc94a7867bc5d26c2"
-
-
-web3.utils.soliditySha3('0x407D73d8a49eeb85D32Cf465507dd71d507100c1');
-> "0x4e8ebbefa452077428f93c9520d3edd60594ff452a29ac7d2ccc11d47f3ab95b"
-
-web3.utils.soliditySha3({t: 'bytes', v: '0x407D73d8a49eeb85D32Cf465507dd71d507100c1'});
-> "0x4e8ebbefa452077428f93c9520d3edd60594ff452a29ac7d2ccc11d47f3ab95b" // same result as above
-
-
-web3.utils.soliditySha3({t: 'address', v: '0x407D73d8a49eeb85D32Cf465507dd71d507100c1'});
-> "0x4e8ebbefa452077428f93c9520d3edd60594ff452a29ac7d2ccc11d47f3ab95b" // same as above, but will do a checksum check, if its multi case
-
-
-web3.utils.soliditySha3({t: 'bytes32', v: '0x407D73d8a49eeb85D32Cf465507dd71d507100c1'});
-> "0x3c69a194aaf415ba5d6afca734660d0a3d45acdc05d54cd1ca89a8988e7625b4" // different result as above
-
-
-web3.utils.soliditySha3({t: 'string', v: 'Hello!%'}, {t: 'int8', v:-23}, {t: 'address', v: '0x85F43D8a49eeB85d32Cf465507DD71d507100C1d'});
-> "0xa13b31627c1ed7aaded5aecec71baf02fe123797fffd45e662eac8e06fbe4955"
-
-
-
-
-
-
-
isHex
-
-
Checks if a given string is a HEX string.
-
-
Parameters
-
-hex - String|HEX: The given HEX string.
-
-
-
-
-
Example
-
web3.utils.isHex('0xc1912');
-> true
-
-web3.utils.isHex(0xc1912);
-> true
-
-web3.utils.isHex('c1912');
-> true
-
-web3.utils.isHex(345);
-> true // this is tricky, as 345 can be a a HEX representation or a number, be careful when not having a 0x in front!
-
-web3.utils.isHex('0xZ1912');
-> false
-
-web3.utils.isHex('Hello');
-> false
-
-
-
-
-
-
-
isHexStrict
-
web3.utils.isHexStrict(hex)
-
-
-
Checks if a given string is a HEX string. Difference to web3.utils.isHex() is that it expects HEX to be prefixed with 0x.
-
-
Parameters
-
-hex - String|HEX: The given HEX string.
-
-
-
-
-
Example
-
web3.utils.isHexStrict('0xc1912');
-> true
-
-web3.utils.isHexStrict(0xc1912);
-> false
-
-web3.utils.isHexStrict('c1912');
-> false
-
-web3.utils.isHexStrict(345);
-> false // this is tricky, as 345 can be a a HEX representation or a number, be careful when not having a 0x in front!
-
-web3.utils.isHexStrict('0xZ1912');
-> false
-
-web3.utils.isHex('Hello');
-> false
-
-
-
-
-
-
-
isAddress
-
web3.utils.isAddress(address)
-
-
-
Checks if a given string is a valid Ethereum address.
-It will also check the checksum, if the address has upper and lowercase letters.
-
-
Parameters
-
-address - String: An address string.
-
-
-
-
-
Example
-
web3.utils.isAddress('0xc1912fee45d61c87cc5ea59dae31190fffff232d');
-> true
-
-web3.utils.isAddress('c1912fee45d61c87cc5ea59dae31190fffff232d');
-> true
-
-web3.utils.isAddress('0XC1912FEE45D61C87CC5EA59DAE31190FFFFF232D');
-> true // as all is uppercase, no checksum will be checked
-
-web3.utils.isAddress('0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d');
-> true
-
-web3.utils.isAddress('0xC1912fEE45d61C87Cc5EA59DaE31190FFFFf232d');
-> false // wrong checksum
-
-
-
-
-
-
-
toChecksumAddress
-
web3.utils.toChecksumAddress(address)
-
-
-
Will convert an upper or lowercase Ethereum address to a checksum address.
-
-
Parameters
-
-address - String: An address string.
-
-
-
-
Returns
-
String: The checksum address.
-
-
-
Example
-
web3.utils.toChecksumAddress('0xc1912fee45d61c87cc5ea59dae31190fffff2323');
-> "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d"
-
-web3.utils.toChecksumAddress('0XC1912FEE45D61C87CC5EA59DAE31190FFFFF232D');
-> "0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d" // same as above
-
-
-
-
-
-
-
checkAddressChecksum
-
web3.utils.checkAddressChecksum(address)
-
-
-
Checks the checksum of a given address. Will also return false on non-checksum addresses.
-
-
Parameters
-
-address - String: An address string.
-
-
-
-
Returns
-
Boolean: true when the checksum of the address is valid, false if its not a checksum address, or the checksum is invalid.
-
-
-
Example
-
web3.utils.checkAddressChecksum('0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d');
-> true
-
-
-
-
-
-
-
toHex
-
web3.utils.toHex(mixed)
-
-
-
Will auto convert any given value to HEX.
-Number strings will interpreted as numbers.
-Text strings will be interpreted as UTF-8 strings.
-
-
Parameters
-
-mixed - String|Number|BN|BigNumber: The input to convert to HEX.
-
-
-
-
Returns
-
String: The resulting HEX string.
-
-
-
Example
-
web3.utils.toHex('234');
-> "0xea"
-
-web3.utils.toHex(234);
-> "0xea"
-
-web3.utils.toHex(new BN('234'));
-> "0xea"
-
-web3.utils.toHex(new BigNumber('234'));
-> "0xea"
-
-web3.utils.toHex('I have 100€');
-> "0x49206861766520313030e282ac"
-
-
-
-
-
-
-
toBN
-
web3.utils.toBN(number)
-
-
-
Will safly convert any given value (including BigNumber.js instances) into a BN.js instance, for handling big numbers in JavaScript.
-
-
-
Parameters
-
-number - String|Number|HEX: Number to convert to a big number.
-
-
-
-
Returns
-
Object: The BN.js instance.
-
-
-
Example
-
web3.utils.toBN(1234).toString();
-> "1234"
-
-web3.utils.toBN('1234').add(web3.utils.toBN('1')).toString();
-> "1235"
-
-web3.utils.toBN('0xea').toString();
-> "234"
-
-
-
-
-
-
-
hexToNumberString
-
web3.utils.hexToNumberString(hex)
-
-
-
Returns the number representation of a given HEX value as a string.
-
-
Parameters
-
-hexString - String|HEX: A string to hash.
-
-
-
-
Returns
-
String: The number as a string.
-
-
-
Example
-
web3.utils.hexToNumberString('0xea');
-> "234"
-
-
-
-
-
-
-
hexToNumber
-
web3.utils.hexToNumber(hex)
-web3.utils.toDecimal(hex) // ALIAS, deprecated
-
-
-
Returns the number representation of a given HEX value.
-
-
Note
-
This is not useful for big numbers, rather use utils.toBN instead.
-
-
-
Parameters
-
-hexString - String|HEX: A string to hash.
-
-
-
-
-
Example
-
web3.utils.hexToNumber('0xea');
-> 234
-
-
-
-
-
-
-
numberToHex
-
web3.utils.numberToHex(number)
-web3.utils.fromDecimal(number) // ALIAS, deprecated
-
-
-
Returns the HEX representation of a given number value.
-
-
Parameters
-
-number - String|Number|BN|BigNumber: A number as string or number.
-
-
-
-
Returns
-
String: The HEX value of the given number.
-
-
-
Example
-
web3.utils.numberToHex('234');
-> '0xea'
-
-
-
-
-
-
-
hexToUtf8
-
web3.utils.hexToUtf8(hex)
-web3.utils.hexToString(hex) // ALIAS
-web3.utils.toUtf8(hex) // ALIAS, deprecated
-
-
-
Returns the UTF-8 string representation of a given HEX value.
-
-
Parameters
-
-hex - String: A HEX string to convert to a UTF-8 string.
-
-
-
-
Returns
-
String: The UTF-8 string.
-
-
-
Example
-
web3.utils.hexToUtf8('0x49206861766520313030e282ac');
-> "I have 100€"
-
-
-
-
-
-
-
hexToAscii
-
web3.utils.hexToAscii(hex)
-web3.utils.toAscii(hex) // ALIAS, deprecated
-
-
-
Returns the ASCII string representation of a given HEX value.
-
-
Parameters
-
-hex - String: A HEX string to convert to a ASCII string.
-
-
-
-
Returns
-
String: The ASCII string.
-
-
-
Example
-
web3.utils.hexToAscii('0x4920686176652031303021');
-> "I have 100!"
-
-
-
-
-
-
-
utf8ToHex
-
web3.utils.utf8ToHex(string)
-web3.utils.stringToHex(string) // ALIAS
-web3.utils.fromUtf8(string) // ALIAS, deprecated
-
-
-
Returns the HEX representation of a given UTF-8 string.
-
-
Parameters
-
-string - String: A UTF-8 string to convert to a HEX string.
-
-
-
-
Returns
-
String: The HEX string.
-
-
-
Example
-
web3.utils.utf8ToHex('I have 100€');
-> "0x49206861766520313030e282ac"
-
-
-
-
-
-
-
asciiToHex
-
web3.utils.asciiToHex(string)
-web3.utils.fromAscii(string) // ALIAS, deprecated
-
-
-
Returns the HEX representation of a given ASCII string.
-
-
Parameters
-
-string - String: A ASCII string to convert to a HEX string.
-
-
-
-
Returns
-
String: The HEX string.
-
-
-
Example
-
web3.utils.asciiToHex('I have 100!');
-> "0x4920686176652031303021"
-
-
-
-
-
-
-
hexToBytes
-
web3.utils.hexToBytes(hex)
-
-
-
Returns a byte array from the given HEX string.
-
-
Parameters
-
-hex - String|HEX: A HEX to convert.
-
-
-
-
Returns
-
Array: The byte array.
-
-
-
Example
-
web3.utils.hexToBytes('0x000000ea');
-> [ 0, 0, 0, 234 ]
-
-web3.utils.hexToBytes(0x000000ea);
-> [ 234 ]
-
-
-
-
-
-
-
bytesToHex
-
web3.utils.bytesToHex(byteArray)
-
-
-
Returns a HEX string from a byte array.
-
-
Parameters
-
-byteArray - Array: A byte array to convert.
-
-
-
-
Returns
-
String: The HEX string.
-
-
-
Example
-
web3.utils.bytesToHex([ 72, 101, 108, 108, 111, 33, 36 ]);
-> "0x48656c6c6f2125"
-
-
-
-
-
-
-
toWei
-
web3.utils.toWei(number [, unit])
-
-
-
Converts any ether value value into wei.
-
-
Note
-
“wei” are the smallest ethere unit, and you should always make calculations in wei and convert only for display reasons.
-
-
-
Parameters
-
1. number - String|Number|BN: The value.
-1. unit - String (optional, defaults to "ether"): The ether to convert from. Possible units are:
-
-
-noether: ‘0’
-wei: ‘1’
-kwei: ‘1000’
-Kwei: ‘1000’
-babbage: ‘1000’
-femtoether: ‘1000’
-mwei: ‘1000000’
-Mwei: ‘1000000’
-lovelace: ‘1000000’
-picoether: ‘1000000’
-gwei: ‘1000000000’
-Gwei: ‘1000000000’
-shannon: ‘1000000000’
-nanoether: ‘1000000000’
-nano: ‘1000000000’
-szabo: ‘1000000000000’
-microether: ‘1000000000000’
-micro: ‘1000000000000’
-finney: ‘1000000000000000’
-milliether: ‘1000000000000000’
-milli: ‘1000000000000000’
-ether: ‘1000000000000000000’
-kether: ‘1000000000000000000000’
-grand: ‘1000000000000000000000’
-mether: ‘1000000000000000000000000’
-gether: ‘1000000000000000000000000000’
-tether: ‘1000000000000000000000000000000’
-
-
-
-
-
Returns
-
String|BN: If a number, or string is given it returns a number string, otherwise a BN.js instance.
-
-
-
Example
-
web3.utils.toWei('1', 'ether');
-> "1000000000000000000"
-
-web3.utils.toWei('1', 'finney');
-> "1000000000000000"
-
-web3.utils.toWei('1', 'szabo');
-> "1000000000000"
-
-web3.utils.toWei('1', 'shannon');
-> "1000000000"
-
-
-
-
-
-
-
fromWei
-
web3.utils.fromWei(number [, unit])
-
-
-
Converts any wei value into a ether value.
-
-
Note
-
“wei” are the smallest ethere unit, and you should always make calculations in wei and convert only for display reasons.
-
-
-
Parameters
-
1. number - String|Number|BN: The value in wei.
-1. unit - String (optional, defaults to "ether"): The ether to convert to. Possible units are:
-
-
-noether: ‘0’
-wei: ‘1’
-kwei: ‘1000’
-Kwei: ‘1000’
-babbage: ‘1000’
-femtoether: ‘1000’
-mwei: ‘1000000’
-Mwei: ‘1000000’
-lovelace: ‘1000000’
-picoether: ‘1000000’
-gwei: ‘1000000000’
-Gwei: ‘1000000000’
-shannon: ‘1000000000’
-nanoether: ‘1000000000’
-nano: ‘1000000000’
-szabo: ‘1000000000000’
-microether: ‘1000000000000’
-micro: ‘1000000000000’
-finney: ‘1000000000000000’
-milliether: ‘1000000000000000’
-milli: ‘1000000000000000’
-ether: ‘1000000000000000000’
-kether: ‘1000000000000000000000’
-grand: ‘1000000000000000000000’
-mether: ‘1000000000000000000000000’
-gether: ‘1000000000000000000000000000’
-tether: ‘1000000000000000000000000000000’
-
-
-
-
-
Returns
-
String|BN: If a number, or string is given it returns a number string, otherwise a BN.js instance.
-
-
-
Example
-
web3.utils.fromWei('1', 'ether');
-> "0.000000000000000001"
-
-web3.utils.fromWei('1', 'finney');
-> "0.000000000000001"
-
-web3.utils.fromWei('1', 'szabo');
-> "0.000000000001"
-
-web3.utils.fromWei('1', 'shannon');
-> "0.000000001"
-
-
-
-
-
-
-
unitMap
-
-
Shows all possible ether value and their amount in wei.
-
-
Retrun value
-
-
-Object with the following properties:
-
-noether: ‘0’
-wei: ‘1’
-kwei: ‘1000’
-Kwei: ‘1000’
-babbage: ‘1000’
-femtoether: ‘1000’
-mwei: ‘1000000’
-Mwei: ‘1000000’
-lovelace: ‘1000000’
-picoether: ‘1000000’
-gwei: ‘1000000000’
-Gwei: ‘1000000000’
-shannon: ‘1000000000’
-nanoether: ‘1000000000’
-nano: ‘1000000000’
-szabo: ‘1000000000000’
-microether: ‘1000000000000’
-micro: ‘1000000000000’
-finney: ‘1000000000000000’
-milliether: ‘1000000000000000’
-milli: ‘1000000000000000’
-ether: ‘1000000000000000000’
-kether: ‘1000000000000000000000’
-grand: ‘1000000000000000000000’
-mether: ‘1000000000000000000000000’
-gether: ‘1000000000000000000000000000’
-tether: ‘1000000000000000000000000000000’
-
-
-
-
-
-
-
-
Example
-
web3.utils.unitMap
-> {
- noether: '0',
- wei: '1',
- kwei: '1000',
- Kwei: '1000',
- babbage: '1000',
- femtoether: '1000',
- mwei: '1000000',
- Mwei: '1000000',
- lovelace: '1000000',
- picoether: '1000000',
- gwei: '1000000000',
- Gwei: '1000000000',
- shannon: '1000000000',
- nanoether: '1000000000',
- nano: '1000000000',
- szabo: '1000000000000',
- microether: '1000000000000',
- micro: '1000000000000',
- finney: '1000000000000000',
- milliether: '1000000000000000',
- milli: '1000000000000000',
- ether: '1000000000000000000',
- kether: '1000000000000000000000',
- grand: '1000000000000000000000',
- mether: '1000000000000000000000000',
- gether: '1000000000000000000000000000',
- tether: '1000000000000000000000000000000'
-}
-
-
-
-
-
-
-
padLeft
-
web3.utils.padLeft(string, characterAmount [, sign])
-web3.utils.leftPad(string, characterAmount [, sign]) // ALIAS
-
-
-
Adds a padding on the left of a string, Useful for adding paddings to HEX strings.
-
-
Parameters
-
-string - String: The string to add padding on the left.
-characterAmount - Number: The number of characters the total string should have.
-sign - String (optional): The character sign to use, defaults to "0".
-
-
-
-
Returns
-
String: The padded string.
-
-
-
Example
-
web3.utils.padLeft('0x3456ff', 20);
-> "0x000000000000003456ff"
-
-web3.utils.padLeft(0x3456ff, 20);
-> "0x000000000000003456ff"
-
-web3.utils.padLeft('Hello', 20, 'x');
-> "xxxxxxxxxxxxxxxHello"
-
-
-
-
-
-
-
padRight
-
web3.utils.padRight(string, characterAmount [, sign])
-web3.utils.rightPad(string, characterAmount [, sign]) // ALIAS
-
-
-
Adds a padding on the right of a string, Useful for adding paddings to HEX strings.
-
-
Parameters
-
-string - String: The string to add padding on the right.
-characterAmount - Number: The number of characters the total string should have.
-sign - String (optional): The character sign to use, defaults to "0".
-
-
-
-
Returns
-
String: The padded string.
-
-
-
Example
-
web3.utils.padRight('0x3456ff', 20);
-> "0x3456ff00000000000000"
-
-web3.utils.padRight(0x3456ff, 20);
-> "0x3456ff00000000000000"
-
-web3.utils.padRight('Hello', 20, 'x');
-> "Helloxxxxxxxxxxxxxxx"
-
-
-
-
-
-
-
toTwosComplement
-
web3.utils.toTwosComplement(number)
-
-
-
Converts a negative numer into a two’s complement.
-
-
Parameters
-
-number - Number|String|BigNumber: The number to convert.
-
-
-
-
Returns
-
String: The converted hex string.
-
-
-
Example
-
web3.utils.toTwosComplement('-1');
-> "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
-
-web3.utils.toTwosComplement(-1);
-> "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
-
-web3.utils.toTwosComplement('0x1');
-> "0x0000000000000000000000000000000000000000000000000000000000000001"
-
-web3.utils.toTwosComplement(-15);
-> "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1"
-
-web3.utils.toTwosComplement('-0x1');
-> "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_build/html/web3.html b/docs/_build/html/web3.html
deleted file mode 100644
index 9480c03c7e2..00000000000
--- a/docs/_build/html/web3.html
+++ /dev/null
@@ -1,501 +0,0 @@
-
-
-
-
-
-
-
- web3 — web3.js 1.0.0 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
web3
-
The web3.js object is an umbrella package to house all ethereum related modules.
-
var Web3 = require('web3');
-
-> Web3.utils
-> Web3.version
-> Web3.modules
-
-// "Web3.providers.givenProvider" will be set if in an Ethereum supported browser.
-var web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546');
-
-> web3.eth
-> web3.shh
-> web3.bzz
-> web3.utils
-> web3.version
-
-
-
-
-
version
-
Web3.version
-web3.version
-
-
-
Contains the version of the web3 container object.
-
-
Returns
-
String: The current version.
-
-
-
Example
-
web3.version;
-> "1.0.0"
-
-
-
-
-
-
-
modules
-
Web3.modules
-web3.modules
-
-
-
Will return an object with the classes of all major sub modules, to be able to instantiate them manually.
-
-
Returns
-
-Object: A list of modules:
-
-Eth - Function: the Eth module for interacting with the ethereum network see web3.eth for more.
-Net - Function: the Net module for interacting with network properties see web3.eth.net for more.
-Personal - Function: the Personal module for interacting with the ethereum accounts see web3.eth.personal for more.
-Shh - Function: the Shh module for interacting with the whisper protocol see web3.shh for more.
-Bzz - Function: the Bzz module for interacting with the swarm network see web3.bzz for more.
-
-
-
-
-
-
Example
-
web3.modules
-> {
- Eth: Eth function(provider),
- Net: Net function(provider),
- Personal: Personal function(provider),
- Shh: Shh function(provider),
- Bzz: Bzz function(provider),
-}
-
-
-
-
-
-
-
utils
-
-
Utility functions are also exposes on the Web3 class object directly.
-
See web3.utils for more.
-
-
-
-
setProvider
-
web3.setProvider(myProvider)
-web3.eth.setProvider(myProvider)
-web3.shh.setProvider(myProvider)
-web3.bzz.setProvider(myProvider)
-...
-
-
-
Will change the provider for its module.
-
-
Note
-
When called on the umbrella package web3 it will also set the provider for all sub modules web3.eth, web3.shh, etc EXCEPT web3.bzz which needs a separate provider at all times.
-
-
-
Parameters
-
-Object - myProvider: a valid provider.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-var web3 = new Web3('http://localhost:8545');
-// or
-var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
-
-// change provider
-web3.setProvider('ws://localhost:8546');
-// or
-web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
providers
-
web3.providers
-web3.eth.providers
-web3.shh.providers
-web3.bzz.providers
-...
-
-
-
Contains the current available providers.
-
-
Value
-
Object with the following providers:
-
-
-Object - HttpProvider: The HTTP provider is deprecated, as it won’t work for subscriptions.
-Object - WebsocketProvider: The Websocket provider is the standard for usage in legacy browsers.
-Object - IpcProvider: The IPC provider is used node.js dapps when running a local node. Gives the most secure connection.
-
-
-
-
-
Example
-
var Web3 = require('web3');
-// use the given Provider, e.g in Mist, or instantiate a new websocket provider
-var web3 = new Web3(Web3.givenProvider || 'ws://remotenode.com:8546');
-// or
-var web3 = new Web3(Web3.givenProvider || new Web3.providers.WebsocketProvider('ws://remotenode.com:8546'));
-
-// Using the IPC provider in node.js
-var net = require('net');
-
-var web3 = new Web3('/Users/myuser/Library/Ethereum/geth.ipc', net); // mac os path
-// or
-var web3 = new Web3(new Web3.providers.IpcProvider('/Users/myuser/Library/Ethereum/geth.ipc', net)); // mac os path
-// on windows the path is: "\\\\.\\pipe\\geth.ipc"
-// on linux the path is: "/users/myuser/.ethereum/geth.ipc"
-
-
-
-
-
-
-
givenProvider
-
web3.givenProvider
-web3.eth.givenProvider
-web3.shh.givenProvider
-web3.bzz.givenProvider
-...
-
-
-
When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser.
-Will return the given provider by the (browser) environment, otherwise null.
-
-
Returns
-
Object: The given provider set or null;
-
-
-
Example
-
-
-
-
-
currentProvider
-
web3.currentProvider
-web3.eth.currentProvider
-web3.shh.currentProvider
-web3.bzz.currentProvider
-...
-
-
-
Will return the current provider, otherwise null.
-
-
Returns
-
Object: The current provider set or null;
-
-
-
Example
-
-
-
-
-
BatchRequest
-
new web3.BatchRequest()
-new web3.eth.BatchRequest()
-new web3.shh.BatchRequest()
-new web3.bzz.BatchRequest()
-
-
-
Class to create and execute batch requests.
-
-
-
Returns
-
Object: With the following methods:
-
-
-add(request): To add a request object to the batch call.
-execute(): Will execute the batch request.
-
-
-
-
-
Example
-
var contract = new web3.eth.Contract(abi, address);
-
-var batch = new web3.BatchRequest();
-batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback));
-batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback2));
-batch.execute();
-
-
-
-
-
-
-
extend
-
web3.extend(methods)
-web3.eth.extend(methods)
-web3.shh.extend(methods)
-web3.bzz.extend(methods)
-...
-
-
-
Allows extending the web3 modules.
-
-
Note
-
You also have *.extend.formatters as additional formatter functions to be used for in and output formatting. Please see the source file for function details.
-
-
-
Parameters
-
-
-methods - Object: Extension object with array of methods description objects as follows:
--
-
-
-
-
-
-
-
Returns
-
Object: The extended module.
-
-
-
Example
-
web3.extend({
- property: 'myModule',
- methods: [{
- name: 'getBalance',
- call: 'eth_getBalance',
- params: 2,
- inputFormatter: [web3.extend.formatters.inputAddressFormatter, web3.extend.formatters.inputDefaultBlockNumberFormatter],
- outputFormatter: web3.utils.hexToNumberString
- },{
- name: 'getGasPriceSuperFunction',
- call: 'eth_gasPriceSuper',
- params: 2,
- inputFormatter: [null, web3.utils.numberToHex]
- }]
-});
-
-web3.extend({
- methods: [{
- name: 'directCall',
- call: 'eth_callForFun',
- }]
-});
-
-console.log(web3);
-> Web3 {
- myModule: {
- getBalance: function(){},
- getGasPriceSuperFunction: function(){}
- },
- directCall: function(){},
- eth: Eth {...},
- bzz: Bzz {...},
- ...
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/getting-started.rst b/docs/getting-started.rst
index 1d9c0a4d734..50fd0babb43 100644
--- a/docs/getting-started.rst
+++ b/docs/getting-started.rst
@@ -17,13 +17,12 @@ Adding web3.js
==============
.. index:: npm
-.. index:: bower
-.. index:: meteor
+.. index:: yarn
First you need to get web3.js into your project. This can be done using the following methods:
- npm: ``npm install web3``
-- meteor: ``meteor add ethereum:web3``
+- yarn: ``yarn add web3``
- pure js: link the ``dist/web3.min.js``
After that you need to create a web3 instance and set a provider.
diff --git a/gulpfile.js b/gulpfile.js
index 637044c291c..6b62709d08f 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -13,7 +13,6 @@ var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var source = require('vinyl-source-stream');
var exorcist = require('exorcist');
-var bower = require('bower');
var streamify = require('gulp-streamify');
var replace = require('gulp-replace');
var exec = require('child_process').exec;
@@ -130,8 +129,6 @@ gulp.task('version', function() {
var jsPattern = /version: '[.0-9\-a-z]*'/;
var glob = [
'./package.json',
- './bower.json',
- './package.js'
];
return gulp.src(glob, {base: './'})
@@ -140,13 +137,6 @@ gulp.task('version', function() {
.pipe(gulp.dest('./'));
});
-gulp.task('bower', gulp.series('version', function(cb) {
- bower.commands.install().on('end', function(installed) {
- console.log(installed);
- cb();
- });
-}));
-
gulp.task('lint', function() {
return gulp.src(['./*.js', './lib/*.js'])
.pipe(jshint())
diff --git a/package-lock.json b/package-lock.json
index a0374711def..bb3c4dc1420 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "web3",
- "version": "1.2.5",
+ "version": "1.2.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3743,12 +3743,6 @@
}
}
},
- "bower": {
- "version": "1.8.8",
- "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.8.tgz",
- "integrity": "sha512-1SrJnXnkP9soITHptSO+ahx3QKp3cVzn8poI6ujqc5SeOkg5iqM1pK9H+DSc2OQ8SnO0jC/NG4Ur/UIwy7574A==",
- "dev": true
- },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -16875,9 +16869,9 @@
}
},
"typescript": {
- "version": "3.8.0-dev.20200130",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.0-dev.20200130.tgz",
- "integrity": "sha512-DJkyFlY26aZLF7CEP7L27ulA0Gml3vNR2C0Uhvz/Meb/9Zk4GVBLZz1wYeY05kcww6zdraKGds/OVUcK4Y9JGQ==",
+ "version": "3.9.0-dev.20200330",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.0-dev.20200330.tgz",
+ "integrity": "sha512-RI1hwkdnHUbQ78PT/VbLgrMjyb47/8+G2CIfuWW6lBAQIwgqjEyYlKW9PbDRG3WlHXieTMkE3Rjwn9hF08dU3Q==",
"dev": true
},
"uglify-js": {
diff --git a/package.js b/package.js
deleted file mode 100644
index 5bada838ce8..00000000000
--- a/package.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* jshint ignore:start */
-Package.describe({
- name: 'ethereum:web3',
- version: '1.2.5',
- summary: 'Ethereum JavaScript API, middleware to talk to a ethreum node over RPC',
- git: 'https://github.com/ethereum/ethereum.js',
- // By default, Meteor will default to using README.md for documentation.
- // To avoid submitting documentation, set this field to null.
- documentation: 'README.md'
-});
-
-// Npm.depends({
-// "xmlhttprequest": "1.7.0"
-// });
-
-
-Package.onUse(function(api) {
- api.versionsFrom('1.0.3.2');
-
- api.addFiles('dist/web3.js', ['client']); // 'server'
-});
-
-/* jshint ignore:end */
diff --git a/package.json b/package.json
index a6317863849..1176393fe60 100644
--- a/package.json
+++ b/package.json
@@ -104,7 +104,6 @@
"bignumber.js": "^4.0.0",
"bluebird": "3.3.1",
"bn.js": "^4.11.8",
- "bower": "1.8.8",
"browserify": "^16.5.0",
"bundlesize": "^0.18.0",
"chai": "^4.2.0",