@gardenfi/core 0.2.0-beta.75 → 0.2.0-beta.76

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 (299) hide show
  1. package/dist/index.cjs +31 -1
  2. package/dist/index.js +7813 -28
  3. package/package.json +1 -1
  4. package/dist/index10.cjs +0 -1
  5. package/dist/index10.js +0 -112
  6. package/dist/index100.cjs +0 -1
  7. package/dist/index100.js +0 -23
  8. package/dist/index101.cjs +0 -1
  9. package/dist/index101.js +0 -9
  10. package/dist/index102.cjs +0 -1
  11. package/dist/index102.js +0 -35
  12. package/dist/index103.cjs +0 -1
  13. package/dist/index103.js +0 -4
  14. package/dist/index104.cjs +0 -1
  15. package/dist/index104.js +0 -40
  16. package/dist/index105.cjs +0 -1
  17. package/dist/index105.js +0 -31
  18. package/dist/index106.cjs +0 -1
  19. package/dist/index106.js +0 -9
  20. package/dist/index107.cjs +0 -1
  21. package/dist/index107.js +0 -7
  22. package/dist/index108.cjs +0 -1
  23. package/dist/index108.js +0 -13
  24. package/dist/index109.cjs +0 -1
  25. package/dist/index109.js +0 -4
  26. package/dist/index11.cjs +0 -20
  27. package/dist/index11.js +0 -380
  28. package/dist/index110.cjs +0 -1
  29. package/dist/index110.js +0 -60
  30. package/dist/index111.cjs +0 -1
  31. package/dist/index111.js +0 -4
  32. package/dist/index112.cjs +0 -1
  33. package/dist/index112.js +0 -42
  34. package/dist/index113.cjs +0 -1
  35. package/dist/index113.js +0 -45
  36. package/dist/index114.cjs +0 -1
  37. package/dist/index114.js +0 -20
  38. package/dist/index115.cjs +0 -1
  39. package/dist/index115.js +0 -111
  40. package/dist/index116.cjs +0 -1
  41. package/dist/index116.js +0 -23
  42. package/dist/index117.cjs +0 -1
  43. package/dist/index117.js +0 -228
  44. package/dist/index118.cjs +0 -1
  45. package/dist/index118.js +0 -6
  46. package/dist/index119.cjs +0 -1
  47. package/dist/index119.js +0 -160
  48. package/dist/index12.cjs +0 -1
  49. package/dist/index12.js +0 -22
  50. package/dist/index120.cjs +0 -1
  51. package/dist/index120.js +0 -4
  52. package/dist/index121.cjs +0 -1
  53. package/dist/index121.js +0 -75
  54. package/dist/index122.cjs +0 -1
  55. package/dist/index122.js +0 -64
  56. package/dist/index123.cjs +0 -1
  57. package/dist/index123.js +0 -37
  58. package/dist/index124.cjs +0 -1
  59. package/dist/index124.js +0 -7
  60. package/dist/index125.cjs +0 -1
  61. package/dist/index125.js +0 -107
  62. package/dist/index126.cjs +0 -1
  63. package/dist/index126.js +0 -15
  64. package/dist/index127.cjs +0 -1
  65. package/dist/index127.js +0 -35
  66. package/dist/index128.cjs +0 -1
  67. package/dist/index128.js +0 -4
  68. package/dist/index129.cjs +0 -1
  69. package/dist/index129.js +0 -32
  70. package/dist/index13.cjs +0 -1
  71. package/dist/index13.js +0 -396
  72. package/dist/index130.cjs +0 -1
  73. package/dist/index130.js +0 -4
  74. package/dist/index131.cjs +0 -1
  75. package/dist/index131.js +0 -358
  76. package/dist/index132.cjs +0 -1
  77. package/dist/index132.js +0 -241
  78. package/dist/index133.cjs +0 -1
  79. package/dist/index133.js +0 -70
  80. package/dist/index134.cjs +0 -1
  81. package/dist/index134.js +0 -64
  82. package/dist/index135.cjs +0 -1
  83. package/dist/index135.js +0 -14
  84. package/dist/index136.cjs +0 -1
  85. package/dist/index136.js +0 -47
  86. package/dist/index137.cjs +0 -1
  87. package/dist/index137.js +0 -65
  88. package/dist/index138.cjs +0 -1
  89. package/dist/index138.js +0 -21
  90. package/dist/index139.cjs +0 -1
  91. package/dist/index139.js +0 -228
  92. package/dist/index14.cjs +0 -1
  93. package/dist/index14.js +0 -28
  94. package/dist/index140.cjs +0 -1
  95. package/dist/index140.js +0 -5
  96. package/dist/index141.cjs +0 -1
  97. package/dist/index141.js +0 -171
  98. package/dist/index142.cjs +0 -1
  99. package/dist/index142.js +0 -30
  100. package/dist/index143.cjs +0 -1
  101. package/dist/index143.js +0 -23
  102. package/dist/index144.cjs +0 -1
  103. package/dist/index144.js +0 -72
  104. package/dist/index145.cjs +0 -1
  105. package/dist/index145.js +0 -130
  106. package/dist/index146.cjs +0 -1
  107. package/dist/index146.js +0 -9
  108. package/dist/index147.cjs +0 -1
  109. package/dist/index147.js +0 -4
  110. package/dist/index148.cjs +0 -1
  111. package/dist/index148.js +0 -28
  112. package/dist/index149.cjs +0 -1
  113. package/dist/index149.js +0 -4
  114. package/dist/index15.cjs +0 -1
  115. package/dist/index15.js +0 -34
  116. package/dist/index16.cjs +0 -1
  117. package/dist/index16.js +0 -27
  118. package/dist/index17.cjs +0 -1
  119. package/dist/index17.js +0 -33
  120. package/dist/index18.cjs +0 -1
  121. package/dist/index18.js +0 -32
  122. package/dist/index19.cjs +0 -1
  123. package/dist/index19.js +0 -55
  124. package/dist/index2.cjs +0 -1
  125. package/dist/index2.js +0 -412
  126. package/dist/index20.cjs +0 -1
  127. package/dist/index20.js +0 -28
  128. package/dist/index21.cjs +0 -1
  129. package/dist/index21.js +0 -4
  130. package/dist/index22.cjs +0 -1
  131. package/dist/index22.js +0 -140
  132. package/dist/index23.cjs +0 -1
  133. package/dist/index23.js +0 -4
  134. package/dist/index24.cjs +0 -1
  135. package/dist/index24.js +0 -11
  136. package/dist/index25.cjs +0 -1
  137. package/dist/index25.js +0 -11
  138. package/dist/index26.cjs +0 -3
  139. package/dist/index26.js +0 -30
  140. package/dist/index27.cjs +0 -1
  141. package/dist/index27.js +0 -17
  142. package/dist/index28.cjs +0 -2
  143. package/dist/index28.js +0 -27
  144. package/dist/index29.cjs +0 -1
  145. package/dist/index29.js +0 -43
  146. package/dist/index3.cjs +0 -1
  147. package/dist/index3.js +0 -5
  148. package/dist/index30.cjs +0 -1
  149. package/dist/index30.js +0 -201
  150. package/dist/index31.cjs +0 -1
  151. package/dist/index31.js +0 -4
  152. package/dist/index32.cjs +0 -1
  153. package/dist/index32.js +0 -4
  154. package/dist/index33.cjs +0 -1
  155. package/dist/index33.js +0 -4
  156. package/dist/index34.cjs +0 -1
  157. package/dist/index34.js +0 -15
  158. package/dist/index35.cjs +0 -1
  159. package/dist/index35.js +0 -39
  160. package/dist/index36.cjs +0 -1
  161. package/dist/index36.js +0 -44
  162. package/dist/index37.cjs +0 -1
  163. package/dist/index37.js +0 -30
  164. package/dist/index38.cjs +0 -1
  165. package/dist/index38.js +0 -17
  166. package/dist/index39.cjs +0 -1
  167. package/dist/index39.js +0 -26
  168. package/dist/index4.cjs +0 -1
  169. package/dist/index4.js +0 -18
  170. package/dist/index40.cjs +0 -1
  171. package/dist/index40.js +0 -28
  172. package/dist/index41.cjs +0 -1
  173. package/dist/index41.js +0 -57
  174. package/dist/index42.cjs +0 -1
  175. package/dist/index42.js +0 -30
  176. package/dist/index43.cjs +0 -1
  177. package/dist/index43.js +0 -177
  178. package/dist/index44.cjs +0 -1
  179. package/dist/index44.js +0 -4
  180. package/dist/index45.cjs +0 -1
  181. package/dist/index45.js +0 -37
  182. package/dist/index46.cjs +0 -1
  183. package/dist/index46.js +0 -11
  184. package/dist/index47.cjs +0 -1
  185. package/dist/index47.js +0 -15
  186. package/dist/index48.cjs +0 -1
  187. package/dist/index48.js +0 -14
  188. package/dist/index49.cjs +0 -1
  189. package/dist/index49.js +0 -6
  190. package/dist/index5.cjs +0 -1
  191. package/dist/index5.js +0 -99
  192. package/dist/index50.cjs +0 -1
  193. package/dist/index50.js +0 -48
  194. package/dist/index51.cjs +0 -1
  195. package/dist/index51.js +0 -45
  196. package/dist/index52.cjs +0 -1
  197. package/dist/index52.js +0 -174
  198. package/dist/index53.cjs +0 -1
  199. package/dist/index53.js +0 -15
  200. package/dist/index54.cjs +0 -1
  201. package/dist/index54.js +0 -7
  202. package/dist/index55.cjs +0 -1
  203. package/dist/index55.js +0 -19
  204. package/dist/index56.cjs +0 -1
  205. package/dist/index56.js +0 -14
  206. package/dist/index57.cjs +0 -1
  207. package/dist/index57.js +0 -22
  208. package/dist/index58.cjs +0 -1
  209. package/dist/index58.js +0 -34
  210. package/dist/index59.cjs +0 -1
  211. package/dist/index59.js +0 -4
  212. package/dist/index6.cjs +0 -1
  213. package/dist/index6.js +0 -5
  214. package/dist/index60.cjs +0 -6
  215. package/dist/index60.js +0 -949
  216. package/dist/index61.cjs +0 -1
  217. package/dist/index61.js +0 -4
  218. package/dist/index62.cjs +0 -1
  219. package/dist/index62.js +0 -64
  220. package/dist/index63.cjs +0 -1
  221. package/dist/index63.js +0 -35
  222. package/dist/index64.cjs +0 -1
  223. package/dist/index64.js +0 -89
  224. package/dist/index65.cjs +0 -1
  225. package/dist/index65.js +0 -58
  226. package/dist/index66.cjs +0 -2
  227. package/dist/index66.js +0 -62
  228. package/dist/index67.cjs +0 -1
  229. package/dist/index67.js +0 -6
  230. package/dist/index68.cjs +0 -1
  231. package/dist/index68.js +0 -37
  232. package/dist/index69.cjs +0 -1
  233. package/dist/index69.js +0 -130
  234. package/dist/index7.cjs +0 -1
  235. package/dist/index7.js +0 -76
  236. package/dist/index70.cjs +0 -2
  237. package/dist/index70.js +0 -45
  238. package/dist/index71.cjs +0 -1
  239. package/dist/index71.js +0 -11
  240. package/dist/index72.cjs +0 -1
  241. package/dist/index72.js +0 -13
  242. package/dist/index73.cjs +0 -1
  243. package/dist/index73.js +0 -14
  244. package/dist/index74.cjs +0 -1
  245. package/dist/index74.js +0 -16
  246. package/dist/index75.cjs +0 -1
  247. package/dist/index75.js +0 -9
  248. package/dist/index76.cjs +0 -1
  249. package/dist/index76.js +0 -20
  250. package/dist/index77.cjs +0 -1
  251. package/dist/index77.js +0 -81
  252. package/dist/index78.cjs +0 -1
  253. package/dist/index78.js +0 -17
  254. package/dist/index79.cjs +0 -1
  255. package/dist/index79.js +0 -21
  256. package/dist/index8.cjs +0 -1
  257. package/dist/index8.js +0 -61
  258. package/dist/index80.cjs +0 -1
  259. package/dist/index80.js +0 -24
  260. package/dist/index81.cjs +0 -1
  261. package/dist/index81.js +0 -16
  262. package/dist/index82.cjs +0 -1
  263. package/dist/index82.js +0 -9
  264. package/dist/index83.cjs +0 -1
  265. package/dist/index83.js +0 -4
  266. package/dist/index84.cjs +0 -1
  267. package/dist/index84.js +0 -4
  268. package/dist/index85.cjs +0 -2
  269. package/dist/index85.js +0 -37
  270. package/dist/index86.cjs +0 -1
  271. package/dist/index86.js +0 -8
  272. package/dist/index87.cjs +0 -1
  273. package/dist/index87.js +0 -22
  274. package/dist/index88.cjs +0 -1
  275. package/dist/index88.js +0 -37
  276. package/dist/index89.cjs +0 -1
  277. package/dist/index89.js +0 -369
  278. package/dist/index9.cjs +0 -1
  279. package/dist/index9.js +0 -63
  280. package/dist/index90.cjs +0 -1
  281. package/dist/index90.js +0 -23
  282. package/dist/index91.cjs +0 -1
  283. package/dist/index91.js +0 -58
  284. package/dist/index92.cjs +0 -1
  285. package/dist/index92.js +0 -5
  286. package/dist/index93.cjs +0 -1
  287. package/dist/index93.js +0 -51
  288. package/dist/index94.cjs +0 -1
  289. package/dist/index94.js +0 -28
  290. package/dist/index95.cjs +0 -1
  291. package/dist/index95.js +0 -4
  292. package/dist/index96.cjs +0 -1
  293. package/dist/index96.js +0 -4
  294. package/dist/index97.cjs +0 -1
  295. package/dist/index97.js +0 -15
  296. package/dist/index98.cjs +0 -1
  297. package/dist/index98.js +0 -9
  298. package/dist/index99.cjs +0 -1
  299. package/dist/index99.js +0 -115
