@gardenfi/core 0.2.0-beta.71 → 0.2.0-beta.73

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.
Files changed (105) hide show
  1. package/dist/index100.cjs +1 -1
  2. package/dist/index100.js +1 -1
  3. package/dist/index101.cjs +1 -1
  4. package/dist/index101.js +1 -1
  5. package/dist/index102.cjs +1 -1
  6. package/dist/index102.js +7 -7
  7. package/dist/index103.cjs +1 -1
  8. package/dist/index103.js +3 -3
  9. package/dist/index104.cjs +1 -1
  10. package/dist/index104.js +1 -1
  11. package/dist/index109.cjs +1 -1
  12. package/dist/index109.js +1 -1
  13. package/dist/index11.cjs +1 -1
  14. package/dist/index11.js +2 -2
  15. package/dist/index110.cjs +1 -1
  16. package/dist/index110.js +1 -1
  17. package/dist/index111.cjs +1 -1
  18. package/dist/index111.js +5 -2
  19. package/dist/index112.cjs +1 -1
  20. package/dist/index112.js +2 -58
  21. package/dist/index113.cjs +1 -1
  22. package/dist/index113.js +58 -2
  23. package/dist/index114.cjs +1 -1
  24. package/dist/index114.js +2 -40
  25. package/dist/index115.cjs +1 -1
  26. package/dist/index115.js +12 -15
  27. package/dist/index116.cjs +1 -1
  28. package/dist/index116.js +40 -15
  29. package/dist/index117.cjs +1 -1
  30. package/dist/index117.js +15 -106
  31. package/dist/index118.cjs +1 -1
  32. package/dist/index118.js +105 -17
  33. package/dist/index119.cjs +1 -1
  34. package/dist/index119.js +18 -223
  35. package/dist/index120.cjs +1 -1
  36. package/dist/index120.js +226 -4
  37. package/dist/index121.cjs +1 -1
  38. package/dist/index121.js +3 -157
  39. package/dist/index122.cjs +1 -1
  40. package/dist/index122.js +158 -2
  41. package/dist/index123.cjs +1 -1
  42. package/dist/index123.js +2 -73
  43. package/dist/index124.cjs +1 -1
  44. package/dist/index124.js +73 -5
  45. package/dist/index125.cjs +1 -1
  46. package/dist/index125.js +1 -1
  47. package/dist/index128.cjs +1 -1
  48. package/dist/index128.js +2 -30
  49. package/dist/index129.cjs +1 -1
  50. package/dist/index129.js +30 -2
  51. package/dist/index132.cjs +1 -1
  52. package/dist/index132.js +3 -3
  53. package/dist/index14.cjs +1 -1
  54. package/dist/index14.js +2 -2
  55. package/dist/index141.cjs +1 -1
  56. package/dist/index141.js +1 -1
  57. package/dist/index16.cjs +1 -1
  58. package/dist/index16.js +1 -1
  59. package/dist/index17.cjs +1 -1
  60. package/dist/index17.js +1 -1
  61. package/dist/index18.cjs +1 -1
  62. package/dist/index18.js +1 -1
  63. package/dist/index19.cjs +1 -1
  64. package/dist/index19.js +1 -1
  65. package/dist/index20.cjs +1 -1
  66. package/dist/index20.js +2 -2
  67. package/dist/index21.cjs +1 -1
  68. package/dist/index21.js +8 -27
  69. package/dist/index22.cjs +1 -1
  70. package/dist/index22.js +8 -14
  71. package/dist/index23.cjs +1 -1
  72. package/dist/index23.js +135 -6
  73. package/dist/index24.cjs +1 -1
  74. package/dist/index24.js +2 -9
  75. package/dist/index25.cjs +1 -1
  76. package/dist/index25.js +12 -137
  77. package/dist/index26.cjs +1 -1
  78. package/dist/index26.js +37 -2
  79. package/dist/index27.cjs +1 -1
  80. package/dist/index27.js +41 -12
  81. package/dist/index28.cjs +1 -1
  82. package/dist/index28.js +27 -36
  83. package/dist/index29.cjs +1 -1
  84. package/dist/index29.js +14 -41
  85. package/dist/index43.cjs +1 -1
  86. package/dist/index43.js +2 -2
  87. package/dist/index59.cjs +1 -1
  88. package/dist/index59.js +1 -1
  89. package/dist/index69.cjs +1 -1
  90. package/dist/index69.js +2 -2
  91. package/dist/index72.cjs +1 -1
  92. package/dist/index72.js +5 -20
  93. package/dist/index73.cjs +1 -1
  94. package/dist/index73.js +21 -13
  95. package/dist/index74.cjs +1 -1
  96. package/dist/index74.js +14 -2
  97. package/dist/index75.cjs +1 -1
  98. package/dist/index75.js +2 -2
  99. package/dist/index76.cjs +1 -1
  100. package/dist/index76.js +2 -7
  101. package/dist/index91.cjs +1 -1
  102. package/dist/index91.js +1 -1
  103. package/dist/index99.cjs +1 -1
  104. package/dist/index99.js +1 -1
  105. package/package.json +2 -2
package/dist/index100.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index99.cjs"),u=require("./index112.cjs"),l=require("./index55.cjs");var v=o.inherits_browserExports,_=u.hashBase,k=l.safeBufferExports.Buffer,p=new Array(16);function n(){_.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}v(n,_);n.prototype._update=function(){for(var a=p,i=0;i<16;++i)a[i]=this._block.readInt32LE(i*4);var e=this._a,t=this._b,f=this._c,x=this._d;e=s(e,t,f,x,a[0],3614090360,7),x=s(x,e,t,f,a[1],3905402710,12),f=s(f,x,e,t,a[2],606105819,17),t=s(t,f,x,e,a[3],3250441966,22),e=s(e,t,f,x,a[4],4118548399,7),x=s(x,e,t,f,a[5],1200080426,12),f=s(f,x,e,t,a[6],2821735955,17),t=s(t,f,x,e,a[7],4249261313,22),e=s(e,t,f,x,a[8],1770035416,7),x=s(x,e,t,f,a[9],2336552879,12),f=s(f,x,e,t,a[10],4294925233,17),t=s(t,f,x,e,a[11],2304563134,22),e=s(e,t,f,x,a[12],1804603682,7),x=s(x,e,t,f,a[13],4254626195,12),f=s(f,x,e,t,a[14],2792965006,17),t=s(t,f,x,e,a[15],1236535329,22),e=c(e,t,f,x,a[1],4129170786,5),x=c(x,e,t,f,a[6],3225465664,9),f=c(f,x,e,t,a[11],643717713,14),t=c(t,f,x,e,a[0],3921069994,20),e=c(e,t,f,x,a[5],3593408605,5),x=c(x,e,t,f,a[10],38016083,9),f=c(f,x,e,t,a[15],3634488961,14),t=c(t,f,x,e,a[4],3889429448,20),e=c(e,t,f,x,a[9],568446438,5),x=c(x,e,t,f,a[14],3275163606,9),f=c(f,x,e,t,a[3],4107603335,14),t=c(t,f,x,e,a[8],1163531501,20),e=c(e,t,f,x,a[13],2850285829,5),x=c(x,e,t,f,a[2],4243563512,9),f=c(f,x,e,t,a[7],1735328473,14),t=c(t,f,x,e,a[12],2368359562,20),e=r(e,t,f,x,a[5],4294588738,4),x=r(x,e,t,f,a[8],2272392833,11),f=r(f,x,e,t,a[11],1839030562,16),t=r(t,f,x,e,a[14],4259657740,23),e=r(e,t,f,x,a[1],2763975236,4),x=r(x,e,t,f,a[4],1272893353,11),f=r(f,x,e,t,a[7],4139469664,16),t=r(t,f,x,e,a[10],3200236656,23),e=r(e,t,f,x,a[13],681279174,4),x=r(x,e,t,f,a[0],3936430074,11),f=r(f,x,e,t,a[3],3572445317,16),t=r(t,f,x,e,a[6],76029189,23),e=r(e,t,f,x,a[9],3654602809,4),x=r(x,e,t,f,a[12],3873151461,11),f=r(f,x,e,t,a[15],530742520,16),t=r(t,f,x,e,a[2],3299628645,23),e=d(e,t,f,x,a[0],4096336452,6),x=d(x,e,t,f,a[7],1126891415,10),f=d(f,x,e,t,a[14],2878612391,15),t=d(t,f,x,e,a[5],4237533241,21),e=d(e,t,f,x,a[12],1700485571,6),x=d(x,e,t,f,a[3],2399980690,10),f=d(f,x,e,t,a[10],4293915773,15),t=d(t,f,x,e,a[1],2240044497,21),e=d(e,t,f,x,a[8],1873313359,6),x=d(x,e,t,f,a[15],4264355552,10),f=d(f,x,e,t,a[6],2734768916,15),t=d(t,f,x,e,a[13],1309151649,21),e=d(e,t,f,x,a[4],4149444226,6),x=d(x,e,t,f,a[11],3174756917,10),f=d(f,x,e,t,a[2],718787259,15),t=d(t,f,x,e,a[9],3951481745,21),this._a=this._a+e|0,this._b=this._b+t|0,this._c=this._c+f|0,this._d=this._d+x|0};n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var a=k.allocUnsafe(16);return a.writeInt32LE(this._a,0),a.writeInt32LE(this._b,4),a.writeInt32LE(this._c,8),a.writeInt32LE(this._d,12),a};function h(a,i){return a<<i|a>>>32-i}function s(a,i,e,t,f,x,b){return h(a+(i&e|~i&t)+f+x|0,b)+i|0}function c(a,i,e,t,f,x,b){return h(a+(i&t|e&~t)+f+x|0,b)+i|0}function r(a,i,e,t,f,x,b){return h(a+(i^e^t)+f+x|0,b)+i|0}function d(a,i,e,t,f,x,b){return h(a+(e^(i|~t))+f+x|0,b)+i|0}var w=n;exports.md5_js=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index99.cjs"),u=require("./index113.cjs"),l=require("./index55.cjs");var v=o.inherits_browserExports,_=u.hashBase,k=l.safeBufferExports.Buffer,p=new Array(16);function n(){_.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}v(n,_);n.prototype._update=function(){for(var a=p,i=0;i<16;++i)a[i]=this._block.readInt32LE(i*4);var e=this._a,t=this._b,f=this._c,x=this._d;e=s(e,t,f,x,a[0],3614090360,7),x=s(x,e,t,f,a[1],3905402710,12),f=s(f,x,e,t,a[2],606105819,17),t=s(t,f,x,e,a[3],3250441966,22),e=s(e,t,f,x,a[4],4118548399,7),x=s(x,e,t,f,a[5],1200080426,12),f=s(f,x,e,t,a[6],2821735955,17),t=s(t,f,x,e,a[7],4249261313,22),e=s(e,t,f,x,a[8],1770035416,7),x=s(x,e,t,f,a[9],2336552879,12),f=s(f,x,e,t,a[10],4294925233,17),t=s(t,f,x,e,a[11],2304563134,22),e=s(e,t,f,x,a[12],1804603682,7),x=s(x,e,t,f,a[13],4254626195,12),f=s(f,x,e,t,a[14],2792965006,17),t=s(t,f,x,e,a[15],1236535329,22),e=c(e,t,f,x,a[1],4129170786,5),x=c(x,e,t,f,a[6],3225465664,9),f=c(f,x,e,t,a[11],643717713,14),t=c(t,f,x,e,a[0],3921069994,20),e=c(e,t,f,x,a[5],3593408605,5),x=c(x,e,t,f,a[10],38016083,9),f=c(f,x,e,t,a[15],3634488961,14),t=c(t,f,x,e,a[4],3889429448,20),e=c(e,t,f,x,a[9],568446438,5),x=c(x,e,t,f,a[14],3275163606,9),f=c(f,x,e,t,a[3],4107603335,14),t=c(t,f,x,e,a[8],1163531501,20),e=c(e,t,f,x,a[13],2850285829,5),x=c(x,e,t,f,a[2],4243563512,9),f=c(f,x,e,t,a[7],1735328473,14),t=c(t,f,x,e,a[12],2368359562,20),e=r(e,t,f,x,a[5],4294588738,4),x=r(x,e,t,f,a[8],2272392833,11),f=r(f,x,e,t,a[11],1839030562,16),t=r(t,f,x,e,a[14],4259657740,23),e=r(e,t,f,x,a[1],2763975236,4),x=r(x,e,t,f,a[4],1272893353,11),f=r(f,x,e,t,a[7],4139469664,16),t=r(t,f,x,e,a[10],3200236656,23),e=r(e,t,f,x,a[13],681279174,4),x=r(x,e,t,f,a[0],3936430074,11),f=r(f,x,e,t,a[3],3572445317,16),t=r(t,f,x,e,a[6],76029189,23),e=r(e,t,f,x,a[9],3654602809,4),x=r(x,e,t,f,a[12],3873151461,11),f=r(f,x,e,t,a[15],530742520,16),t=r(t,f,x,e,a[2],3299628645,23),e=d(e,t,f,x,a[0],4096336452,6),x=d(x,e,t,f,a[7],1126891415,10),f=d(f,x,e,t,a[14],2878612391,15),t=d(t,f,x,e,a[5],4237533241,21),e=d(e,t,f,x,a[12],1700485571,6),x=d(x,e,t,f,a[3],2399980690,10),f=d(f,x,e,t,a[10],4293915773,15),t=d(t,f,x,e,a[1],2240044497,21),e=d(e,t,f,x,a[8],1873313359,6),x=d(x,e,t,f,a[15],4264355552,10),f=d(f,x,e,t,a[6],2734768916,15),t=d(t,f,x,e,a[13],1309151649,21),e=d(e,t,f,x,a[4],4149444226,6),x=d(x,e,t,f,a[11],3174756917,10),f=d(f,x,e,t,a[2],718787259,15),t=d(t,f,x,e,a[9],3951481745,21),this._a=this._a+e|0,this._b=this._b+t|0,this._c=this._c+f|0,this._d=this._d+x|0};n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var a=k.allocUnsafe(16);return a.writeInt32LE(this._a,0),a.writeInt32LE(this._b,4),a.writeInt32LE(this._c,8),a.writeInt32LE(this._d,12),a};function h(a,i){return a<<i|a>>>32-i}function s(a,i,e,t,f,x,b){return h(a+(i&e|~i&t)+f+x|0,b)+i|0}function c(a,i,e,t,f,x,b){return h(a+(i&t|e&~t)+f+x|0,b)+i|0}function r(a,i,e,t,f,x,b){return h(a+(i^e^t)+f+x|0,b)+i|0}function d(a,i,e,t,f,x,b){return h(a+(e^(i|~t))+f+x|0,b)+i|0}var w=n;exports.md5_js=w;
package/dist/index100.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as o } from "./index99.js";
2
- import { h as l } from "./index112.js";
2
+ import { h as l } from "./index113.js";
3
3
  import { s as u } from "./index55.js";
4
4
  var p = o, n = l, v = u.Buffer, k = new Array(16);
