x402-proxy 0.10.7 → 0.10.9

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 (90) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +7 -1
  3. package/dist/Credential-COZQnr1-.js +2055 -0
  4. package/dist/Mcp-CrCEqLqO.js +10 -0
  5. package/dist/Sse-ChldYgU7.js +9742 -0
  6. package/dist/Sse-kCB38G56.js +16482 -0
  7. package/dist/accounts-DsuvWwph.js +232 -0
  8. package/dist/accounts-DzvAlQRn.js +5 -0
  9. package/dist/accounts-IG-Cmrwy.js +229 -0
  10. package/dist/api-CUzmQvTQ.js +2802 -0
  11. package/dist/auth-DTzQmnZ_.js +1196 -0
  12. package/dist/bin/cli.js +585 -242
  13. package/dist/ccip-Bx-zoUCJ.js +240 -0
  14. package/dist/ccip-C2k1DD1T.js +153 -0
  15. package/dist/ccip-C6CQOJYv.js +152 -0
  16. package/dist/ccip-RZzsZ5Mv.js +156 -0
  17. package/dist/chain-CafcHffR.js +1997 -0
  18. package/dist/chain-DwfP5RGZ.js +1968 -0
  19. package/dist/chunk-DBEY4PJZ.js +16 -0
  20. package/dist/chunk-DjEMn6fM.js +36 -0
  21. package/dist/client-Blw2V7LF.js +657 -0
  22. package/dist/client-C37gWJOZ.js +102 -0
  23. package/dist/client-CEc4NYAA.js +6388 -0
  24. package/dist/client-CVDTUY0l.js +5152 -0
  25. package/dist/config-BUQsit4s.js +3 -0
  26. package/dist/config-DR1Fs_wL.js +6600 -0
  27. package/dist/{config-D9wIR3xc.js → config-rvKA3SYT.js} +10 -5
  28. package/dist/decodeFunctionData-DuFcwhC_.js +4510 -0
  29. package/dist/decodeFunctionData-JPOUdvil.js +4394 -0
  30. package/dist/derive-DNUl8LU9.js +9109 -0
  31. package/dist/dist-C2YO6HSQ.js +6581 -0
  32. package/dist/dist-DM5_F3r5.js +4 -0
  33. package/dist/dist-DxJCYyL5.js +1388 -0
  34. package/dist/hashTypedData-BHmP9dBd.js +859 -0
  35. package/dist/hashTypedData-CtEdfx4y.js +846 -0
  36. package/dist/helpers-CuUSw-tH.js +7125 -0
  37. package/dist/hmac-59IlS_by.js +648 -0
  38. package/dist/http-BAtucMbS.js +2060 -0
  39. package/dist/index.d.ts +1903 -9
  40. package/dist/index.js +18006 -50
  41. package/dist/index.node-CxkL0OFh.js +3592 -0
  42. package/dist/index.node-DvmeuZBj.js +3 -0
  43. package/dist/isAddressEqual-BLrd1Hg1.js +9 -0
  44. package/dist/isAddressEqual-DsAqfQOD.js +10 -0
  45. package/dist/localBatchGatewayRequest-C-RPJyDO.js +6260 -0
  46. package/dist/localBatchGatewayRequest-DOdQ9bR7.js +93 -0
  47. package/dist/localBatchGatewayRequest-DQkbZaSy.js +6261 -0
  48. package/dist/parseUnits-CApwcKSD.js +49 -0
  49. package/dist/parseUnits-cMO2udMe.js +48 -0
  50. package/dist/schemas-BxMFYNbH.js +1270 -0
  51. package/dist/secp256k1-BZpiyffY.js +2525 -0
  52. package/dist/secp256k1-BjenrLl5.js +1877 -0
  53. package/dist/secp256k1-CLPUX17u.js +3 -0
  54. package/dist/sendRawTransactionSync-DvSkhZtW.js +3612 -0
  55. package/dist/server-CSq0IuUq.js +565 -0
  56. package/dist/setup-BY4J49Lv.js +1110 -0
  57. package/dist/setup-wMOAgrsN.js +3 -0
  58. package/dist/sha256-FAs0qeni.js +17 -0
  59. package/dist/sha3-CYkWM8Xa.js +195 -0
  60. package/dist/sha3-DbMJRJ3C.js +194 -0
  61. package/dist/sse-B4LLqBQm.js +408 -0
  62. package/dist/status-Bu23RjW6.js +3 -0
  63. package/dist/{status-DihAcUSC.js → status-X21VnGUO.js} +16 -15
  64. package/dist/stdio-BADqxZdZ.js +85 -0
  65. package/dist/streamableHttp-BHkJypcI.js +358 -0
  66. package/dist/tempo-3nttrxgQ.js +17 -0
  67. package/dist/tempo-DER0P-ul.js +18 -0
  68. package/dist/types-BEKUz-Mf.js +1240 -0
  69. package/dist/types-DatK5vR5.js +3 -0
  70. package/dist/utils-BYjkXZDF.js +444 -0
  71. package/dist/utils-SeGHMW9O.js +445 -0
  72. package/dist/wallet-DKVlrR1S.js +3 -0
  73. package/dist/wallet-DSyht15_.js +17759 -0
  74. package/package.json +18 -71
  75. package/dist/config-B_upkJeK.js +0 -66
  76. package/dist/config-Be35NM5s.js +0 -3
  77. package/dist/config-J1m-CWXT.js +0 -27
  78. package/dist/derive-CL6e8K0Z.js +0 -81
  79. package/dist/openclaw/plugin.d.ts +0 -15
  80. package/dist/openclaw/plugin.js +0 -2067
  81. package/dist/openclaw.plugin.json +0 -93
  82. package/dist/setup-CNyMLnM-.js +0 -197
  83. package/dist/setup-DTIxPe58.js +0 -3
  84. package/dist/status-DZlJ4pS7.js +0 -3
  85. package/dist/wallet-B0S-rma9.js +0 -544
  86. package/dist/wallet-DBrVZJqe.js +0 -3
  87. package/openclaw.plugin.json +0 -93
  88. package/skills/SKILL.md +0 -183
  89. package/skills/references/library.md +0 -85
  90. package/skills/references/openclaw-plugin.md +0 -145
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { t as runSetup } from "./setup-BY4J49Lv.js";
3
+ export { runSetup };
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import { n as sha256$1 } from "./hmac-59IlS_by.js";
3
+ //#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
4
+ /**
5
+ * SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.
6
+ *
7
+ * To break sha256 using birthday attack, attackers need to try 2^128 hashes.
8
+ * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
9
+ *
10
+ * Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
11
+ * @module
12
+ * @deprecated
13
+ */
14
+ /** @deprecated Use import from `noble/hashes/sha2` module */
15
+ const sha256 = sha256$1;
16
+ //#endregion
17
+ export { sha256 as t };
@@ -0,0 +1,195 @@
1
+ #!/usr/bin/env node
2
+ import { A as createHasher, C as abytes, D as aoutput, E as anumber, F as swap32IfBE, G as rotlBH, I as toBytes, J as rotlSL, K as rotlBL, L as u32, M as createXOFer, O as clean, S as Hash, q as rotlSH, tt as split, w as aexists } from "./utils-SeGHMW9O.js";
3
+ //#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js
4
+ /**
5
+ * SHA3 (keccak) hash function, based on a new "Sponge function" design.
6
+ * Different from older hashes, the internal state is bigger than output size.
7
+ *
8
+ * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
9
+ * [Website](https://keccak.team/keccak.html),
10
+ * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).
11
+ *
12
+ * Check out `sha3-addons` module for cSHAKE, k12, and others.
13
+ * @module
14
+ */
15
+ const _0n = BigInt(0);
16
+ const _1n = BigInt(1);
17
+ const _2n = BigInt(2);
18
+ const _7n = BigInt(7);
19
+ const _256n = BigInt(256);
20
+ const _0x71n = BigInt(113);
21
+ const SHA3_PI = [];
22
+ const SHA3_ROTL = [];
23
+ const _SHA3_IOTA = [];
24
+ for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
25
+ [x, y] = [y, (2 * x + 3 * y) % 5];
26
+ SHA3_PI.push(2 * (5 * y + x));
27
+ SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
28
+ let t = _0n;
29
+ for (let j = 0; j < 7; j++) {
30
+ R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
31
+ if (R & _2n) t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
32
+ }
33
+ _SHA3_IOTA.push(t);
34
+ }
35
+ const IOTAS = split(_SHA3_IOTA, true);
36
+ const SHA3_IOTA_H = IOTAS[0];
37
+ const SHA3_IOTA_L = IOTAS[1];
38
+ const rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
39
+ const rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
40
+ /** `keccakf1600` internal function, additionally allows to adjust round count. */
41
+ function keccakP(s, rounds = 24) {
42
+ const B = new Uint32Array(10);
43
+ for (let round = 24 - rounds; round < 24; round++) {
44
+ for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
45
+ for (let x = 0; x < 10; x += 2) {
46
+ const idx1 = (x + 8) % 10;
47
+ const idx0 = (x + 2) % 10;
48
+ const B0 = B[idx0];
49
+ const B1 = B[idx0 + 1];
50
+ const Th = rotlH(B0, B1, 1) ^ B[idx1];
51
+ const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
52
+ for (let y = 0; y < 50; y += 10) {
53
+ s[x + y] ^= Th;
54
+ s[x + y + 1] ^= Tl;
55
+ }
56
+ }
57
+ let curH = s[2];
58
+ let curL = s[3];
59
+ for (let t = 0; t < 24; t++) {
60
+ const shift = SHA3_ROTL[t];
61
+ const Th = rotlH(curH, curL, shift);
62
+ const Tl = rotlL(curH, curL, shift);
63
+ const PI = SHA3_PI[t];
64
+ curH = s[PI];
65
+ curL = s[PI + 1];
66
+ s[PI] = Th;
67
+ s[PI + 1] = Tl;
68
+ }
69
+ for (let y = 0; y < 50; y += 10) {
70
+ for (let x = 0; x < 10; x++) B[x] = s[y + x];
71
+ for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
72
+ }
73
+ s[0] ^= SHA3_IOTA_H[round];
74
+ s[1] ^= SHA3_IOTA_L[round];
75
+ }
76
+ clean(B);
77
+ }
78
+ /** Keccak sponge function. */
79
+ var Keccak = class Keccak extends Hash {
80
+ constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
81
+ super();
82
+ this.pos = 0;
83
+ this.posOut = 0;
84
+ this.finished = false;
85
+ this.destroyed = false;
86
+ this.enableXOF = false;
87
+ this.blockLen = blockLen;
88
+ this.suffix = suffix;
89
+ this.outputLen = outputLen;
90
+ this.enableXOF = enableXOF;
91
+ this.rounds = rounds;
92
+ anumber(outputLen);
93
+ if (!(0 < blockLen && blockLen < 200)) throw new Error("only keccak-f1600 function is supported");
94
+ this.state = new Uint8Array(200);
95
+ this.state32 = u32(this.state);
96
+ }
97
+ clone() {
98
+ return this._cloneInto();
99
+ }
100
+ keccak() {
101
+ swap32IfBE(this.state32);
102
+ keccakP(this.state32, this.rounds);
103
+ swap32IfBE(this.state32);
104
+ this.posOut = 0;
105
+ this.pos = 0;
106
+ }
107
+ update(data) {
108
+ aexists(this);
109
+ data = toBytes(data);
110
+ abytes(data);
111
+ const { blockLen, state } = this;
112
+ const len = data.length;
113
+ for (let pos = 0; pos < len;) {
114
+ const take = Math.min(blockLen - this.pos, len - pos);
115
+ for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];
116
+ if (this.pos === blockLen) this.keccak();
117
+ }
118
+ return this;
119
+ }
120
+ finish() {
121
+ if (this.finished) return;
122
+ this.finished = true;
123
+ const { state, suffix, pos, blockLen } = this;
124
+ state[pos] ^= suffix;
125
+ if ((suffix & 128) !== 0 && pos === blockLen - 1) this.keccak();
126
+ state[blockLen - 1] ^= 128;
127
+ this.keccak();
128
+ }
129
+ writeInto(out) {
130
+ aexists(this, false);
131
+ abytes(out);
132
+ this.finish();
133
+ const bufferOut = this.state;
134
+ const { blockLen } = this;
135
+ for (let pos = 0, len = out.length; pos < len;) {
136
+ if (this.posOut >= blockLen) this.keccak();
137
+ const take = Math.min(blockLen - this.posOut, len - pos);
138
+ out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
139
+ this.posOut += take;
140
+ pos += take;
141
+ }
142
+ return out;
143
+ }
144
+ xofInto(out) {
145
+ if (!this.enableXOF) throw new Error("XOF is not possible for this instance");
146
+ return this.writeInto(out);
147
+ }
148
+ xof(bytes) {
149
+ anumber(bytes);
150
+ return this.xofInto(new Uint8Array(bytes));
151
+ }
152
+ digestInto(out) {
153
+ aoutput(out, this);
154
+ if (this.finished) throw new Error("digest() was already called");
155
+ this.writeInto(out);
156
+ this.destroy();
157
+ return out;
158
+ }
159
+ digest() {
160
+ return this.digestInto(new Uint8Array(this.outputLen));
161
+ }
162
+ destroy() {
163
+ this.destroyed = true;
164
+ clean(this.state);
165
+ }
166
+ _cloneInto(to) {
167
+ const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
168
+ to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
169
+ to.state32.set(this.state32);
170
+ to.pos = this.pos;
171
+ to.posOut = this.posOut;
172
+ to.finished = this.finished;
173
+ to.rounds = rounds;
174
+ to.suffix = suffix;
175
+ to.outputLen = outputLen;
176
+ to.enableXOF = enableXOF;
177
+ to.destroyed = this.destroyed;
178
+ return to;
179
+ }
180
+ };
181
+ const gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
182
+ gen(6, 144, 224 / 8);
183
+ gen(6, 136, 256 / 8);
184
+ gen(6, 104, 384 / 8);
185
+ gen(6, 72, 512 / 8);
186
+ gen(1, 144, 224 / 8);
187
+ /** keccak-256 hash function. Different from SHA3-256. */
188
+ const keccak_256 = gen(1, 136, 256 / 8);
189
+ gen(1, 104, 384 / 8);
190
+ gen(1, 72, 512 / 8);
191
+ const genShake = (suffix, blockLen, outputLen) => createXOFer((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
192
+ genShake(31, 168, 128 / 8);
193
+ genShake(31, 136, 256 / 8);
194
+ //#endregion
195
+ export { keccak_256 as t };
@@ -0,0 +1,194 @@
1
+ import { A as createHasher, C as abytes, D as aoutput, E as anumber, F as swap32IfBE, G as rotlBH, I as toBytes, J as rotlSL, K as rotlBL, L as u32, M as createXOFer, O as clean, S as Hash, q as rotlSH, tt as split, w as aexists } from "./utils-BYjkXZDF.js";
2
+ //#region node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js
3
+ /**
4
+ * SHA3 (keccak) hash function, based on a new "Sponge function" design.
5
+ * Different from older hashes, the internal state is bigger than output size.
6
+ *
7
+ * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
8
+ * [Website](https://keccak.team/keccak.html),
9
+ * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).
10
+ *
11
+ * Check out `sha3-addons` module for cSHAKE, k12, and others.
12
+ * @module
13
+ */
14
+ const _0n = BigInt(0);
15
+ const _1n = BigInt(1);
16
+ const _2n = BigInt(2);
17
+ const _7n = BigInt(7);
18
+ const _256n = BigInt(256);
19
+ const _0x71n = BigInt(113);
20
+ const SHA3_PI = [];
21
+ const SHA3_ROTL = [];
22
+ const _SHA3_IOTA = [];
23
+ for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
24
+ [x, y] = [y, (2 * x + 3 * y) % 5];
25
+ SHA3_PI.push(2 * (5 * y + x));
26
+ SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
27
+ let t = _0n;
28
+ for (let j = 0; j < 7; j++) {
29
+ R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
30
+ if (R & _2n) t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
31
+ }
32
+ _SHA3_IOTA.push(t);
33
+ }
34
+ const IOTAS = split(_SHA3_IOTA, true);
35
+ const SHA3_IOTA_H = IOTAS[0];
36
+ const SHA3_IOTA_L = IOTAS[1];
37
+ const rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
38
+ const rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
39
+ /** `keccakf1600` internal function, additionally allows to adjust round count. */
40
+ function keccakP(s, rounds = 24) {
41
+ const B = new Uint32Array(10);
42
+ for (let round = 24 - rounds; round < 24; round++) {
43
+ for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
44
+ for (let x = 0; x < 10; x += 2) {
45
+ const idx1 = (x + 8) % 10;
46
+ const idx0 = (x + 2) % 10;
47
+ const B0 = B[idx0];
48
+ const B1 = B[idx0 + 1];
49
+ const Th = rotlH(B0, B1, 1) ^ B[idx1];
50
+ const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
51
+ for (let y = 0; y < 50; y += 10) {
52
+ s[x + y] ^= Th;
53
+ s[x + y + 1] ^= Tl;
54
+ }
55
+ }
56
+ let curH = s[2];
57
+ let curL = s[3];
58
+ for (let t = 0; t < 24; t++) {
59
+ const shift = SHA3_ROTL[t];
60
+ const Th = rotlH(curH, curL, shift);
61
+ const Tl = rotlL(curH, curL, shift);
62
+ const PI = SHA3_PI[t];
63
+ curH = s[PI];
64
+ curL = s[PI + 1];
65
+ s[PI] = Th;
66
+ s[PI + 1] = Tl;
67
+ }
68
+ for (let y = 0; y < 50; y += 10) {
69
+ for (let x = 0; x < 10; x++) B[x] = s[y + x];
70
+ for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
71
+ }
72
+ s[0] ^= SHA3_IOTA_H[round];
73
+ s[1] ^= SHA3_IOTA_L[round];
74
+ }
75
+ clean(B);
76
+ }
77
+ /** Keccak sponge function. */
78
+ var Keccak = class Keccak extends Hash {
79
+ constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
80
+ super();
81
+ this.pos = 0;
82
+ this.posOut = 0;
83
+ this.finished = false;
84
+ this.destroyed = false;
85
+ this.enableXOF = false;
86
+ this.blockLen = blockLen;
87
+ this.suffix = suffix;
88
+ this.outputLen = outputLen;
89
+ this.enableXOF = enableXOF;
90
+ this.rounds = rounds;
91
+ anumber(outputLen);
92
+ if (!(0 < blockLen && blockLen < 200)) throw new Error("only keccak-f1600 function is supported");
93
+ this.state = new Uint8Array(200);
94
+ this.state32 = u32(this.state);
95
+ }
96
+ clone() {
97
+ return this._cloneInto();
98
+ }
99
+ keccak() {
100
+ swap32IfBE(this.state32);
101
+ keccakP(this.state32, this.rounds);
102
+ swap32IfBE(this.state32);
103
+ this.posOut = 0;
104
+ this.pos = 0;
105
+ }
106
+ update(data) {
107
+ aexists(this);
108
+ data = toBytes(data);
109
+ abytes(data);
110
+ const { blockLen, state } = this;
111
+ const len = data.length;
112
+ for (let pos = 0; pos < len;) {
113
+ const take = Math.min(blockLen - this.pos, len - pos);
114
+ for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];
115
+ if (this.pos === blockLen) this.keccak();
116
+ }
117
+ return this;
118
+ }
119
+ finish() {
120
+ if (this.finished) return;
121
+ this.finished = true;
122
+ const { state, suffix, pos, blockLen } = this;
123
+ state[pos] ^= suffix;
124
+ if ((suffix & 128) !== 0 && pos === blockLen - 1) this.keccak();
125
+ state[blockLen - 1] ^= 128;
126
+ this.keccak();
127
+ }
128
+ writeInto(out) {
129
+ aexists(this, false);
130
+ abytes(out);
131
+ this.finish();
132
+ const bufferOut = this.state;
133
+ const { blockLen } = this;
134
+ for (let pos = 0, len = out.length; pos < len;) {
135
+ if (this.posOut >= blockLen) this.keccak();
136
+ const take = Math.min(blockLen - this.posOut, len - pos);
137
+ out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
138
+ this.posOut += take;
139
+ pos += take;
140
+ }
141
+ return out;
142
+ }
143
+ xofInto(out) {
144
+ if (!this.enableXOF) throw new Error("XOF is not possible for this instance");
145
+ return this.writeInto(out);
146
+ }
147
+ xof(bytes) {
148
+ anumber(bytes);
149
+ return this.xofInto(new Uint8Array(bytes));
150
+ }
151
+ digestInto(out) {
152
+ aoutput(out, this);
153
+ if (this.finished) throw new Error("digest() was already called");
154
+ this.writeInto(out);
155
+ this.destroy();
156
+ return out;
157
+ }
158
+ digest() {
159
+ return this.digestInto(new Uint8Array(this.outputLen));
160
+ }
161
+ destroy() {
162
+ this.destroyed = true;
163
+ clean(this.state);
164
+ }
165
+ _cloneInto(to) {
166
+ const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
167
+ to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
168
+ to.state32.set(this.state32);
169
+ to.pos = this.pos;
170
+ to.posOut = this.posOut;
171
+ to.finished = this.finished;
172
+ to.rounds = rounds;
173
+ to.suffix = suffix;
174
+ to.outputLen = outputLen;
175
+ to.enableXOF = enableXOF;
176
+ to.destroyed = this.destroyed;
177
+ return to;
178
+ }
179
+ };
180
+ const gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
181
+ gen(6, 144, 224 / 8);
182
+ gen(6, 136, 256 / 8);
183
+ gen(6, 104, 384 / 8);
184
+ gen(6, 72, 512 / 8);
185
+ gen(1, 144, 224 / 8);
186
+ /** keccak-256 hash function. Different from SHA3-256. */
187
+ const keccak_256 = gen(1, 136, 256 / 8);
188
+ gen(1, 104, 384 / 8);
189
+ gen(1, 72, 512 / 8);
190
+ const genShake = (suffix, blockLen, outputLen) => createXOFer((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
191
+ genShake(31, 168, 128 / 8);
192
+ genShake(31, 136, 256 / 8);
193
+ //#endregion
194
+ export { keccak_256 as t };