@capxul/mcp 4.20.0-beta.4 → 4.20.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -26
- package/dist/{lib-CQFHjQEQ.mjs → lib-5nM6ORJd.mjs} +4 -4
- package/dist/{lib-DS3ZLCxu.mjs → lib-BJgR4mWJ.mjs} +5 -5
- package/dist/lib-BlUleR2B.mjs +3 -0
- package/dist/{lib-DO3Il55w.mjs → lib-BspI667y.mjs} +6 -6
- package/dist/{lib-B8j6PH9L.mjs → lib-Buegx0dz.mjs} +5 -5
- package/dist/{lib-83Fk1wWX.mjs → lib-CJw8te9L.mjs} +37 -37
- package/dist/lib-C_-etuHZ.mjs +3 -0
- package/dist/{lib-vbuHK0v7.mjs → lib-CoGPQsbr.mjs} +3 -3
- package/dist/lib-Dd_fsz7h.mjs +3 -0
- package/dist/{lib-EFzR1_47.mjs → lib-DnmstTkB.mjs} +2 -1
- package/dist/lib-IlYdzOHo.mjs +3 -0
- package/dist/main.mjs +31952 -41930
- package/dist/organizations-BXC-6y-P.mjs +41861 -0
- package/dist/permission-approvals-BNP5hA8b.mjs +137 -0
- package/dist/secp256k1-CLeVBma1.mjs +2 -0
- package/dist/{secp256k1-oe2FO-K6.mjs → secp256k1-vkvPWdOZ.mjs} +4 -424
- package/dist/{esm-DUNJOL6b.mjs → sentryClient-CN-gBjYx.mjs} +98 -1
- package/dist/sha2-D5rBHwg7.mjs +422 -0
- package/package.json +13 -9
- package/dist/lib-BNmz42MT.mjs +0 -3
- package/dist/lib-DRIaj4W_.mjs +0 -3
- package/dist/lib-DZmUoBjo.mjs +0 -3
- package/dist/lib-F14n2Pis.mjs +0 -3
- package/dist/secp256k1-CYG6Mi0X.mjs +0 -2
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import * as nc from "node:crypto";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/cryptoNode.js
|
|
3
|
+
/**
|
|
4
|
+
* Internal webcrypto alias.
|
|
5
|
+
* We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.
|
|
6
|
+
* Falls back to Node.js built-in crypto for Node.js <=v14.
|
|
7
|
+
* See utils.ts for details.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
const crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
13
|
+
/**
|
|
14
|
+
* Utilities for hex, bytes, CSPRNG.
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
18
|
+
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
19
|
+
function isBytes(a) {
|
|
20
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
21
|
+
}
|
|
22
|
+
/** Asserts something is positive integer. */
|
|
23
|
+
function anumber(n) {
|
|
24
|
+
if (!Number.isSafeInteger(n) || n < 0) throw new Error("positive integer expected, got " + n);
|
|
25
|
+
}
|
|
26
|
+
/** Asserts something is Uint8Array. */
|
|
27
|
+
function abytes(b, ...lengths) {
|
|
28
|
+
if (!isBytes(b)) throw new Error("Uint8Array expected");
|
|
29
|
+
if (lengths.length > 0 && !lengths.includes(b.length)) throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
30
|
+
}
|
|
31
|
+
/** Asserts something is hash */
|
|
32
|
+
function ahash(h) {
|
|
33
|
+
if (typeof h !== "function" || typeof h.create !== "function") throw new Error("Hash should be wrapped by utils.createHasher");
|
|
34
|
+
anumber(h.outputLen);
|
|
35
|
+
anumber(h.blockLen);
|
|
36
|
+
}
|
|
37
|
+
/** Asserts a hash instance has not been destroyed / finished */
|
|
38
|
+
function aexists(instance, checkFinished = true) {
|
|
39
|
+
if (instance.destroyed) throw new Error("Hash instance has been destroyed");
|
|
40
|
+
if (checkFinished && instance.finished) throw new Error("Hash#digest() has already been called");
|
|
41
|
+
}
|
|
42
|
+
/** Asserts output is properly-sized byte array */
|
|
43
|
+
function aoutput(out, instance) {
|
|
44
|
+
abytes(out);
|
|
45
|
+
const min = instance.outputLen;
|
|
46
|
+
if (out.length < min) throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
47
|
+
}
|
|
48
|
+
/** Cast u8 / u16 / u32 to u32. */
|
|
49
|
+
function u32(arr) {
|
|
50
|
+
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
51
|
+
}
|
|
52
|
+
/** Zeroize a byte array. Warning: JS provides no guarantees. */
|
|
53
|
+
function clean(...arrays) {
|
|
54
|
+
for (let i = 0; i < arrays.length; i++) arrays[i].fill(0);
|
|
55
|
+
}
|
|
56
|
+
/** Create DataView of an array for easy byte-level manipulation. */
|
|
57
|
+
function createView(arr) {
|
|
58
|
+
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
59
|
+
}
|
|
60
|
+
/** The rotate right (circular right shift) operation for uint32 */
|
|
61
|
+
function rotr(word, shift) {
|
|
62
|
+
return word << 32 - shift | word >>> shift;
|
|
63
|
+
}
|
|
64
|
+
/** Is current platform little-endian? Most are. Big-Endian platform: IBM */
|
|
65
|
+
const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
66
|
+
/** The byte swap operation for uint32 */
|
|
67
|
+
function byteSwap(word) {
|
|
68
|
+
return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
|
69
|
+
}
|
|
70
|
+
/** In place byte swap for Uint32Array */
|
|
71
|
+
function byteSwap32(arr) {
|
|
72
|
+
for (let i = 0; i < arr.length; i++) arr[i] = byteSwap(arr[i]);
|
|
73
|
+
return arr;
|
|
74
|
+
}
|
|
75
|
+
const swap32IfBE = isLE ? (u) => u : byteSwap32;
|
|
76
|
+
/**
|
|
77
|
+
* Converts string to bytes using UTF8 encoding.
|
|
78
|
+
* @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])
|
|
79
|
+
*/
|
|
80
|
+
function utf8ToBytes(str) {
|
|
81
|
+
if (typeof str !== "string") throw new Error("string expected");
|
|
82
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Normalizes (non-hex) string or Uint8Array to Uint8Array.
|
|
86
|
+
* Warning: when Uint8Array is passed, it would NOT get copied.
|
|
87
|
+
* Keep in mind for future mutable operations.
|
|
88
|
+
*/
|
|
89
|
+
function toBytes(data) {
|
|
90
|
+
if (typeof data === "string") data = utf8ToBytes(data);
|
|
91
|
+
abytes(data);
|
|
92
|
+
return data;
|
|
93
|
+
}
|
|
94
|
+
/** Copies several Uint8Arrays into one. */
|
|
95
|
+
function concatBytes(...arrays) {
|
|
96
|
+
let sum = 0;
|
|
97
|
+
for (let i = 0; i < arrays.length; i++) {
|
|
98
|
+
const a = arrays[i];
|
|
99
|
+
abytes(a);
|
|
100
|
+
sum += a.length;
|
|
101
|
+
}
|
|
102
|
+
const res = new Uint8Array(sum);
|
|
103
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
|
104
|
+
const a = arrays[i];
|
|
105
|
+
res.set(a, pad);
|
|
106
|
+
pad += a.length;
|
|
107
|
+
}
|
|
108
|
+
return res;
|
|
109
|
+
}
|
|
110
|
+
/** For runtime check if class implements interface */
|
|
111
|
+
var Hash = class {};
|
|
112
|
+
/** Wraps hash function, creating an interface on top of it */
|
|
113
|
+
function createHasher(hashCons) {
|
|
114
|
+
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
115
|
+
const tmp = hashCons();
|
|
116
|
+
hashC.outputLen = tmp.outputLen;
|
|
117
|
+
hashC.blockLen = tmp.blockLen;
|
|
118
|
+
hashC.create = () => hashCons();
|
|
119
|
+
return hashC;
|
|
120
|
+
}
|
|
121
|
+
/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */
|
|
122
|
+
function randomBytes(bytesLength = 32) {
|
|
123
|
+
if (crypto && typeof crypto.getRandomValues === "function") return crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
124
|
+
if (crypto && typeof crypto.randomBytes === "function") return Uint8Array.from(crypto.randomBytes(bytesLength));
|
|
125
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
|
|
129
|
+
/**
|
|
130
|
+
* Internal Merkle-Damgard hash utils.
|
|
131
|
+
* @module
|
|
132
|
+
*/
|
|
133
|
+
/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
|
|
134
|
+
function setBigUint64(view, byteOffset, value, isLE) {
|
|
135
|
+
if (typeof view.setBigUint64 === "function") return view.setBigUint64(byteOffset, value, isLE);
|
|
136
|
+
const _32n = BigInt(32);
|
|
137
|
+
const _u32_max = BigInt(4294967295);
|
|
138
|
+
const wh = Number(value >> _32n & _u32_max);
|
|
139
|
+
const wl = Number(value & _u32_max);
|
|
140
|
+
const h = isLE ? 4 : 0;
|
|
141
|
+
const l = isLE ? 0 : 4;
|
|
142
|
+
view.setUint32(byteOffset + h, wh, isLE);
|
|
143
|
+
view.setUint32(byteOffset + l, wl, isLE);
|
|
144
|
+
}
|
|
145
|
+
/** Choice: a ? b : c */
|
|
146
|
+
function Chi(a, b, c) {
|
|
147
|
+
return a & b ^ ~a & c;
|
|
148
|
+
}
|
|
149
|
+
/** Majority function, true if any two inputs is true. */
|
|
150
|
+
function Maj(a, b, c) {
|
|
151
|
+
return a & b ^ a & c ^ b & c;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Merkle-Damgard hash construction base class.
|
|
155
|
+
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
|
|
156
|
+
*/
|
|
157
|
+
var HashMD = class extends Hash {
|
|
158
|
+
constructor(blockLen, outputLen, padOffset, isLE) {
|
|
159
|
+
super();
|
|
160
|
+
this.finished = false;
|
|
161
|
+
this.length = 0;
|
|
162
|
+
this.pos = 0;
|
|
163
|
+
this.destroyed = false;
|
|
164
|
+
this.blockLen = blockLen;
|
|
165
|
+
this.outputLen = outputLen;
|
|
166
|
+
this.padOffset = padOffset;
|
|
167
|
+
this.isLE = isLE;
|
|
168
|
+
this.buffer = new Uint8Array(blockLen);
|
|
169
|
+
this.view = createView(this.buffer);
|
|
170
|
+
}
|
|
171
|
+
update(data) {
|
|
172
|
+
aexists(this);
|
|
173
|
+
data = toBytes(data);
|
|
174
|
+
abytes(data);
|
|
175
|
+
const { view, buffer, blockLen } = this;
|
|
176
|
+
const len = data.length;
|
|
177
|
+
for (let pos = 0; pos < len;) {
|
|
178
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
179
|
+
if (take === blockLen) {
|
|
180
|
+
const dataView = createView(data);
|
|
181
|
+
for (; blockLen <= len - pos; pos += blockLen) this.process(dataView, pos);
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
buffer.set(data.subarray(pos, pos + take), this.pos);
|
|
185
|
+
this.pos += take;
|
|
186
|
+
pos += take;
|
|
187
|
+
if (this.pos === blockLen) {
|
|
188
|
+
this.process(view, 0);
|
|
189
|
+
this.pos = 0;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
this.length += data.length;
|
|
193
|
+
this.roundClean();
|
|
194
|
+
return this;
|
|
195
|
+
}
|
|
196
|
+
digestInto(out) {
|
|
197
|
+
aexists(this);
|
|
198
|
+
aoutput(out, this);
|
|
199
|
+
this.finished = true;
|
|
200
|
+
const { buffer, view, blockLen, isLE } = this;
|
|
201
|
+
let { pos } = this;
|
|
202
|
+
buffer[pos++] = 128;
|
|
203
|
+
clean(this.buffer.subarray(pos));
|
|
204
|
+
if (this.padOffset > blockLen - pos) {
|
|
205
|
+
this.process(view, 0);
|
|
206
|
+
pos = 0;
|
|
207
|
+
}
|
|
208
|
+
for (let i = pos; i < blockLen; i++) buffer[i] = 0;
|
|
209
|
+
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
|
|
210
|
+
this.process(view, 0);
|
|
211
|
+
const oview = createView(out);
|
|
212
|
+
const len = this.outputLen;
|
|
213
|
+
if (len % 4) throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
214
|
+
const outLen = len / 4;
|
|
215
|
+
const state = this.get();
|
|
216
|
+
if (outLen > state.length) throw new Error("_sha2: outputLen bigger than state");
|
|
217
|
+
for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);
|
|
218
|
+
}
|
|
219
|
+
digest() {
|
|
220
|
+
const { buffer, outputLen } = this;
|
|
221
|
+
this.digestInto(buffer);
|
|
222
|
+
const res = buffer.slice(0, outputLen);
|
|
223
|
+
this.destroy();
|
|
224
|
+
return res;
|
|
225
|
+
}
|
|
226
|
+
_cloneInto(to) {
|
|
227
|
+
to || (to = new this.constructor());
|
|
228
|
+
to.set(...this.get());
|
|
229
|
+
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
|
230
|
+
to.destroyed = destroyed;
|
|
231
|
+
to.finished = finished;
|
|
232
|
+
to.length = length;
|
|
233
|
+
to.pos = pos;
|
|
234
|
+
if (length % blockLen) to.buffer.set(buffer);
|
|
235
|
+
return to;
|
|
236
|
+
}
|
|
237
|
+
clone() {
|
|
238
|
+
return this._cloneInto();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
|
|
243
|
+
* Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
|
|
244
|
+
*/
|
|
245
|
+
/** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */
|
|
246
|
+
const SHA256_IV = /* @__PURE__ */ Uint32Array.from([
|
|
247
|
+
1779033703,
|
|
248
|
+
3144134277,
|
|
249
|
+
1013904242,
|
|
250
|
+
2773480762,
|
|
251
|
+
1359893119,
|
|
252
|
+
2600822924,
|
|
253
|
+
528734635,
|
|
254
|
+
1541459225
|
|
255
|
+
]);
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
|
|
258
|
+
/**
|
|
259
|
+
* SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
|
|
260
|
+
* SHA256 is the fastest hash implementable in JS, even faster than Blake3.
|
|
261
|
+
* Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
|
|
262
|
+
* [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
|
|
263
|
+
* @module
|
|
264
|
+
*/
|
|
265
|
+
/**
|
|
266
|
+
* Round constants:
|
|
267
|
+
* First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)
|
|
268
|
+
*/
|
|
269
|
+
const SHA256_K = /* @__PURE__ */ Uint32Array.from([
|
|
270
|
+
1116352408,
|
|
271
|
+
1899447441,
|
|
272
|
+
3049323471,
|
|
273
|
+
3921009573,
|
|
274
|
+
961987163,
|
|
275
|
+
1508970993,
|
|
276
|
+
2453635748,
|
|
277
|
+
2870763221,
|
|
278
|
+
3624381080,
|
|
279
|
+
310598401,
|
|
280
|
+
607225278,
|
|
281
|
+
1426881987,
|
|
282
|
+
1925078388,
|
|
283
|
+
2162078206,
|
|
284
|
+
2614888103,
|
|
285
|
+
3248222580,
|
|
286
|
+
3835390401,
|
|
287
|
+
4022224774,
|
|
288
|
+
264347078,
|
|
289
|
+
604807628,
|
|
290
|
+
770255983,
|
|
291
|
+
1249150122,
|
|
292
|
+
1555081692,
|
|
293
|
+
1996064986,
|
|
294
|
+
2554220882,
|
|
295
|
+
2821834349,
|
|
296
|
+
2952996808,
|
|
297
|
+
3210313671,
|
|
298
|
+
3336571891,
|
|
299
|
+
3584528711,
|
|
300
|
+
113926993,
|
|
301
|
+
338241895,
|
|
302
|
+
666307205,
|
|
303
|
+
773529912,
|
|
304
|
+
1294757372,
|
|
305
|
+
1396182291,
|
|
306
|
+
1695183700,
|
|
307
|
+
1986661051,
|
|
308
|
+
2177026350,
|
|
309
|
+
2456956037,
|
|
310
|
+
2730485921,
|
|
311
|
+
2820302411,
|
|
312
|
+
3259730800,
|
|
313
|
+
3345764771,
|
|
314
|
+
3516065817,
|
|
315
|
+
3600352804,
|
|
316
|
+
4094571909,
|
|
317
|
+
275423344,
|
|
318
|
+
430227734,
|
|
319
|
+
506948616,
|
|
320
|
+
659060556,
|
|
321
|
+
883997877,
|
|
322
|
+
958139571,
|
|
323
|
+
1322822218,
|
|
324
|
+
1537002063,
|
|
325
|
+
1747873779,
|
|
326
|
+
1955562222,
|
|
327
|
+
2024104815,
|
|
328
|
+
2227730452,
|
|
329
|
+
2361852424,
|
|
330
|
+
2428436474,
|
|
331
|
+
2756734187,
|
|
332
|
+
3204031479,
|
|
333
|
+
3329325298
|
|
334
|
+
]);
|
|
335
|
+
/** Reusable temporary buffer. "W" comes straight from spec. */
|
|
336
|
+
const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
|
337
|
+
var SHA256 = class extends HashMD {
|
|
338
|
+
constructor(outputLen = 32) {
|
|
339
|
+
super(64, outputLen, 8, false);
|
|
340
|
+
this.A = SHA256_IV[0] | 0;
|
|
341
|
+
this.B = SHA256_IV[1] | 0;
|
|
342
|
+
this.C = SHA256_IV[2] | 0;
|
|
343
|
+
this.D = SHA256_IV[3] | 0;
|
|
344
|
+
this.E = SHA256_IV[4] | 0;
|
|
345
|
+
this.F = SHA256_IV[5] | 0;
|
|
346
|
+
this.G = SHA256_IV[6] | 0;
|
|
347
|
+
this.H = SHA256_IV[7] | 0;
|
|
348
|
+
}
|
|
349
|
+
get() {
|
|
350
|
+
const { A, B, C, D, E, F, G, H } = this;
|
|
351
|
+
return [
|
|
352
|
+
A,
|
|
353
|
+
B,
|
|
354
|
+
C,
|
|
355
|
+
D,
|
|
356
|
+
E,
|
|
357
|
+
F,
|
|
358
|
+
G,
|
|
359
|
+
H
|
|
360
|
+
];
|
|
361
|
+
}
|
|
362
|
+
set(A, B, C, D, E, F, G, H) {
|
|
363
|
+
this.A = A | 0;
|
|
364
|
+
this.B = B | 0;
|
|
365
|
+
this.C = C | 0;
|
|
366
|
+
this.D = D | 0;
|
|
367
|
+
this.E = E | 0;
|
|
368
|
+
this.F = F | 0;
|
|
369
|
+
this.G = G | 0;
|
|
370
|
+
this.H = H | 0;
|
|
371
|
+
}
|
|
372
|
+
process(view, offset) {
|
|
373
|
+
for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
|
|
374
|
+
for (let i = 16; i < 64; i++) {
|
|
375
|
+
const W15 = SHA256_W[i - 15];
|
|
376
|
+
const W2 = SHA256_W[i - 2];
|
|
377
|
+
const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;
|
|
378
|
+
const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;
|
|
379
|
+
SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
|
|
380
|
+
}
|
|
381
|
+
let { A, B, C, D, E, F, G, H } = this;
|
|
382
|
+
for (let i = 0; i < 64; i++) {
|
|
383
|
+
const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
|
|
384
|
+
const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;
|
|
385
|
+
const T2 = (rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22)) + Maj(A, B, C) | 0;
|
|
386
|
+
H = G;
|
|
387
|
+
G = F;
|
|
388
|
+
F = E;
|
|
389
|
+
E = D + T1 | 0;
|
|
390
|
+
D = C;
|
|
391
|
+
C = B;
|
|
392
|
+
B = A;
|
|
393
|
+
A = T1 + T2 | 0;
|
|
394
|
+
}
|
|
395
|
+
A = A + this.A | 0;
|
|
396
|
+
B = B + this.B | 0;
|
|
397
|
+
C = C + this.C | 0;
|
|
398
|
+
D = D + this.D | 0;
|
|
399
|
+
E = E + this.E | 0;
|
|
400
|
+
F = F + this.F | 0;
|
|
401
|
+
G = G + this.G | 0;
|
|
402
|
+
H = H + this.H | 0;
|
|
403
|
+
this.set(A, B, C, D, E, F, G, H);
|
|
404
|
+
}
|
|
405
|
+
roundClean() {
|
|
406
|
+
clean(SHA256_W);
|
|
407
|
+
}
|
|
408
|
+
destroy() {
|
|
409
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
|
410
|
+
clean(this.buffer);
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* SHA2-256 hash function from RFC 4634.
|
|
415
|
+
*
|
|
416
|
+
* It is the fastest JS hash, even faster than Blake3.
|
|
417
|
+
* To break sha256 using birthday attack, attackers need to try 2^128 hashes.
|
|
418
|
+
* BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
|
|
419
|
+
*/
|
|
420
|
+
const sha256 = /* @__PURE__ */ createHasher(() => new SHA256());
|
|
421
|
+
//#endregion
|
|
422
|
+
export { ahash as a, clean as c, randomBytes as d, swap32IfBE as f, aexists as i, concatBytes as l, u32 as m, Hash as n, anumber as o, toBytes as p, abytes as r, aoutput as s, sha256 as t, createHasher as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/mcp",
|
|
3
|
-
"version": "4.20.0-beta.
|
|
3
|
+
"version": "4.20.0-beta.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Capxul MCP server for auth, Account readiness, identity, Organizations, relationships, requests, destinations, and testnet funding over Streamable HTTP.",
|
|
6
6
|
"keywords": [
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
34
|
"type": "module",
|
|
35
|
+
"imports": {
|
|
36
|
+
"#*": "./src/*.ts"
|
|
37
|
+
},
|
|
35
38
|
"publishConfig": {
|
|
36
39
|
"access": "public"
|
|
37
40
|
},
|
|
@@ -39,26 +42,27 @@
|
|
|
39
42
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
40
43
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
41
44
|
"@posthog/mcp": "0.13.0",
|
|
42
|
-
"effect": "4.0.0
|
|
45
|
+
"effect": "4.0.0",
|
|
43
46
|
"posthog-node": "5.51.6",
|
|
44
47
|
"zod": "^4.2.0"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
50
|
"@modelcontextprotocol/client": "^2.0.0",
|
|
51
|
+
"@total-typescript/shoehorn": "0.1.2",
|
|
48
52
|
"@types/node": "^22.15.3",
|
|
49
53
|
"tsx": "^4.19.0",
|
|
50
54
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
51
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
52
|
-
"vite-plus": "0.
|
|
53
|
-
"@capxul/
|
|
54
|
-
"@capxul/
|
|
55
|
-
"@capxul/
|
|
55
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.0.0",
|
|
56
|
+
"vite-plus": "1.0.0",
|
|
57
|
+
"@capxul/sdk": "4.20.0-beta.40",
|
|
58
|
+
"@capxul/typescript-config": "0.0.0",
|
|
59
|
+
"@capxul/protocol": "0.2.0-beta.8",
|
|
60
|
+
"@capxul/observability": "4.20.0-beta.40"
|
|
56
61
|
},
|
|
57
62
|
"scripts": {
|
|
58
63
|
"dev": "vp exec tsx src/main.ts serve",
|
|
59
|
-
"journey:staff": "vp exec bun run journeys/staff-proof.ts",
|
|
60
64
|
"check-types": "vp exec ../../node_modules/@typescript/native/bin/tsc -p tsconfig.json --noEmit",
|
|
61
|
-
"lint": "vp lint
|
|
65
|
+
"lint": "vp lint -c ../../.oxlintrc.json .",
|
|
62
66
|
"build": "NODE_OPTIONS=--max-old-space-size=12288 vp pack",
|
|
63
67
|
"_vp-tasks-allowed": "vp-allowed: `test` + `test:coverage` are defined as cache-augmented tasks in vite.config.ts so vitest's self-writes don't bust input fingerprinting (#205)."
|
|
64
68
|
}
|
package/dist/lib-BNmz42MT.mjs
DELETED
package/dist/lib-DRIaj4W_.mjs
DELETED
package/dist/lib-DZmUoBjo.mjs
DELETED
package/dist/lib-F14n2Pis.mjs
DELETED