5
5
  function h() {
package/dist/index101.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index82.cjs");const R=require("./index99.cjs"),z=require("./index112.cjs"),M=require("./index83.cjs");var L=M.__exports.Buffer,P=R.inherits_browserExports,m=z.hashBase,S=new Array(16),v=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],w=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],k=[0,1518500249,1859775393,2400959708,2840853838],E=[1352829926,1548603684,1836072691,2053994217,0];function I(){m.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}P(I,m);I.prototype._update=function(){for(var t=S,s=0;s<16;++s)t[s]=this._block.readInt32LE(s*4);for(var n=this._a|0,e=this._b|0,i=this._c|0,a=this._d|0,h=this._e|0,_=this._a|0,f=this._b|0,c=this._c|0,o=this._d|0,l=this._e|0,r=0;r<80;r+=1){var d,u;r<16?(d=O(n,e,i,a,h,t[v[r]],k[0],p[r]),u=B(_,f,c,o,l,t[x[r]],E[0],w[r])):r<32?(d=g(n,e,i,a,h,t[v[r]],k[1],p[r]),u=q(_,f,c,o,l,t[x[r]],E[1],w[r])):r<48?(d=y(n,e,i,a,h,t[v[r]],k[2],p[r]),u=y(_,f,c,o,l,t[x[r]],E[2],w[r])):r<64?(d=q(n,e,i,a,h,t[v[r]],k[3],p[r]),u=g(_,f,c,o,l,t[x[r]],E[3],w[r])):(d=B(n,e,i,a,h,t[v[r]],k[4],p[r]),u=O(_,f,c,o,l,t[x[r]],E[4],w[r])),n=h,h=a,a=b(i,10),i=e,e=d,_=l,l=o,o=b(c,10),c=f,f=u}var A=this._b+i+o|0;this._b=this._c+a+l|0,this._c=this._d+h+_|0,this._d=this._e+n+f|0,this._e=this._a+e+c|0,this._a=A};I.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=L.alloc?L.alloc(20):new L(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function b(t,s){return t<<s|t>>>32-s}function O(t,s,n,e,i,a,h,_){return b(t+(s^n^e)+a+h|0,_)+i|0}function g(t,s,n,e,i,a,h,_){return b(t+(s&n|~s&e)+a+h|0,_)+i|0}function y(t,s,n,e,i,a,h,_){return b(t+((s|~n)^e)+a+h|0,_)+i|0}function q(t,s,n,e,i,a,h,_){return b(t+(s&e|n&~e)+a+h|0,_)+i|0}function B(t,s,n,e,i,a,h,_){return b(t+(s^(n|~e))+a+h|0,_)+i|0}var U=I;exports.ripemd160=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index82.cjs");const R=require("./index99.cjs"),z=require("./index113.cjs"),M=require("./index83.cjs");var L=M.__exports.Buffer,P=R.inherits_browserExports,m=z.hashBase,S=new Array(16),v=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],x=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],w=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],k=[0,1518500249,1859775393,2400959708,2840853838],E=[1352829926,1548603684,1836072691,2053994217,0];function I(){m.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}P(I,m);I.prototype._update=function(){for(var t=S,s=0;s<16;++s)t[s]=this._block.readInt32LE(s*4);for(var n=this._a|0,e=this._b|0,i=this._c|0,a=this._d|0,h=this._e|0,_=this._a|0,f=this._b|0,c=this._c|0,o=this._d|0,l=this._e|0,r=0;r<80;r+=1){var d,u;r<16?(d=O(n,e,i,a,h,t[v[r]],k[0],p[r]),u=B(_,f,c,o,l,t[x[r]],E[0],w[r])):r<32?(d=g(n,e,i,a,h,t[v[r]],k[1],p[r]),u=q(_,f,c,o,l,t[x[r]],E[1],w[r])):r<48?(d=y(n,e,i,a,h,t[v[r]],k[2],p[r]),u=y(_,f,c,o,l,t[x[r]],E[2],w[r])):r<64?(d=q(n,e,i,a,h,t[v[r]],k[3],p[r]),u=g(_,f,c,o,l,t[x[r]],E[3],w[r])):(d=B(n,e,i,a,h,t[v[r]],k[4],p[r]),u=O(_,f,c,o,l,t[x[r]],E[4],w[r])),n=h,h=a,a=b(i,10),i=e,e=d,_=l,l=o,o=b(c,10),c=f,f=u}var A=this._b+i+o|0;this._b=this._c+a+l|0,this._c=this._d+h+_|0,this._d=this._e+n+f|0,this._e=this._a+e+c|0,this._a=A};I.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=L.alloc?L.alloc(20):new L(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function b(t,s){return t<<s|t>>>32-s}function O(t,s,n,e,i,a,h,_){return b(t+(s^n^e)+a+h|0,_)+i|0}function g(t,s,n,e,i,a,h,_){return b(t+(s&n|~s&e)+a+h|0,_)+i|0}function y(t,s,n,e,i,a,h,_){return b(t+((s|~n)^e)+a+h|0,_)+i|0}function q(t,s,n,e,i,a,h,_){return b(t+(s&e|n&~e)+a+h|0,_)+i|0}function B(t,s,n,e,i,a,h,_){return b(t+(s^(n|~e))+a+h|0,_)+i|0}var U=I;exports.ripemd160=U;
package/dist/index101.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index82.js";
2
2
  import { i as z } from "./index99.js";
3
- import { h as U } from "./index112.js";
3
+ import { h as U } from "./index113.js";
4
4
  import { __exports as D } from "./index83.js";
5
5
  var m = D.Buffer, H = z, A = U, M = new Array(16), u = [
6
6
  0,
package/dist/index102.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index113.cjs"),t=require("./index114.cjs"),o=require("./index115.cjs"),h=require("./index116.cjs"),u=require("./index117.cjs"),n=require("./index118.cjs"),c=require("./index119.cjs");var s=a.__module.exports=function(e){e=e.toLowerCase();var r=s[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};s.sha=t.sha;s.sha1=o.sha1;s.sha224=h.sha224;s.sha256=u.sha256;s.sha384=n.sha384;s.sha512=c.sha512;var i=a.__module.exports;exports.sha_jsExports=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index114.cjs"),t=require("./index115.cjs"),o=require("./index116.cjs"),h=require("./index117.cjs"),u=require("./index118.cjs"),n=require("./index119.cjs"),c=require("./index120.cjs");var s=a.__module.exports=function(e){e=e.toLowerCase();var r=s[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};s.sha=t.sha;s.sha1=o.sha1;s.sha224=h.sha224;s.sha256=u.sha256;s.sha384=n.sha384;s.sha512=c.sha512;var i=a.__module.exports;exports.sha_jsExports=i;
package/dist/index102.js CHANGED
@@ -1,10 +1,10 @@
1
- import { __module as a } from "./index113.js";
2
- import { s as t } from "./index114.js";
3
- import { s as p } from "./index115.js";
4
- import { s as e } from "./index116.js";
5
- import { s as h } from "./index117.js";
6
- import { s as m } from "./index118.js";
7
- import { s as f } from "./index119.js";
1
+ import { __module as a } from "./index114.js";
2
+ import { s as t } from "./index115.js";
3
+ import { s as p } from "./index116.js";
4
+ import { s as e } from "./index117.js";
5
+ import { s as h } from "./index118.js";
6
+ import { s as m } from "./index119.js";
7
+ import { s as f } from "./index120.js";
8
8
  var s = a.exports = function(r) {
9
9
  r = r.toLowerCase();
10
10
  var o = s[r];
package/dist/index103.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index55.cjs"),f=require("./index120.cjs");require("./index121.cjs");const u=require("./index99.cjs"),_=require("./index122.cjs");var n=a.safeBufferExports.Buffer,s=f.Transform,p=_.__exports.StringDecoder,c=u.inherits_browserExports;function e(t){s.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}c(e,s);e.prototype.update=function(t,r,o){typeof t=="string"&&(t=n.from(t,r));var i=this._update(t);return this.hashMode?this:(o&&(i=this._toString(i,o)),i)};e.prototype.setAutoPadding=function(){};e.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};e.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};e.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};e.prototype._transform=function(t,r,o){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(h){i=h}finally{o(i)}};e.prototype._flush=function(t){var r;try{this.push(this.__final())}catch(o){r=o}t(r)};e.prototype._finalOrDigest=function(t){var r=this.__final()||n.alloc(0);return t&&(r=this._toString(r,t,!0)),r};e.prototype._toString=function(t,r,o){if(this._decoder||(this._decoder=new p(r),this._encoding=r),this._encoding!==r)throw new Error("can't switch encodings");var i=this._decoder.write(t);return o&&(i+=this._decoder.end()),i};var d=e;exports.cipherBase=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index55.cjs"),f=require("./index121.cjs");require("./index122.cjs");const u=require("./index99.cjs"),_=require("./index123.cjs");var n=a.safeBufferExports.Buffer,s=f.Transform,p=_.__exports.StringDecoder,c=u.inherits_browserExports;function e(t){s.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}c(e,s);e.prototype.update=function(t,r,o){typeof t=="string"&&(t=n.from(t,r));var i=this._update(t);return this.hashMode?this:(o&&(i=this._toString(i,o)),i)};e.prototype.setAutoPadding=function(){};e.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};e.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};e.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};e.prototype._transform=function(t,r,o){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(h){i=h}finally{o(i)}};e.prototype._flush=function(t){var r;try{this.push(this.__final())}catch(o){r=o}t(r)};e.prototype._finalOrDigest=function(t){var r=this.__final()||n.alloc(0);return t&&(r=this._toString(r,t,!0)),r};e.prototype._toString=function(t,r,o){if(this._decoder||(this._decoder=new p(r),this._encoding=r),this._encoding!==r)throw new Error("can't switch encodings");var i=this._decoder.write(t);return o&&(i+=this._decoder.end()),i};var d=e;exports.cipherBase=d;
package/dist/index103.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { s as a } from "./index55.js";
2
- import f from "./index120.js";
3
- import "./index121.js";
2
+ import f from "./index121.js";
3
+ import "./index122.js";
4
4
  import { i as p } from "./index99.js";
5
- import { __exports as u } from "./index122.js";
5
+ import { __exports as u } from "./index123.js";
6
6
  var s = a.Buffer, n = f.Transform, _ = u.StringDecoder, c = p;
7
7
  function i(t) {
8
8
  n.call(this), this.hashMode = typeof t == "string", this.hashMode ? this[t] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
package/dist/index104.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index123.cjs");var r=e.src,s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",t=r(s);exports.bs58=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index124.cjs");var r=e.src,s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",t=r(s);exports.bs58=t;
package/dist/index104.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s as r } from "./index123.js";
1
+ import { s as r } from "./index124.js";
2
2
  var a = r, s = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", o = a(s);
3
3
  export {
4
4
  o as b
package/dist/index109.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index128.cjs"),u=require("./index110.cjs");function a(o,t,s,i){if(typeof o.setBigUint64=="function")return o.setBigUint64(t,s,i);const n=BigInt(32),h=BigInt(4294967295),e=Number(s>>n&h),r=Number(s&h),c=i?4:0,l=i?0:4;o.setUint32(t+c,e,i),o.setUint32(t+l,r,i)}const d=(o,t,s)=>o&t^~o&s,b=(o,t,s)=>o&t^o&s^t&s;class w extends u.Hash{constructor(t,s,i,n){super(),this.blockLen=t,this.outputLen=s,this.padOffset=i,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=u.createView(this.buffer)}update(t){p.exists(this);const{view:s,buffer:i,blockLen:n}=this;t=u.toBytes(t);const h=t.length;for(let e=0;e<h;){const r=Math.min(n-this.pos,h-e);if(r===n){const c=u.createView(t);for(;n<=h-e;e+=n)this.process(c,e);continue}i.set(t.subarray(e,e+r),this.pos),this.pos+=r,e+=r,this.pos===n&&(this.process(s,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){p.exists(this),p.output(t,this),this.finished=!0;const{buffer:s,view:i,blockLen:n,isLE:h}=this;let{pos:e}=this;s[e++]=128,this.buffer.subarray(e).fill(0),this.padOffset>n-e&&(this.process(i,0),e=0);for(let f=e;f<n;f++)s[f]=0;a(i,n-8,BigInt(this.length*8),h),this.process(i,0);const r=u.createView(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,g=this.get();if(l>g.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)r.setUint32(4*f,g[f],h)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const i=t.slice(0,s);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:i,length:n,finished:h,destroyed:e,pos:r}=this;return t.length=n,t.pos=r,t.finished=h,t.destroyed=e,n%s&&t.buffer.set(i),t}}exports.Chi=d;exports.HashMD=w;exports.Maj=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index129.cjs"),u=require("./index110.cjs");function a(o,t,s,i){if(typeof o.setBigUint64=="function")return o.setBigUint64(t,s,i);const n=BigInt(32),h=BigInt(4294967295),e=Number(s>>n&h),r=Number(s&h),c=i?4:0,l=i?0:4;o.setUint32(t+c,e,i),o.setUint32(t+l,r,i)}const d=(o,t,s)=>o&t^~o&s,b=(o,t,s)=>o&t^o&s^t&s;class w extends u.Hash{constructor(t,s,i,n){super(),this.blockLen=t,this.outputLen=s,this.padOffset=i,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=u.createView(this.buffer)}update(t){p.exists(this);const{view:s,buffer:i,blockLen:n}=this;t=u.toBytes(t);const h=t.length;for(let e=0;e<h;){const r=Math.min(n-this.pos,h-e);if(r===n){const c=u.createView(t);for(;n<=h-e;e+=n)this.process(c,e);continue}i.set(t.subarray(e,e+r),this.pos),this.pos+=r,e+=r,this.pos===n&&(this.process(s,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){p.exists(this),p.output(t,this),this.finished=!0;const{buffer:s,view:i,blockLen:n,isLE:h}=this;let{pos:e}=this;s[e++]=128,this.buffer.subarray(e).fill(0),this.padOffset>n-e&&(this.process(i,0),e=0);for(let f=e;f<n;f++)s[f]=0;a(i,n-8,BigInt(this.length*8),h),this.process(i,0);const r=u.createView(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,g=this.get();if(l>g.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<l;f++)r.setUint32(4*f,g[f],h)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const i=t.slice(0,s);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:i,length:n,finished:h,destroyed:e,pos:r}=this;return t.length=n,t.pos=r,t.finished=h,t.destroyed=e,n%s&&t.buffer.set(i),t}}exports.Chi=d;exports.HashMD=w;exports.Maj=b;
package/dist/index109.js CHANGED
@@ -1,4 +1,4 @@
1
- import { exists as g, output as d } from "./index128.js";
1
+ import { exists as g, output as d } from "./index129.js";
2
2
  import { Hash as b, createView as p, toBytes as a } from "./index110.js";
3
3
  function w(o, t, s, i) {
4
4
  if (typeof o.setBigUint64 == "function")
package/dist/index11.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@catalogfi/wallets"),H=require("bitcoinjs-lib"),O=require("tiny-secp256k1"),P=require("./index21.cjs"),f=require("./index10.cjs"),u=require("./index22.cjs");function S(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const r in p)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(p,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>p[r]})}}return e.default=p,Object.freeze(e)}const h=S(H),k=S(O),m=192;h.initEccLib(k);class v{constructor(e,r,t,s,i,a,d,o){this.secretHash=t,this.redeemerPubkey=s,this.initiatorPubkey=i,this.expiry=a,this.signer=e,this.network=d,this.internalPubkey=P.generateInternalkey(),this.initiateAmount=r,this.utxoHashes=o}static async from(e,r,t,s,i,a,d){t=t.startsWith("0x")?t.slice(2):t,f.assert(t.length===64,u.htlcErrors.secretHashLenMismatch),f.assert(s.length===64||s.length===66,`initiator ${u.htlcErrors.pubkeyLenMismatch}`),f.assert(i.length===64||i.length===66,`redeemer ${u.htlcErrors.pubkeyLenMismatch}`),f.assert(a>0,u.htlcErrors.zeroOrNegativeExpiry);const o=await e.getNetwork();return new v(e,r,t,f.xOnlyPubkey(i).toString("hex"),f.xOnlyPubkey(s).toString("hex"),a,o,d)}address(){const{address:e}=h.payments.p2tr({internalPubkey:this.internalPubkey,network:this.network,scriptTree:this.leaves()});if(!e)throw new Error(u.htlcErrors.htlcAddressGenerationFailed);return e}id(){return this.address()}async _buildRawTx(e,r){const t=new h.Transaction;t.version=2;const s=this.address(),i=await this.signer.getProvider();let a=[];if(this.utxoHashes&&this.utxoHashes.length>0)for(const o of this.utxoHashes){const l=await i.getTransaction(o);for(let g=0;g<l.vout.length;g++){const n=l.vout[g];n.scriptpubkey_address===s&&a.push({txid:l.txid,vout:g,value:n.value,status:{confirmed:!1}})}}else a=await i.getUTXOs(s);const d=a.reduce((o,l)=>o+l.value,0);if(d===0)throw new Error(`${s} ${u.htlcErrors.notFunded}`);for(let o=0;o<a.length;o++)t.addInput(Buffer.from(a[o].txid,"hex").reverse(),a[o].vout);return r??(r=await i.suggestFee(s,d,b.Urgency.MEDIUM)),t.addOutput(h.address.toOutputScript(e,this.network),d-r),{tx:t,usedUtxos:a}}async buildRawTx(e){return await this._buildRawTx(await this.signer.getAddress(),e)}getOutputScript(){return h.address.toOutputScript(this.address(),this.network)}async init(e){return e??(e=await(await this.signer.getProvider()).suggestFee(await this.signer.getAddress(),this.initiateAmount,b.Urgency.MEDIUM)),await this.signer.send(this.address(),this.initiateAmount,e)}async instantRefund(e,r){f.assert(e.length>0,u.htlcErrors.noCounterpartySigs);const{tx:t,usedUtxos:s}=await this.buildRawTx(r);for(const n of s)if(!e.find(c=>c.utxo===n.txid))throw new Error(u.htlcErrors.counterPartySigNotFound(n.txid));const i=this.getOutputScript(),a=h.Transaction.SIGHASH_DEFAULT,d=this.leafHash(2),o=s.map(n=>n.value),l=y(i,s.length);for(let n=0;n<t.ins.length;n++){const c=t.hashForWitnessV1(n,l,o,a,d);if(!k.verifySchnorr(c,Buffer.from(this.redeemerPubkey,"hex"),Buffer.from(e[n].sig,"hex")))throw new Error(u.htlcErrors.invalidCounterpartySigForUTXO(e[n].utxo));const w=await this.signer.signSchnorr(c),x=Buffer.from(t.ins[n].hash).reverse().toString("hex"),E=e.find(L=>L.utxo===x);if(!E)throw new Error(u.htlcErrors.counterPartySigNotFound(x));t.setWitness(n,[Buffer.from(E.sig,"hex"),w,this.instantRefundLeaf(),this.generateControlBlockFor(2)])}return await(await this.signer.getProvider()).broadcast(t.toHex())}async redeem(e,r,t){f.assert(h.crypto.sha256(Buffer.from(e,"hex")).toString("hex")===this.secretHash,u.htlcErrors.secretMismatch);const{tx:s,usedUtxos:i}=await this._buildRawTx(r??await this.signer.getAddress(),t),a=this.leafHash(1),d=i.map(n=>n.value),o=y(this.getOutputScript(),i.length),l=h.Transaction.SIGHASH_DEFAULT;for(let n=0;n<s.ins.length;n++){const c=s.hashForWitnessV1(n,o,d,l,a),w=await this.signer.signSchnorr(c);s.setWitness(n,[w,Buffer.from(e,"hex"),this.redeemLeaf(),this.generateControlBlockFor(1)])}return await(await this.signer.getProvider()).broadcast(s.toHex())}async refund(e,r){const{tx:t,usedUtxos:s}=await this._buildRawTx(e??await this.signer.getAddress(),r),[i,a]=await this.canRefund(s);if(!i)throw new Error(u.htlcErrors.htlcNotExpired(a));const d=this.leafHash(0),o=s.map(c=>c.value),l=y(this.getOutputScript(),s.length),g=h.Transaction.SIGHASH_DEFAULT;for(let c=0;c<t.ins.length;c++){t.ins[c].sequence=this.expiry;const w=t.hashForWitnessV1(c,l,o,g,d),x=await this.signer.signSchnorr(w);t.setWitness(c,[x,this.refundLeaf(),this.generateControlBlockFor(0)])}return await(await this.signer.getProvider()).broadcast(t.toHex())}async canRefund(e){const t=await(await this.signer.getProvider()).getLatestTip();for(const s of e){let i=0;if(s.status.confirmed&&s.status.block_height+this.expiry>t?i=s.status.block_height+this.expiry-t+1:s.status.confirmed||(i=this.expiry+1),i>0)return[!1,i]}return[!0,0]}generateControlBlockFor(e){let r;switch(e){case 1:r=this.redeemLeaf();break;case 0:r=this.refundLeaf();break;case 2:r=this.instantRefundLeaf();break;default:throw new Error(u.htlcErrors.invalidLeaf)}const t=h.payments.p2tr({internalPubkey:this.internalPubkey,network:this.network,scriptTree:this.leaves(),redeem:{output:r,redeemVersion:m}});if(!t.witness)throw new Error(u.htlcErrors.controlBlockGenerationFailed);return t.witness[t.witness.length-1]}leafHash(e){let r=this.redeemLeaf();return e===0&&(r=this.refundLeaf()),e===2&&(r=this.instantRefundLeaf()),h.crypto.taggedHash("TapLeaf",f.serializeScript(r))}refundLeaf(){return h.script.fromASM(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@catalogfi/wallets"),H=require("bitcoinjs-lib"),O=require("tiny-secp256k1"),P=require("./index28.cjs"),f=require("./index10.cjs"),u=require("./index29.cjs");function S(p){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const r in p)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(p,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>p[r]})}}return e.default=p,Object.freeze(e)}const h=S(H),k=S(O),m=192;h.initEccLib(k);class v{constructor(e,r,t,s,i,a,d,o){this.secretHash=t,this.redeemerPubkey=s,this.initiatorPubkey=i,this.expiry=a,this.signer=e,this.network=d,this.internalPubkey=P.generateInternalkey(),this.initiateAmount=r,this.utxoHashes=o}static async from(e,r,t,s,i,a,d){t=t.startsWith("0x")?t.slice(2):t,f.assert(t.length===64,u.htlcErrors.secretHashLenMismatch),f.assert(s.length===64||s.length===66,`initiator ${u.htlcErrors.pubkeyLenMismatch}`),f.assert(i.length===64||i.length===66,`redeemer ${u.htlcErrors.pubkeyLenMismatch}`),f.assert(a>0,u.htlcErrors.zeroOrNegativeExpiry);const o=await e.getNetwork();return new v(e,r,t,f.xOnlyPubkey(i).toString("hex"),f.xOnlyPubkey(s).toString("hex"),a,o,d)}address(){const{address:e}=h.payments.p2tr({internalPubkey:this.internalPubkey,network:this.network,scriptTree:this.leaves()});if(!e)throw new Error(u.htlcErrors.htlcAddressGenerationFailed);return e}id(){return this.address()}async _buildRawTx(e,r){const t=new h.Transaction;t.version=2;const s=this.address(),i=await this.signer.getProvider();let a=[];if(this.utxoHashes&&this.utxoHashes.length>0)for(const o of this.utxoHashes){const l=await i.getTransaction(o);for(let g=0;g<l.vout.length;g++){const n=l.vout[g];n.scriptpubkey_address===s&&a.push({txid:l.txid,vout:g,value:n.value,status:{confirmed:!1}})}}else a=await i.getUTXOs(s);const d=a.reduce((o,l)=>o+l.value,0);if(d===0)throw new Error(`${s} ${u.htlcErrors.notFunded}`);for(let o=0;o<a.length;o++)t.addInput(Buffer.from(a[o].txid,"hex").reverse(),a[o].vout);return r??(r=await i.suggestFee(s,d,b.Urgency.MEDIUM)),t.addOutput(h.address.toOutputScript(e,this.network),d-r),{tx:t,usedUtxos:a}}async buildRawTx(e){return await this._buildRawTx(await this.signer.getAddress(),e)}getOutputScript(){return h.address.toOutputScript(this.address(),this.network)}async init(e){return e??(e=await(await this.signer.getProvider()).suggestFee(await this.signer.getAddress(),this.initiateAmount,b.Urgency.MEDIUM)),await this.signer.send(this.address(),this.initiateAmount,e)}async instantRefund(e,r){f.assert(e.length>0,u.htlcErrors.noCounterpartySigs);const{tx:t,usedUtxos:s}=await this.buildRawTx(r);for(const n of s)if(!e.find(c=>c.utxo===n.txid))throw new Error(u.htlcErrors.counterPartySigNotFound(n.txid));const i=this.getOutputScript(),a=h.Transaction.SIGHASH_DEFAULT,d=this.leafHash(2),o=s.map(n=>n.value),l=y(i,s.length);for(let n=0;n<t.ins.length;n++){const c=t.hashForWitnessV1(n,l,o,a,d);if(!k.verifySchnorr(c,Buffer.from(this.redeemerPubkey,"hex"),Buffer.from(e[n].sig,"hex")))throw new Error(u.htlcErrors.invalidCounterpartySigForUTXO(e[n].utxo));const w=await this.signer.signSchnorr(c),x=Buffer.from(t.ins[n].hash).reverse().toString("hex"),E=e.find(L=>L.utxo===x);if(!E)throw new Error(u.htlcErrors.counterPartySigNotFound(x));t.setWitness(n,[Buffer.from(E.sig,"hex"),w,this.instantRefundLeaf(),this.generateControlBlockFor(2)])}return await(await this.signer.getProvider()).broadcast(t.toHex())}async redeem(e,r,t){f.assert(h.crypto.sha256(Buffer.from(e,"hex")).toString("hex")===this.secretHash,u.htlcErrors.secretMismatch);const{tx:s,usedUtxos:i}=await this._buildRawTx(r??await this.signer.getAddress(),t),a=this.leafHash(1),d=i.map(n=>n.value),o=y(this.getOutputScript(),i.length),l=h.Transaction.SIGHASH_DEFAULT;for(let n=0;n<s.ins.length;n++){const c=s.hashForWitnessV1(n,o,d,l,a),w=await this.signer.signSchnorr(c);s.setWitness(n,[w,Buffer.from(e,"hex"),this.redeemLeaf(),this.generateControlBlockFor(1)])}return await(await this.signer.getProvider()).broadcast(s.toHex())}async refund(e,r){const{tx:t,usedUtxos:s}=await this._buildRawTx(e??await this.signer.getAddress(),r),[i,a]=await this.canRefund(s);if(!i)throw new Error(u.htlcErrors.htlcNotExpired(a));const d=this.leafHash(0),o=s.map(c=>c.value),l=y(this.getOutputScript(),s.length),g=h.Transaction.SIGHASH_DEFAULT;for(let c=0;c<t.ins.length;c++){t.ins[c].sequence=this.expiry;const w=t.hashForWitnessV1(c,l,o,g,d),x=await this.signer.signSchnorr(w);t.setWitness(c,[x,this.refundLeaf(),this.generateControlBlockFor(0)])}return await(await this.signer.getProvider()).broadcast(t.toHex())}async canRefund(e){const t=await(await this.signer.getProvider()).getLatestTip();for(const s of e){let i=0;if(s.status.confirmed&&s.status.block_height+this.expiry>t?i=s.status.block_height+this.expiry-t+1:s.status.confirmed||(i=this.expiry+1),i>0)return[!1,i]}return[!0,0]}generateControlBlockFor(e){let r;switch(e){case 1:r=this.redeemLeaf();break;case 0:r=this.refundLeaf();break;case 2:r=this.instantRefundLeaf();break;default:throw new Error(u.htlcErrors.invalidLeaf)}const t=h.payments.p2tr({internalPubkey:this.internalPubkey,network:this.network,scriptTree:this.leaves(),redeem:{output:r,redeemVersion:m}});if(!t.witness)throw new Error(u.htlcErrors.controlBlockGenerationFailed);return t.witness[t.witness.length-1]}leafHash(e){let r=this.redeemLeaf();return e===0&&(r=this.refundLeaf()),e===2&&(r=this.instantRefundLeaf()),h.crypto.taggedHash("TapLeaf",f.serializeScript(r))}refundLeaf(){return h.script.fromASM(`
2
2
  ${h.script.number.encode(this.expiry).toString("hex")}
3
3
  OP_CHECKSEQUENCEVERIFY
4
4
  OP_DROP
package/dist/index11.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Urgency as y } from "@catalogfi/wallets";
2
2
  import * as h from "bitcoinjs-lib";
3
3
  import * as k from "tiny-secp256k1";
4
- import { generateInternalkey as b } from "./index21.js";
4
+ import { generateInternalkey as b } from "./index28.js";
5
5
  import { assert as g, xOnlyPubkey as L, serializeScript as P, sortLeaves as O } from "./index10.js";
6
- import { htlcErrors as u } from "./index22.js";
6
+ import { htlcErrors as u } from "./index29.js";
7
7
  const m = 192;
8
8
  h.initEccLib(k);
9
9
  class H {
package/dist/index110.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index128.cjs");/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),i=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),y=(t,e)=>t<<32-e|t>>>e,b=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,o=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function p(t){for(let e=0;e<t.length;e++)t[e]=o(t[e])}function f(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function r(t){return typeof t=="string"&&(t=f(t)),s.bytes(t),t}class w{clone(){return this._cloneInto()}}function l(t){const e=c=>t().update(r(c)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}exports.Hash=w;exports.byteSwap=o;exports.byteSwap32=p;exports.createView=i;exports.isLE=b;exports.rotr=y;exports.toBytes=r;exports.u32=u;exports.utf8ToBytes=f;exports.wrapConstructor=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index129.cjs");/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),i=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),y=(t,e)=>t<<32-e|t>>>e,b=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,o=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function p(t){for(let e=0;e<t.length;e++)t[e]=o(t[e])}function f(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function r(t){return typeof t=="string"&&(t=f(t)),s.bytes(t),t}class w{clone(){return this._cloneInto()}}function l(t){const e=c=>t().update(r(c)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}exports.Hash=w;exports.byteSwap=o;exports.byteSwap32=p;exports.createView=i;exports.isLE=b;exports.rotr=y;exports.toBytes=r;exports.u32=u;exports.utf8ToBytes=f;exports.wrapConstructor=l;
package/dist/index110.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bytes as f } from "./index128.js";
1
+ import { bytes as f } from "./index129.js";
2
2
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3
3
  const s = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4)), y = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), p = (t, e) => t << 32 - e | t >>> e, b = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, c = (t) => t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
4
4
  function w(t) {
package/dist/index111.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=6,s=32,e=4096,n=s*e,o=n*t-1-1*e*t;exports.bytesPerBlob=n;exports.bytesPerFieldElement=s;exports.fieldElementsPerBlob=e;exports.maxBytesPerTransaction=o;
package/dist/index111.js CHANGED
@@ -1,4 +1,7 @@
1
- var r = { exports: {} };
1
+ const e = 32, s = 4096, t = 131072, l = 761855;
2
2
  export {
3
- r as __module
3
+ t as bytesPerBlob,
4
+ e as bytesPerFieldElement,
5
+ s as fieldElementsPerBlob,
6
+ l as maxBytesPerTransaction
4
7
  };
package/dist/index112.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index55.cjs"),a=require("./index126.cjs"),_=require("./index99.cjs");var h=u.safeBufferExports.Buffer,l=a.readableBrowserExports.Transform,c=_.inherits_browserExports;function p(t,e){if(!h.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function i(t){l.call(this),this._block=h.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}c(i,l);i.prototype._transform=function(t,e,r){var s=null;try{this.update(t,e)}catch(f){s=f}r(s)};i.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};i.prototype.update=function(t,e){if(p(t,"Data"),this._finalized)throw new Error("Digest already called");h.isBuffer(t)||(t=h.from(t,e));for(var r=this._block,s=0;this._blockOffset+t.length-s>=this._blockSize;){for(var f=this._blockOffset;f<this._blockSize;)r[f++]=t[s++];this._update(),this._blockOffset=0}for(;s<t.length;)r[this._blockOffset++]=t[s++];for(var n=0,o=t.length*8;o>0;++n)this._length[n]+=o,o=this._length[n]/4294967296|0,o>0&&(this._length[n]-=4294967296*o);return this};i.prototype._update=function(){throw new Error("_update is not implemented")};i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};i.prototype._digest=function(){throw new Error("_digest is not implemented")};var g=i;exports.hashBase=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
package/dist/index112.js CHANGED
@@ -1,60 +1,4 @@
1
- import { s as a } from "./index55.js";
2
- import { r as _ } from "./index126.js";
3
- import { i as p } from "./index99.js";
4
- var n = a.Buffer, l = _.Transform, u = p;
5
- function c(t, r) {
6
- if (!n.isBuffer(t) && typeof t != "string")
7
- throw new TypeError(r + " must be a string or a buffer");
8
- }
9
- function i(t) {
10
- l.call(this), this._block = n.allocUnsafe(t), this._blockSize = t, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
11
- }
12
- u(i, l);
13
- i.prototype._transform = function(t, r, e) {
14
- var s = null;
15
- try {
16
- this.update(t, r);
17
- } catch (f) {
18
- s = f;
19
- }
20
- e(s);
21
- };
22
- i.prototype._flush = function(t) {
23
- var r = null;
24
- try {
25
- this.push(this.digest());
26
- } catch (e) {
27
- r = e;
28
- }
29
- t(r);
30
- };
31
- i.prototype.update = function(t, r) {
32
- if (c(t, "Data"), this._finalized) throw new Error("Digest already called");
33
- n.isBuffer(t) || (t = n.from(t, r));
34
- for (var e = this._block, s = 0; this._blockOffset + t.length - s >= this._blockSize; ) {
35
- for (var f = this._blockOffset; f < this._blockSize; ) e[f++] = t[s++];
36
- this._update(), this._blockOffset = 0;
37
- }
38
- for (; s < t.length; ) e[this._blockOffset++] = t[s++];
39
- for (var h = 0, o = t.length * 8; o > 0; ++h)
40
- this._length[h] += o, o = this._length[h] / 4294967296 | 0, o > 0 && (this._length[h] -= 4294967296 * o);
41
- return this;
42
- };
43
- i.prototype._update = function() {
44
- throw new Error("_update is not implemented");
45
- };
46
- i.prototype.digest = function(t) {
47
- if (this._finalized) throw new Error("Digest already called");
48
- this._finalized = !0;
49
- var r = this._digest();
50
- t !== void 0 && (r = r.toString(t)), this._block.fill(0), this._blockOffset = 0;
51
- for (var e = 0; e < 4; ++e) this._length[e] = 0;
52
- return r;
53
- };
54
- i.prototype._digest = function() {
55
- throw new Error("_digest is not implemented");
56
- };
57
- var m = i;
1
+ var r = { exports: {} };
58
2
  export {
59
- m as h
3
+ r as __module
60
4
  };
package/dist/index113.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index55.cjs"),a=require("./index126.cjs"),_=require("./index99.cjs");var h=u.safeBufferExports.Buffer,l=a.readableBrowserExports.Transform,c=_.inherits_browserExports;function p(t,e){if(!h.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function i(t){l.call(this),this._block=h.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}c(i,l);i.prototype._transform=function(t,e,r){var s=null;try{this.update(t,e)}catch(f){s=f}r(s)};i.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};i.prototype.update=function(t,e){if(p(t,"Data"),this._finalized)throw new Error("Digest already called");h.isBuffer(t)||(t=h.from(t,e));for(var r=this._block,s=0;this._blockOffset+t.length-s>=this._blockSize;){for(var f=this._blockOffset;f<this._blockSize;)r[f++]=t[s++];this._update(),this._blockOffset=0}for(;s<t.length;)r[this._blockOffset++]=t[s++];for(var n=0,o=t.length*8;o>0;++n)this._length[n]+=o,o=this._length[n]/4294967296|0,o>0&&(this._length[n]-=4294967296*o);return this};i.prototype._update=function(){throw new Error("_update is not implemented")};i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};i.prototype._digest=function(){throw new Error("_digest is not implemented")};var g=i;exports.hashBase=g;
package/dist/index113.js CHANGED
@@ -1,4 +1,60 @@
1
- var s = { exports: {} };
1
+ import { s as a } from "./index55.js";
2
+ import { r as _ } from "./index126.js";
3
+ import { i as p } from "./index99.js";
4
+ var n = a.Buffer, l = _.Transform, u = p;
5
+ function c(t, r) {
6
+ if (!n.isBuffer(t) && typeof t != "string")
7
+ throw new TypeError(r + " must be a string or a buffer");
8
+ }
9
+ function i(t) {
10
+ l.call(this), this._block = n.allocUnsafe(t), this._blockSize = t, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
11
+ }
12
+ u(i, l);
13
+ i.prototype._transform = function(t, r, e) {
14
+ var s = null;
15
+ try {
16
+ this.update(t, r);
17
+ } catch (f) {
18
+ s = f;
19
+ }
20
+ e(s);
21
+ };
22
+ i.prototype._flush = function(t) {
23
+ var r = null;
24
+ try {
25
+ this.push(this.digest());
26
+ } catch (e) {
27
+ r = e;
28
+ }
29
+ t(r);
30
+ };
31
+ i.prototype.update = function(t, r) {
32
+ if (c(t, "Data"), this._finalized) throw new Error("Digest already called");
33
+ n.isBuffer(t) || (t = n.from(t, r));
34
+ for (var e = this._block, s = 0; this._blockOffset + t.length - s >= this._blockSize; ) {
35
+ for (var f = this._blockOffset; f < this._blockSize; ) e[f++] = t[s++];
36
+ this._update(), this._blockOffset = 0;
37
+ }
38
+ for (; s < t.length; ) e[this._blockOffset++] = t[s++];
39
+ for (var h = 0, o = t.length * 8; o > 0; ++h)
40
+ this._length[h] += o, o = this._length[h] / 4294967296 | 0, o > 0 && (this._length[h] -= 4294967296 * o);
41
+ return this;
42
+ };
43
+ i.prototype._update = function() {
44
+ throw new Error("_update is not implemented");
45
+ };
46
+ i.prototype.digest = function(t) {
47
+ if (this._finalized) throw new Error("Digest already called");
48
+ this._finalized = !0;
49
+ var r = this._digest();
50
+ t !== void 0 && (r = r.toString(t)), this._block.fill(0), this._blockOffset = 0;
51
+ for (var e = 0; e < 4; ++e) this._length[e] = 0;
52
+ return r;
53
+ };
54
+ i.prototype._digest = function() {
55
+ throw new Error("_digest is not implemented");
56
+ };
57
+ var m = i;
2
58
  export {
3
- s as __module
59
+ m as h
4
60
  };
package/dist/index114.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index99.cjs"),d=require("./index127.cjs"),x=require("./index55.cjs");var b=v.inherits_browserExports,c=d.hash,p=x.safeBufferExports.Buffer,w=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function a(){this.init(),this._w=l,c.call(this,64,56)}b(a,c);a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(t){return t<<5|t>>>27}function E(t){return t<<30|t>>>2}function y(t,r,i,s){return t===0?r&i|~r&s:t===2?r&i|r&s|i&s:r^i^s}a.prototype._update=function(t){for(var r=this._w,i=this._a|0,s=this._b|0,h=this._c|0,n=this._d|0,o=this._e|0,e=0;e<16;++e)r[e]=t.readInt32BE(e*4);for(;e<80;++e)r[e]=r[e-3]^r[e-8]^r[e-14]^r[e-16];for(var _=0;_<80;++_){var f=~~(_/20),u=B(i)+y(f,s,h,n)+o+r[_]+w[f]|0;o=n,n=h,h=E(s),s=i,i=u}this._a=i+this._a|0,this._b=s+this._b|0,this._c=h+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};a.prototype._hash=function(){var t=p.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var I=a;exports.sha=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
package/dist/index114.js CHANGED
@@ -1,42 +1,4 @@
1
- import { i as u } from "./index99.js";
2
- import { h as p } from "./index127.js";
3
- import { s as x } from "./index55.js";
4
- var d = u, c = p, w = x.Buffer, B = [
5
- 1518500249,
6
- 1859775393,
7
- -1894007588,
8
- -899497514
9
- ], b = new Array(80);
10
- function h() {
11
- this.init(), this._w = b, c.call(this, 64, 56);
12
- }
13
- d(h, c);
14
- h.prototype.init = function() {
15
- return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
16
- };
17
- function E(t) {
18
- return t << 5 | t >>> 27;
19
- }
20
- function l(t) {
21
- return t << 30 | t >>> 2;
22
- }
23
- function I(t, r, s, a) {
24
- return t === 0 ? r & s | ~r & a : t === 2 ? r & s | r & a | s & a : r ^ s ^ a;
25
- }
26
- h.prototype._update = function(t) {
27
- for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, o = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
28
- for (; i < 80; ++i) r[i] = r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16];
29
- for (var _ = 0; _ < 80; ++_) {
30
- var f = ~~(_ / 20), v = E(s) + I(f, a, e, n) + o + r[_] + B[f] | 0;
31
- o = n, n = e, e = l(a), a = s, s = v;
32
- }
33
- this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = e + this._c | 0, this._d = n + this._d | 0, this._e = o + this._e | 0;
34
- };
35
- h.prototype._hash = function() {
36
- var t = w.allocUnsafe(20);
37
- return t.writeInt32BE(this._a | 0, 0), t.writeInt32BE(this._b | 0, 4), t.writeInt32BE(this._c | 0, 8), t.writeInt32BE(this._d | 0, 12), t.writeInt32BE(this._e | 0, 16), t;
38
- };
39
- var W = h;
1
+ var s = { exports: {} };
40
2
  export {
41
- W as s
3
+ s as __module
42
4
  };
package/dist/index115.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index99.cjs"),d=require("./index127.cjs"),x=require("./index55.cjs");var b=v.inherits_browserExports,c=d.hash,l=x.safeBufferExports.Buffer,p=[1518500249,1859775393,-1894007588,-899497514],w=new Array(80);function a(){this.init(),this._w=w,c.call(this,64,56)}b(a,c);a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(t){return t<<1|t>>>31}function E(t){return t<<5|t>>>27}function y(t){return t<<30|t>>>2}function I(t,r,i,s){return t===0?r&i|~r&s:t===2?r&i|r&s|i&s:r^i^s}a.prototype._update=function(t){for(var r=this._w,i=this._a|0,s=this._b|0,h=this._c|0,n=this._d|0,_=this._e|0,e=0;e<16;++e)r[e]=t.readInt32BE(e*4);for(;e<80;++e)r[e]=B(r[e-3]^r[e-8]^r[e-14]^r[e-16]);for(var o=0;o<80;++o){var f=~~(o/20),u=E(i)+I(f,s,h,n)+_+r[o]+p[f]|0;_=n,n=h,h=y(s),s=i,i=u}this._a=i+this._a|0,this._b=s+this._b|0,this._c=h+this._c|0,this._d=n+this._d|0,this._e=_+this._e|0};a.prototype._hash=function(){var t=l.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var q=a;exports.sha1=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index99.cjs"),d=require("./index127.cjs"),x=require("./index55.cjs");var b=v.inherits_browserExports,c=d.hash,p=x.safeBufferExports.Buffer,w=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function a(){this.init(),this._w=l,c.call(this,64,56)}b(a,c);a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(t){return t<<5|t>>>27}function E(t){return t<<30|t>>>2}function y(t,r,i,s){return t===0?r&i|~r&s:t===2?r&i|r&s|i&s:r^i^s}a.prototype._update=function(t){for(var r=this._w,i=this._a|0,s=this._b|0,h=this._c|0,n=this._d|0,o=this._e|0,e=0;e<16;++e)r[e]=t.readInt32BE(e*4);for(;e<80;++e)r[e]=r[e-3]^r[e-8]^r[e-14]^r[e-16];for(var _=0;_<80;++_){var f=~~(_/20),u=B(i)+y(f,s,h,n)+o+r[_]+w[f]|0;o=n,n=h,h=E(s),s=i,i=u}this._a=i+this._a|0,this._b=s+this._b|0,this._c=h+this._c|0,this._d=n+this._d|0,this._e=o+this._e|0};a.prototype._hash=function(){var t=p.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var I=a;exports.sha=I;
package/dist/index115.js CHANGED
@@ -1,7 +1,7 @@
1
- import { i as v } from "./index99.js";
1
+ import { i as u } from "./index99.js";
2
2
  import { h as p } from "./index127.js";
3
3
  import { s as x } from "./index55.js";
4
- var d = v, c = p, w = x.Buffer, B = [
4
+ var d = u, c = p, w = x.Buffer, B = [
5
5
  1518500249,
6
6
  1859775393,
7
7
  -1894007588,
@@ -15,31 +15,28 @@ h.prototype.init = function() {
15
15
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
16
16
  };
17
17
  function E(t) {
18
- return t << 1 | t >>> 31;
19
- }
20
- function l(t) {
21
18
  return t << 5 | t >>> 27;
22
19
  }
23
- function I(t) {
20
+ function l(t) {
24
21
  return t << 30 | t >>> 2;
25
22
  }
26
- function y(t, r, s, a) {
23
+ function I(t, r, s, a) {
27
24
  return t === 0 ? r & s | ~r & a : t === 2 ? r & s | r & a | s & a : r ^ s ^ a;
28
25
  }
29
26
  h.prototype._update = function(t) {
30
- for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, _ = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
31
- for (; i < 80; ++i) r[i] = E(r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16]);
32
- for (var o = 0; o < 80; ++o) {
33
- var f = ~~(o / 20), u = l(s) + y(f, a, e, n) + _ + r[o] + B[f] | 0;
34
- _ = n, n = e, e = I(a), a = s, s = u;
27
+ for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, o = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
28
+ for (; i < 80; ++i) r[i] = r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16];
29
+ for (var _ = 0; _ < 80; ++_) {
30
+ var f = ~~(_ / 20), v = E(s) + I(f, a, e, n) + o + r[_] + B[f] | 0;
31
+ o = n, n = e, e = l(a), a = s, s = v;
35
32
  }
36
- this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = e + this._c | 0, this._d = n + this._d | 0, this._e = _ + this._e | 0;
33
+ this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = e + this._c | 0, this._d = n + this._d | 0, this._e = o + this._e | 0;
37
34
  };
38
35
  h.prototype._hash = function() {
39
36
  var t = w.allocUnsafe(20);
40
37
  return t.writeInt32BE(this._a | 0, 0), t.writeInt32BE(this._b | 0, 4), t.writeInt32BE(this._c | 0, 8), t.writeInt32BE(this._d | 0, 12), t.writeInt32BE(this._e | 0, 16), t;
41
38
  };
42
- var A = h;
39
+ var W = h;
43
40
  export {
44
- A as s
41
+ W as s
45
42
  };
package/dist/index116.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index99.cjs"),e=require("./index117.cjs"),s=require("./index127.cjs"),h=require("./index55.cjs");var a=r.inherits_browserExports,n=e.sha256,f=s.hash,o=h.safeBufferExports.Buffer,_=new Array(64);function i(){this.init(),this._w=_,f.call(this,64,56)}a(i,n);i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};i.prototype._hash=function(){var t=o.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var c=i;exports.sha224=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index99.cjs"),d=require("./index127.cjs"),x=require("./index55.cjs");var b=v.inherits_browserExports,c=d.hash,l=x.safeBufferExports.Buffer,p=[1518500249,1859775393,-1894007588,-899497514],w=new Array(80);function a(){this.init(),this._w=w,c.call(this,64,56)}b(a,c);a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(t){return t<<1|t>>>31}function E(t){return t<<5|t>>>27}function y(t){return t<<30|t>>>2}function I(t,r,i,s){return t===0?r&i|~r&s:t===2?r&i|r&s|i&s:r^i^s}a.prototype._update=function(t){for(var r=this._w,i=this._a|0,s=this._b|0,h=this._c|0,n=this._d|0,_=this._e|0,e=0;e<16;++e)r[e]=t.readInt32BE(e*4);for(;e<80;++e)r[e]=B(r[e-3]^r[e-8]^r[e-14]^r[e-16]);for(var o=0;o<80;++o){var f=~~(o/20),u=E(i)+I(f,s,h,n)+_+r[o]+p[f]|0;_=n,n=h,h=y(s),s=i,i=u}this._a=i+this._a|0,this._b=s+this._b|0,this._c=h+this._c|0,this._d=n+this._d|0,this._e=_+this._e|0};a.prototype._hash=function(){var t=l.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var q=a;exports.sha1=q;
package/dist/index116.js CHANGED
@@ -1,20 +1,45 @@
1
- import { i as r } from "./index99.js";
2
- import { s } from "./index117.js";
3
- import { h } from "./index127.js";
4
- import { s as a } from "./index55.js";
5
- var e = r, f = s, n = h, o = a.Buffer, _ = new Array(64);
6
- function i() {
7
- this.init(), this._w = _, n.call(this, 64, 56);
1
+ import { i as v } from "./index99.js";
2
+ import { h as p } from "./index127.js";
3
+ import { s as x } from "./index55.js";
4
+ var d = v, c = p, w = x.Buffer, B = [
5
+ 1518500249,
6
+ 1859775393,
7
+ -1894007588,
8
+ -899497514
9
+ ], b = new Array(80);
10
+ function h() {
11
+ this.init(), this._w = b, c.call(this, 64, 56);
8
12
  }
9
- e(i, f);
10
- i.prototype.init = function() {
11
- return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
13
+ d(h, c);
14
+ h.prototype.init = function() {
15
+ return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
12
16
  };
13
- i.prototype._hash = function() {
14
- var t = o.allocUnsafe(28);
15
- return t.writeInt32BE(this._a, 0), t.writeInt32BE(this._b, 4), t.writeInt32BE(this._c, 8), t.writeInt32BE(this._d, 12), t.writeInt32BE(this._e, 16), t.writeInt32BE(this._f, 20), t.writeInt32BE(this._g, 24), t;
17
+ function E(t) {
18
+ return t << 1 | t >>> 31;
19
+ }
20
+ function l(t) {
21
+ return t << 5 | t >>> 27;
22
+ }
23
+ function I(t) {
24
+ return t << 30 | t >>> 2;
25
+ }
26
+ function y(t, r, s, a) {
27
+ return t === 0 ? r & s | ~r & a : t === 2 ? r & s | r & a | s & a : r ^ s ^ a;
28
+ }
29
+ h.prototype._update = function(t) {
30
+ for (var r = this._w, s = this._a | 0, a = this._b | 0, e = this._c | 0, n = this._d | 0, _ = this._e | 0, i = 0; i < 16; ++i) r[i] = t.readInt32BE(i * 4);
31
+ for (; i < 80; ++i) r[i] = E(r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16]);
32
+ for (var o = 0; o < 80; ++o) {
33
+ var f = ~~(o / 20), u = l(s) + y(f, a, e, n) + _ + r[o] + B[f] | 0;
34
+ _ = n, n = e, e = I(a), a = s, s = u;
35
+ }
36
+ this._a = s + this._a | 0, this._b = a + this._b | 0, this._c = e + this._c | 0, this._d = n + this._d | 0, this._e = _ + this._e | 0;
37
+ };
38
+ h.prototype._hash = function() {
39
+ var t = w.allocUnsafe(20);
40
+ return t.writeInt32BE(this._a | 0, 0), t.writeInt32BE(this._b | 0, 4), t.writeInt32BE(this._c | 0, 8), t.writeInt32BE(this._d | 0, 12), t.writeInt32BE(this._e | 0, 16), t;
16
41
  };
17
- var B = i;
42
+ var A = h;
18
43
  export {
19
- B as s
44
+ A as s
20
45
  };
package/dist/index117.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index99.cjs"),u=require("./index127.cjs"),c=require("./index55.cjs");var v=F.inherits_browserExports,f=u.hash,D=c.safeBufferExports.Buffer,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);function e(){this.init(),this._w=d,f.call(this,64,56)}v(e,f);e.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function w(t,r,s){return s^t&(r^s)}function g(t,r,s){return t&r|s&(t|r)}function p(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function I(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function m(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function l(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}e.prototype._update=function(t){for(var r=this._w,s=this._a|0,x=this._b|0,a=this._c|0,C=this._d|0,h=this._e|0,n=this._f|0,B=this._g|0,A=this._h|0,i=0;i<16;++i)r[i]=t.readInt32BE(i*4);for(;i<64;++i)r[i]=l(r[i-2])+r[i-7]+m(r[i-15])+r[i-16]|0;for(var _=0;_<64;++_){var E=A+I(h)+w(h,n,B)+b[_]+r[_]|0,o=p(s)+g(s,x,a)|0;A=B,B=n,n=h,h=C+E|0,C=a,a=x,x=s,s=E+o|0}this._a=s+this._a|0,this._b=x+this._b|0,this._c=a+this._c|0,this._d=C+this._d|0,this._e=h+this._e|0,this._f=n+this._f|0,this._g=B+this._g|0,this._h=A+this._h|0};e.prototype._hash=function(){var t=D.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var y=e;exports.sha256=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index99.cjs"),e=require("./index118.cjs"),s=require("./index127.cjs"),h=require("./index55.cjs");var a=r.inherits_browserExports,n=e.sha256,f=s.hash,o=h.safeBufferExports.Buffer,_=new Array(64);function i(){this.init(),this._w=_,f.call(this,64,56)}a(i,n);i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};i.prototype._hash=function(){var t=o.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var c=i;exports.sha224=c;