gamegold 5.1.2 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gamegold-worker.js +3 -3
- package/lib/gamegold.js +3 -3
- package/package.json +1 -1
package/lib/gamegold-worker.js
CHANGED
|
@@ -24,7 +24,7 @@ const path = require('path');var gpath = path.join(__dirname, '../../../', 'node
|
|
|
24
24
|
* consensus.js - consensus constants and helpers for vallnet
|
|
25
25
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
26
26
|
* https://github.com/bookmansoft/gamegold
|
|
27
|
-
*/const i=r(0),a=r(47);t.ROOT="xxxxxxxx-vallnet-root-xxxxxxxxxxxxxx",t.COIN=1e8,t.BASE_REWARD=50*t.COIN,t.VALLNET_HEARTBEAT=6,t.BLOCK_DAY=2,t.retargetInterval=14*t.BLOCK_DAY,t.targetTimespan=t.VALLNET_HEARTBEAT*t.retargetInterval,t.MAX_MONEY=21e6*t.COIN,t.ORIGINAL=t.MAX_MONEY/10,t.GRAM=100,t.MINPROPVALUE=100*t.GRAM,t.registerFee=t.COIN,t.contractConfirmation=1,t.TRANSACTION_PERIOD=10,t.HTLC_CANCEL_PERIOD=72,t.SmartContractMnemonic={phrase:"legal winner thank year wave sausage worth useful legal winner thank yellow",language:"english",passphrase:"bookmansoft"},t.getRealValue=function(e,t){return e*Math.pow(t,.5)},t.getVoteZone=function(e){return 1+(e/t.retargetInterval|0)},t.getRealValues=function(e,r){let i=0;for(const s of e){var a=s.getDepth(r);a<1||s.getReturnType(106)||(i+=t.getRealValue(s.value,a))}return i},t.HALF_REWARD=Math.floor(t.BASE_REWARD/2),t.MAX_BLOCK_SIZE=1e7,t.MAX_RAW_BLOCK_SIZE=4e7,t.MAX_BLOCK_WEIGHT=4e7,t.MAX_PACKING_SIZE=16,t.MAX_BLOCK_SIGOPS=2e5,t.MAX_BLOCK_SIGOPS_COST=8e5,t.VERSION_TOP_BITS=536870912,t.VERSION_TOP_MASK=3758096384,t.COINBASE_MATURITY=100,t.STOCK_ORIENT=5e6,t.STOCK_MAX_PRICE=5e6,t.STOCK_ADDED_SINGLE=1e6,t.STOCK_ADDED=1e7,t.STOCK_TRADE_SINGLE=100,t.STOCK_MAX_TRADE_SINGLE=1e4,t.STOCK_OFFER_PERIOD=14,t.STOCK_OFFER_CD=28,t.WITNESS_SCALE_FACTOR=4,t.LOCKTIME_THRESHOLD=5e8,t.SEQUENCE_DISABLE_FLAG=1<<31>>>0,t.SEQUENCE_TYPE_FLAG=1<<22,t.SEQUENCE_GRANULARITY=9,t.SEQUENCE_MASK=65535,t.MAX_SCRIPT_SIZE=1e4,t.MAX_SCRIPT_STACK=1e3,t.MAX_SCRIPT_PUSH=520,t.MAX_SCRIPT_OPS=201,t.MAX_MULTISIG_PUBKEYS=20,t.MAX_CACHE_REORGAN_TX=2e5,t.compact2BN=function(e){if(0===e)return new a(0);var t=e>>>24,r=e>>>23&1;let i,s=8388607&e;return t<=3?(s>>>=8*(3-t),i=new a(s)):(i=new a(s)).iushln(8*(t-3)),r&&i.ineg(),i},t.bn2Compact=function(e){if(e.isZero())return 0;let t,r=e.byteLength(),i=(r<=3?(t=e.toNumber(),t<<=8*(3-r)):t=e.ushrn(8*(r-3)).toNumber(),8388608&t&&(t>>=8,r++),r<<24|t);return e.isNeg()&&(i|=8388608),i>>>0},t.verifyPOW=function(e,r){return!(r=t.compact2BN(r)).isNeg()&&!r.isZero()&&!new a(e,"le").gt(r)},t.getReward=function(e,r){return i(0<=e,"Bad height for reward."),33<=(e=Math.floor(e/r))?0:0===e?t.BASE_REWARD:t.HALF_REWARD>>>e-1},t.hasBit=function(e,r){return(e&t.VERSION_TOP_MASK)>>>0===t.VERSION_TOP_BITS&&0!=(e&1<<r)}},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("util")},function(e,t,r){var i=r(0),a=r(46).Stream,s=r(9),n=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e,t,r,a,n){throw new i.AssertionError({message:s.format("%s (%s) is required",e,t),actual:void 0===n?typeof a:n(a),expected:t,operator:r||"===",stackStartFunction:c.caller})}function u(e){return Object.prototype.toString.call(e).slice(8,-1)}function h(){}var l={bool:{check:function(e){return"boolean"==typeof e}},func:{check:function(e){return"function"==typeof e}},string:{check:function(e){return"string"==typeof e}},object:{check:function(e){return"object"==typeof e&&null!==e}},number:{check:function(e){return"number"==typeof e&&!isNaN(e)}},finite:{check:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof a},operator:"instanceof",actual:u},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:u},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:u},uuid:{check:function(e){return"string"==typeof e&&n.test(e)},operator:"isUUID"}};e.exports=function e(t){var r=Object.keys(l),a=process.env.NODE_NDEBUG?h:function(e,t){e||c(t,"true",e)};return r.forEach((function(e){var r;t?a[e]=h:(r=l[e],a[e]=function(t,i){r.check(t)||c(i,e,r.operator,t,r.actual)})})),r.forEach((function(e){var r,i="optional"+o(e);t?a[i]=h:(r=l[e],a[i]=function(t,i){null==t||r.check(t)||c(i,e,r.operator,t,r.actual)})})),r.forEach((function(e){var r,i,s="arrayOf"+o(e);t?a[s]=h:(r=l[e],i="["+e+"]",a[s]=function(e,t){var a;for(Array.isArray(e)||c(t,i,r.operator,e,r.actual),a=0;a<e.length;a++)r.check(e[a])||c(t,i,r.operator,e,r.actual)})})),r.forEach((function(e){var r,i,s="optionalArrayOf"+o(e);t?a[s]=h:(r=l[e],i="["+e+"]",a[s]=function(e,t){var a;if(null!=e)for(Array.isArray(e)||c(t,i,r.operator,e,r.actual),a=0;a<e.length;a++)r.check(e[a])||c(t,i,r.operator,e,r.actual)})})),Object.keys(i).forEach((function(e){a[e]="AssertionError"!==e&&t?h:i[e]})),a._setExports=e,a}(process.env.NODE_NDEBUG)},function(e,t,r){"use strict";var i,a=r(76),s="undefined"==typeof navigator,n={e:{}},o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function c(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return n.e=e,n}}function u(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function h(e,t,r){return u(e)||a.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writable:!0}),e}var l=function(){function e(e){for(var t=0;t<i.length;++t)if(i[t]===e)return 1}var t,r,i=[Array.prototype,Object.prototype,Function.prototype];return a.isES5?(t=Object.getOwnPropertyNames,function(r){for(var i,s=[],n=Object.create(null);null!=r&&!e(r);){try{i=t(r)}catch(r){return s}for(var o=0;o<i.length;++o){var c,u=i[o];n[u]||(n[u]=!0,null!=(c=Object.getOwnPropertyDescriptor(r,u))&&null==c.get&&null==c.set&&s.push(u))}r=a.getPrototypeOf(r)}return s}):(r={}.hasOwnProperty,function(t){if(e(t))return[];var a=[];e:for(var s in t){if(!r.call(t,s))for(var n=0;n<i.length;++n)if(r.call(i[n],s))continue e;a.push(s)}return a})}(),p=/this\s*\.\s*\S+\s*=/;var d=/^[a-z$_][a-z$_0-9]*$/i;function f(e){try{return e+""}catch(e){return"[no string representation]"}}function m(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){return m(e)&&a.propertyIsWritable(e,"stack")}var y="stack"in new Error?function(e){return g(e)?e:new Error(f(e))}:function(e){if(g(e))return e;try{throw new Error(f(e))}catch(e){return e}};function v(e){return{}.toString.call(e)}var b,w,k=function(e){return a.isArray(e)?e:null},x=("undefined"!=typeof Symbol&&Symbol.iterator&&(b="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],i=e[Symbol.iterator]();!(t=i.next()).done;)r.push(t.value);return r},k=function(e){return a.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?b(e):null}),"undefined"!=typeof process&&"[object process]"===v(process).toLowerCase()),S="undefined"!=typeof process&&void 0!==process.env;var _={setReflectHandler:function(e){w=e},isClass:function(e){try{if("function"==typeof e){var t=a.names(e.prototype),r=a.isES5&&1<t.length,i=0<t.length&&!(1===t.length&&"constructor"===t[0]),s=p.test(e+"")&&0<a.names(e).length;if(r||i||s)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return d.test(e)},inheritedDataKeys:l,getDataPropertyOrDefault:function(e,t,r){var i;return a.isES5?null!=(i=Object.getOwnPropertyDescriptor(e,t))?null==i.get&&null==i.set?i.value:r:void 0:{}.hasOwnProperty.call(e,t)?e[t]:void 0},thrower:function(e){throw e},isArray:a.isArray,asArray:k,notEnumerableProp:h,isPrimitive:u,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:m,canEvaluate:s,errorObj:n,tryCatch:function(e){return i=e,c},inherits:function(e,t){var r={}.hasOwnProperty;function i(){for(var i in this.constructor=e,(this.constructor$=t).prototype)r.call(t.prototype,i)&&"$"!==i.charAt(i.length-1)&&(this[i+"$"]=t.prototype[i])}return i.prototype=t.prototype,e.prototype=new i,e.prototype},withAppended:function(e,t){for(var r=e.length,i=new Array(r+1),a=0;a<r;++a)i[a]=e[a];return i[a]=t,i},maybeWrapAsError:function(e){return u(e)?new Error(f(e)):e},toFastProperties:function(e){function t(){}t.prototype=e;var r=new t;function i(){r.foo}return i(),i(),e},filledRange:function(e,t,r){for(var i=new Array(e),a=0;a<e;++a)i[a]=t+a+r;return i},toString:f,canAttachTrace:g,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{h(e,"isOperational",!0)}catch(e){}},classString:v,copyDescriptors:function(e,t,r){for(var i=a.names(e),s=0;s<i.length;++s){var n=i[s];if(r(n))try{a.defineProperty(t,n,a.getDescriptor(e,n))}catch(e){}}},isNode:x,hasEnvVariables:S,env:function(e){return S?process.env[e]:void 0},global:o,getNativePromise:function(){if("function"==typeof Promise)try{if("[object Promise]"===v(new Promise((function(){}))))return Promise}catch(e){}},contextBind:function(e,t){var r,i;return null!==e&&"function"==typeof t&&t!==w&&(null!==e.domain&&(t=e.domain.bind(t)),null!==(r=e.async))&&(i=t,t=function(){for(var e=arguments.length+2,t=new Array(e),a=2;a<e;++a)t[a]=arguments[a-2];return t[0]=i,t[1]=this,r.runInAsyncScope.apply(r,t)}),t}};_.isRecentNode=_.isNode&&function(){var e;return process.versions&&process.versions.node?e=process.versions.node.split(".").map(Number):process.version&&(e=process.version.split(".").map(Number)),0===e[0]&&10<e[1]||0<e[0]}(),_.nodeSupportsAsyncResource=_.isNode&&function(){var e=!1;try{e="function"==typeof r(258).AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),_.isNode&&_.toFastProperties(process);try{throw new Error}catch(e){_.lastLineError=e}e.exports=_},function(e,t,r){"use strict";var i,a=r(125),s=a.Buffer,n={};for(i in a)a.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(n[i]=a[i]);var o=n.Buffer={};for(i in s)s.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(o[i]=s[i]);if(n.Buffer.prototype=s.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),o.alloc||(o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return e=s(e),t&&0!==t.length?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e}),!n.kStringMaxLength)try{n.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}n.constants||(n.constants={MAX_LENGTH:n.kMaxLength},n.kStringMaxLength&&(n.constants.MAX_STRING_LENGTH=n.kStringMaxLength)),e.exports=n},function(e,t,r){"use strict";
|
|
27
|
+
*/const i=r(0),a=r(47);t.ROOT="xxxxxxxx-vallnet-root-xxxxxxxxxxxxxx",t.COIN=1e8,t.BASE_REWARD=50*t.COIN,t.VALLNET_HEARTBEAT=600,t.BLOCK_DAY=144,t.retargetInterval=14*t.BLOCK_DAY,t.targetTimespan=t.VALLNET_HEARTBEAT*t.retargetInterval,t.MAX_MONEY=21e6*t.COIN,t.ORIGINAL=t.MAX_MONEY/10,t.GRAM=100,t.MINPROPVALUE=100*t.GRAM,t.registerFee=t.COIN,t.contractConfirmation=1,t.TRANSACTION_PERIOD=10,t.HTLC_CANCEL_PERIOD=72,t.SmartContractMnemonic={phrase:"legal winner thank year wave sausage worth useful legal winner thank yellow",language:"english",passphrase:"bookmansoft"},t.getRealValue=function(e,t){return e*Math.pow(t,.5)},t.getVoteZone=function(e){return 1+(e/t.retargetInterval|0)},t.getRealValues=function(e,r){let i=0;for(const s of e){var a=s.getDepth(r);a<1||s.getReturnType(106)||(i+=t.getRealValue(s.value,a))}return i},t.HALF_REWARD=Math.floor(t.BASE_REWARD/2),t.MAX_BLOCK_SIZE=1e7,t.MAX_RAW_BLOCK_SIZE=4e7,t.MAX_BLOCK_WEIGHT=4e7,t.MAX_PACKING_SIZE=16,t.MAX_BLOCK_SIGOPS=2e5,t.MAX_BLOCK_SIGOPS_COST=8e5,t.VERSION_TOP_BITS=536870912,t.VERSION_TOP_MASK=3758096384,t.COINBASE_MATURITY=100,t.STOCK_ORIENT=5e6,t.STOCK_MAX_PRICE=5e6,t.STOCK_ADDED_SINGLE=1e6,t.STOCK_ADDED=1e7,t.STOCK_TRADE_SINGLE=100,t.STOCK_MAX_TRADE_SINGLE=1e4,t.STOCK_OFFER_PERIOD=14,t.STOCK_OFFER_CD=28,t.WITNESS_SCALE_FACTOR=4,t.LOCKTIME_THRESHOLD=5e8,t.SEQUENCE_DISABLE_FLAG=1<<31>>>0,t.SEQUENCE_TYPE_FLAG=1<<22,t.SEQUENCE_GRANULARITY=9,t.SEQUENCE_MASK=65535,t.MAX_SCRIPT_SIZE=1e4,t.MAX_SCRIPT_STACK=1e3,t.MAX_SCRIPT_PUSH=520,t.MAX_SCRIPT_OPS=201,t.MAX_MULTISIG_PUBKEYS=20,t.MAX_CACHE_REORGAN_TX=2e5,t.compact2BN=function(e){if(0===e)return new a(0);var t=e>>>24,r=e>>>23&1;let i,s=8388607&e;return t<=3?(s>>>=8*(3-t),i=new a(s)):(i=new a(s)).iushln(8*(t-3)),r&&i.ineg(),i},t.bn2Compact=function(e){if(e.isZero())return 0;let t,r=e.byteLength(),i=(r<=3?(t=e.toNumber(),t<<=8*(3-r)):t=e.ushrn(8*(r-3)).toNumber(),8388608&t&&(t>>=8,r++),r<<24|t);return e.isNeg()&&(i|=8388608),i>>>0},t.verifyPOW=function(e,r){return!(r=t.compact2BN(r)).isNeg()&&!r.isZero()&&!new a(e,"le").gt(r)},t.getReward=function(e,r){return i(0<=e,"Bad height for reward."),33<=(e=Math.floor(e/r))?0:0===e?t.BASE_REWARD:t.HALF_REWARD>>>e-1},t.hasBit=function(e,r){return(e&t.VERSION_TOP_MASK)>>>0===t.VERSION_TOP_BITS&&0!=(e&1<<r)}},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("util")},function(e,t,r){var i=r(0),a=r(46).Stream,s=r(9),n=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e,t,r,a,n){throw new i.AssertionError({message:s.format("%s (%s) is required",e,t),actual:void 0===n?typeof a:n(a),expected:t,operator:r||"===",stackStartFunction:c.caller})}function u(e){return Object.prototype.toString.call(e).slice(8,-1)}function h(){}var l={bool:{check:function(e){return"boolean"==typeof e}},func:{check:function(e){return"function"==typeof e}},string:{check:function(e){return"string"==typeof e}},object:{check:function(e){return"object"==typeof e&&null!==e}},number:{check:function(e){return"number"==typeof e&&!isNaN(e)}},finite:{check:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof a},operator:"instanceof",actual:u},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:u},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:u},uuid:{check:function(e){return"string"==typeof e&&n.test(e)},operator:"isUUID"}};e.exports=function e(t){var r=Object.keys(l),a=process.env.NODE_NDEBUG?h:function(e,t){e||c(t,"true",e)};return r.forEach((function(e){var r;t?a[e]=h:(r=l[e],a[e]=function(t,i){r.check(t)||c(i,e,r.operator,t,r.actual)})})),r.forEach((function(e){var r,i="optional"+o(e);t?a[i]=h:(r=l[e],a[i]=function(t,i){null==t||r.check(t)||c(i,e,r.operator,t,r.actual)})})),r.forEach((function(e){var r,i,s="arrayOf"+o(e);t?a[s]=h:(r=l[e],i="["+e+"]",a[s]=function(e,t){var a;for(Array.isArray(e)||c(t,i,r.operator,e,r.actual),a=0;a<e.length;a++)r.check(e[a])||c(t,i,r.operator,e,r.actual)})})),r.forEach((function(e){var r,i,s="optionalArrayOf"+o(e);t?a[s]=h:(r=l[e],i="["+e+"]",a[s]=function(e,t){var a;if(null!=e)for(Array.isArray(e)||c(t,i,r.operator,e,r.actual),a=0;a<e.length;a++)r.check(e[a])||c(t,i,r.operator,e,r.actual)})})),Object.keys(i).forEach((function(e){a[e]="AssertionError"!==e&&t?h:i[e]})),a._setExports=e,a}(process.env.NODE_NDEBUG)},function(e,t,r){"use strict";var i,a=r(76),s="undefined"==typeof navigator,n={e:{}},o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function c(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return n.e=e,n}}function u(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function h(e,t,r){return u(e)||a.defineProperty(e,t,{value:r,configurable:!0,enumerable:!1,writable:!0}),e}var l=function(){function e(e){for(var t=0;t<i.length;++t)if(i[t]===e)return 1}var t,r,i=[Array.prototype,Object.prototype,Function.prototype];return a.isES5?(t=Object.getOwnPropertyNames,function(r){for(var i,s=[],n=Object.create(null);null!=r&&!e(r);){try{i=t(r)}catch(r){return s}for(var o=0;o<i.length;++o){var c,u=i[o];n[u]||(n[u]=!0,null!=(c=Object.getOwnPropertyDescriptor(r,u))&&null==c.get&&null==c.set&&s.push(u))}r=a.getPrototypeOf(r)}return s}):(r={}.hasOwnProperty,function(t){if(e(t))return[];var a=[];e:for(var s in t){if(!r.call(t,s))for(var n=0;n<i.length;++n)if(r.call(i[n],s))continue e;a.push(s)}return a})}(),p=/this\s*\.\s*\S+\s*=/;var d=/^[a-z$_][a-z$_0-9]*$/i;function f(e){try{return e+""}catch(e){return"[no string representation]"}}function m(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){return m(e)&&a.propertyIsWritable(e,"stack")}var y="stack"in new Error?function(e){return g(e)?e:new Error(f(e))}:function(e){if(g(e))return e;try{throw new Error(f(e))}catch(e){return e}};function v(e){return{}.toString.call(e)}var b,w,k=function(e){return a.isArray(e)?e:null},x=("undefined"!=typeof Symbol&&Symbol.iterator&&(b="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],i=e[Symbol.iterator]();!(t=i.next()).done;)r.push(t.value);return r},k=function(e){return a.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?b(e):null}),"undefined"!=typeof process&&"[object process]"===v(process).toLowerCase()),S="undefined"!=typeof process&&void 0!==process.env;var _={setReflectHandler:function(e){w=e},isClass:function(e){try{if("function"==typeof e){var t=a.names(e.prototype),r=a.isES5&&1<t.length,i=0<t.length&&!(1===t.length&&"constructor"===t[0]),s=p.test(e+"")&&0<a.names(e).length;if(r||i||s)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return d.test(e)},inheritedDataKeys:l,getDataPropertyOrDefault:function(e,t,r){var i;return a.isES5?null!=(i=Object.getOwnPropertyDescriptor(e,t))?null==i.get&&null==i.set?i.value:r:void 0:{}.hasOwnProperty.call(e,t)?e[t]:void 0},thrower:function(e){throw e},isArray:a.isArray,asArray:k,notEnumerableProp:h,isPrimitive:u,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:m,canEvaluate:s,errorObj:n,tryCatch:function(e){return i=e,c},inherits:function(e,t){var r={}.hasOwnProperty;function i(){for(var i in this.constructor=e,(this.constructor$=t).prototype)r.call(t.prototype,i)&&"$"!==i.charAt(i.length-1)&&(this[i+"$"]=t.prototype[i])}return i.prototype=t.prototype,e.prototype=new i,e.prototype},withAppended:function(e,t){for(var r=e.length,i=new Array(r+1),a=0;a<r;++a)i[a]=e[a];return i[a]=t,i},maybeWrapAsError:function(e){return u(e)?new Error(f(e)):e},toFastProperties:function(e){function t(){}t.prototype=e;var r=new t;function i(){r.foo}return i(),i(),e},filledRange:function(e,t,r){for(var i=new Array(e),a=0;a<e;++a)i[a]=t+a+r;return i},toString:f,canAttachTrace:g,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{h(e,"isOperational",!0)}catch(e){}},classString:v,copyDescriptors:function(e,t,r){for(var i=a.names(e),s=0;s<i.length;++s){var n=i[s];if(r(n))try{a.defineProperty(t,n,a.getDescriptor(e,n))}catch(e){}}},isNode:x,hasEnvVariables:S,env:function(e){return S?process.env[e]:void 0},global:o,getNativePromise:function(){if("function"==typeof Promise)try{if("[object Promise]"===v(new Promise((function(){}))))return Promise}catch(e){}},contextBind:function(e,t){var r,i;return null!==e&&"function"==typeof t&&t!==w&&(null!==e.domain&&(t=e.domain.bind(t)),null!==(r=e.async))&&(i=t,t=function(){for(var e=arguments.length+2,t=new Array(e),a=2;a<e;++a)t[a]=arguments[a-2];return t[0]=i,t[1]=this,r.runInAsyncScope.apply(r,t)}),t}};_.isRecentNode=_.isNode&&function(){var e;return process.versions&&process.versions.node?e=process.versions.node.split(".").map(Number):process.version&&(e=process.version.split(".").map(Number)),0===e[0]&&10<e[1]||0<e[0]}(),_.nodeSupportsAsyncResource=_.isNode&&function(){var e=!1;try{e="function"==typeof r(258).AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),_.isNode&&_.toFastProperties(process);try{throw new Error}catch(e){_.lastLineError=e}e.exports=_},function(e,t,r){"use strict";var i,a=r(125),s=a.Buffer,n={};for(i in a)a.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(n[i]=a[i]);var o=n.Buffer={};for(i in s)s.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(o[i]=s[i]);if(n.Buffer.prototype=s.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),o.alloc||(o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return e=s(e),t&&0!==t.length?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e}),!n.kStringMaxLength)try{n.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}n.constants||(n.constants={MAX_LENGTH:n.kMaxLength},n.kStringMaxLength&&(n.constants.MAX_STRING_LENGTH=n.kStringMaxLength)),e.exports=n},function(e,t,r){"use strict";
|
|
28
28
|
/*!
|
|
29
29
|
* address.js - address object for vallnet
|
|
30
30
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
@@ -196,7 +196,7 @@ let i=[];[r(557),r(558),r(559),r(560),r(561),r(562),r(563),r(564),r(565),r(566),
|
|
|
196
196
|
* pkg.js - package constants
|
|
197
197
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
198
198
|
* https://github.com/bookmansoft/gamegold
|
|
199
|
-
*/t.protocol="vallnet",t.version="v5.
|
|
199
|
+
*/t.protocol="vallnet",t.version="v5.2.0",t.url="https://github.com/bookmansoft/gamegold"},function(e,t,r){"use strict";
|
|
200
200
|
/*!
|
|
201
201
|
* common.js - p2p constants for vallnet
|
|
202
202
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
@@ -873,7 +873,7 @@ const i=r(5).ContractType;e.exports=function(e){if(!e)return r(188);switch(e.ope
|
|
|
873
873
|
* testnet.js - config of of testnet network
|
|
874
874
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
875
875
|
* https://github.com/bookmansoft/gamegold
|
|
876
|
-
*/var i=r(47),a=r(29),s=r(7),n=(r=r(97),{type:"testnet",typeId:1,magic:118034699,genesisId:"xxxxxxxx-vallnet-boss-xxxxxxxxxxxxxx",tokenFix:"xxxxxxxx-vallnet-boss-tokenxxxxx",tokenReg:/^xxxxxxxx-vallnet-boss-tokenxxxxx[0-9]{4}$/i,seeds:[]});n.txcheckpoint=r.testnet,n.txchecktime={1:1e4},a.setPort(n),n.checkpointMap={},n.lastCheckpoint=Object.keys(n.checkpointMap).reduce((e,t)=>Math.max(e,parseInt(t)),0),n.halvingInterval=21e4,n.pow={limit:new i("000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","hex"),chainwork:new i("0000000000000000000000000000000000000000000000000000000000000002","hex"),targetTimespan:s.targetTimespan,targetSpacing:s.VALLNET_HEARTBEAT,retargetInterval:s.retargetInterval,targetReset:!
|
|
876
|
+
*/var i=r(47),a=r(29),s=r(7),n=(r=r(97),{type:"testnet",typeId:1,magic:118034699,genesisId:"xxxxxxxx-vallnet-boss-xxxxxxxxxxxxxx",tokenFix:"xxxxxxxx-vallnet-boss-tokenxxxxx",tokenReg:/^xxxxxxxx-vallnet-boss-tokenxxxxx[0-9]{4}$/i,seeds:[]});n.txcheckpoint=r.testnet,n.txchecktime={1:1e4},a.setPort(n),n.checkpointMap={},n.lastCheckpoint=Object.keys(n.checkpointMap).reduce((e,t)=>Math.max(e,parseInt(t)),0),n.halvingInterval=21e4,n.pow={limit:new i("000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","hex"),chainwork:new i("0000000000000000000000000000000000000000000000000000000000000002","hex"),targetTimespan:s.targetTimespan,targetSpacing:s.VALLNET_HEARTBEAT,retargetInterval:s.retargetInterval,targetReset:!1,noRetargeting:!1},n.pow.bits=s.bn2Compact(n.pow.limit),n.coinbaseAddress="tb1qrkwzpkhzuq2w7mechcesa50m7wv7qcuw9hpe76",n.genesis={version:2,hash:"0000000000000000000000000000000000000000000000000000000000000000",prevBlock:"0000000000000000000000000000000000000000000000000000000000000000",merkleRoot:"0000000000000000000000000000000000000000000000000000000000000000",addresses:"tb1qzx4t30su0na7wly567zwmjfkuffcs9vt87gpx9,tb1qrkwzpkhzuq2w7mechcesa50m7wv7qcuw9hpe76,tb1q8d3dpnlxexm6wndqqpdkmz5nllxfk6kdlntqws,tb1qfha9pgvlx32sjsr9twdr76dr8z7uvfn9nk5gtd,tb1qt2z45tzyflld0rj0jgxxang8zp9sjfxfqnklld,tb1qd2x745swsml842p3jt6heymdy0q0vg05qtjcrl,tb1q0drn4auw7anz7nf7qz00tlq3hzvvf5xka70x2w,tb1qj62dhftccj427djq7y54f0fmxqwhexd6s74t6f,tb1qhqkgtxxd2djrcs58st0ya0stxzzx5p0te5d8uf,tb1qcxeajcpcv5pdyanjdky7yywex5qqnc8dnr6jzf,tb1qaeuvffm4wdyyj6xxzfhez4u8jvnh57jxqcjmqg",time:1567296e3,bits:n.pow.bits,nonce:20190901,height:0},n.block={pruneAfterHeight:1e3,keepBlocks:288,maxTipAge:4294967295,slowHeight:95e4},n.minerWindow=n.pow.retargetInterval,n.activationThreshold=.75*n.minerWindow|0,n.deployments={csv:{name:"csv",bit:0,startTime:1456790400,timeout:1493596800,threshold:-1,window:-1,required:!1,force:!0},testdummy:{name:"testdummy",bit:28,startTime:1199145601,timeout:1230767999,threshold:-1,window:-1,required:!1,force:!0}},n.deploys=[n.deployments.csv,n.deployments.testdummy],n.keyPrefix={privkey:239,xpubkey:70617039,xprivkey:70615956,xpubkey58:"tpub",xprivkey58:"tprv",coinType:1},n.addressPrefix={pubkeyhash:111,scripthash:196,witnesspubkeyhash:3,witnessscripthash:40,bech32:"tb"},n.requireStandard=!1,n.minRelay=1e3,n.feeRate=2e4,n.maxFeeRate=6e4,n.selfConnect=!1,n.requestMempool=!0,e.exports=n},function(e,t,r){"use strict";
|
|
877
877
|
/*!
|
|
878
878
|
* evidence.js - config of of evidence network
|
|
879
879
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
package/lib/gamegold.js
CHANGED
|
@@ -24,7 +24,7 @@ const path = require('path');var gpath = path.join(__dirname, '../../../', 'node
|
|
|
24
24
|
* consensus.js - consensus constants and helpers for vallnet
|
|
25
25
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
26
26
|
* https://github.com/bookmansoft/gamegold
|
|
27
|
-
*/const r=i(0),s=i(47);t.ROOT="xxxxxxxx-vallnet-root-xxxxxxxxxxxxxx",t.COIN=1e8,t.BASE_REWARD=50*t.COIN,t.VALLNET_HEARTBEAT=6,t.BLOCK_DAY=2,t.retargetInterval=14*t.BLOCK_DAY,t.targetTimespan=t.VALLNET_HEARTBEAT*t.retargetInterval,t.MAX_MONEY=21e6*t.COIN,t.ORIGINAL=t.MAX_MONEY/10,t.GRAM=100,t.MINPROPVALUE=100*t.GRAM,t.registerFee=t.COIN,t.contractConfirmation=1,t.TRANSACTION_PERIOD=10,t.HTLC_CANCEL_PERIOD=72,t.SmartContractMnemonic={phrase:"legal winner thank year wave sausage worth useful legal winner thank yellow",language:"english",passphrase:"bookmansoft"},t.getRealValue=function(e,t){return e*Math.pow(t,.5)},t.getVoteZone=function(e){return 1+(e/t.retargetInterval|0)},t.getRealValues=function(e,i){let r=0;for(const n of e){var s=n.getDepth(i);s<1||n.getReturnType(106)||(r+=t.getRealValue(n.value,s))}return r},t.HALF_REWARD=Math.floor(t.BASE_REWARD/2),t.MAX_BLOCK_SIZE=1e7,t.MAX_RAW_BLOCK_SIZE=4e7,t.MAX_BLOCK_WEIGHT=4e7,t.MAX_PACKING_SIZE=16,t.MAX_BLOCK_SIGOPS=2e5,t.MAX_BLOCK_SIGOPS_COST=8e5,t.VERSION_TOP_BITS=536870912,t.VERSION_TOP_MASK=3758096384,t.COINBASE_MATURITY=100,t.STOCK_ORIENT=5e6,t.STOCK_MAX_PRICE=5e6,t.STOCK_ADDED_SINGLE=1e6,t.STOCK_ADDED=1e7,t.STOCK_TRADE_SINGLE=100,t.STOCK_MAX_TRADE_SINGLE=1e4,t.STOCK_OFFER_PERIOD=14,t.STOCK_OFFER_CD=28,t.WITNESS_SCALE_FACTOR=4,t.LOCKTIME_THRESHOLD=5e8,t.SEQUENCE_DISABLE_FLAG=1<<31>>>0,t.SEQUENCE_TYPE_FLAG=1<<22,t.SEQUENCE_GRANULARITY=9,t.SEQUENCE_MASK=65535,t.MAX_SCRIPT_SIZE=1e4,t.MAX_SCRIPT_STACK=1e3,t.MAX_SCRIPT_PUSH=520,t.MAX_SCRIPT_OPS=201,t.MAX_MULTISIG_PUBKEYS=20,t.MAX_CACHE_REORGAN_TX=2e5,t.compact2BN=function(e){if(0===e)return new s(0);var t=e>>>24,i=e>>>23&1;let r,n=8388607&e;return t<=3?(n>>>=8*(3-t),r=new s(n)):(r=new s(n)).iushln(8*(t-3)),i&&r.ineg(),r},t.bn2Compact=function(e){if(e.isZero())return 0;let t,i=e.byteLength(),r=(i<=3?(t=e.toNumber(),t<<=8*(3-i)):t=e.ushrn(8*(i-3)).toNumber(),8388608&t&&(t>>=8,i++),i<<24|t);return e.isNeg()&&(r|=8388608),r>>>0},t.verifyPOW=function(e,i){return!(i=t.compact2BN(i)).isNeg()&&!i.isZero()&&!new s(e,"le").gt(i)},t.getReward=function(e,i){return r(0<=e,"Bad height for reward."),33<=(e=Math.floor(e/i))?0:0===e?t.BASE_REWARD:t.HALF_REWARD>>>e-1},t.hasBit=function(e,i){return(e&t.VERSION_TOP_MASK)>>>0===t.VERSION_TOP_BITS&&0!=(e&1<<i)}},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("util")},function(e,t,i){var r=i(0),s=i(46).Stream,n=i(9),a=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e,t,i,s,a){throw new r.AssertionError({message:n.format("%s (%s) is required",e,t),actual:void 0===a?typeof s:a(s),expected:t,operator:i||"===",stackStartFunction:c.caller})}function h(e){return Object.prototype.toString.call(e).slice(8,-1)}function u(){}var l={bool:{check:function(e){return"boolean"==typeof e}},func:{check:function(e){return"function"==typeof e}},string:{check:function(e){return"string"==typeof e}},object:{check:function(e){return"object"==typeof e&&null!==e}},number:{check:function(e){return"number"==typeof e&&!isNaN(e)}},finite:{check:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof s},operator:"instanceof",actual:h},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:h},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:h},uuid:{check:function(e){return"string"==typeof e&&a.test(e)},operator:"isUUID"}};e.exports=function e(t){var i=Object.keys(l),s=process.env.NODE_NDEBUG?u:function(e,t){e||c(t,"true",e)};return i.forEach((function(e){var i;t?s[e]=u:(i=l[e],s[e]=function(t,r){i.check(t)||c(r,e,i.operator,t,i.actual)})})),i.forEach((function(e){var i,r="optional"+o(e);t?s[r]=u:(i=l[e],s[r]=function(t,r){null==t||i.check(t)||c(r,e,i.operator,t,i.actual)})})),i.forEach((function(e){var i,r,n="arrayOf"+o(e);t?s[n]=u:(i=l[e],r="["+e+"]",s[n]=function(e,t){var s;for(Array.isArray(e)||c(t,r,i.operator,e,i.actual),s=0;s<e.length;s++)i.check(e[s])||c(t,r,i.operator,e,i.actual)})})),i.forEach((function(e){var i,r,n="optionalArrayOf"+o(e);t?s[n]=u:(i=l[e],r="["+e+"]",s[n]=function(e,t){var s;if(null!=e)for(Array.isArray(e)||c(t,r,i.operator,e,i.actual),s=0;s<e.length;s++)i.check(e[s])||c(t,r,i.operator,e,i.actual)})})),Object.keys(r).forEach((function(e){s[e]="AssertionError"!==e&&t?u:r[e]})),s._setExports=e,s}(process.env.NODE_NDEBUG)},function(e,t,i){"use strict";var r,s=i(76),n="undefined"==typeof navigator,a={e:{}},o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function c(){try{var e=r;return r=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function h(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function u(e,t,i){return h(e)||s.defineProperty(e,t,{value:i,configurable:!0,enumerable:!1,writable:!0}),e}var l=function(){function e(e){for(var t=0;t<r.length;++t)if(r[t]===e)return 1}var t,i,r=[Array.prototype,Object.prototype,Function.prototype];return s.isES5?(t=Object.getOwnPropertyNames,function(i){for(var r,n=[],a=Object.create(null);null!=i&&!e(i);){try{r=t(i)}catch(i){return n}for(var o=0;o<r.length;++o){var c,h=r[o];a[h]||(a[h]=!0,null!=(c=Object.getOwnPropertyDescriptor(i,h))&&null==c.get&&null==c.set&&n.push(h))}i=s.getPrototypeOf(i)}return n}):(i={}.hasOwnProperty,function(t){if(e(t))return[];var s=[];e:for(var n in t){if(!i.call(t,n))for(var a=0;a<r.length;++a)if(i.call(r[a],n))continue e;s.push(n)}return s})}(),p=/this\s*\.\s*\S+\s*=/;var d=/^[a-z$_][a-z$_0-9]*$/i;function f(e){try{return e+""}catch(e){return"[no string representation]"}}function m(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){return m(e)&&s.propertyIsWritable(e,"stack")}var y="stack"in new Error?function(e){return g(e)?e:new Error(f(e))}:function(e){if(g(e))return e;try{throw new Error(f(e))}catch(e){return e}};function v(e){return{}.toString.call(e)}var b,w,k=function(e){return s.isArray(e)?e:null},x=("undefined"!=typeof Symbol&&Symbol.iterator&&(b="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,i=[],r=e[Symbol.iterator]();!(t=r.next()).done;)i.push(t.value);return i},k=function(e){return s.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?b(e):null}),"undefined"!=typeof process&&"[object process]"===v(process).toLowerCase()),S="undefined"!=typeof process&&void 0!==process.env;var _={setReflectHandler:function(e){w=e},isClass:function(e){try{if("function"==typeof e){var t=s.names(e.prototype),i=s.isES5&&1<t.length,r=0<t.length&&!(1===t.length&&"constructor"===t[0]),n=p.test(e+"")&&0<s.names(e).length;if(i||r||n)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return d.test(e)},inheritedDataKeys:l,getDataPropertyOrDefault:function(e,t,i){var r;return s.isES5?null!=(r=Object.getOwnPropertyDescriptor(e,t))?null==r.get&&null==r.set?r.value:i:void 0:{}.hasOwnProperty.call(e,t)?e[t]:void 0},thrower:function(e){throw e},isArray:s.isArray,asArray:k,notEnumerableProp:u,isPrimitive:h,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:m,canEvaluate:n,errorObj:a,tryCatch:function(e){return r=e,c},inherits:function(e,t){var i={}.hasOwnProperty;function r(){for(var r in this.constructor=e,(this.constructor$=t).prototype)i.call(t.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=t.prototype[r])}return r.prototype=t.prototype,e.prototype=new r,e.prototype},withAppended:function(e,t){for(var i=e.length,r=new Array(i+1),s=0;s<i;++s)r[s]=e[s];return r[s]=t,r},maybeWrapAsError:function(e){return h(e)?new Error(f(e)):e},toFastProperties:function(e){function t(){}t.prototype=e;var i=new t;function r(){i.foo}return r(),r(),e},filledRange:function(e,t,i){for(var r=new Array(e),s=0;s<e;++s)r[s]=t+s+i;return r},toString:f,canAttachTrace:g,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{u(e,"isOperational",!0)}catch(e){}},classString:v,copyDescriptors:function(e,t,i){for(var r=s.names(e),n=0;n<r.length;++n){var a=r[n];if(i(a))try{s.defineProperty(t,a,s.getDescriptor(e,a))}catch(e){}}},isNode:x,hasEnvVariables:S,env:function(e){return S?process.env[e]:void 0},global:o,getNativePromise:function(){if("function"==typeof Promise)try{if("[object Promise]"===v(new Promise((function(){}))))return Promise}catch(e){}},contextBind:function(e,t){var i,r;return null!==e&&"function"==typeof t&&t!==w&&(null!==e.domain&&(t=e.domain.bind(t)),null!==(i=e.async))&&(r=t,t=function(){for(var e=arguments.length+2,t=new Array(e),s=2;s<e;++s)t[s]=arguments[s-2];return t[0]=r,t[1]=this,i.runInAsyncScope.apply(i,t)}),t}};_.isRecentNode=_.isNode&&function(){var e;return process.versions&&process.versions.node?e=process.versions.node.split(".").map(Number):process.version&&(e=process.version.split(".").map(Number)),0===e[0]&&10<e[1]||0<e[0]}(),_.nodeSupportsAsyncResource=_.isNode&&function(){var e=!1;try{e="function"==typeof i(258).AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),_.isNode&&_.toFastProperties(process);try{throw new Error}catch(e){_.lastLineError=e}e.exports=_},function(e,t,i){"use strict";var r,s=i(125),n=s.Buffer,a={};for(r in s)s.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=s[r]);var o=a.Buffer={};for(r in n)n.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=n[r]);if(a.Buffer.prototype=n.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return n(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return e=n(e),t&&0!==t.length?"string"==typeof i?e.fill(t,i):e.fill(t):e.fill(0),e}),!a.kStringMaxLength)try{a.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a},function(e,t,i){"use strict";
|
|
27
|
+
*/const r=i(0),s=i(47);t.ROOT="xxxxxxxx-vallnet-root-xxxxxxxxxxxxxx",t.COIN=1e8,t.BASE_REWARD=50*t.COIN,t.VALLNET_HEARTBEAT=600,t.BLOCK_DAY=144,t.retargetInterval=14*t.BLOCK_DAY,t.targetTimespan=t.VALLNET_HEARTBEAT*t.retargetInterval,t.MAX_MONEY=21e6*t.COIN,t.ORIGINAL=t.MAX_MONEY/10,t.GRAM=100,t.MINPROPVALUE=100*t.GRAM,t.registerFee=t.COIN,t.contractConfirmation=1,t.TRANSACTION_PERIOD=10,t.HTLC_CANCEL_PERIOD=72,t.SmartContractMnemonic={phrase:"legal winner thank year wave sausage worth useful legal winner thank yellow",language:"english",passphrase:"bookmansoft"},t.getRealValue=function(e,t){return e*Math.pow(t,.5)},t.getVoteZone=function(e){return 1+(e/t.retargetInterval|0)},t.getRealValues=function(e,i){let r=0;for(const n of e){var s=n.getDepth(i);s<1||n.getReturnType(106)||(r+=t.getRealValue(n.value,s))}return r},t.HALF_REWARD=Math.floor(t.BASE_REWARD/2),t.MAX_BLOCK_SIZE=1e7,t.MAX_RAW_BLOCK_SIZE=4e7,t.MAX_BLOCK_WEIGHT=4e7,t.MAX_PACKING_SIZE=16,t.MAX_BLOCK_SIGOPS=2e5,t.MAX_BLOCK_SIGOPS_COST=8e5,t.VERSION_TOP_BITS=536870912,t.VERSION_TOP_MASK=3758096384,t.COINBASE_MATURITY=100,t.STOCK_ORIENT=5e6,t.STOCK_MAX_PRICE=5e6,t.STOCK_ADDED_SINGLE=1e6,t.STOCK_ADDED=1e7,t.STOCK_TRADE_SINGLE=100,t.STOCK_MAX_TRADE_SINGLE=1e4,t.STOCK_OFFER_PERIOD=14,t.STOCK_OFFER_CD=28,t.WITNESS_SCALE_FACTOR=4,t.LOCKTIME_THRESHOLD=5e8,t.SEQUENCE_DISABLE_FLAG=1<<31>>>0,t.SEQUENCE_TYPE_FLAG=1<<22,t.SEQUENCE_GRANULARITY=9,t.SEQUENCE_MASK=65535,t.MAX_SCRIPT_SIZE=1e4,t.MAX_SCRIPT_STACK=1e3,t.MAX_SCRIPT_PUSH=520,t.MAX_SCRIPT_OPS=201,t.MAX_MULTISIG_PUBKEYS=20,t.MAX_CACHE_REORGAN_TX=2e5,t.compact2BN=function(e){if(0===e)return new s(0);var t=e>>>24,i=e>>>23&1;let r,n=8388607&e;return t<=3?(n>>>=8*(3-t),r=new s(n)):(r=new s(n)).iushln(8*(t-3)),i&&r.ineg(),r},t.bn2Compact=function(e){if(e.isZero())return 0;let t,i=e.byteLength(),r=(i<=3?(t=e.toNumber(),t<<=8*(3-i)):t=e.ushrn(8*(i-3)).toNumber(),8388608&t&&(t>>=8,i++),i<<24|t);return e.isNeg()&&(r|=8388608),r>>>0},t.verifyPOW=function(e,i){return!(i=t.compact2BN(i)).isNeg()&&!i.isZero()&&!new s(e,"le").gt(i)},t.getReward=function(e,i){return r(0<=e,"Bad height for reward."),33<=(e=Math.floor(e/i))?0:0===e?t.BASE_REWARD:t.HALF_REWARD>>>e-1},t.hasBit=function(e,i){return(e&t.VERSION_TOP_MASK)>>>0===t.VERSION_TOP_BITS&&0!=(e&1<<i)}},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("util")},function(e,t,i){var r=i(0),s=i(46).Stream,n=i(9),a=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e,t,i,s,a){throw new r.AssertionError({message:n.format("%s (%s) is required",e,t),actual:void 0===a?typeof s:a(s),expected:t,operator:i||"===",stackStartFunction:c.caller})}function h(e){return Object.prototype.toString.call(e).slice(8,-1)}function u(){}var l={bool:{check:function(e){return"boolean"==typeof e}},func:{check:function(e){return"function"==typeof e}},string:{check:function(e){return"string"==typeof e}},object:{check:function(e){return"object"==typeof e&&null!==e}},number:{check:function(e){return"number"==typeof e&&!isNaN(e)}},finite:{check:function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof s},operator:"instanceof",actual:h},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:h},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:h},uuid:{check:function(e){return"string"==typeof e&&a.test(e)},operator:"isUUID"}};e.exports=function e(t){var i=Object.keys(l),s=process.env.NODE_NDEBUG?u:function(e,t){e||c(t,"true",e)};return i.forEach((function(e){var i;t?s[e]=u:(i=l[e],s[e]=function(t,r){i.check(t)||c(r,e,i.operator,t,i.actual)})})),i.forEach((function(e){var i,r="optional"+o(e);t?s[r]=u:(i=l[e],s[r]=function(t,r){null==t||i.check(t)||c(r,e,i.operator,t,i.actual)})})),i.forEach((function(e){var i,r,n="arrayOf"+o(e);t?s[n]=u:(i=l[e],r="["+e+"]",s[n]=function(e,t){var s;for(Array.isArray(e)||c(t,r,i.operator,e,i.actual),s=0;s<e.length;s++)i.check(e[s])||c(t,r,i.operator,e,i.actual)})})),i.forEach((function(e){var i,r,n="optionalArrayOf"+o(e);t?s[n]=u:(i=l[e],r="["+e+"]",s[n]=function(e,t){var s;if(null!=e)for(Array.isArray(e)||c(t,r,i.operator,e,i.actual),s=0;s<e.length;s++)i.check(e[s])||c(t,r,i.operator,e,i.actual)})})),Object.keys(r).forEach((function(e){s[e]="AssertionError"!==e&&t?u:r[e]})),s._setExports=e,s}(process.env.NODE_NDEBUG)},function(e,t,i){"use strict";var r,s=i(76),n="undefined"==typeof navigator,a={e:{}},o="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null;function c(){try{var e=r;return r=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function h(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function u(e,t,i){return h(e)||s.defineProperty(e,t,{value:i,configurable:!0,enumerable:!1,writable:!0}),e}var l=function(){function e(e){for(var t=0;t<r.length;++t)if(r[t]===e)return 1}var t,i,r=[Array.prototype,Object.prototype,Function.prototype];return s.isES5?(t=Object.getOwnPropertyNames,function(i){for(var r,n=[],a=Object.create(null);null!=i&&!e(i);){try{r=t(i)}catch(i){return n}for(var o=0;o<r.length;++o){var c,h=r[o];a[h]||(a[h]=!0,null!=(c=Object.getOwnPropertyDescriptor(i,h))&&null==c.get&&null==c.set&&n.push(h))}i=s.getPrototypeOf(i)}return n}):(i={}.hasOwnProperty,function(t){if(e(t))return[];var s=[];e:for(var n in t){if(!i.call(t,n))for(var a=0;a<r.length;++a)if(i.call(r[a],n))continue e;s.push(n)}return s})}(),p=/this\s*\.\s*\S+\s*=/;var d=/^[a-z$_][a-z$_0-9]*$/i;function f(e){try{return e+""}catch(e){return"[no string representation]"}}function m(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){return m(e)&&s.propertyIsWritable(e,"stack")}var y="stack"in new Error?function(e){return g(e)?e:new Error(f(e))}:function(e){if(g(e))return e;try{throw new Error(f(e))}catch(e){return e}};function v(e){return{}.toString.call(e)}var b,w,k=function(e){return s.isArray(e)?e:null},x=("undefined"!=typeof Symbol&&Symbol.iterator&&(b="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,i=[],r=e[Symbol.iterator]();!(t=r.next()).done;)i.push(t.value);return i},k=function(e){return s.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?b(e):null}),"undefined"!=typeof process&&"[object process]"===v(process).toLowerCase()),S="undefined"!=typeof process&&void 0!==process.env;var _={setReflectHandler:function(e){w=e},isClass:function(e){try{if("function"==typeof e){var t=s.names(e.prototype),i=s.isES5&&1<t.length,r=0<t.length&&!(1===t.length&&"constructor"===t[0]),n=p.test(e+"")&&0<s.names(e).length;if(i||r||n)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return d.test(e)},inheritedDataKeys:l,getDataPropertyOrDefault:function(e,t,i){var r;return s.isES5?null!=(r=Object.getOwnPropertyDescriptor(e,t))?null==r.get&&null==r.set?r.value:i:void 0:{}.hasOwnProperty.call(e,t)?e[t]:void 0},thrower:function(e){throw e},isArray:s.isArray,asArray:k,notEnumerableProp:u,isPrimitive:h,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:m,canEvaluate:n,errorObj:a,tryCatch:function(e){return r=e,c},inherits:function(e,t){var i={}.hasOwnProperty;function r(){for(var r in this.constructor=e,(this.constructor$=t).prototype)i.call(t.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=t.prototype[r])}return r.prototype=t.prototype,e.prototype=new r,e.prototype},withAppended:function(e,t){for(var i=e.length,r=new Array(i+1),s=0;s<i;++s)r[s]=e[s];return r[s]=t,r},maybeWrapAsError:function(e){return h(e)?new Error(f(e)):e},toFastProperties:function(e){function t(){}t.prototype=e;var i=new t;function r(){i.foo}return r(),r(),e},filledRange:function(e,t,i){for(var r=new Array(e),s=0;s<e;++s)r[s]=t+s+i;return r},toString:f,canAttachTrace:g,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{u(e,"isOperational",!0)}catch(e){}},classString:v,copyDescriptors:function(e,t,i){for(var r=s.names(e),n=0;n<r.length;++n){var a=r[n];if(i(a))try{s.defineProperty(t,a,s.getDescriptor(e,a))}catch(e){}}},isNode:x,hasEnvVariables:S,env:function(e){return S?process.env[e]:void 0},global:o,getNativePromise:function(){if("function"==typeof Promise)try{if("[object Promise]"===v(new Promise((function(){}))))return Promise}catch(e){}},contextBind:function(e,t){var i,r;return null!==e&&"function"==typeof t&&t!==w&&(null!==e.domain&&(t=e.domain.bind(t)),null!==(i=e.async))&&(r=t,t=function(){for(var e=arguments.length+2,t=new Array(e),s=2;s<e;++s)t[s]=arguments[s-2];return t[0]=r,t[1]=this,i.runInAsyncScope.apply(i,t)}),t}};_.isRecentNode=_.isNode&&function(){var e;return process.versions&&process.versions.node?e=process.versions.node.split(".").map(Number):process.version&&(e=process.version.split(".").map(Number)),0===e[0]&&10<e[1]||0<e[0]}(),_.nodeSupportsAsyncResource=_.isNode&&function(){var e=!1;try{e="function"==typeof i(258).AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),_.isNode&&_.toFastProperties(process);try{throw new Error}catch(e){_.lastLineError=e}e.exports=_},function(e,t,i){"use strict";var r,s=i(125),n=s.Buffer,a={};for(r in s)s.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=s[r]);var o=a.Buffer={};for(r in n)n.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=n[r]);if(a.Buffer.prototype=n.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return n(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return e=n(e),t&&0!==t.length?"string"==typeof i?e.fill(t,i):e.fill(t):e.fill(0),e}),!a.kStringMaxLength)try{a.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a},function(e,t,i){"use strict";
|
|
28
28
|
/*!
|
|
29
29
|
* address.js - address object for vallnet
|
|
30
30
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
@@ -206,7 +206,7 @@ let r=[];[i(557),i(558),i(559),i(560),i(561),i(562),i(563),i(564),i(565),i(566),
|
|
|
206
206
|
* pkg.js - package constants
|
|
207
207
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
208
208
|
* https://github.com/bookmansoft/gamegold
|
|
209
|
-
*/t.protocol="vallnet",t.version="v5.
|
|
209
|
+
*/t.protocol="vallnet",t.version="v5.2.0",t.url="https://github.com/bookmansoft/gamegold"},function(e,t,i){"use strict";
|
|
210
210
|
/*!
|
|
211
211
|
* common.js - p2p constants for vallnet
|
|
212
212
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
@@ -995,7 +995,7 @@ var r=i(770),s=i(772),n=i(773),a=i(774),o=i(775),c=i(776),h=i(777);i=i(778),s=[]
|
|
|
995
995
|
* testnet.js - config of of testnet network
|
|
996
996
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|
|
997
997
|
* https://github.com/bookmansoft/gamegold
|
|
998
|
-
*/var r=i(47),s=i(29),n=i(7),a=(i=i(97),{type:"testnet",typeId:1,magic:118034699,genesisId:"xxxxxxxx-vallnet-boss-xxxxxxxxxxxxxx",tokenFix:"xxxxxxxx-vallnet-boss-tokenxxxxx",tokenReg:/^xxxxxxxx-vallnet-boss-tokenxxxxx[0-9]{4}$/i,seeds:[]});a.txcheckpoint=i.testnet,a.txchecktime={1:1e4},s.setPort(a),a.checkpointMap={},a.lastCheckpoint=Object.keys(a.checkpointMap).reduce((e,t)=>Math.max(e,parseInt(t)),0),a.halvingInterval=21e4,a.pow={limit:new r("000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","hex"),chainwork:new r("0000000000000000000000000000000000000000000000000000000000000002","hex"),targetTimespan:n.targetTimespan,targetSpacing:n.VALLNET_HEARTBEAT,retargetInterval:n.retargetInterval,targetReset:!
|
|
998
|
+
*/var r=i(47),s=i(29),n=i(7),a=(i=i(97),{type:"testnet",typeId:1,magic:118034699,genesisId:"xxxxxxxx-vallnet-boss-xxxxxxxxxxxxxx",tokenFix:"xxxxxxxx-vallnet-boss-tokenxxxxx",tokenReg:/^xxxxxxxx-vallnet-boss-tokenxxxxx[0-9]{4}$/i,seeds:[]});a.txcheckpoint=i.testnet,a.txchecktime={1:1e4},s.setPort(a),a.checkpointMap={},a.lastCheckpoint=Object.keys(a.checkpointMap).reduce((e,t)=>Math.max(e,parseInt(t)),0),a.halvingInterval=21e4,a.pow={limit:new r("000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","hex"),chainwork:new r("0000000000000000000000000000000000000000000000000000000000000002","hex"),targetTimespan:n.targetTimespan,targetSpacing:n.VALLNET_HEARTBEAT,retargetInterval:n.retargetInterval,targetReset:!1,noRetargeting:!1},a.pow.bits=n.bn2Compact(a.pow.limit),a.coinbaseAddress="tb1qrkwzpkhzuq2w7mechcesa50m7wv7qcuw9hpe76",a.genesis={version:2,hash:"0000000000000000000000000000000000000000000000000000000000000000",prevBlock:"0000000000000000000000000000000000000000000000000000000000000000",merkleRoot:"0000000000000000000000000000000000000000000000000000000000000000",addresses:"tb1qzx4t30su0na7wly567zwmjfkuffcs9vt87gpx9,tb1qrkwzpkhzuq2w7mechcesa50m7wv7qcuw9hpe76,tb1q8d3dpnlxexm6wndqqpdkmz5nllxfk6kdlntqws,tb1qfha9pgvlx32sjsr9twdr76dr8z7uvfn9nk5gtd,tb1qt2z45tzyflld0rj0jgxxang8zp9sjfxfqnklld,tb1qd2x745swsml842p3jt6heymdy0q0vg05qtjcrl,tb1q0drn4auw7anz7nf7qz00tlq3hzvvf5xka70x2w,tb1qj62dhftccj427djq7y54f0fmxqwhexd6s74t6f,tb1qhqkgtxxd2djrcs58st0ya0stxzzx5p0te5d8uf,tb1qcxeajcpcv5pdyanjdky7yywex5qqnc8dnr6jzf,tb1qaeuvffm4wdyyj6xxzfhez4u8jvnh57jxqcjmqg",time:1567296e3,bits:a.pow.bits,nonce:20190901,height:0},a.block={pruneAfterHeight:1e3,keepBlocks:288,maxTipAge:4294967295,slowHeight:95e4},a.minerWindow=a.pow.retargetInterval,a.activationThreshold=.75*a.minerWindow|0,a.deployments={csv:{name:"csv",bit:0,startTime:1456790400,timeout:1493596800,threshold:-1,window:-1,required:!1,force:!0},testdummy:{name:"testdummy",bit:28,startTime:1199145601,timeout:1230767999,threshold:-1,window:-1,required:!1,force:!0}},a.deploys=[a.deployments.csv,a.deployments.testdummy],a.keyPrefix={privkey:239,xpubkey:70617039,xprivkey:70615956,xpubkey58:"tpub",xprivkey58:"tprv",coinType:1},a.addressPrefix={pubkeyhash:111,scripthash:196,witnesspubkeyhash:3,witnessscripthash:40,bech32:"tb"},a.requireStandard=!1,a.minRelay=1e3,a.feeRate=2e4,a.maxFeeRate=6e4,a.selfConnect=!1,a.requestMempool=!0,e.exports=a},function(e,t,i){"use strict";
|
|
999
999
|
/*!
|
|
1000
1000
|
* evidence.js - config of of evidence network
|
|
1001
1001
|
* Copyright (c) 2019-2022, Bookman Software (MIT License).
|