package/dist/index123.js DELETED
@@ -1,37 +0,0 @@
1
- import { bytes as f } from "./index129.js";
2
- /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
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
- function w(t) {
5
- for (let e = 0; e < t.length; e++)
6
- t[e] = c(t[e]);
7
- }
8
- function r(t) {
9
- if (typeof t != "string")
10
- throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
11
- return new Uint8Array(new TextEncoder().encode(t));
12
- }
13
- function u(t) {
14
- return typeof t == "string" && (t = r(t)), f(t), t;
15
- }
16
- class x {
17
- // Safe version that clones internal state
18
- clone() {
19
- return this._cloneInto();
20
- }
21
- }
22
- function g(t) {
23
- const e = (o) => t().update(u(o)).digest(), n = t();
24
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
25
- }
26
- export {
27
- x as Hash,
28
- c as byteSwap,
29
- w as byteSwap32,
30
- y as createView,
31
- b as isLE,
32
- p as rotr,
33
- u as toBytes,
34
- s as u32,
35
- r as utf8ToBytes,
36
- g as wrapConstructor
37
- };
package/dist/index124.cjs DELETED
@@ -1 +0,0 @@
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/index124.js DELETED
@@ -1,7 +0,0 @@
1
- const e = 32, s = 4096, t = 131072, l = 761855;
2
- export {
3
- t as bytesPerBlob,
4
- e as bytesPerFieldElement,
5
- s as fieldElementsPerBlob,
6
- l as maxBytesPerTransaction
7
- };
package/dist/index125.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index129.cjs"),a=require("./index138.cjs"),c=require("./index123.cjs"),I=[],O=[],w=[],B=BigInt(0),f=BigInt(1),A=BigInt(2),S=BigInt(7),H=BigInt(256),T=BigInt(113);for(let i=0,t=f,s=1,n=0;i<24;i++){[s,n]=[n,(2*s+3*n)%5],I.push(2*(5*n+s)),O.push((i+1)*(i+2)/2%64);let o=B;for(let r=0;r<7;r++)t=(t<<f^(t>>S)*T)%H,t&A&&(o^=f<<(f<<BigInt(r))-f);w.push(o)}const[m,E]=a.split(w,!0),y=(i,t,s)=>s>32?a.rotlBH(i,t,s):a.rotlSH(i,t,s),b=(i,t,s)=>s>32?a.rotlBL(i,t,s):a.rotlSL(i,t,s);function L(i,t=24){const s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let e=0;e<10;e++)s[e]=i[e]^i[e+10]^i[e+20]^i[e+30]^i[e+40];for(let e=0;e<10;e+=2){const h=(e+8)%10,p=(e+2)%10,d=s[p],u=s[p+1],_=y(d,u,1)^s[h],g=b(d,u,1)^s[h+1];for(let k=0;k<50;k+=10)i[e+k]^=_,i[e+k+1]^=g}let o=i[2],r=i[3];for(let e=0;e<24;e++){const h=O[e],p=y(o,r,h),d=b(o,r,h),u=I[e];o=i[u],r=i[u+1],i[u]=p,i[u+1]=d}for(let e=0;e<50;e+=10){for(let h=0;h<10;h++)s[h]=i[e+h];for(let h=0;h<10;h++)i[e+h]^=~s[(h+2)%10]&s[(h+4)%10]}i[0]^=m[n],i[1]^=E[n]}s.fill(0)}class x extends c.Hash{constructor(t,s,n,o=!1,r=24){if(super(),this.blockLen=t,this.suffix=s,this.outputLen=n,this.enableXOF=o,this.rounds=r,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,l.number(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=c.u32(this.state)}keccak(){c.isLE||c.byteSwap32(this.state32),L(this.state32,this.rounds),c.isLE||c.byteSwap32(this.state32),this.posOut=0,this.pos=0}update(t){l.exists(this);const{blockLen:s,state:n}=this;t=c.toBytes(t);const o=t.length;for(let r=0;r<o;){const e=Math.min(s-this.pos,o-r);for(let h=0;h<e;h++)n[this.pos++]^=t[r++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:s,pos:n,blockLen:o}=this;t[n]^=s,s&128&&n===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){l.exists(this,!1),l.bytes(t),this.finish();const s=this.state,{blockLen:n}=this;for(let o=0,r=t.length;o<r;){this.posOut>=n&&this.keccak();const e=Math.min(n-this.posOut,r-o);t.set(s.subarray(this.posOut,this.posOut+e),o),this.posOut+=e,o+=e}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return l.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(l.output(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:s,suffix:n,outputLen:o,rounds:r,enableXOF:e}=this;return t||(t=new x(s,n,o,e,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=n,t.outputLen=o,t.enableXOF=e,t.destroyed=this.destroyed,t}}const F=(i,t,s)=>c.wrapConstructor(()=>new x(t,i,s)),P=F(1,136,256/8);exports.Keccak=x;exports.keccakP=L;exports.keccak_256=P;
package/dist/index125.js DELETED
@@ -1,107 +0,0 @@
1
- import { number as d, exists as k, bytes as B, output as A } from "./index129.js";
2
- import { split as H, rotlBH as m, rotlSH as S, rotlBL as T, rotlSL as F } from "./index138.js";
3
- import { wrapConstructor as X, Hash as E, u32 as U, isLE as x, byteSwap32 as I, toBytes as P } from "./index123.js";
4
- const y = [], L = [], b = [], M = /* @__PURE__ */ BigInt(0), f = /* @__PURE__ */ BigInt(1), R = /* @__PURE__ */ BigInt(2), j = /* @__PURE__ */ BigInt(7), C = /* @__PURE__ */ BigInt(256), q = /* @__PURE__ */ BigInt(113);
5
- for (let e = 0, t = f, s = 1, n = 0; e < 24; e++) {
6
- [s, n] = [n, (2 * s + 3 * n) % 5], y.push(2 * (5 * n + s)), L.push((e + 1) * (e + 2) / 2 % 64);
7
- let o = M;
8
- for (let r = 0; r < 7; r++)
9
- t = (t << f ^ (t >> j) * q) % C, t & R && (o ^= f << (f << /* @__PURE__ */ BigInt(r)) - f);
10
- b.push(o);
11
- }
12
- const [v, z] = /* @__PURE__ */ H(b, !0), O = (e, t, s) => s > 32 ? m(e, t, s) : S(e, t, s), w = (e, t, s) => s > 32 ? T(e, t, s) : F(e, t, s);
13
- function D(e, t = 24) {
14
- const s = new Uint32Array(10);
15
- for (let n = 24 - t; n < 24; n++) {
16
- for (let i = 0; i < 10; i++)
17
- s[i] = e[i] ^ e[i + 10] ^ e[i + 20] ^ e[i + 30] ^ e[i + 40];
18
- for (let i = 0; i < 10; i += 2) {
19
- const h = (i + 8) % 10, l = (i + 2) % 10, u = s[l], c = s[l + 1], _ = O(u, c, 1) ^ s[h], g = w(u, c, 1) ^ s[h + 1];
20
- for (let a = 0; a < 50; a += 10)
21
- e[i + a] ^= _, e[i + a + 1] ^= g;
22
- }
23
- let o = e[2], r = e[3];
24
- for (let i = 0; i < 24; i++) {
25
- const h = L[i], l = O(o, r, h), u = w(o, r, h), c = y[i];
26
- o = e[c], r = e[c + 1], e[c] = l, e[c + 1] = u;
27
- }
28
- for (let i = 0; i < 50; i += 10) {
29
- for (let h = 0; h < 10; h++)
30
- s[h] = e[i + h];
31
- for (let h = 0; h < 10; h++)
32
- e[i + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
33
- }
34
- e[0] ^= v[n], e[1] ^= z[n];
35
- }
36
- s.fill(0);
37
- }
38
- class p extends E {
39
- // NOTE: we accept arguments in bytes instead of bits here.
40
- constructor(t, s, n, o = !1, r = 24) {
41
- if (super(), this.blockLen = t, this.suffix = s, this.outputLen = n, this.enableXOF = o, this.rounds = r, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, d(n), 0 >= this.blockLen || this.blockLen >= 200)
42
- throw new Error("Sha3 supports only keccak-f1600 function");
43
- this.state = new Uint8Array(200), this.state32 = U(this.state);
44
- }
45
- keccak() {
46
- x || I(this.state32), D(this.state32, this.rounds), x || I(this.state32), this.posOut = 0, this.pos = 0;
47
- }
48
- update(t) {
49
- k(this);
50
- const { blockLen: s, state: n } = this;
51
- t = P(t);
52
- const o = t.length;
53
- for (let r = 0; r < o; ) {
54
- const i = Math.min(s - this.pos, o - r);
55
- for (let h = 0; h < i; h++)
56
- n[this.pos++] ^= t[r++];
57
- this.pos === s && this.keccak();
58
- }
59
- return this;
60
- }
61
- finish() {
62
- if (this.finished)
63
- return;
64
- this.finished = !0;
65
- const { state: t, suffix: s, pos: n, blockLen: o } = this;
66
- t[n] ^= s, s & 128 && n === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
67
- }
68
- writeInto(t) {
69
- k(this, !1), B(t), this.finish();
70
- const s = this.state, { blockLen: n } = this;
71
- for (let o = 0, r = t.length; o < r; ) {
72
- this.posOut >= n && this.keccak();
73
- const i = Math.min(n - this.posOut, r - o);
74
- t.set(s.subarray(this.posOut, this.posOut + i), o), this.posOut += i, o += i;
75
- }
76
- return t;
77
- }
78
- xofInto(t) {
79
- if (!this.enableXOF)
80
- throw new Error("XOF is not possible for this instance");
81
- return this.writeInto(t);
82
- }
83
- xof(t) {
84
- return d(t), this.xofInto(new Uint8Array(t));
85
- }
86
- digestInto(t) {
87
- if (A(t, this), this.finished)
88
- throw new Error("digest() was already called");
89
- return this.writeInto(t), this.destroy(), t;
90
- }
91
- digest() {
92
- return this.digestInto(new Uint8Array(this.outputLen));
93
- }
94
- destroy() {
95
- this.destroyed = !0, this.state.fill(0);
96
- }
97
- _cloneInto(t) {
98
- const { blockLen: s, suffix: n, outputLen: o, rounds: r, enableXOF: i } = this;
99
- return t || (t = new p(s, n, o, i, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = n, t.outputLen = o, t.enableXOF = i, t.destroyed = this.destroyed, t;
100
- }
101
- }
102
- const G = (e, t, s) => X(() => new p(t, e, s)), Q = /* @__PURE__ */ G(1, 136, 256 / 8);
103
- export {
104
- p as Keccak,
105
- D as keccakP,
106
- Q as keccak_256
107
- };
package/dist/index126.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index130.cjs"),_=require("./index131.cjs"),t=require("./index132.cjs"),i=require("./index133.cjs"),s=require("./index134.cjs"),u=require("./index135.cjs"),n=require("./index136.cjs"),o=require("./index137.cjs");(function(a,e){e=a.exports=_.__require(),e.Stream=e,e.Readable=e,e.Writable=t.__require(),e.Duplex=i.__require(),e.Transform=s._stream_transform,e.PassThrough=u._stream_passthrough,e.finished=n.endOfStream,e.pipeline=o.pipeline_1})(r.__module,r.__module.exports);var l=r.__module.exports;exports.readableBrowserExports=l;
package/dist/index126.js DELETED
@@ -1,15 +0,0 @@
1
- import { __module as e } from "./index130.js";
2
- import { __require as m } from "./index131.js";
3
- import { __require as i } from "./index132.js";
4
- import { __require as _ } from "./index133.js";
5
- import { _ as o } from "./index134.js";
6
- import { _ as s } from "./index135.js";
7
- import { e as t } from "./index136.js";
8
- import { p as f } from "./index137.js";
9
- (function(a, r) {
10
- r = a.exports = m(), r.Stream = r, r.Readable = r, r.Writable = i(), r.Duplex = _(), r.Transform = o, r.PassThrough = s, r.finished = t, r.pipeline = f;
11
- })(e, e.exports);
12
- var w = e.exports;
13
- export {
14
- w as r
15
- };
package/dist/index127.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index45.cjs");var n=a.safeBufferExports.Buffer;function f(t,i){this._block=n.alloc(t),this._finalSize=i,this._blockSize=t,this._len=0}f.prototype.update=function(t,i){typeof t=="string"&&(i=i||"utf8",t=n.from(t,i));for(var e=this._block,h=this._blockSize,s=t.length,r=this._len,l=0;l<s;){for(var c=r%h,_=Math.min(s-l,h-c),o=0;o<_;o++)e[c+o]=t[l+o];r+=_,l+=_,r%h===0&&this._update(e)}return this._len+=s,this};f.prototype.digest=function(t){var i=this._len%this._blockSize;this._block[i]=128,this._block.fill(0,i+1),i>=this._finalSize&&(this._update(this._block),this._block.fill(0));var e=this._len*8;if(e<=4294967295)this._block.writeUInt32BE(e,this._blockSize-4);else{var h=(e&4294967295)>>>0,s=(e-h)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(h,this._blockSize-4)}this._update(this._block);var r=this._hash();return t?r.toString(t):r};f.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var b=f;exports.hash=b;
package/dist/index127.js DELETED
@@ -1,35 +0,0 @@
1
- import { s as b } from "./index45.js";
2
- var c = b.Buffer;
3
- function e(t, i) {
4
- this._block = c.alloc(t), this._finalSize = i, this._blockSize = t, this._len = 0;
5
- }
6
- e.prototype.update = function(t, i) {
7
- typeof t == "string" && (i = i || "utf8", t = c.from(t, i));
8
- for (var h = this._block, s = this._blockSize, f = t.length, r = this._len, o = 0; o < f; ) {
9
- for (var a = r % s, _ = Math.min(f - o, s - a), l = 0; l < _; l++)
10
- h[a + l] = t[o + l];
11
- r += _, o += _, r % s === 0 && this._update(h);
12
- }
13
- return this._len += f, this;
14
- };
15
- e.prototype.digest = function(t) {
16
- var i = this._len % this._blockSize;
17
- this._block[i] = 128, this._block.fill(0, i + 1), i >= this._finalSize && (this._update(this._block), this._block.fill(0));
18
- var h = this._len * 8;
19
- if (h <= 4294967295)
20
- this._block.writeUInt32BE(h, this._blockSize - 4);
21
- else {
22
- var s = (h & 4294967295) >>> 0, f = (h - s) / 4294967296;
23
- this._block.writeUInt32BE(f, this._blockSize - 8), this._block.writeUInt32BE(s, this._blockSize - 4);
24
- }
25
- this._update(this._block);
26
- var r = this._hash();
27
- return t ? r.toString(t) : r;
28
- };
29
- e.prototype._update = function() {
30
- throw new Error("_update must be implemented by subclass");
31
- };
32
- var u = e;
33
- export {
34
- u as h
35
- };
package/dist/index128.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";const t={};module.exports=t;
package/dist/index128.js DELETED
@@ -1,4 +0,0 @@
1
- const e = {};
2
- export {
3
- e as default
4
- };
package/dist/index129.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function n(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function o(e,...t){if(!n(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}exports.bytes=o;exports.exists=s;exports.isBytes=n;exports.number=i;exports.output=u;
package/dist/index129.js DELETED
@@ -1,32 +0,0 @@
1
- function i(e) {
2
- if (!Number.isSafeInteger(e) || e < 0)
3
- throw new Error(`positive integer expected, not ${e}`);
4
- }
5
- function n(e) {
6
- return e instanceof Uint8Array || e != null && typeof e == "object" && e.constructor.name === "Uint8Array";
7
- }
8
- function o(e, ...t) {
9
- if (!n(e))
10
- throw new Error("Uint8Array expected");
11
- if (t.length > 0 && !t.includes(e.length))
12
- throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`);
13
- }
14
- function f(e, t = !0) {
15
- if (e.destroyed)
16
- throw new Error("Hash instance has been destroyed");
17
- if (t && e.finished)
18
- throw new Error("Hash#digest() has already been called");
19
- }
20
- function s(e, t) {
21
- o(e);
22
- const r = t.outputLen;
23
- if (e.length < r)
24
- throw new Error(`digestInto() expects output buffer of length at least ${r}`);
25
- }
26
- export {
27
- o as bytes,
28
- f as exists,
29
- n as isBytes,
30
- i as number,
31
- s as output
32
- };
package/dist/index13.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=[{inputs:[{internalType:"address",name:"token_",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"InvalidShortString",type:"error"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"StringTooLong",type:"error"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"orderID",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"secretHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Initiated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"orderID",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"secretHash",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"secret",type:"bytes"}],name:"Redeemed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"orderID",type:"bytes32"}],name:"Refunded",type:"event"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"redeemer",type:"address"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"secretHash",type:"bytes32"}],name:"initiate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"redeemer",type:"address"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"secretHash",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"initiateWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"orderID",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"instantRefund",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"redeemer",type:"address"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"secretHash",type:"bytes32"},{internalType:"bytes",name:"signature",type:"bytes"}],internalType:"struct HTLC.InitWithSig[]",name:"inits",type:"tuple[]"},{components:[{internalType:"bytes32",name:"orderID",type:"bytes32"},{internalType:"bytes",name:"secret",type:"bytes"}],internalType:"struct HTLC.Redeem[]",name:"redeems",type:"tuple[]"},{components:[{internalType:"bytes32",name:"orderID",type:"bytes32"}],internalType:"struct HTLC.Refund[]",name:"refunds",type:"tuple[]"}],name:"multicall",outputs:[{internalType:"bool[]",name:"results",type:"bool[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"orders",outputs:[{internalType:"bool",name:"isFulfilled",type:"bool"},{internalType:"address",name:"initiator",type:"address"},{internalType:"address",name:"redeemer",type:"address"},{internalType:"uint256",name:"initiatedAt",type:"uint256"},{internalType:"uint256",name:"timelock",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"orderID",type:"bytes32"},{internalType:"bytes",name:"secret",type:"bytes"}],name:"redeem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"orderID",type:"bytes32"}],name:"refund",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"token",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"}];exports.AtomicSwapABI=e;
package/dist/index13.js DELETED
@@ -1,396 +0,0 @@
1
- const e = [
2
- {
3
- inputs: [
4
- {
5
- internalType: "address",
6
- name: "token_",
7
- type: "address"
8
- },
9
- {
10
- internalType: "string",
11
- name: "name",
12
- type: "string"
13
- },
14
- {
15
- internalType: "string",
16
- name: "version",
17
- type: "string"
18
- }
19
- ],
20
- stateMutability: "nonpayable",
21
- type: "constructor"
22
- },
23
- {
24
- inputs: [],
25
- name: "InvalidShortString",
26
- type: "error"
27
- },
28
- {
29
- inputs: [
30
- {
31
- internalType: "string",
32
- name: "str",
33
- type: "string"
34
- }
35
- ],
36
- name: "StringTooLong",
37
- type: "error"
38
- },
39
- {
40
- anonymous: !1,
41
- inputs: [],
42
- name: "EIP712DomainChanged",
43
- type: "event"
44
- },
45
- {
46
- anonymous: !1,
47
- inputs: [
48
- {
49
- indexed: !0,
50
- internalType: "bytes32",
51
- name: "orderID",
52
- type: "bytes32"
53
- },
54
- {
55
- indexed: !0,
56
- internalType: "bytes32",
57
- name: "secretHash",
58
- type: "bytes32"
59
- },
60
- {
61
- indexed: !1,
62
- internalType: "uint256",
63
- name: "amount",
64
- type: "uint256"
65
- }
66
- ],
67
- name: "Initiated",
68
- type: "event"
69
- },
70
- {
71
- anonymous: !1,
72
- inputs: [
73
- {
74
- indexed: !0,
75
- internalType: "bytes32",
76
- name: "orderID",
77
- type: "bytes32"
78
- },
79
- {
80
- indexed: !0,
81
- internalType: "bytes32",
82
- name: "secretHash",
83
- type: "bytes32"
84
- },
85
- {
86
- indexed: !1,
87
- internalType: "bytes",
88
- name: "secret",
89
- type: "bytes"
90
- }
91
- ],
92
- name: "Redeemed",
93
- type: "event"
94
- },
95
- {
96
- anonymous: !1,
97
- inputs: [
98
- {
99
- indexed: !0,
100
- internalType: "bytes32",
101
- name: "orderID",
102
- type: "bytes32"
103
- }
104
- ],
105
- name: "Refunded",
106
- type: "event"
107
- },
108
- {
109
- inputs: [],
110
- name: "eip712Domain",
111
- outputs: [
112
- {
113
- internalType: "bytes1",
114
- name: "fields",
115
- type: "bytes1"
116
- },
117
- {
118
- internalType: "string",
119
- name: "name",
120
- type: "string"
121
- },
122
- {
123
- internalType: "string",
124
- name: "version",
125
- type: "string"
126
- },
127
- {
128
- internalType: "uint256",
129
- name: "chainId",
130
- type: "uint256"
131
- },
132
- {
133
- internalType: "address",
134
- name: "verifyingContract",
135
- type: "address"
136
- },
137
- {
138
- internalType: "bytes32",
139
- name: "salt",
140
- type: "bytes32"
141
- },
142
- {
143
- internalType: "uint256[]",
144
- name: "extensions",
145
- type: "uint256[]"
146
- }
147
- ],
148
- stateMutability: "view",
149
- type: "function"
150
- },
151
- {
152
- inputs: [
153
- {
154
- internalType: "address",
155
- name: "redeemer",
156
- type: "address"
157
- },
158
- {
159
- internalType: "uint256",
160
- name: "timelock",
161
- type: "uint256"
162
- },
163
- {
164
- internalType: "uint256",
165
- name: "amount",
166
- type: "uint256"
167
- },
168
- {
169
- internalType: "bytes32",
170
- name: "secretHash",
171
- type: "bytes32"
172
- }
173
- ],
174
- name: "initiate",
175
- outputs: [],
176
- stateMutability: "nonpayable",
177
- type: "function"
178
- },
179
- {
180
- inputs: [
181
- {
182
- internalType: "address",
183
- name: "redeemer",
184
- type: "address"
185
- },
186
- {
187
- internalType: "uint256",
188
- name: "timelock",
189
- type: "uint256"
190
- },
191
- {
192
- internalType: "uint256",
193
- name: "amount",
194
- type: "uint256"
195
- },
196
- {
197
- internalType: "bytes32",
198
- name: "secretHash",
199
- type: "bytes32"
200
- },
201
- {
202
- internalType: "bytes",
203
- name: "signature",
204
- type: "bytes"
205
- }
206
- ],
207
- name: "initiateWithSignature",
208
- outputs: [],
209
- stateMutability: "nonpayable",
210
- type: "function"
211
- },
212
- {
213
- inputs: [
214
- {
215
- internalType: "bytes32",
216
- name: "orderID",
217
- type: "bytes32"
218
- },
219
- {
220
- internalType: "bytes",
221
- name: "signature",
222
- type: "bytes"
223
- }
224
- ],
225
- name: "instantRefund",
226
- outputs: [],
227
- stateMutability: "nonpayable",
228
- type: "function"
229
- },
230
- {
231
- inputs: [
232
- {
233
- components: [
234
- {
235
- internalType: "address",
236
- name: "redeemer",
237
- type: "address"
238
- },
239
- {
240
- internalType: "uint256",
241
- name: "expiry",
242
- type: "uint256"
243
- },
244
- {
245
- internalType: "uint256",
246
- name: "amount",
247
- type: "uint256"
248
- },
249
- {
250
- internalType: "bytes32",
251
- name: "secretHash",
252
- type: "bytes32"
253
- },
254
- {
255
- internalType: "bytes",
256
- name: "signature",
257
- type: "bytes"
258
- }
259
- ],
260
- internalType: "struct HTLC.InitWithSig[]",
261
- name: "inits",
262
- type: "tuple[]"
263
- },
264
- {
265
- components: [
266
- {
267
- internalType: "bytes32",
268
- name: "orderID",
269
- type: "bytes32"
270
- },
271
- {
272
- internalType: "bytes",
273
- name: "secret",
274
- type: "bytes"
275
- }
276
- ],
277
- internalType: "struct HTLC.Redeem[]",
278
- name: "redeems",
279
- type: "tuple[]"
280
- },
281
- {
282
- components: [
283
- {
284
- internalType: "bytes32",
285
- name: "orderID",
286
- type: "bytes32"
287
- }
288
- ],
289
- internalType: "struct HTLC.Refund[]",
290
- name: "refunds",
291
- type: "tuple[]"
292
- }
293
- ],
294
- name: "multicall",
295
- outputs: [
296
- {
297
- internalType: "bool[]",
298
- name: "results",
299
- type: "bool[]"
300
- }
301
- ],
302
- stateMutability: "nonpayable",
303
- type: "function"
304
- },
305
- {
306
- inputs: [
307
- {
308
- internalType: "bytes32",
309
- name: "",
310
- type: "bytes32"
311
- }
312
- ],
313
- name: "orders",
314
- outputs: [
315
- {
316
- internalType: "bool",
317
- name: "isFulfilled",
318
- type: "bool"
319
- },
320
- {
321
- internalType: "address",
322
- name: "initiator",
323
- type: "address"
324
- },
325
- {
326
- internalType: "address",
327
- name: "redeemer",
328
- type: "address"
329
- },
330
- {
331
- internalType: "uint256",
332
- name: "initiatedAt",
333
- type: "uint256"
334
- },
335
- {
336
- internalType: "uint256",
337
- name: "timelock",
338
- type: "uint256"
339
- },
340
- {
341
- internalType: "uint256",
342
- name: "amount",
343
- type: "uint256"
344
- }
345
- ],
346
- stateMutability: "view",
347
- type: "function"
348
- },
349
- {
350
- inputs: [
351
- {
352
- internalType: "bytes32",
353
- name: "orderID",
354
- type: "bytes32"
355
- },
356
- {
357
- internalType: "bytes",
358
- name: "secret",
359
- type: "bytes"
360
- }
361
- ],
362
- name: "redeem",
363
- outputs: [],
364
- stateMutability: "nonpayable",
365
- type: "function"
366
- },
367
- {
368
- inputs: [
369
- {
370
- internalType: "bytes32",
371
- name: "orderID",
372
- type: "bytes32"
373
- }
374
- ],
375
- name: "refund",
376
- outputs: [],
377
- stateMutability: "nonpayable",
378
- type: "function"
379
- },
380
- {
381
- inputs: [],
382
- name: "token",
383
- outputs: [
384
- {
385
- internalType: "contract IERC20",
386
- name: "",
387
- type: "address"
388
- }
389
- ],
390
- stateMutability: "view",
391
- type: "function"
392
- }
393
- ];
394
- export {
395
- e as AtomicSwapABI
396
- };
package/dist/index130.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
package/dist/index130.js DELETED
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };