@humanode-hyperlane/cli 30.0.0-humanode.1 → 1045.2.0
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 +1 -1
- package/bundle/154.index.js +462 -0
- package/bundle/230.index.js +572 -0
- package/bundle/25.index.js +9569 -0
- package/bundle/{214.index.js → 308.index.js} +192 -88
- package/bundle/367.index.js +4 -0
- package/bundle/461.index.js +49 -0
- package/bundle/505.index.js +126369 -0
- package/bundle/529.index.js +3603 -0
- package/bundle/576.index.js +36 -0
- package/bundle/610.index.js +86 -0
- package/bundle/628.index.js +152 -0
- package/bundle/633.index.js +86 -0
- package/bundle/697.index.js +410 -0
- package/bundle/{30fb121a258f7502fa97.js → 7183ea1c1bf0a5da980d.js} +1 -1
- package/bundle/748.index.js +674 -0
- package/bundle/78.index.js +372 -0
- package/bundle/787.index.js +175 -0
- package/bundle/841.index.js +2093 -0
- package/bundle/{172.index.js → 848.index.js} +779 -915
- package/bundle/868.index.js +460 -0
- package/bundle/902.index.js +173 -0
- package/bundle/956.index.js +9901 -0
- package/bundle/aleo_wasm.wasm +0 -0
- package/bundle/aleo_wasm1.wasm +0 -0
- package/bundle/build/Release/bigint_buffer.node +0 -0
- package/bundle/index.js +2 -2
- package/bundle/worker2.js +9123 -3469
- package/bundle/worker3.js +9109 -3455
- package/examples/layerzero/layerzero-warp-route.yaml +91 -0
- package/examples/sealevel/core-config-composite-ism.yaml +21 -0
- package/examples/sealevel/igp-hook-config.yaml +13 -0
- package/examples/sealevel/warp-config-routing-message-id-multisig-ism.yaml +21 -0
- package/examples/warp-base.yaml +24 -0
- package/examples/warp-config-predicate-mainnet.yaml +14 -0
- package/examples/warp-deployed-predicate-mainnet.yaml +19 -0
- package/examples/warp-ethereum.yaml +19 -0
- package/examples/wormhole/wormhole-warp-route.yaml +46 -0
- package/package.json +35 -28
- package/bundle/100.index.js +0 -1453
- package/bundle/12.index.js +0 -91
- package/bundle/213.index.js +0 -901
- package/bundle/306.index.js +0 -1037
- package/bundle/467.index.js +0 -222
- package/bundle/485.index.js +0 -85430
- package/bundle/515.index.js +0 -5191
- package/bundle/544.index.js +0 -792
- package/bundle/617.index.js +0 -1612
- package/bundle/660.index.js +0 -223
- package/bundle/688.index.js +0 -232
- package/bundle/756.index.js +0 -8595
- package/bundle/824.index.js +0 -385
- package/bundle/95.index.js +0 -264
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
export const id = 868;
|
|
2
|
+
export const ids = [868,787];
|
|
3
|
+
export const modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 92787:
|
|
6
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// EXPORTS
|
|
10
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
p256: () => (/* binding */ p256_p256)
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// UNUSED EXPORTS: encodeToCurve, hashToCurve, secp256r1
|
|
15
|
+
|
|
16
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js + 1 modules
|
|
17
|
+
var sha2 = __webpack_require__(20707);
|
|
18
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js + 1 modules
|
|
19
|
+
var _shortw_utils = __webpack_require__(59159);
|
|
20
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js
|
|
21
|
+
var modular = __webpack_require__(5194);
|
|
22
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js
|
|
23
|
+
/**
|
|
24
|
+
* Internal module for NIST P256, P384, P521 curves.
|
|
25
|
+
* Do not use for now.
|
|
26
|
+
* @module
|
|
27
|
+
*/
|
|
28
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// p = 2n**224n * (2n**32n-1n) + 2n**192n + 2n**96n - 1n
|
|
35
|
+
// a = Fp256.create(BigInt('-3'));
|
|
36
|
+
const p256_CURVE = {
|
|
37
|
+
p: BigInt('0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff'),
|
|
38
|
+
n: BigInt('0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551'),
|
|
39
|
+
h: BigInt(1),
|
|
40
|
+
a: BigInt('0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc'),
|
|
41
|
+
b: BigInt('0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b'),
|
|
42
|
+
Gx: BigInt('0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296'),
|
|
43
|
+
Gy: BigInt('0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5'),
|
|
44
|
+
};
|
|
45
|
+
// p = 2n**384n - 2n**128n - 2n**96n + 2n**32n - 1n
|
|
46
|
+
const p384_CURVE = {
|
|
47
|
+
p: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff'),
|
|
48
|
+
n: BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973'),
|
|
49
|
+
h: BigInt(1),
|
|
50
|
+
a: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc'),
|
|
51
|
+
b: BigInt('0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef'),
|
|
52
|
+
Gx: BigInt('0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7'),
|
|
53
|
+
Gy: BigInt('0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f'),
|
|
54
|
+
};
|
|
55
|
+
// p = 2n**521n - 1n
|
|
56
|
+
const p521_CURVE = {
|
|
57
|
+
p: BigInt('0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'),
|
|
58
|
+
n: BigInt('0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409'),
|
|
59
|
+
h: BigInt(1),
|
|
60
|
+
a: BigInt('0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc'),
|
|
61
|
+
b: BigInt('0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00'),
|
|
62
|
+
Gx: BigInt('0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66'),
|
|
63
|
+
Gy: BigInt('0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650'),
|
|
64
|
+
};
|
|
65
|
+
const Fp256 = (0,modular/* Field */.D0)(p256_CURVE.p);
|
|
66
|
+
const Fp384 = (0,modular/* Field */.D0)(p384_CURVE.p);
|
|
67
|
+
const Fp521 = (0,modular/* Field */.D0)(p521_CURVE.p);
|
|
68
|
+
function createSWU(Point, opts) {
|
|
69
|
+
const map = mapToCurveSimpleSWU(Point.Fp, opts);
|
|
70
|
+
return (scalars) => map(scalars[0]);
|
|
71
|
+
}
|
|
72
|
+
/** NIST P256 (aka secp256r1, prime256v1) curve, ECDSA and ECDH methods. */
|
|
73
|
+
const p256 = (0,_shortw_utils/* createCurve */.s)({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha2/* sha256 */.sc);
|
|
74
|
+
/** Hashing / encoding to p256 points / field. RFC 9380 methods. */
|
|
75
|
+
const nist_p256_hasher = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => {
|
|
76
|
+
return createHasher(p256.Point, createSWU(p256.Point, {
|
|
77
|
+
A: p256_CURVE.a,
|
|
78
|
+
B: p256_CURVE.b,
|
|
79
|
+
Z: p256.Point.Fp.create(BigInt('-10')),
|
|
80
|
+
}), {
|
|
81
|
+
DST: 'P256_XMD:SHA-256_SSWU_RO_',
|
|
82
|
+
encodeDST: 'P256_XMD:SHA-256_SSWU_NU_',
|
|
83
|
+
p: p256_CURVE.p,
|
|
84
|
+
m: 1,
|
|
85
|
+
k: 128,
|
|
86
|
+
expand: 'xmd',
|
|
87
|
+
hash: sha256,
|
|
88
|
+
});
|
|
89
|
+
})()));
|
|
90
|
+
// export const p256_oprf: OPRF = createORPF({
|
|
91
|
+
// name: 'P256-SHA256',
|
|
92
|
+
// Point: p256.Point,
|
|
93
|
+
// hash: sha256,
|
|
94
|
+
// hashToGroup: p256_hasher.hashToCurve,
|
|
95
|
+
// hashToScalar: p256_hasher.hashToScalar,
|
|
96
|
+
// });
|
|
97
|
+
/** NIST P384 (aka secp384r1) curve, ECDSA and ECDH methods. */
|
|
98
|
+
const p384 = (0,_shortw_utils/* createCurve */.s)({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha2/* sha384 */.qt);
|
|
99
|
+
/** Hashing / encoding to p384 points / field. RFC 9380 methods. */
|
|
100
|
+
const p384_hasher = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => {
|
|
101
|
+
return createHasher(p384.Point, createSWU(p384.Point, {
|
|
102
|
+
A: p384_CURVE.a,
|
|
103
|
+
B: p384_CURVE.b,
|
|
104
|
+
Z: p384.Point.Fp.create(BigInt('-12')),
|
|
105
|
+
}), {
|
|
106
|
+
DST: 'P384_XMD:SHA-384_SSWU_RO_',
|
|
107
|
+
encodeDST: 'P384_XMD:SHA-384_SSWU_NU_',
|
|
108
|
+
p: p384_CURVE.p,
|
|
109
|
+
m: 1,
|
|
110
|
+
k: 192,
|
|
111
|
+
expand: 'xmd',
|
|
112
|
+
hash: sha384,
|
|
113
|
+
});
|
|
114
|
+
})()));
|
|
115
|
+
// export const p384_oprf: OPRF = createORPF({
|
|
116
|
+
// name: 'P384-SHA384',
|
|
117
|
+
// Point: p384.Point,
|
|
118
|
+
// hash: sha384,
|
|
119
|
+
// hashToGroup: p384_hasher.hashToCurve,
|
|
120
|
+
// hashToScalar: p384_hasher.hashToScalar,
|
|
121
|
+
// });
|
|
122
|
+
// const Fn521 = Field(p521_CURVE.n, { allowedScalarLengths: [65, 66] });
|
|
123
|
+
/** NIST P521 (aka secp521r1) curve, ECDSA and ECDH methods. */
|
|
124
|
+
const p521 = (0,_shortw_utils/* createCurve */.s)({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha2/* sha512 */.Zf);
|
|
125
|
+
/** @deprecated use `p256` for consistency with `p256_hasher` */
|
|
126
|
+
const secp256r1 = (/* unused pure expression or super */ null && (p256));
|
|
127
|
+
/** @deprecated use `p384` for consistency with `p384_hasher` */
|
|
128
|
+
const secp384r1 = (/* unused pure expression or super */ null && (p384));
|
|
129
|
+
/** @deprecated use `p521` for consistency with `p521_hasher` */
|
|
130
|
+
const secp521r1 = (/* unused pure expression or super */ null && (p521));
|
|
131
|
+
/** Hashing / encoding to p521 points / field. RFC 9380 methods. */
|
|
132
|
+
const p521_hasher = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => {
|
|
133
|
+
return createHasher(p521.Point, createSWU(p521.Point, {
|
|
134
|
+
A: p521_CURVE.a,
|
|
135
|
+
B: p521_CURVE.b,
|
|
136
|
+
Z: p521.Point.Fp.create(BigInt('-4')),
|
|
137
|
+
}), {
|
|
138
|
+
DST: 'P521_XMD:SHA-512_SSWU_RO_',
|
|
139
|
+
encodeDST: 'P521_XMD:SHA-512_SSWU_NU_',
|
|
140
|
+
p: p521_CURVE.p,
|
|
141
|
+
m: 1,
|
|
142
|
+
k: 256,
|
|
143
|
+
expand: 'xmd',
|
|
144
|
+
hash: sha512,
|
|
145
|
+
});
|
|
146
|
+
})()));
|
|
147
|
+
// export const p521_oprf: OPRF = createORPF({
|
|
148
|
+
// name: 'P521-SHA512',
|
|
149
|
+
// Point: p521.Point,
|
|
150
|
+
// hash: sha512,
|
|
151
|
+
// hashToGroup: p521_hasher.hashToCurve,
|
|
152
|
+
// hashToScalar: p521_hasher.hashToScalar, // produces L=98 just like in RFC
|
|
153
|
+
// });
|
|
154
|
+
//# sourceMappingURL=nist.js.map
|
|
155
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js
|
|
156
|
+
/**
|
|
157
|
+
* NIST secp256r1 aka p256.
|
|
158
|
+
* @module
|
|
159
|
+
*/
|
|
160
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
|
|
164
|
+
const p256_p256 = p256;
|
|
165
|
+
/** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
|
|
166
|
+
const p256_secp256r1 = (/* unused pure expression or super */ null && (p256n));
|
|
167
|
+
/** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
|
|
168
|
+
const hashToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => p256_hasher.hashToCurve)()));
|
|
169
|
+
/** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
|
|
170
|
+
const encodeToCurve = /* @__PURE__ */ (/* unused pure expression or super */ null && ((() => p256_hasher.encodeToCurve)()));
|
|
171
|
+
//# sourceMappingURL=p256.js.map
|
|
172
|
+
|
|
173
|
+
/***/ }),
|
|
174
|
+
|
|
175
|
+
/***/ 62868:
|
|
176
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
177
|
+
|
|
178
|
+
// ESM COMPAT FLAG
|
|
179
|
+
__webpack_require__.r(__webpack_exports__);
|
|
180
|
+
|
|
181
|
+
// EXPORTS
|
|
182
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
183
|
+
signWithApiKey: () => (/* binding */ signWithApiKey)
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js + 1 modules
|
|
187
|
+
var p256 = __webpack_require__(92787);
|
|
188
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/sha256-uint8array@0.10.7/node_modules/sha256-uint8array/dist/sha256-uint8array.mjs
|
|
189
|
+
/**
|
|
190
|
+
* sha256-uint8array.ts
|
|
191
|
+
*/
|
|
192
|
+
// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311
|
|
193
|
+
const K = [
|
|
194
|
+
0x428a2f98 | 0, 0x71374491 | 0, 0xb5c0fbcf | 0, 0xe9b5dba5 | 0,
|
|
195
|
+
0x3956c25b | 0, 0x59f111f1 | 0, 0x923f82a4 | 0, 0xab1c5ed5 | 0,
|
|
196
|
+
0xd807aa98 | 0, 0x12835b01 | 0, 0x243185be | 0, 0x550c7dc3 | 0,
|
|
197
|
+
0x72be5d74 | 0, 0x80deb1fe | 0, 0x9bdc06a7 | 0, 0xc19bf174 | 0,
|
|
198
|
+
0xe49b69c1 | 0, 0xefbe4786 | 0, 0x0fc19dc6 | 0, 0x240ca1cc | 0,
|
|
199
|
+
0x2de92c6f | 0, 0x4a7484aa | 0, 0x5cb0a9dc | 0, 0x76f988da | 0,
|
|
200
|
+
0x983e5152 | 0, 0xa831c66d | 0, 0xb00327c8 | 0, 0xbf597fc7 | 0,
|
|
201
|
+
0xc6e00bf3 | 0, 0xd5a79147 | 0, 0x06ca6351 | 0, 0x14292967 | 0,
|
|
202
|
+
0x27b70a85 | 0, 0x2e1b2138 | 0, 0x4d2c6dfc | 0, 0x53380d13 | 0,
|
|
203
|
+
0x650a7354 | 0, 0x766a0abb | 0, 0x81c2c92e | 0, 0x92722c85 | 0,
|
|
204
|
+
0xa2bfe8a1 | 0, 0xa81a664b | 0, 0xc24b8b70 | 0, 0xc76c51a3 | 0,
|
|
205
|
+
0xd192e819 | 0, 0xd6990624 | 0, 0xf40e3585 | 0, 0x106aa070 | 0,
|
|
206
|
+
0x19a4c116 | 0, 0x1e376c08 | 0, 0x2748774c | 0, 0x34b0bcb5 | 0,
|
|
207
|
+
0x391c0cb3 | 0, 0x4ed8aa4a | 0, 0x5b9cca4f | 0, 0x682e6ff3 | 0,
|
|
208
|
+
0x748f82ee | 0, 0x78a5636f | 0, 0x84c87814 | 0, 0x8cc70208 | 0,
|
|
209
|
+
0x90befffa | 0, 0xa4506ceb | 0, 0xbef9a3f7 | 0, 0xc67178f2 | 0,
|
|
210
|
+
];
|
|
211
|
+
const algorithms = {
|
|
212
|
+
sha256: 1,
|
|
213
|
+
};
|
|
214
|
+
function createHash(algorithm) {
|
|
215
|
+
if (algorithm && !algorithms[algorithm] && !algorithms[algorithm.toLowerCase()]) {
|
|
216
|
+
throw new Error("Digest method not supported");
|
|
217
|
+
}
|
|
218
|
+
return new Hash();
|
|
219
|
+
}
|
|
220
|
+
class Hash {
|
|
221
|
+
constructor() {
|
|
222
|
+
// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19
|
|
223
|
+
this.A = 0x6a09e667 | 0;
|
|
224
|
+
this.B = 0xbb67ae85 | 0;
|
|
225
|
+
this.C = 0x3c6ef372 | 0;
|
|
226
|
+
this.D = 0xa54ff53a | 0;
|
|
227
|
+
this.E = 0x510e527f | 0;
|
|
228
|
+
this.F = 0x9b05688c | 0;
|
|
229
|
+
this.G = 0x1f83d9ab | 0;
|
|
230
|
+
this.H = 0x5be0cd19 | 0;
|
|
231
|
+
this._size = 0;
|
|
232
|
+
this._sp = 0; // surrogate pair
|
|
233
|
+
if (!sharedBuffer || sharedOffset >= 8000 /* N.allocTotal */) {
|
|
234
|
+
sharedBuffer = new ArrayBuffer(8000 /* N.allocTotal */);
|
|
235
|
+
sharedOffset = 0;
|
|
236
|
+
}
|
|
237
|
+
this._byte = new Uint8Array(sharedBuffer, sharedOffset, 80 /* N.allocBytes */);
|
|
238
|
+
this._word = new Int32Array(sharedBuffer, sharedOffset, 20 /* N.allocWords */);
|
|
239
|
+
sharedOffset += 80 /* N.allocBytes */;
|
|
240
|
+
}
|
|
241
|
+
update(data) {
|
|
242
|
+
// data: string
|
|
243
|
+
if ("string" === typeof data) {
|
|
244
|
+
return this._utf8(data);
|
|
245
|
+
}
|
|
246
|
+
// data: undefined
|
|
247
|
+
if (data == null) {
|
|
248
|
+
throw new TypeError("Invalid type: " + typeof data);
|
|
249
|
+
}
|
|
250
|
+
const byteOffset = data.byteOffset;
|
|
251
|
+
const length = data.byteLength;
|
|
252
|
+
let blocks = (length / 64 /* N.inputBytes */) | 0;
|
|
253
|
+
let offset = 0;
|
|
254
|
+
// longer than 1 block
|
|
255
|
+
if (blocks && !(byteOffset & 3) && !(this._size % 64 /* N.inputBytes */)) {
|
|
256
|
+
const block = new Int32Array(data.buffer, byteOffset, blocks * 16 /* N.inputWords */);
|
|
257
|
+
while (blocks--) {
|
|
258
|
+
this._int32(block, offset >> 2);
|
|
259
|
+
offset += 64 /* N.inputBytes */;
|
|
260
|
+
}
|
|
261
|
+
this._size += offset;
|
|
262
|
+
}
|
|
263
|
+
// data: TypedArray | DataView
|
|
264
|
+
const BYTES_PER_ELEMENT = data.BYTES_PER_ELEMENT;
|
|
265
|
+
if (BYTES_PER_ELEMENT !== 1 && data.buffer) {
|
|
266
|
+
const rest = new Uint8Array(data.buffer, byteOffset + offset, length - offset);
|
|
267
|
+
return this._uint8(rest);
|
|
268
|
+
}
|
|
269
|
+
// no more bytes
|
|
270
|
+
if (offset === length)
|
|
271
|
+
return this;
|
|
272
|
+
// data: Uint8Array | Int8Array
|
|
273
|
+
return this._uint8(data, offset);
|
|
274
|
+
}
|
|
275
|
+
_uint8(data, offset) {
|
|
276
|
+
const { _byte, _word } = this;
|
|
277
|
+
const length = data.length;
|
|
278
|
+
offset = offset | 0;
|
|
279
|
+
while (offset < length) {
|
|
280
|
+
const start = this._size % 64 /* N.inputBytes */;
|
|
281
|
+
let index = start;
|
|
282
|
+
while (offset < length && index < 64 /* N.inputBytes */) {
|
|
283
|
+
_byte[index++] = data[offset++];
|
|
284
|
+
}
|
|
285
|
+
if (index >= 64 /* N.inputBytes */) {
|
|
286
|
+
this._int32(_word);
|
|
287
|
+
}
|
|
288
|
+
this._size += index - start;
|
|
289
|
+
}
|
|
290
|
+
return this;
|
|
291
|
+
}
|
|
292
|
+
_utf8(text) {
|
|
293
|
+
const { _byte, _word } = this;
|
|
294
|
+
const length = text.length;
|
|
295
|
+
let surrogate = this._sp;
|
|
296
|
+
for (let offset = 0; offset < length;) {
|
|
297
|
+
const start = this._size % 64 /* N.inputBytes */;
|
|
298
|
+
let index = start;
|
|
299
|
+
while (offset < length && index < 64 /* N.inputBytes */) {
|
|
300
|
+
let code = text.charCodeAt(offset++) | 0;
|
|
301
|
+
if (code < 0x80) {
|
|
302
|
+
// ASCII characters
|
|
303
|
+
_byte[index++] = code;
|
|
304
|
+
}
|
|
305
|
+
else if (code < 0x800) {
|
|
306
|
+
// 2 bytes
|
|
307
|
+
_byte[index++] = 0xC0 | (code >>> 6);
|
|
308
|
+
_byte[index++] = 0x80 | (code & 0x3F);
|
|
309
|
+
}
|
|
310
|
+
else if (code < 0xD800 || code > 0xDFFF) {
|
|
311
|
+
// 3 bytes
|
|
312
|
+
_byte[index++] = 0xE0 | (code >>> 12);
|
|
313
|
+
_byte[index++] = 0x80 | ((code >>> 6) & 0x3F);
|
|
314
|
+
_byte[index++] = 0x80 | (code & 0x3F);
|
|
315
|
+
}
|
|
316
|
+
else if (surrogate) {
|
|
317
|
+
// 4 bytes - surrogate pair
|
|
318
|
+
code = ((surrogate & 0x3FF) << 10) + (code & 0x3FF) + 0x10000;
|
|
319
|
+
_byte[index++] = 0xF0 | (code >>> 18);
|
|
320
|
+
_byte[index++] = 0x80 | ((code >>> 12) & 0x3F);
|
|
321
|
+
_byte[index++] = 0x80 | ((code >>> 6) & 0x3F);
|
|
322
|
+
_byte[index++] = 0x80 | (code & 0x3F);
|
|
323
|
+
surrogate = 0;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
surrogate = code;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (index >= 64 /* N.inputBytes */) {
|
|
330
|
+
this._int32(_word);
|
|
331
|
+
_word[0] = _word[16 /* N.inputWords */];
|
|
332
|
+
}
|
|
333
|
+
this._size += index - start;
|
|
334
|
+
}
|
|
335
|
+
this._sp = surrogate;
|
|
336
|
+
return this;
|
|
337
|
+
}
|
|
338
|
+
_int32(data, offset) {
|
|
339
|
+
let { A, B, C, D, E, F, G, H } = this;
|
|
340
|
+
let i = 0;
|
|
341
|
+
offset = offset | 0;
|
|
342
|
+
while (i < 16 /* N.inputWords */) {
|
|
343
|
+
W[i++] = swap32(data[offset++]);
|
|
344
|
+
}
|
|
345
|
+
for (i = 16 /* N.inputWords */; i < 64 /* N.workWords */; i++) {
|
|
346
|
+
W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0;
|
|
347
|
+
}
|
|
348
|
+
for (i = 0; i < 64 /* N.workWords */; i++) {
|
|
349
|
+
const T1 = (H + sigma1(E) + ch(E, F, G) + K[i] + W[i]) | 0;
|
|
350
|
+
const T2 = (sigma0(A) + maj(A, B, C)) | 0;
|
|
351
|
+
H = G;
|
|
352
|
+
G = F;
|
|
353
|
+
F = E;
|
|
354
|
+
E = (D + T1) | 0;
|
|
355
|
+
D = C;
|
|
356
|
+
C = B;
|
|
357
|
+
B = A;
|
|
358
|
+
A = (T1 + T2) | 0;
|
|
359
|
+
}
|
|
360
|
+
this.A = (A + this.A) | 0;
|
|
361
|
+
this.B = (B + this.B) | 0;
|
|
362
|
+
this.C = (C + this.C) | 0;
|
|
363
|
+
this.D = (D + this.D) | 0;
|
|
364
|
+
this.E = (E + this.E) | 0;
|
|
365
|
+
this.F = (F + this.F) | 0;
|
|
366
|
+
this.G = (G + this.G) | 0;
|
|
367
|
+
this.H = (H + this.H) | 0;
|
|
368
|
+
}
|
|
369
|
+
digest(encoding) {
|
|
370
|
+
const { _byte, _word } = this;
|
|
371
|
+
let i = (this._size % 64 /* N.inputBytes */) | 0;
|
|
372
|
+
_byte[i++] = 0x80;
|
|
373
|
+
// pad 0 for current word
|
|
374
|
+
while (i & 3) {
|
|
375
|
+
_byte[i++] = 0;
|
|
376
|
+
}
|
|
377
|
+
i >>= 2;
|
|
378
|
+
if (i > 14 /* N.highIndex */) {
|
|
379
|
+
while (i < 16 /* N.inputWords */) {
|
|
380
|
+
_word[i++] = 0;
|
|
381
|
+
}
|
|
382
|
+
i = 0;
|
|
383
|
+
this._int32(_word);
|
|
384
|
+
}
|
|
385
|
+
// pad 0 for rest words
|
|
386
|
+
while (i < 16 /* N.inputWords */) {
|
|
387
|
+
_word[i++] = 0;
|
|
388
|
+
}
|
|
389
|
+
// input size
|
|
390
|
+
const bits64 = this._size * 8;
|
|
391
|
+
const low32 = (bits64 & 0xffffffff) >>> 0;
|
|
392
|
+
const high32 = (bits64 - low32) / 0x100000000;
|
|
393
|
+
if (high32)
|
|
394
|
+
_word[14 /* N.highIndex */] = swap32(high32);
|
|
395
|
+
if (low32)
|
|
396
|
+
_word[15 /* N.lowIndex */] = swap32(low32);
|
|
397
|
+
this._int32(_word);
|
|
398
|
+
return (encoding === "hex") ? this._hex() : this._bin();
|
|
399
|
+
}
|
|
400
|
+
_hex() {
|
|
401
|
+
const { A, B, C, D, E, F, G, H } = this;
|
|
402
|
+
return hex32(A) + hex32(B) + hex32(C) + hex32(D) + hex32(E) + hex32(F) + hex32(G) + hex32(H);
|
|
403
|
+
}
|
|
404
|
+
_bin() {
|
|
405
|
+
const { A, B, C, D, E, F, G, H, _byte, _word } = this;
|
|
406
|
+
_word[0] = swap32(A);
|
|
407
|
+
_word[1] = swap32(B);
|
|
408
|
+
_word[2] = swap32(C);
|
|
409
|
+
_word[3] = swap32(D);
|
|
410
|
+
_word[4] = swap32(E);
|
|
411
|
+
_word[5] = swap32(F);
|
|
412
|
+
_word[6] = swap32(G);
|
|
413
|
+
_word[7] = swap32(H);
|
|
414
|
+
return _byte.slice(0, 32);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
const W = new Int32Array(64 /* N.workWords */);
|
|
418
|
+
let sharedBuffer;
|
|
419
|
+
let sharedOffset = 0;
|
|
420
|
+
const hex32 = num => (num + 0x100000000).toString(16).substr(-8);
|
|
421
|
+
const swapLE = (c => (((c << 24) & 0xff000000) | ((c << 8) & 0xff0000) | ((c >> 8) & 0xff00) | ((c >> 24) & 0xff)));
|
|
422
|
+
const swapBE = (c => c);
|
|
423
|
+
const swap32 = isBE() ? swapBE : swapLE;
|
|
424
|
+
const ch = (x, y, z) => (z ^ (x & (y ^ z)));
|
|
425
|
+
const maj = (x, y, z) => ((x & y) | (z & (x | y)));
|
|
426
|
+
const sigma0 = x => ((x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10));
|
|
427
|
+
const sigma1 = x => ((x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7));
|
|
428
|
+
const gamma0 = x => ((x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3));
|
|
429
|
+
const gamma1 = x => ((x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10));
|
|
430
|
+
function isBE() {
|
|
431
|
+
const buf = new Uint8Array(new Uint16Array([0xFEFF]).buffer); // BOM
|
|
432
|
+
return (buf[0] === 0xFE);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/@turnkey+encoding@0.6.0/node_modules/@turnkey/encoding/dist/index.mjs + 6 modules
|
|
436
|
+
var dist = __webpack_require__(56390);
|
|
437
|
+
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@turnkey+api-key-stamper@0.5.0/node_modules/@turnkey/api-key-stamper/dist/purejs.mjs
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
const signWithApiKey = async (input) => {
|
|
443
|
+
const publicKey = p256.p256.getPublicKey(input.privateKey, true);
|
|
444
|
+
// Public key in the usual 02 or 03 + 64 hex digits
|
|
445
|
+
const publicKeyString = (0,dist/* uint8ArrayToHexString */.pD)(publicKey);
|
|
446
|
+
if (publicKeyString != input.publicKey) {
|
|
447
|
+
throw new Error(`Bad API key. Expected to get public key ${input.publicKey}, got ${publicKeyString}`);
|
|
448
|
+
}
|
|
449
|
+
const hash = createHash().update(input.content).digest();
|
|
450
|
+
const signature = p256.p256.sign(hash, input.privateKey);
|
|
451
|
+
return signature.toDERHex();
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
//# sourceMappingURL=purejs.mjs.map
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
/***/ })
|
|
459
|
+
|
|
460
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export const id = 902;
|
|
2
|
+
export const ids = [902];
|
|
3
|
+
export const modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 32902:
|
|
6
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
7
|
+
|
|
8
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
/* harmony export */ hashMessage: () => (/* reexport safe */ _utils_signature_hashMessage_js__WEBPACK_IMPORTED_MODULE_0__.A),
|
|
10
|
+
/* harmony export */ recoverPublicKey: () => (/* reexport safe */ _utils_signature_recoverPublicKey_js__WEBPACK_IMPORTED_MODULE_1__.j)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var _utils_signature_hashMessage_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29473);
|
|
13
|
+
/* harmony import */ var _utils_signature_recoverPublicKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39149);
|
|
14
|
+
// biome-ignore lint/performance/noBarrelFile: entrypoint module
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=index.js.map
|
|
170
|
+
|
|
171
|
+
/***/ })
|
|
172
|
+
|
|
173
|
+
};
|