@liquality/bitcoin-utils
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=require("@liquality/crypto")},function(e,t){e.exports=require("@liquality/bitcoin-networks")},function(e){e.exports={a:"0.2.8"}},function(e,t){e.exports=require("lodash")},function(e,t,r){"use strict";r.r(t),r.d(t,"calculateFee",function(){return i}),r.d(t,"toHexInt",function(){return h}),r.d(t,"compressPubKey",function(){return s}),r.d(t,"pubKeyToAddress",function(){return a}),r.d(t,"pubKeyHashToAddress",function(){return d}),r.d(t,"addressToPubKeyHash",function(){return l}),r.d(t,"reverseBuffer",function(){return b}),r.d(t,"scriptNumEncode",function(){return p}),r.d(t,"getAddressNetwork",function(){return g});var n=r(3),u=r(0),o=r(1),c=r.n(o),f=r(2);function i(e,t,r){return(148*e+34*t+10)*r}function s(e){const t=e.substring(2,66),r=e.substring(66,130);return(parseInt(r.substring(62,64),16)%2==0?"02":"03")+t}function a(e,t,r){return e=Object(u.ensureBuffer)(e),d(Object(u.hash160)(e),t,r)}function d(e,t,r){e=Object(u.ensureBuffer)(e);const n=Buffer.concat([Buffer.from(c.a[t][r],"hex"),e]),o=Buffer.from(Object(u.sha256)(Object(u.sha256)(n)).slice(0,8),"hex");return u.base58.encode(Buffer.concat([n,o]).slice(0,25))}function l(e){return u.base58.decode(e).toString("hex").substring(2,42)}function b(e){let t=Buffer.alloc(e.length);for(let r=0,n=e.length-1;r<=n;++r,--n)t[r]=e[n],t[n]=e[r];return t}function p(e){let t=Math.abs(e),r=(n=t)>2147483647?5:n>8388607?4:n>32767?3:n>127?2:n>0?1:0;var n;let u=Buffer.allocUnsafe(r),o=e<0;for(let e=0;e<r;++e)u.writeUInt8(255&t,e),t>>=8;return 128&u[r-1]?u.writeUInt8(o?128:0,r-1):o&&(u[r-1]|=128),u}function y(e){return"0123456789abcdef".charAt(e>>4)+"0123456789abcdef".charAt(15&e)}function h(e){return y(e>>24&255)+y(e>>16&255)+y(e>>8&255)+y(255&e)}function g(e){const t=u.base58.decode(e).toString("hex").substring(0,2).toUpperCase(),r=Object(n.findKey)(c.a,e=>[e.pubKeyHash,e.scriptHash].includes(t));return c.a[r]}r.d(t,"version",function(){return f.a})}]); | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t){e.exports=require("@liquality/crypto")},function(e,t){e.exports=require("@liquality/bitcoin-networks")},function(e){e.exports={a:"0.2.9"}},function(e,t){e.exports=require("lodash")},function(e,t,r){"use strict";r.r(t),r.d(t,"calculateFee",function(){return i}),r.d(t,"toHexInt",function(){return h}),r.d(t,"compressPubKey",function(){return s}),r.d(t,"pubKeyToAddress",function(){return a}),r.d(t,"pubKeyHashToAddress",function(){return d}),r.d(t,"addressToPubKeyHash",function(){return l}),r.d(t,"reverseBuffer",function(){return b}),r.d(t,"scriptNumEncode",function(){return p}),r.d(t,"getAddressNetwork",function(){return g});var n=r(3),u=r(0),o=r(1),c=r.n(o),f=r(2);function i(e,t,r){return(148*e+34*t+10)*r}function s(e){const t=e.substring(2,66),r=e.substring(66,130);return(parseInt(r.substring(62,64),16)%2==0?"02":"03")+t}function a(e,t,r){return e=Object(u.ensureBuffer)(e),d(Object(u.hash160)(e),t,r)}function d(e,t,r){e=Object(u.ensureBuffer)(e);const n=Buffer.concat([Buffer.from(c.a[t][r],"hex"),e]),o=Buffer.from(Object(u.sha256)(Object(u.sha256)(n)).slice(0,8),"hex");return u.base58.encode(Buffer.concat([n,o]).slice(0,25))}function l(e){return u.base58.decode(e).toString("hex").substring(2,42)}function b(e){let t=Buffer.alloc(e.length);for(let r=0,n=e.length-1;r<=n;++r,--n)t[r]=e[n],t[n]=e[r];return t}function p(e){let t=Math.abs(e),r=(n=t)>2147483647?5:n>8388607?4:n>32767?3:n>127?2:n>0?1:0;var n;let u=Buffer.allocUnsafe(r),o=e<0;for(let e=0;e<r;++e)u.writeUInt8(255&t,e),t>>=8;return 128&u[r-1]?u.writeUInt8(o?128:0,r-1):o&&(u[r-1]|=128),u}function y(e){return"0123456789abcdef".charAt(e>>4)+"0123456789abcdef".charAt(15&e)}function h(e){return y(e>>24&255)+y(e>>16&255)+y(e>>8&255)+y(255&e)}function g(e){const t=u.base58.decode(e).toString("hex").substring(0,2).toUpperCase(),r=Object(n.findKey)(c.a,e=>[e.pubKeyHash,e.scriptHash].includes(t));return c.a[r]}r.d(t,"version",function(){return f.a})}]); | ||
//# sourceMappingURL=index.cjs.js.map |
{ | ||
"name": "@liquality/bitcoin-utils", | ||
"umdName": "BitcoinUtils", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "", | ||
@@ -21,4 +21,4 @@ "module": "lib/index.js", | ||
"@babel/runtime": "^7.4.3", | ||
"@liquality/bitcoin-networks": "^0.2.8", | ||
"@liquality/crypto": "^0.2.8", | ||
"@liquality/bitcoin-networks": "^0.2.9", | ||
"@liquality/crypto": "^0.2.9", | ||
"lodash": "^4.17.11" | ||
@@ -40,3 +40,3 @@ }, | ||
}, | ||
"gitHead": "cb335efd0cd44dc663ac4669402b6fb8eb2f837d" | ||
"gitHead": "6dd8e707ce78968a18a693b8b23b4c9aa26ffcaf" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package