@smartledger/bsv 6.1.0 → 6.1.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.1.1] - 2026-07-13
11
+
12
+ First release published from CI with **npm provenance**. No runtime/API change —
13
+ type corrections + release/CI hardening.
14
+
15
+ ### CI / release
16
+
17
+ - **Automated releases with npm provenance** (`.github/workflows/release.yml`, `RELEASING.md`).
18
+ Pushing a `vX.Y.Z` tag now gates the tag (version match, full suite, scoped lint, bundle-parity)
19
+ and publishes from GitHub Actions with `--provenance` via OIDC — npmjs.com gets a verifiable
20
+ link proving the tarball was built from that commit ("published == audited source"). Replaces
21
+ the manual publish flow; idempotent (no-op if the version is already published). Requires a
22
+ one-time `NPM_TOKEN` Actions secret (npm Automation token). Tidied `repository.url` to the
23
+ canonical `git+https://…​.git` form provenance expects.
24
+
25
+ ### Fixed — types
26
+
27
+ - **`bsv.d.ts` no longer declares phantom APIs.** A new mechanical type-drift gate
28
+ (`test/types/dts_drift.js`, TypeScript AST vs. runtime) found six declarations for symbols
29
+ the runtime doesn't expose; all corrected: removed `Unit`,
30
+ `Script.buildWitnessMultisigOutFromScript`, and the top-level `splitSecret`/
31
+ `reconstructSecret`/`validateShare` (Shamir lives at `bsv.Shamir.split`/`.combine`/
32
+ `.verifyShare`); replaced the non-existent `crypto.EllipticFixed.ec` with its real members.
33
+
34
+ ### CI / quality (no runtime change)
35
+
36
+ - Added the **type-drift gate** to the (blocking) suite: every declared class/function/const
37
+ must exist at runtime, and every runtime function on `Ordinals` / `Ordinals.BSV20` / `SPV`
38
+ must be declared — so the curated `bsv.d.ts` can't drift from the code again.
39
+ - `typescript` is now a pinned devDependency (was installed ad-hoc in CI); the scoped
40
+ blocking lint covers `test/types`.
41
+
10
42
  ## [6.1.0] - 2026-07-13
11
43
 
12
44
  ### Changed — build toolchain (no source/API change)
package/README.md CHANGED
@@ -186,42 +186,42 @@ console.log('Status:', status) // 'revoked'
186
186
  ### **Core Modules**
187
187
  | Module | Size | Use Case | CDN |
188
188
  |--------|------|----------|-----|
189
- | **bsv.min.js** | 1149KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js` |
190
- | **bsv.bundle.js** | 1149KB | Everything in one file | `unpkg.com/@smartledger/bsv@6.1.0/bsv.bundle.js` |
189
+ | **bsv.min.js** | 1149KB | Core BSV + SmartContract | `unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js` |
190
+ | **bsv.bundle.js** | 1149KB | Everything in one file | `unpkg.com/@smartledger/bsv@6.1.1/bsv.bundle.js` |
191
191
 
192
192
  ### **W3C Verifiable Credentials**
193
193
  | Module | Size | Use Case | CDN |
194
194
  |--------|------|----------|-----|
195
- | **🟢 bsv-didweb.min.js** | 315KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@6.1.0/bsv-didweb.min.js` |
196
- | **🟢 bsv-vcjwt.min.js** | 315KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@6.1.0/bsv-vcjwt.min.js` |
197
- | **🟢 bsv-statuslist.min.js** | 415KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@6.1.0/bsv-statuslist.min.js` |
198
- | **🟢 bsv-anchor.min.js** | 314KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@6.1.0/bsv-anchor.min.js` |
195
+ | **🟢 bsv-didweb.min.js** | 315KB | **DID:web generation** | `unpkg.com/@smartledger/bsv@6.1.1/bsv-didweb.min.js` |
196
+ | **🟢 bsv-vcjwt.min.js** | 315KB | **VC-JWT issue/verify** | `unpkg.com/@smartledger/bsv@6.1.1/bsv-vcjwt.min.js` |
197
+ | **🟢 bsv-statuslist.min.js** | 415KB | **StatusList2021 revocation** | `unpkg.com/@smartledger/bsv@6.1.1/bsv-statuslist.min.js` |
198
+ | **🟢 bsv-anchor.min.js** | 314KB | **BSV anchoring (hash-only)** | `unpkg.com/@smartledger/bsv@6.1.1/bsv-anchor.min.js` |
199
199
 
200
200
  ### **Smart Contract & Development**
201
201
  | Module | Size | Use Case | CDN |
202
202
  |--------|------|----------|-----|
203
- | **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@6.1.0/bsv-smartcontract.min.js` |
204
- | **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@6.1.0/bsv-covenant.min.js` |
205
- | **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@6.1.0/bsv-script-helper.min.js` |
206
- | **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@6.1.0/bsv-security.min.js` |
203
+ | **bsv-smartcontract.min.js** | 873KB | Complete covenant framework | `unpkg.com/@smartledger/bsv@6.1.1/bsv-smartcontract.min.js` |
204
+ | **bsv-covenant.min.js** | 873KB | Covenant operations | `unpkg.com/@smartledger/bsv@6.1.1/bsv-covenant.min.js` |
205
+ | **bsv-script-helper.min.js** | 30KB | Custom script tools | `unpkg.com/@smartledger/bsv@6.1.1/bsv-script-helper.min.js` |
206
+ | **bsv-security.min.js** | 30KB | Security enhancements | `unpkg.com/@smartledger/bsv@6.1.1/bsv-security.min.js` |
207
207
 
208
208
  ### **Legal & Compliance**
209
209
  | Module | Size | Use Case | CDN |
210
210
  |--------|------|----------|-----|
211
- | **bsv-ltp.min.js** | 1149KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@6.1.0/bsv-ltp.min.js` |
212
- | **bsv-gdaf.min.js** | 1149KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@6.1.0/bsv-gdaf.min.js` |
211
+ | **bsv-ltp.min.js** | 1149KB | Legal Token Protocol | `unpkg.com/@smartledger/bsv@6.1.1/bsv-ltp.min.js` |
212
+ | **bsv-gdaf.min.js** | 1149KB | Digital Identity & Attestation | `unpkg.com/@smartledger/bsv@6.1.1/bsv-gdaf.min.js` |
213
213
 
214
214
  ### **Advanced Cryptography**
215
215
  | Module | Size | Use Case | CDN |
216
216
  |--------|------|----------|-----|
217
- | **bsv-shamir.min.js** | 353KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@6.1.0/bsv-shamir.min.js` |
217
+ | **bsv-shamir.min.js** | 353KB | Threshold Cryptography | `unpkg.com/@smartledger/bsv@6.1.1/bsv-shamir.min.js` |
218
218
 
219
219
  ### **Utilities**
220
220
  | Module | Size | Use Case | CDN |
221
221
  |--------|------|----------|-----|
222
- | **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@6.1.0/bsv-ecies.min.js` |
223
- | **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@6.1.0/bsv-message.min.js` |
224
- | **bsv-mnemonic.min.js** | 592KB | HD wallets | `unpkg.com/@smartledger/bsv@6.1.0/bsv-mnemonic.min.js` |
222
+ | **bsv-ecies.min.js** | 79KB | Encryption | `unpkg.com/@smartledger/bsv@6.1.1/bsv-ecies.min.js` |
223
+ | **bsv-message.min.js** | 30KB | Message signing | `unpkg.com/@smartledger/bsv@6.1.1/bsv-message.min.js` |
224
+ | **bsv-mnemonic.min.js** | 592KB | HD wallets | `unpkg.com/@smartledger/bsv@6.1.1/bsv-mnemonic.min.js` |
225
225
 
226
226
  ## ⚡ **2-Minute Quick Start**
227
227
 
@@ -232,7 +232,7 @@ Get started with Bitcoin SV development in under 2 minutes:
232
232
  npm install @smartledger/bsv
233
233
 
234
234
  # Or include in HTML
235
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
235
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
236
236
  ```
237
237
 
238
238
  > **🔒 v5.0.0 (production hardening — has breaking changes):** Shamir secret
@@ -332,8 +332,8 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
332
332
 
333
333
  ### 🔧 **Basic Development** (~1.2MB total)
334
334
  ```html
335
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
336
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-script-helper.min.js"></script>
335
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
336
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-script-helper.min.js"></script>
337
337
  <script>
338
338
  const privateKey = new bsv.PrivateKey();
339
339
  const utxos = new bsv.SmartContract.UTXOGenerator().createRealUTXOs(2, 100000);
@@ -342,9 +342,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
342
342
 
343
343
  ### 🔒 **Smart Contract Development** (~2.8MB total — each bundle re-embeds core BSV)
344
344
  ```html
345
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
346
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-covenant.min.js"></script>
347
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-smartcontract.min.js"></script>
345
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
346
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-covenant.min.js"></script>
347
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-smartcontract.min.js"></script>
348
348
  <script>
349
349
  const covenant = bsv.SmartContract.createCovenantBuilder()
350
350
  .extractField('amount').push(50000).greaterThanOrEqual().verify().build();
@@ -354,9 +354,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
354
354
 
355
355
  ### 🆕 **Legal & Identity Development** (~3.4MB total — each bundle re-embeds core BSV)
356
356
  ```html
357
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
358
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-ltp.min.js"></script>
359
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-gdaf.min.js"></script>
357
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
358
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-ltp.min.js"></script>
359
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-gdaf.min.js"></script>
360
360
  <script>
361
361
  // Legal Token Protocol
362
362
  const propertyToken = bsv.createPropertyToken({
@@ -370,9 +370,9 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
370
370
 
371
371
  ### 🆕 **Security & Cryptography** (~1.5MB total)
372
372
  ```html
373
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
374
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-security.min.js"></script>
375
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-shamir.min.js"></script>
373
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
374
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-security.min.js"></script>
375
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-shamir.min.js"></script>
376
376
  <script>
377
377
  // Threshold Cryptography
378
378
  const shares = bsv.splitSecret('my_secret_key', 5, 3); // 5 shares, 3 needed
@@ -384,7 +384,7 @@ const covenant = bsv.SmartContract.createCovenantBuilder()
384
384
 
385
385
  ### 🎯 **Everything Bundle** (~1.1MB)
386
386
  ```html
387
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.bundle.js"></script>
387
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.bundle.js"></script>
388
388
  <script>
389
389
  // Everything available immediately
390
390
  const shares = bsv.splitSecret('secret', 5, 3); // Shamir Secret Sharing
@@ -494,8 +494,8 @@ const contractTx = covenant.createCovenantTransaction({
494
494
 
495
495
  #### 1. **Minimal Setup** - Core + Script Helper (~1.2MB)
496
496
  ```html
497
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
498
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-script-helper.min.js"></script>
497
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
498
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-script-helper.min.js"></script>
499
499
  <script>
500
500
  const tx = new bsv.Transaction();
501
501
  const sig = bsvScriptHelper.createSignature(tx, privateKey, 0, script, satoshis);
@@ -504,9 +504,9 @@ const contractTx = covenant.createCovenantTransaction({
504
504
 
505
505
  #### 2. **DeFi Development** - Core + Covenants + Debug (~2.8MB — each bundle re-embeds core BSV)
506
506
  ```html
507
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
508
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-covenant.min.js"></script>
509
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-smartcontract.min.js"></script>
507
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
508
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-covenant.min.js"></script>
509
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-smartcontract.min.js"></script>
510
510
  <script>
511
511
  const covenant = new bsvCovenant.CovenantInterface();
512
512
  const debugInfo = SmartContract.interpretScript(script);
@@ -516,8 +516,8 @@ const contractTx = covenant.createCovenantTransaction({
516
516
 
517
517
  #### 3. **Security First** - Core + Enhanced Security (~1.2MB)
518
518
  ```html
519
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.min.js"></script>
520
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv-security.min.js"></script>
519
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.min.js"></script>
520
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv-security.min.js"></script>
521
521
  <script>
522
522
  const verified = bsvSecurity.SmartVerify.verify(signature, hash, publicKey);
523
523
  const enhanced = bsvSecurity.EllipticFixed.createSignature(privateKey, hash);
@@ -526,7 +526,7 @@ const contractTx = covenant.createCovenantTransaction({
526
526
 
527
527
  #### 4. **Everything Bundle** - One File Solution (~1.1MB)
528
528
  ```html
529
- <script src="https://unpkg.com/@smartledger/bsv@6.1.0/bsv.bundle.js"></script>
529
+ <script src="https://unpkg.com/@smartledger/bsv@6.1.1/bsv.bundle.js"></script>
530
530
  <script>
531
531
  // Everything available under bsv namespace
532
532
  const keys = bsv.SmartLedgerBundle.generateKeys();
@@ -834,7 +834,7 @@ const timelockScript = helper.createTimelockScript(
834
834
 
835
835
  See the **[16 Loading Options](#-16-loading-options---choose-your-approach)**
836
836
  table near the top for the full list of bundles with current sizes and
837
- canonical `unpkg.com/@smartledger/bsv@6.1.0/...` URLs.
837
+ canonical `unpkg.com/@smartledger/bsv@6.1.1/...` URLs.
838
838
 
839
839
  ## 🔐 Security
840
840
 
@@ -45,4 +45,4 @@ const re=BigInt(0),ie=BigInt(1);function ne(e,t){const r=t.negate();return e?r:t
45
45
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
46
46
  const ge=(e,t)=>(e+(e>=0?t:-t)/Oe)/t;function me(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function ye(e,t){P(e);const r={};for(let i of Object.keys(t))r[i]=void 0===e[i]?t[i]:e[i];return d(r.lowS,"lowS"),d(r.prehash,"prehash"),void 0!==r.format&&me(r.format),r}class ve extends Error{constructor(e=""){super(e)}}const be={Err:ve,_tlv:{encode:(e,t)=>{const{Err:r}=be;if(m(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if("string"!=typeof t)throw new TypeError('"data" expected string, got type='+typeof t);if(1&t.length)throw new r("tlv.encode: unpadded data");const i=t.length/2,n=y(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");const o=i>127?y(n.length/2|128):"";return y(e)+o+n+t},decode(e,t){const{Err:r}=be;t=o(t,void 0,"DER data");let i=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");const n=t[i++];let a=0;if(!!(128&n)){const e=127&n;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const o=t.subarray(i,i+e);if(o.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===o[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of o)a=a<<8|e;if(i+=e,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=n;const s=t.subarray(i,i+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+a)}}},_int:{encode(e){const{Err:t}=be;if(g(e),e<Se)throw new t("integer: negative integers are not allowed");let r=y(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=be;if(e.length<1)throw new t("invalid signature integer: empty");if(128&e[0])throw new t("invalid signature integer: negative");if(e.length>1&&0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return b(e)}},toSig(e){const{Err:t,_int:r,_tlv:i}=be,n=o(e,void 0,"signature"),{v:a,l:s}=i.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");const{v:u,l:c}=i.decode(2,a),{v:l,l:h}=i.decode(2,c);if(h.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(l)}},hexFromSig(e){const{_tlv:t,_int:r}=be,i=t.encode(2,r.encode(e.r))+t.encode(2,r.encode(e.s));return t.encode(48,i)}};Object.freeze(be._tlv),Object.freeze(be._int),Object.freeze(be);const Se=BigInt(0),we=BigInt(1),Oe=BigInt(2),_e=BigInt(3),Ie=BigInt(4);function Ee(e,t={}){const r=function(e,t,r={},i){if(void 0===i&&(i="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const r=t[e];if(!("bigint"==typeof r&&r>re))throw new Error(`CURVE.${e} must be positive bigint`)}const n=de(t.p,r.Fp,i),o=de(t.n,r.Fn,i),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of a)if(!n.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:n,Fn:o}}("weierstrass",e,t),i=r.Fp,n=r.Fn;let a=r.CURVE;const{h:l,n:h}=a;P(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});const{endo:f,allowInfinityPoint:p}=t;if(f&&(!i.is0(a.a)||"bigint"!=typeof f.beta||!Array.isArray(f.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const g=Pe(i,n);function m(){if(!i.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const y=void 0===t.toBytes?function(e,t,r){if(p&&t.is0())return Uint8Array.of(0);const{x:n,y:o}=t.toAffine(),a=i.toBytes(n);if(d(r,"isCompressed"),r){m();const e=!i.isOdd(o);return u(Ae(e),a)}return u(Uint8Array.of(4),a,i.toBytes(o))}:t.toBytes,v=void 0===t.fromBytes?function(e){o(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:r}=g,n=e.length,a=e[0],s=e.subarray(1);if(p&&1===n&&0===a)return{x:i.ZERO,y:i.ZERO};if(n!==t||2!==a&&3!==a){if(n===r&&4===a){const e=i.BYTES,t=i.fromBytes(s.subarray(0,e)),r=i.fromBytes(s.subarray(e,2*e));if(!S(t,r))throw new Error("bad point: is not on curve");return{x:t,y:r}}throw new Error(`bad point: got length ${n}, expected compressed=${t} or uncompressed=${r}`)}{const e=i.fromBytes(s);if(!i.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=b(e);let r;try{r=i.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}m();return!(1&~a)!==i.isOdd(r)&&(r=i.neg(r)),{x:e,y:r}}}:t.fromBytes;function b(e){const t=i.sqr(e),r=i.mul(t,e);return i.add(i.add(r,i.mul(e,a.a)),a.b)}function S(e,t){const r=i.sqr(t),n=b(e);return i.eql(r,n)}if(!S(a.Gx,a.Gy))throw new Error("bad curve params: generator point");const w=i.mul(i.pow(a.a,_e),Ie),O=i.mul(i.sqr(a.b),BigInt(27));if(i.is0(i.add(w,O)))throw new Error("bad curve params: a or b");function _(e,t,r=!1){if(!i.isValid(t)||r&&i.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function k(e){if(!(e instanceof R))throw new Error("Weierstrass Point expected")}function x(e){if(!f||!f.basises)throw new Error("no endo");return function(e,t,r){I("scalar",e,Se,r);const[[i,n],[o,a]]=t,s=ge(a*e,r),u=ge(-n*e,r);let c=e-s*i-u*o,l=-s*n-u*a;const h=c<Se,f=l<Se;h&&(c=-c),f&&(l=-l);const p=A(Math.ceil(E(r)/2))+we;if(c<Se||c>=p||l<Se||l>=p)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:h,k1:c,k2neg:f,k2:l}}(e,f.basises,n.ORDER)}function T(e,t,r,n,o){return r=new R(i.mul(r.X,e),r.Y,r.Z),t=ne(n,t),r=ne(o,r),t.add(r)}class R{static BASE=new R(a.Gx,a.Gy,i.ONE);static ZERO=new R(i.ZERO,i.ONE,i.ZERO);static Fp=i;static Fn=n;X;Y;Z;constructor(e,t,r){this.X=_("x",e),this.Y=_("y",t,!0),this.Z=_("z",r),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!i.isValid(t)||!i.isValid(r))throw new Error("invalid affine point");if(e instanceof R)throw new Error("projective point not allowed");return i.is0(t)&&i.is0(r)?R.ZERO:new R(t,r,i.ONE)}static fromBytes(e){const t=R.fromAffine(v(o(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return R.fromBytes(c(e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return N.createCache(this,e),t||this.multiply(_e),this}assertValidity(){const e=this;if(e.is0()){if(t.allowInfinityPoint&&i.is0(e.X)&&i.eql(e.Y,i.ONE)&&i.is0(e.Z))return;throw new Error("bad point: ZERO")}const{x:r,y:n}=e.toAffine();if(!i.isValid(r)||!i.isValid(n))throw new Error("bad point: x or y not field elements");if(!S(r,n))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(!i.isOdd)throw new Error("Field doesn't support isOdd");return!i.isOdd(e)}equals(e){k(e);const{X:t,Y:r,Z:n}=this,{X:o,Y:a,Z:s}=e,u=i.eql(i.mul(t,s),i.mul(o,n)),c=i.eql(i.mul(r,s),i.mul(a,n));return u&&c}negate(){return new R(this.X,i.neg(this.Y),this.Z)}double(){const{a:e,b:t}=a,r=i.mul(t,_e),{X:n,Y:o,Z:s}=this;let u=i.ZERO,c=i.ZERO,l=i.ZERO,h=i.mul(n,n),f=i.mul(o,o),p=i.mul(s,s),d=i.mul(n,o);return d=i.add(d,d),l=i.mul(n,s),l=i.add(l,l),u=i.mul(e,l),c=i.mul(r,p),c=i.add(u,c),u=i.sub(f,c),c=i.add(f,c),c=i.mul(u,c),u=i.mul(d,u),l=i.mul(r,l),p=i.mul(e,p),d=i.sub(h,p),d=i.mul(e,d),d=i.add(d,l),l=i.add(h,h),h=i.add(l,h),h=i.add(h,p),h=i.mul(h,d),c=i.add(c,h),p=i.mul(o,s),p=i.add(p,p),h=i.mul(p,d),u=i.sub(u,h),l=i.mul(p,f),l=i.add(l,l),l=i.add(l,l),new R(u,c,l)}add(e){k(e);const{X:t,Y:r,Z:n}=this,{X:o,Y:s,Z:u}=e;let c=i.ZERO,l=i.ZERO,h=i.ZERO;const f=a.a,p=i.mul(a.b,_e);let d=i.mul(t,o),g=i.mul(r,s),m=i.mul(n,u),y=i.add(t,r),v=i.add(o,s);y=i.mul(y,v),v=i.add(d,g),y=i.sub(y,v),v=i.add(t,n);let b=i.add(o,u);return v=i.mul(v,b),b=i.add(d,m),v=i.sub(v,b),b=i.add(r,n),c=i.add(s,u),b=i.mul(b,c),c=i.add(g,m),b=i.sub(b,c),h=i.mul(f,v),c=i.mul(p,m),h=i.add(c,h),c=i.sub(g,h),h=i.add(g,h),l=i.mul(c,h),g=i.add(d,d),g=i.add(g,d),m=i.mul(f,m),v=i.mul(p,v),g=i.add(g,m),m=i.sub(d,m),m=i.mul(f,m),v=i.add(v,m),d=i.mul(g,v),l=i.add(l,d),d=i.mul(b,v),c=i.mul(y,c),c=i.sub(c,d),d=i.mul(y,g),h=i.mul(b,h),h=i.add(h,d),new R(c,l,h)}subtract(e){return k(e),this.add(e.negate())}is0(){return this.equals(R.ZERO)}multiply(e){const{endo:r}=t;if(!n.isValidNot0(e))throw new RangeError("invalid scalar: out of range");let i,o;const a=e=>N.cached(this,e,e=>oe(R,e));if(r){const{k1neg:t,k1:n,k2neg:s,k2:u}=x(e),{p:c,f:l}=a(n),{p:h,f}=a(u);o=l.add(f),i=T(r.beta,c,h,t,s)}else{const{p:t,f:r}=a(e);i=t,o=r}return oe(R,[i,o])[0]}multiplyUnsafe(e){const{endo:r}=t,i=this,o=e;if(!n.isValid(o))throw new RangeError("invalid scalar: out of range");if(o===Se||i.is0())return R.ZERO;if(o===we)return i;if(N.hasCache(this))return this.multiply(o);if(r){const{k1neg:e,k1:t,k2neg:n,k2:a}=x(o),{p1:s,p2:u}=function(e,t,r,i){let n=t,o=e.ZERO,a=e.ZERO;for(;r>re||i>re;)r&ie&&(o=o.add(n)),i&ie&&(a=a.add(n)),n=n.double(),r>>=ie,i>>=ie;return{p1:o,p2:a}}(R,i,t,a);return T(r.beta,s,u,e,n)}return N.unsafe(i,o)}toAffine(e){let t=e;const{X:r,Y:n,Z:o}=this;if(i.eql(o,i.ONE))return{x:r,y:n};const a=this.is0();null==t&&(t=a?i.ONE:i.inv(o));const s=i.mul(r,t),u=i.mul(n,t),c=i.mul(o,t);if(a)return{x:i.ZERO,y:i.ZERO};if(!i.eql(c,i.ONE))throw new Error("invZ was invalid");return{x:s,y:u}}isTorsionFree(){const{isTorsionFree:e}=t;return l===we||(e?e(R,this):N.unsafe(this,h).is0())}clearCofactor(){const{clearCofactor:e}=t;return l===we?this:e?e(R,this):this.multiplyUnsafe(l)}isSmallOrder(){return l===we?this.is0():this.clearCofactor().is0()}toBytes(e=!0){return d(e,"isCompressed"),this.assertValidity(),y(R,this,e)}toHex(e=!0){return s(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const B=n.BITS,N=new pe(R,t.endo?Math.ceil(B/2):B);return B>=8&&R.BASE.precompute(8),Object.freeze(R.prototype),Object.freeze(R),R}function Ae(e){return Uint8Array.of(e?2:3)}function Pe(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function ke(e,t={}){const{Fn:r}=e,i=void 0===t.randomBytes?h:t.randomBytes,n=Object.assign(Pe(e.Fp,r),{seed:Math.max(ee(r.ORDER),16)});function a(e){return e=void 0===e?i(n.seed):e,function(e,t,r=!1){o(e);const i=e.length,n=Q(t),a=Math.max(ee(t),16);if(i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const s=H(r?S(e):b(e),t-x)+x;return r?O(s,n):w(s,n)}(o(e,n.seed,"seed"),r.ORDER)}function s(t,i=!0){return e.BASE.multiply(r.fromBytes(t)).toBytes(i)}function u(e){const{secretKey:t,publicKey:i,publicKeyUncompressed:a}=n,s=r._lengths;if(!l(e))return;const u=o(e,void 0,"key").length,c=u===i||u===a,h=u===t||!!s?.includes(u);return c&&h?void 0:c}const c={isValidSecretKey:function(e){try{const t=r.fromBytes(e);return r.isValidNot0(t)}catch(e){return!1}},isValidPublicKey:function(t,r){const{publicKey:i,publicKeyUncompressed:o}=n;try{const n=t.length;return(!0!==r||n===i)&&((!1!==r||n===o)&&!!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:a},f=function(e,t){return function(r){const i=e(r);return{secretKey:i,publicKey:t(i)}}}(a,s);return Object.freeze(c),Object.freeze(n),Object.freeze({getPublicKey:s,getSharedSecret:function(t,i,n=!0){if(!0===u(t))throw new Error("first arg must be private key");if(!1===u(i))throw new Error("second arg must be public key");const o=r.fromBytes(t);return e.fromBytes(i).multiply(o).toBytes(n)},keygen:f,Point:e,utils:c,lengths:n})}function xe(e,t,r={}){const i=t;(0,n.sd)(i),P(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const a=void 0===(r=Object.assign({},r)).randomBytes?h:r.randomBytes,f=void 0===r.hmac?(e,t)=>(0,te.hmac)(i,e,t):r.hmac,{Fp:p,Fn:d}=e,{ORDER:g,BITS:m}=d,{keygen:y,getPublicKey:v,getSharedSecret:S,utils:w,lengths:O}=ke(e,r),_={prehash:!0,lowS:"boolean"!=typeof r.lowS||r.lowS,format:"compact",extraEntropy:!1},E=g*Oe+we<p.ORDER;function k(e){return e>g>>we}function x(e,t){if(!d.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}function T(){if(E)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function R(e,t){me(t);const r=O.signature;return o(e,"compact"===t?r:"recovered"===t?r+1:void 0)}class B{r;s;recovery;constructor(e,t,r){if(this.r=x("r",e),this.s=x("s",t),null!=r){if(T(),![0,1,2,3].includes(r))throw new Error("invalid recovery id");this.recovery=r}Object.freeze(this)}static fromBytes(e,t=_.format){let r;if(R(e,t),"der"===t){const{r:t,s:r}=be.toSig(o(e));return new B(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));const i=O.signature/2,n=e.subarray(0,i),a=e.subarray(i,2*i);return new B(d.fromBytes(n),d.fromBytes(a),r)}static fromHex(e,t){return this.fromBytes(c(e),t)}assertRecovery(){const{recovery:e}=this;if(null==e)throw new Error("invalid recovery id: must be present");return e}addRecoveryBit(e){return new B(this.r,this.s,e)}recoverPublicKey(t){const{r,s:i}=this,n=this.assertRecovery(),a=2===n||3===n?r+g:r;if(!p.isValid(a))throw new Error("invalid recovery id: sig.r+curve.n != R.x");const s=p.toBytes(a),c=e.fromBytes(u(Ae(!(1&n)),s)),l=d.inv(a),h=C(o(t,void 0,"msgHash")),f=d.create(-h*l),m=d.create(i*l),y=e.BASE.multiplyUnsafe(f).add(c.multiplyUnsafe(m));if(y.is0())throw new Error("invalid recovery: point at infinify");return y.assertValidity(),y}hasHighS(){return k(this.s)}toBytes(e=_.format){if(me(e),"der"===e)return c(be.hexFromSig(this));const{r:t,s:r}=this,i=d.toBytes(t),n=d.toBytes(r);return"recovered"===e?(T(),u(Uint8Array.of(this.assertRecovery()),i,n)):u(i,n)}toHex(e){return s(this.toBytes(e))}}Object.freeze(B.prototype),Object.freeze(B);const N=void 0===r.bits2int?function(e){if(e.length>8192)throw new Error("input is too large");const t=b(e),r=8*e.length-m;return r>0?t>>BigInt(r):t}:r.bits2int,C=void 0===r.bits2int_modN?function(e){return d.create(N(e))}:r.bits2int_modN,D=A(m);function M(e){return I("num < 2^"+m,e,Se,D),d.toBytes(e)}function L(e,t){return o(e,void 0,"message"),t?o(i(e),void 0,"prehashed message"):e}return Object.freeze({keygen:y,getPublicKey:v,getSharedSecret:S,utils:w,lengths:O,Point:e,sign:function(t,r,s={}){const{seed:c,k2sig:l}=function(t,r,i){const{lowS:n,prehash:s,extraEntropy:c}=ye(i,_);t=L(t,s);const l=C(t),h=d.fromBytes(r);if(!d.isValidNot0(h))throw new Error("invalid private key");const f=[M(h),M(l)];if(null!=c&&!1!==c){const e=!0===c?a(O.secretKey):c;f.push(o(e,void 0,"extraEntropy"))}const p=u(...f),g=l;return{seed:p,k2sig:function(t){const r=N(t);if(!d.isValidNot0(r))return;const i=d.inv(r),o=e.BASE.multiply(r).toAffine(),a=d.create(o.x);if(a===Se)return;const s=d.create(i*d.create(g+a*h));if(s===Se)return;let u=(o.x===a?0:2)|Number(o.y&we),c=s;return n&&k(s)&&(c=d.neg(s),u^=1),new B(a,c,E?void 0:u)}}}(t,r,s);return function(e,t,r){if((0,n.Fe)(e,"hashLen"),(0,n.Fe)(t,"qByteLen"),"function"!=typeof r)throw new TypeError("hmacFn must be a function");const i=e=>new Uint8Array(e),o=Uint8Array.of(),a=Uint8Array.of(0),s=Uint8Array.of(1);let c=i(e),l=i(e),h=0;const f=()=>{c.fill(1),l.fill(0),h=0},p=(...e)=>r(l,u(c,...e)),d=(e=o)=>{l=p(a,e),c=p(),0!==e.length&&(l=p(s,e),c=p())},g=()=>{if(h++>=1e3)throw new Error("drbg: tried max amount of iterations");let e=0;const r=[];for(;e<t;){c=p();const t=c.slice();r.push(t),e+=c.length}return u(...r)};return(e,t)=>{let r;for(f(),d(e);void 0===(r=t(g()));)d();return f(),r}}(i.outputLen,d.BYTES,f)(c,l).toBytes(s.format)},verify:function(t,r,i,n={}){const{lowS:a,prehash:s,format:u}=ye(n,_);if(i=o(i,void 0,"publicKey"),r=L(r,s),!l(t)){throw new Error("verify expects Uint8Array signature"+(t instanceof B?", use sig.toBytes()":""))}R(t,u);try{const n=B.fromBytes(t,u),o=e.fromBytes(i);if(a&&n.hasHighS())return!1;const{r:s,s:c}=n,l=C(r),h=d.inv(c),f=d.create(l*h),p=d.create(s*h),g=e.BASE.multiplyUnsafe(f).add(o.multiplyUnsafe(p));if(g.is0())return!1;return d.create(g.x)===s}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){const{prehash:i}=ye(r,_);return t=L(t,i),B.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:B,hash:i})}
47
47
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
48
- const Te={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Re={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Be=BigInt(2);const Ne=Z(Te.p,{sqrt:function(e){const t=Te.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,h=j(l,r,t)*l%t,f=j(h,r,t)*l%t,p=j(f,Be,t)*c%t,d=j(p,n,t)*p%t,g=j(d,o,t)*d%t,m=j(g,s,t)*g%t,y=j(m,u,t)*m%t,v=j(y,s,t)*g%t,b=j(v,r,t)*l%t,S=j(b,a,t)*d%t,w=j(S,i,t)*c%t,O=j(w,Be,t);if(!Ne.eql(Ne.sqr(O),e))throw new Error("Cannot find square root");return O}}),Ce=Ee(Te,{Fp:Ne,endo:Re}),De=xe(Ce,i.sha256)},7474(e,t,r){"use strict";r.d(t,{hmac:()=>o});var i=r(508);class n{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if((0,i.sd)(e),(0,i.DO)(t,void 0,"key"),this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),(0,i.uH)(n)}update(e){return(0,i.CC)(this),this.iHash.update(e),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:a}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(()=>{const e=(e,t,r)=>new n(e,t).update(r).digest();return e.create=(e,t)=>new n(e,t),e})()},8087(e,t,r){"use strict";r.d(t,{sha256:()=>L,sha512:()=>H});var i=r(508);function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}class a{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,i.CC)(this),(0,i.DO)(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(n-this.pos,o-a);if(s===n){const t=(0,i.O8)(e);for(;n<=o-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:a}=this;t[a++]=128,(0,i.uH)(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const s=(0,i.O8)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=u/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,l[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=n,e.length=i,e.pos=a,i%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const s=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),c=BigInt(2**32-1),l=BigInt(32);function h(e,t=!1){return t?{h:Number(e&c),l:Number(e>>l&c)}:{h:0|Number(e>>l&c),l:0|Number(e&c)}}function f(e,t=!1){const r=e.length;let i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){const{h:r,l:a}=h(e[o],t);[i[o],n[o]]=[r,a]}return[i,n]}const p=(e,t,r)=>e>>>r,d=(e,t,r)=>e<<32-r|t>>>r,g=(e,t,r)=>e>>>r|t<<32-r,m=(e,t,r)=>e<<32-r|t>>>r,y=(e,t,r)=>e<<64-r|t>>>r-32,v=(e,t,r)=>e>>>r-32|t<<64-r;function b(e,t,r,i){const n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:0|n}}const S=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),w=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,O=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),_=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,I=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),E=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0;const A=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),P=new Uint32Array(64);class k extends a{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)P[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=P[e-15],r=P[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;P[e]=o+P[e-7]+n+P[e-16]|0}let{A:r,B:a,C:s,D:u,E:c,F:l,G:h,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+n(c,l,h)+A[e]+P[e]|0,p=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,a,s)|0;f=h,h=l,l=c,c=u+t|0,u=s,s=a,a=r,r=t+p|0}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,u=u+this.D|0,c=c+this.E|0,l=l+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(r,a,s,u,c,l,h,f)}roundClean(){(0,i.uH)(P)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),(0,i.uH)(this.buffer)}}class x extends k{A=0|s[0];B=0|s[1];C=0|s[2];D=0|s[3];E=0|s[4];F=0|s[5];G=0|s[6];H=0|s[7];constructor(){super(32)}}const T=(()=>f(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),R=(()=>T[0])(),B=(()=>T[1])(),N=new Uint32Array(80),C=new Uint32Array(80);class D extends a{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:l,Fl:h,Gh:f,Gl:p,Hh:d,Hl:g}=this;return[e,t,r,i,n,o,a,s,u,c,l,h,f,p,d,g]}set(e,t,r,i,n,o,a,s,u,c,l,h,f,p,d,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|h,this.Gh=0|f,this.Gl=0|p,this.Hh=0|d,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)N[r]=e.getUint32(t),C[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|N[e-15],r=0|C[e-15],i=g(t,r,1)^g(t,r,8)^p(t,0,7),n=m(t,r,1)^m(t,r,8)^d(t,r,7),o=0|N[e-2],a=0|C[e-2],s=g(o,a,19)^y(o,a,61)^p(o,0,6),u=m(o,a,19)^v(o,a,61)^d(o,a,6),c=O(n,u,C[e-7],C[e-16]),l=_(c,i,s,N[e-7],N[e-16]);N[e]=0|l,C[e]=0|c}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:a,Cl:s,Dh:u,Dl:c,Eh:l,El:h,Fh:f,Fl:A,Gh:P,Gl:k,Hh:x,Hl:T}=this;for(let e=0;e<80;e++){const t=g(l,h,14)^g(l,h,18)^y(l,h,41),p=m(l,h,14)^m(l,h,18)^v(l,h,41),d=l&f^~l&P,O=I(T,p,h&A^~h&k,B[e],C[e]),_=E(O,x,t,d,R[e],N[e]),D=0|O,M=g(r,i,28)^y(r,i,34)^y(r,i,39),L=m(r,i,28)^v(r,i,34)^v(r,i,39),H=r&n^r&a^n&a,j=i&o^i&s^o&s;x=0|P,T=0|k,P=0|f,k=0|A,f=0|l,A=0|h,({h:l,l:h}=b(0|u,0|c,0|_,0|D)),u=0|a,c=0|s,a=0|n,s=0|o,n=0|r,o=0|i;const U=S(D,L,j);r=w(U,_,M,H),i=0|U}({h:r,l:i}=b(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=b(0|this.Bh,0|this.Bl,0|n,0|o)),({h:a,l:s}=b(0|this.Ch,0|this.Cl,0|a,0|s)),({h:u,l:c}=b(0|this.Dh,0|this.Dl,0|u,0|c)),({h:l,l:h}=b(0|this.Eh,0|this.El,0|l,0|h)),({h:f,l:A}=b(0|this.Fh,0|this.Fl,0|f,0|A)),({h:P,l:k}=b(0|this.Gh,0|this.Gl,0|P,0|k)),({h:x,l:T}=b(0|this.Hh,0|this.Hl,0|x,0|T)),this.set(r,i,n,o,a,s,u,c,l,h,f,A,P,k,x,T)}roundClean(){(0,i.uH)(N,C)}destroy(){this.destroyed=!0,(0,i.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class M extends D{Ah=0|u[0];Al=0|u[1];Bh=0|u[2];Bl=0|u[3];Ch=0|u[4];Cl=0|u[5];Dh=0|u[6];Dl=0|u[7];Eh=0|u[8];El=0|u[9];Fh=0|u[10];Fl=0|u[11];Gh=0|u[12];Gl=0|u[13];Hh=0|u[14];Hl=0|u[15];constructor(){super(64)}}const L=(0,i.qj)(()=>new x,(0,i.nx)(1)),H=(0,i.qj)(()=>new M,(0,i.nx)(3))},508(e,t,r){"use strict";function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function n(e,t=""){if("number"!=typeof e){throw new TypeError(`${t&&`"${t}" `}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){throw new RangeError(`${t&&`"${t}" `}expected integer >= 0, got ${e}`)}}function o(e,t,r=""){const n=i(e),o=e?.length,a=void 0!==t;if(!n||a&&o!==t){const i=(r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${o}`:"type="+typeof e);if(!n)throw new TypeError(i);throw new RangeError(i)}return e}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw new TypeError("Hash must wrapped by utils.createHasher");if(n(e.outputLen),n(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}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,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function c(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function l(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function h(e,t){return e<<32-t|e>>>t}r.d(t,{CC:()=>s,DO:()=>o,Fe:()=>n,Ht:()=>u,Id:()=>_,My:()=>d,O8:()=>l,Ow:()=>h,aT:()=>O,aY:()=>i,nx:()=>A,po:()=>E,qj:()=>I,sd:()=>a,uH:()=>c});const f=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(o(e),f)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=p[e[r]];return t}const g=48,m=57,y=65,v=70,b=97,S=102;function w(e){return e>=g&&e<=m?e-g:e>=y&&e<=v?e-(y-10):e>=b&&e<=S?e-(b-10):void 0}function O(e){if("string"!=typeof e)throw new TypeError("hex string expected, got "+typeof e);if(f)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw new RangeError(e.message);throw e}const t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=w(e.charCodeAt(n)),o=w(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new RangeError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function _(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];o(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r}function I(e,t={}){const r=(t,r)=>e(r).update(t).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}function E(e=32){n(e,"bytesLength");const t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const A=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})},9294(e,t,r){"use strict";r.d(t,{c:()=>i});var i=r(4233)},8330(e){"use strict";e.exports={rE:"6.1.0"}}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.c=t,r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i=r(r.s=5424);bsvCovenant=i})();
48
+ const Te={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Re={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Be=BigInt(2);const Ne=Z(Te.p,{sqrt:function(e){const t=Te.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,h=j(l,r,t)*l%t,f=j(h,r,t)*l%t,p=j(f,Be,t)*c%t,d=j(p,n,t)*p%t,g=j(d,o,t)*d%t,m=j(g,s,t)*g%t,y=j(m,u,t)*m%t,v=j(y,s,t)*g%t,b=j(v,r,t)*l%t,S=j(b,a,t)*d%t,w=j(S,i,t)*c%t,O=j(w,Be,t);if(!Ne.eql(Ne.sqr(O),e))throw new Error("Cannot find square root");return O}}),Ce=Ee(Te,{Fp:Ne,endo:Re}),De=xe(Ce,i.sha256)},7474(e,t,r){"use strict";r.d(t,{hmac:()=>o});var i=r(508);class n{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if((0,i.sd)(e),(0,i.DO)(t,void 0,"key"),this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),(0,i.uH)(n)}update(e){return(0,i.CC)(this),this.iHash.update(e),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:a}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(()=>{const e=(e,t,r)=>new n(e,t).update(r).digest();return e.create=(e,t)=>new n(e,t),e})()},8087(e,t,r){"use strict";r.d(t,{sha256:()=>L,sha512:()=>H});var i=r(508);function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}class a{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,i.CC)(this),(0,i.DO)(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(n-this.pos,o-a);if(s===n){const t=(0,i.O8)(e);for(;n<=o-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:a}=this;t[a++]=128,(0,i.uH)(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const s=(0,i.O8)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=u/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,l[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=n,e.length=i,e.pos=a,i%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const s=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),c=BigInt(2**32-1),l=BigInt(32);function h(e,t=!1){return t?{h:Number(e&c),l:Number(e>>l&c)}:{h:0|Number(e>>l&c),l:0|Number(e&c)}}function f(e,t=!1){const r=e.length;let i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){const{h:r,l:a}=h(e[o],t);[i[o],n[o]]=[r,a]}return[i,n]}const p=(e,t,r)=>e>>>r,d=(e,t,r)=>e<<32-r|t>>>r,g=(e,t,r)=>e>>>r|t<<32-r,m=(e,t,r)=>e<<32-r|t>>>r,y=(e,t,r)=>e<<64-r|t>>>r-32,v=(e,t,r)=>e>>>r-32|t<<64-r;function b(e,t,r,i){const n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:0|n}}const S=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),w=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,O=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),_=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,I=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),E=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0;const A=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),P=new Uint32Array(64);class k extends a{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)P[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=P[e-15],r=P[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;P[e]=o+P[e-7]+n+P[e-16]|0}let{A:r,B:a,C:s,D:u,E:c,F:l,G:h,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+n(c,l,h)+A[e]+P[e]|0,p=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,a,s)|0;f=h,h=l,l=c,c=u+t|0,u=s,s=a,a=r,r=t+p|0}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,u=u+this.D|0,c=c+this.E|0,l=l+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(r,a,s,u,c,l,h,f)}roundClean(){(0,i.uH)(P)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),(0,i.uH)(this.buffer)}}class x extends k{A=0|s[0];B=0|s[1];C=0|s[2];D=0|s[3];E=0|s[4];F=0|s[5];G=0|s[6];H=0|s[7];constructor(){super(32)}}const T=(()=>f(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),R=(()=>T[0])(),B=(()=>T[1])(),N=new Uint32Array(80),C=new Uint32Array(80);class D extends a{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:l,Fl:h,Gh:f,Gl:p,Hh:d,Hl:g}=this;return[e,t,r,i,n,o,a,s,u,c,l,h,f,p,d,g]}set(e,t,r,i,n,o,a,s,u,c,l,h,f,p,d,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|h,this.Gh=0|f,this.Gl=0|p,this.Hh=0|d,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)N[r]=e.getUint32(t),C[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|N[e-15],r=0|C[e-15],i=g(t,r,1)^g(t,r,8)^p(t,0,7),n=m(t,r,1)^m(t,r,8)^d(t,r,7),o=0|N[e-2],a=0|C[e-2],s=g(o,a,19)^y(o,a,61)^p(o,0,6),u=m(o,a,19)^v(o,a,61)^d(o,a,6),c=O(n,u,C[e-7],C[e-16]),l=_(c,i,s,N[e-7],N[e-16]);N[e]=0|l,C[e]=0|c}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:a,Cl:s,Dh:u,Dl:c,Eh:l,El:h,Fh:f,Fl:A,Gh:P,Gl:k,Hh:x,Hl:T}=this;for(let e=0;e<80;e++){const t=g(l,h,14)^g(l,h,18)^y(l,h,41),p=m(l,h,14)^m(l,h,18)^v(l,h,41),d=l&f^~l&P,O=I(T,p,h&A^~h&k,B[e],C[e]),_=E(O,x,t,d,R[e],N[e]),D=0|O,M=g(r,i,28)^y(r,i,34)^y(r,i,39),L=m(r,i,28)^v(r,i,34)^v(r,i,39),H=r&n^r&a^n&a,j=i&o^i&s^o&s;x=0|P,T=0|k,P=0|f,k=0|A,f=0|l,A=0|h,({h:l,l:h}=b(0|u,0|c,0|_,0|D)),u=0|a,c=0|s,a=0|n,s=0|o,n=0|r,o=0|i;const U=S(D,L,j);r=w(U,_,M,H),i=0|U}({h:r,l:i}=b(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=b(0|this.Bh,0|this.Bl,0|n,0|o)),({h:a,l:s}=b(0|this.Ch,0|this.Cl,0|a,0|s)),({h:u,l:c}=b(0|this.Dh,0|this.Dl,0|u,0|c)),({h:l,l:h}=b(0|this.Eh,0|this.El,0|l,0|h)),({h:f,l:A}=b(0|this.Fh,0|this.Fl,0|f,0|A)),({h:P,l:k}=b(0|this.Gh,0|this.Gl,0|P,0|k)),({h:x,l:T}=b(0|this.Hh,0|this.Hl,0|x,0|T)),this.set(r,i,n,o,a,s,u,c,l,h,f,A,P,k,x,T)}roundClean(){(0,i.uH)(N,C)}destroy(){this.destroyed=!0,(0,i.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class M extends D{Ah=0|u[0];Al=0|u[1];Bh=0|u[2];Bl=0|u[3];Ch=0|u[4];Cl=0|u[5];Dh=0|u[6];Dl=0|u[7];Eh=0|u[8];El=0|u[9];Fh=0|u[10];Fl=0|u[11];Gh=0|u[12];Gl=0|u[13];Hh=0|u[14];Hl=0|u[15];constructor(){super(64)}}const L=(0,i.qj)(()=>new x,(0,i.nx)(1)),H=(0,i.qj)(()=>new M,(0,i.nx)(3))},508(e,t,r){"use strict";function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function n(e,t=""){if("number"!=typeof e){throw new TypeError(`${t&&`"${t}" `}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){throw new RangeError(`${t&&`"${t}" `}expected integer >= 0, got ${e}`)}}function o(e,t,r=""){const n=i(e),o=e?.length,a=void 0!==t;if(!n||a&&o!==t){const i=(r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${o}`:"type="+typeof e);if(!n)throw new TypeError(i);throw new RangeError(i)}return e}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw new TypeError("Hash must wrapped by utils.createHasher");if(n(e.outputLen),n(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}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,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function c(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function l(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function h(e,t){return e<<32-t|e>>>t}r.d(t,{CC:()=>s,DO:()=>o,Fe:()=>n,Ht:()=>u,Id:()=>_,My:()=>d,O8:()=>l,Ow:()=>h,aT:()=>O,aY:()=>i,nx:()=>A,po:()=>E,qj:()=>I,sd:()=>a,uH:()=>c});const f=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(o(e),f)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=p[e[r]];return t}const g=48,m=57,y=65,v=70,b=97,S=102;function w(e){return e>=g&&e<=m?e-g:e>=y&&e<=v?e-(y-10):e>=b&&e<=S?e-(b-10):void 0}function O(e){if("string"!=typeof e)throw new TypeError("hex string expected, got "+typeof e);if(f)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw new RangeError(e.message);throw e}const t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=w(e.charCodeAt(n)),o=w(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new RangeError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function _(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];o(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r}function I(e,t={}){const r=(t,r)=>e(r).update(t).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}function E(e=32){n(e,"bytesLength");const t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const A=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})},9294(e,t,r){"use strict";r.d(t,{c:()=>i});var i=r(4233)},8330(e){"use strict";e.exports={rE:"6.1.1"}}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.c=t,r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i=r(r.s=5424);bsvCovenant=i})();
package/bsv-gdaf.min.js CHANGED
@@ -42,4 +42,4 @@ const re=BigInt(0),ie=BigInt(1);function ne(e,t){const r=t.negate();return e?r:t
42
42
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
43
43
  const ge=(e,t)=>(e+(e>=0?t:-t)/Se)/t;function me(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function ye(e,t){A(e);const r={};for(let i of Object.keys(t))r[i]=void 0===e[i]?t[i]:e[i];return d(r.lowS,"lowS"),d(r.prehash,"prehash"),void 0!==r.format&&me(r.format),r}class ve extends Error{constructor(e=""){super(e)}}const be={Err:ve,_tlv:{encode:(e,t)=>{const{Err:r}=be;if(m(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if("string"!=typeof t)throw new TypeError('"data" expected string, got type='+typeof t);if(1&t.length)throw new r("tlv.encode: unpadded data");const i=t.length/2,n=y(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");const o=i>127?y(n.length/2|128):"";return y(e)+o+n+t},decode(e,t){const{Err:r}=be;t=o(t,void 0,"DER data");let i=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");const n=t[i++];let a=0;if(!!(128&n)){const e=127&n;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");const o=t.subarray(i,i+e);if(o.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===o[0])throw new r("tlv.decode(long): zero leftmost byte");for(const e of o)a=a<<8|e;if(i+=e,a<128)throw new r("tlv.decode(long): not minimal encoding")}else a=n;const s=t.subarray(i,i+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+a)}}},_int:{encode(e){const{Err:t}=be;if(g(e),e<_e)throw new t("integer: negative integers are not allowed");let r=y(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=be;if(e.length<1)throw new t("invalid signature integer: empty");if(128&e[0])throw new t("invalid signature integer: negative");if(e.length>1&&0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return b(e)}},toSig(e){const{Err:t,_int:r,_tlv:i}=be,n=o(e,void 0,"signature"),{v:a,l:s}=i.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");const{v:u,l:c}=i.decode(2,a),{v:h,l}=i.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(u),s:r.decode(h)}},hexFromSig(e){const{_tlv:t,_int:r}=be,i=t.encode(2,r.encode(e.r))+t.encode(2,r.encode(e.s));return t.encode(48,i)}};Object.freeze(be._tlv),Object.freeze(be._int),Object.freeze(be);const _e=BigInt(0),we=BigInt(1),Se=BigInt(2),Ee=BigInt(3),ke=BigInt(4);function Oe(e,t={}){const r=function(e,t,r={},i){if(void 0===i&&(i="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const r=t[e];if(!("bigint"==typeof r&&r>re))throw new Error(`CURVE.${e} must be positive bigint`)}const n=de(t.p,r.Fp,i),o=de(t.n,r.Fn,i),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of a)if(!n.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:n,Fn:o}}("weierstrass",e,t),i=r.Fp,n=r.Fn;let a=r.CURVE;const{h,n:l}=a;A(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});const{endo:f,allowInfinityPoint:p}=t;if(f&&(!i.is0(a.a)||"bigint"!=typeof f.beta||!Array.isArray(f.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const g=Ae(i,n);function m(){if(!i.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const y=void 0===t.toBytes?function(e,t,r){if(p&&t.is0())return Uint8Array.of(0);const{x:n,y:o}=t.toAffine(),a=i.toBytes(n);if(d(r,"isCompressed"),r){m();const e=!i.isOdd(o);return u(Ie(e),a)}return u(Uint8Array.of(4),a,i.toBytes(o))}:t.toBytes,v=void 0===t.fromBytes?function(e){o(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:r}=g,n=e.length,a=e[0],s=e.subarray(1);if(p&&1===n&&0===a)return{x:i.ZERO,y:i.ZERO};if(n!==t||2!==a&&3!==a){if(n===r&&4===a){const e=i.BYTES,t=i.fromBytes(s.subarray(0,e)),r=i.fromBytes(s.subarray(e,2*e));if(!_(t,r))throw new Error("bad point: is not on curve");return{x:t,y:r}}throw new Error(`bad point: got length ${n}, expected compressed=${t} or uncompressed=${r}`)}{const e=i.fromBytes(s);if(!i.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=b(e);let r;try{r=i.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}m();return!(1&~a)!==i.isOdd(r)&&(r=i.neg(r)),{x:e,y:r}}}:t.fromBytes;function b(e){const t=i.sqr(e),r=i.mul(t,e);return i.add(i.add(r,i.mul(e,a.a)),a.b)}function _(e,t){const r=i.sqr(t),n=b(e);return i.eql(r,n)}if(!_(a.Gx,a.Gy))throw new Error("bad curve params: generator point");const w=i.mul(i.pow(a.a,Ee),ke),S=i.mul(i.sqr(a.b),BigInt(27));if(i.is0(i.add(w,S)))throw new Error("bad curve params: a or b");function E(e,t,r=!1){if(!i.isValid(t)||r&&i.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function P(e){if(!(e instanceof R))throw new Error("Weierstrass Point expected")}function x(e){if(!f||!f.basises)throw new Error("no endo");return function(e,t,r){k("scalar",e,_e,r);const[[i,n],[o,a]]=t,s=ge(a*e,r),u=ge(-n*e,r);let c=e-s*i-u*o,h=-s*n-u*a;const l=c<_e,f=h<_e;l&&(c=-c),f&&(h=-h);const p=I(Math.ceil(O(r)/2))+we;if(c<_e||c>=p||h<_e||h>=p)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:l,k1:c,k2neg:f,k2:h}}(e,f.basises,n.ORDER)}function T(e,t,r,n,o){return r=new R(i.mul(r.X,e),r.Y,r.Z),t=ne(n,t),r=ne(o,r),t.add(r)}class R{static BASE=new R(a.Gx,a.Gy,i.ONE);static ZERO=new R(i.ZERO,i.ONE,i.ZERO);static Fp=i;static Fn=n;X;Y;Z;constructor(e,t,r){this.X=E("x",e),this.Y=E("y",t,!0),this.Z=E("z",r),Object.freeze(this)}static CURVE(){return a}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!i.isValid(t)||!i.isValid(r))throw new Error("invalid affine point");if(e instanceof R)throw new Error("projective point not allowed");return i.is0(t)&&i.is0(r)?R.ZERO:new R(t,r,i.ONE)}static fromBytes(e){const t=R.fromAffine(v(o(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return R.fromBytes(c(e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return B.createCache(this,e),t||this.multiply(Ee),this}assertValidity(){const e=this;if(e.is0()){if(t.allowInfinityPoint&&i.is0(e.X)&&i.eql(e.Y,i.ONE)&&i.is0(e.Z))return;throw new Error("bad point: ZERO")}const{x:r,y:n}=e.toAffine();if(!i.isValid(r)||!i.isValid(n))throw new Error("bad point: x or y not field elements");if(!_(r,n))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(!i.isOdd)throw new Error("Field doesn't support isOdd");return!i.isOdd(e)}equals(e){P(e);const{X:t,Y:r,Z:n}=this,{X:o,Y:a,Z:s}=e,u=i.eql(i.mul(t,s),i.mul(o,n)),c=i.eql(i.mul(r,s),i.mul(a,n));return u&&c}negate(){return new R(this.X,i.neg(this.Y),this.Z)}double(){const{a:e,b:t}=a,r=i.mul(t,Ee),{X:n,Y:o,Z:s}=this;let u=i.ZERO,c=i.ZERO,h=i.ZERO,l=i.mul(n,n),f=i.mul(o,o),p=i.mul(s,s),d=i.mul(n,o);return d=i.add(d,d),h=i.mul(n,s),h=i.add(h,h),u=i.mul(e,h),c=i.mul(r,p),c=i.add(u,c),u=i.sub(f,c),c=i.add(f,c),c=i.mul(u,c),u=i.mul(d,u),h=i.mul(r,h),p=i.mul(e,p),d=i.sub(l,p),d=i.mul(e,d),d=i.add(d,h),h=i.add(l,l),l=i.add(h,l),l=i.add(l,p),l=i.mul(l,d),c=i.add(c,l),p=i.mul(o,s),p=i.add(p,p),l=i.mul(p,d),u=i.sub(u,l),h=i.mul(p,f),h=i.add(h,h),h=i.add(h,h),new R(u,c,h)}add(e){P(e);const{X:t,Y:r,Z:n}=this,{X:o,Y:s,Z:u}=e;let c=i.ZERO,h=i.ZERO,l=i.ZERO;const f=a.a,p=i.mul(a.b,Ee);let d=i.mul(t,o),g=i.mul(r,s),m=i.mul(n,u),y=i.add(t,r),v=i.add(o,s);y=i.mul(y,v),v=i.add(d,g),y=i.sub(y,v),v=i.add(t,n);let b=i.add(o,u);return v=i.mul(v,b),b=i.add(d,m),v=i.sub(v,b),b=i.add(r,n),c=i.add(s,u),b=i.mul(b,c),c=i.add(g,m),b=i.sub(b,c),l=i.mul(f,v),c=i.mul(p,m),l=i.add(c,l),c=i.sub(g,l),l=i.add(g,l),h=i.mul(c,l),g=i.add(d,d),g=i.add(g,d),m=i.mul(f,m),v=i.mul(p,v),g=i.add(g,m),m=i.sub(d,m),m=i.mul(f,m),v=i.add(v,m),d=i.mul(g,v),h=i.add(h,d),d=i.mul(b,v),c=i.mul(y,c),c=i.sub(c,d),d=i.mul(y,g),l=i.mul(b,l),l=i.add(l,d),new R(c,h,l)}subtract(e){return P(e),this.add(e.negate())}is0(){return this.equals(R.ZERO)}multiply(e){const{endo:r}=t;if(!n.isValidNot0(e))throw new RangeError("invalid scalar: out of range");let i,o;const a=e=>B.cached(this,e,e=>oe(R,e));if(r){const{k1neg:t,k1:n,k2neg:s,k2:u}=x(e),{p:c,f:h}=a(n),{p:l,f}=a(u);o=h.add(f),i=T(r.beta,c,l,t,s)}else{const{p:t,f:r}=a(e);i=t,o=r}return oe(R,[i,o])[0]}multiplyUnsafe(e){const{endo:r}=t,i=this,o=e;if(!n.isValid(o))throw new RangeError("invalid scalar: out of range");if(o===_e||i.is0())return R.ZERO;if(o===we)return i;if(B.hasCache(this))return this.multiply(o);if(r){const{k1neg:e,k1:t,k2neg:n,k2:a}=x(o),{p1:s,p2:u}=function(e,t,r,i){let n=t,o=e.ZERO,a=e.ZERO;for(;r>re||i>re;)r&ie&&(o=o.add(n)),i&ie&&(a=a.add(n)),n=n.double(),r>>=ie,i>>=ie;return{p1:o,p2:a}}(R,i,t,a);return T(r.beta,s,u,e,n)}return B.unsafe(i,o)}toAffine(e){let t=e;const{X:r,Y:n,Z:o}=this;if(i.eql(o,i.ONE))return{x:r,y:n};const a=this.is0();null==t&&(t=a?i.ONE:i.inv(o));const s=i.mul(r,t),u=i.mul(n,t),c=i.mul(o,t);if(a)return{x:i.ZERO,y:i.ZERO};if(!i.eql(c,i.ONE))throw new Error("invZ was invalid");return{x:s,y:u}}isTorsionFree(){const{isTorsionFree:e}=t;return h===we||(e?e(R,this):B.unsafe(this,l).is0())}clearCofactor(){const{clearCofactor:e}=t;return h===we?this:e?e(R,this):this.multiplyUnsafe(h)}isSmallOrder(){return h===we?this.is0():this.clearCofactor().is0()}toBytes(e=!0){return d(e,"isCompressed"),this.assertValidity(),y(R,this,e)}toHex(e=!0){return s(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const M=n.BITS,B=new pe(R,t.endo?Math.ceil(M/2):M);return M>=8&&R.BASE.precompute(8),Object.freeze(R.prototype),Object.freeze(R),R}function Ie(e){return Uint8Array.of(e?2:3)}function Ae(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Pe(e,t={}){const{Fn:r}=e,i=void 0===t.randomBytes?l:t.randomBytes,n=Object.assign(Ae(e.Fp,r),{seed:Math.max(ee(r.ORDER),16)});function a(e){return e=void 0===e?i(n.seed):e,function(e,t,r=!1){o(e);const i=e.length,n=Q(t),a=Math.max(ee(t),16);if(i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const s=j(r?_(e):b(e),t-x)+x;return r?S(s,n):w(s,n)}(o(e,n.seed,"seed"),r.ORDER)}function s(t,i=!0){return e.BASE.multiply(r.fromBytes(t)).toBytes(i)}function u(e){const{secretKey:t,publicKey:i,publicKeyUncompressed:a}=n,s=r._lengths;if(!h(e))return;const u=o(e,void 0,"key").length,c=u===i||u===a,l=u===t||!!s?.includes(u);return c&&l?void 0:c}const c={isValidSecretKey:function(e){try{const t=r.fromBytes(e);return r.isValidNot0(t)}catch(e){return!1}},isValidPublicKey:function(t,r){const{publicKey:i,publicKeyUncompressed:o}=n;try{const n=t.length;return(!0!==r||n===i)&&((!1!==r||n===o)&&!!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:a},f=function(e,t){return function(r){const i=e(r);return{secretKey:i,publicKey:t(i)}}}(a,s);return Object.freeze(c),Object.freeze(n),Object.freeze({getPublicKey:s,getSharedSecret:function(t,i,n=!0){if(!0===u(t))throw new Error("first arg must be private key");if(!1===u(i))throw new Error("second arg must be public key");const o=r.fromBytes(t);return e.fromBytes(i).multiply(o).toBytes(n)},keygen:f,Point:e,utils:c,lengths:n})}function xe(e,t,r={}){const i=t;(0,n.sd)(i),A(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const a=void 0===(r=Object.assign({},r)).randomBytes?l:r.randomBytes,f=void 0===r.hmac?(e,t)=>(0,te.hmac)(i,e,t):r.hmac,{Fp:p,Fn:d}=e,{ORDER:g,BITS:m}=d,{keygen:y,getPublicKey:v,getSharedSecret:_,utils:w,lengths:S}=Pe(e,r),E={prehash:!0,lowS:"boolean"!=typeof r.lowS||r.lowS,format:"compact",extraEntropy:!1},O=g*Se+we<p.ORDER;function P(e){return e>g>>we}function x(e,t){if(!d.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}function T(){if(O)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function R(e,t){me(t);const r=S.signature;return o(e,"compact"===t?r:"recovered"===t?r+1:void 0)}class M{r;s;recovery;constructor(e,t,r){if(this.r=x("r",e),this.s=x("s",t),null!=r){if(T(),![0,1,2,3].includes(r))throw new Error("invalid recovery id");this.recovery=r}Object.freeze(this)}static fromBytes(e,t=E.format){let r;if(R(e,t),"der"===t){const{r:t,s:r}=be.toSig(o(e));return new M(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));const i=S.signature/2,n=e.subarray(0,i),a=e.subarray(i,2*i);return new M(d.fromBytes(n),d.fromBytes(a),r)}static fromHex(e,t){return this.fromBytes(c(e),t)}assertRecovery(){const{recovery:e}=this;if(null==e)throw new Error("invalid recovery id: must be present");return e}addRecoveryBit(e){return new M(this.r,this.s,e)}recoverPublicKey(t){const{r,s:i}=this,n=this.assertRecovery(),a=2===n||3===n?r+g:r;if(!p.isValid(a))throw new Error("invalid recovery id: sig.r+curve.n != R.x");const s=p.toBytes(a),c=e.fromBytes(u(Ie(!(1&n)),s)),h=d.inv(a),l=C(o(t,void 0,"msgHash")),f=d.create(-l*h),m=d.create(i*h),y=e.BASE.multiplyUnsafe(f).add(c.multiplyUnsafe(m));if(y.is0())throw new Error("invalid recovery: point at infinify");return y.assertValidity(),y}hasHighS(){return P(this.s)}toBytes(e=E.format){if(me(e),"der"===e)return c(be.hexFromSig(this));const{r:t,s:r}=this,i=d.toBytes(t),n=d.toBytes(r);return"recovered"===e?(T(),u(Uint8Array.of(this.assertRecovery()),i,n)):u(i,n)}toHex(e){return s(this.toBytes(e))}}Object.freeze(M.prototype),Object.freeze(M);const B=void 0===r.bits2int?function(e){if(e.length>8192)throw new Error("input is too large");const t=b(e),r=8*e.length-m;return r>0?t>>BigInt(r):t}:r.bits2int,C=void 0===r.bits2int_modN?function(e){return d.create(B(e))}:r.bits2int_modN,N=I(m);function D(e){return k("num < 2^"+m,e,_e,N),d.toBytes(e)}function L(e,t){return o(e,void 0,"message"),t?o(i(e),void 0,"prehashed message"):e}return Object.freeze({keygen:y,getPublicKey:v,getSharedSecret:_,utils:w,lengths:S,Point:e,sign:function(t,r,s={}){const{seed:c,k2sig:h}=function(t,r,i){const{lowS:n,prehash:s,extraEntropy:c}=ye(i,E);t=L(t,s);const h=C(t),l=d.fromBytes(r);if(!d.isValidNot0(l))throw new Error("invalid private key");const f=[D(l),D(h)];if(null!=c&&!1!==c){const e=!0===c?a(S.secretKey):c;f.push(o(e,void 0,"extraEntropy"))}const p=u(...f),g=h;return{seed:p,k2sig:function(t){const r=B(t);if(!d.isValidNot0(r))return;const i=d.inv(r),o=e.BASE.multiply(r).toAffine(),a=d.create(o.x);if(a===_e)return;const s=d.create(i*d.create(g+a*l));if(s===_e)return;let u=(o.x===a?0:2)|Number(o.y&we),c=s;return n&&P(s)&&(c=d.neg(s),u^=1),new M(a,c,O?void 0:u)}}}(t,r,s);return function(e,t,r){if((0,n.Fe)(e,"hashLen"),(0,n.Fe)(t,"qByteLen"),"function"!=typeof r)throw new TypeError("hmacFn must be a function");const i=e=>new Uint8Array(e),o=Uint8Array.of(),a=Uint8Array.of(0),s=Uint8Array.of(1);let c=i(e),h=i(e),l=0;const f=()=>{c.fill(1),h.fill(0),l=0},p=(...e)=>r(h,u(c,...e)),d=(e=o)=>{h=p(a,e),c=p(),0!==e.length&&(h=p(s,e),c=p())},g=()=>{if(l++>=1e3)throw new Error("drbg: tried max amount of iterations");let e=0;const r=[];for(;e<t;){c=p();const t=c.slice();r.push(t),e+=c.length}return u(...r)};return(e,t)=>{let r;for(f(),d(e);void 0===(r=t(g()));)d();return f(),r}}(i.outputLen,d.BYTES,f)(c,h).toBytes(s.format)},verify:function(t,r,i,n={}){const{lowS:a,prehash:s,format:u}=ye(n,E);if(i=o(i,void 0,"publicKey"),r=L(r,s),!h(t)){throw new Error("verify expects Uint8Array signature"+(t instanceof M?", use sig.toBytes()":""))}R(t,u);try{const n=M.fromBytes(t,u),o=e.fromBytes(i);if(a&&n.hasHighS())return!1;const{r:s,s:c}=n,h=C(r),l=d.inv(c),f=d.create(h*l),p=d.create(s*l),g=e.BASE.multiplyUnsafe(f).add(o.multiplyUnsafe(p));if(g.is0())return!1;return d.create(g.x)===s}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){const{prehash:i}=ye(r,E);return t=L(t,i),M.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:M,hash:i})}
44
44
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
45
- const Te={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Re={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Me=BigInt(2);const Be=J(Te.p,{sqrt:function(e){const t=Te.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,h=c*c*e%t,l=U(h,r,t)*h%t,f=U(l,r,t)*h%t,p=U(f,Me,t)*c%t,d=U(p,n,t)*p%t,g=U(d,o,t)*d%t,m=U(g,s,t)*g%t,y=U(m,u,t)*m%t,v=U(y,s,t)*g%t,b=U(v,r,t)*h%t,_=U(b,a,t)*d%t,w=U(_,i,t)*c%t,S=U(w,Me,t);if(!Be.eql(Be.sqr(S),e))throw new Error("Cannot find square root");return S}}),Ce=Oe(Te,{Fp:Be,endo:Re}),Ne=xe(Ce,i.sha256)},7474(e,t,r){"use strict";r.d(t,{hmac:()=>o});var i=r(508);class n{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if((0,i.sd)(e),(0,i.DO)(t,void 0,"key"),this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),(0,i.uH)(n)}update(e){return(0,i.CC)(this),this.iHash.update(e),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:a}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(()=>{const e=(e,t,r)=>new n(e,t).update(r).digest();return e.create=(e,t)=>new n(e,t),e})()},8087(e,t,r){"use strict";r.d(t,{sha256:()=>L,sha512:()=>j});var i=r(508);function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}class a{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,i.CC)(this),(0,i.DO)(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(n-this.pos,o-a);if(s===n){const t=(0,i.O8)(e);for(;n<=o-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:a}=this;t[a++]=128,(0,i.uH)(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const s=(0,i.O8)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=u/4,h=this.get();if(c>h.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,h[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=n,e.length=i,e.pos=a,i%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const s=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),c=BigInt(2**32-1),h=BigInt(32);function l(e,t=!1){return t?{h:Number(e&c),l:Number(e>>h&c)}:{h:0|Number(e>>h&c),l:0|Number(e&c)}}function f(e,t=!1){const r=e.length;let i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){const{h:r,l:a}=l(e[o],t);[i[o],n[o]]=[r,a]}return[i,n]}const p=(e,t,r)=>e>>>r,d=(e,t,r)=>e<<32-r|t>>>r,g=(e,t,r)=>e>>>r|t<<32-r,m=(e,t,r)=>e<<32-r|t>>>r,y=(e,t,r)=>e<<64-r|t>>>r-32,v=(e,t,r)=>e>>>r-32|t<<64-r;function b(e,t,r,i){const n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:0|n}}const _=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),w=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,S=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),E=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,k=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),O=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0;const I=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),A=new Uint32Array(64);class P extends a{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)A[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=A[e-15],r=A[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;A[e]=o+A[e-7]+n+A[e-16]|0}let{A:r,B:a,C:s,D:u,E:c,F:h,G:l,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+n(c,h,l)+I[e]+A[e]|0,p=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,a,s)|0;f=l,l=h,h=c,c=u+t|0,u=s,s=a,a=r,r=t+p|0}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,u=u+this.D|0,c=c+this.E|0,h=h+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,a,s,u,c,h,l,f)}roundClean(){(0,i.uH)(A)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),(0,i.uH)(this.buffer)}}class x extends P{A=0|s[0];B=0|s[1];C=0|s[2];D=0|s[3];E=0|s[4];F=0|s[5];G=0|s[6];H=0|s[7];constructor(){super(32)}}const T=(()=>f(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),R=(()=>T[0])(),M=(()=>T[1])(),B=new Uint32Array(80),C=new Uint32Array(80);class N extends a{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:h,Fl:l,Gh:f,Gl:p,Hh:d,Hl:g}=this;return[e,t,r,i,n,o,a,s,u,c,h,l,f,p,d,g]}set(e,t,r,i,n,o,a,s,u,c,h,l,f,p,d,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|h,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|d,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)B[r]=e.getUint32(t),C[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|B[e-15],r=0|C[e-15],i=g(t,r,1)^g(t,r,8)^p(t,0,7),n=m(t,r,1)^m(t,r,8)^d(t,r,7),o=0|B[e-2],a=0|C[e-2],s=g(o,a,19)^y(o,a,61)^p(o,0,6),u=m(o,a,19)^v(o,a,61)^d(o,a,6),c=S(n,u,C[e-7],C[e-16]),h=E(c,i,s,B[e-7],B[e-16]);B[e]=0|h,C[e]=0|c}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:a,Cl:s,Dh:u,Dl:c,Eh:h,El:l,Fh:f,Fl:I,Gh:A,Gl:P,Hh:x,Hl:T}=this;for(let e=0;e<80;e++){const t=g(h,l,14)^g(h,l,18)^y(h,l,41),p=m(h,l,14)^m(h,l,18)^v(h,l,41),d=h&f^~h&A,S=k(T,p,l&I^~l&P,M[e],C[e]),E=O(S,x,t,d,R[e],B[e]),N=0|S,D=g(r,i,28)^y(r,i,34)^y(r,i,39),L=m(r,i,28)^v(r,i,34)^v(r,i,39),j=r&n^r&a^n&a,U=i&o^i&s^o&s;x=0|A,T=0|P,A=0|f,P=0|I,f=0|h,I=0|l,({h,l}=b(0|u,0|c,0|E,0|N)),u=0|a,c=0|s,a=0|n,s=0|o,n=0|r,o=0|i;const H=_(N,L,U);r=w(H,E,D,j),i=0|H}({h:r,l:i}=b(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=b(0|this.Bh,0|this.Bl,0|n,0|o)),({h:a,l:s}=b(0|this.Ch,0|this.Cl,0|a,0|s)),({h:u,l:c}=b(0|this.Dh,0|this.Dl,0|u,0|c)),({h,l}=b(0|this.Eh,0|this.El,0|h,0|l)),({h:f,l:I}=b(0|this.Fh,0|this.Fl,0|f,0|I)),({h:A,l:P}=b(0|this.Gh,0|this.Gl,0|A,0|P)),({h:x,l:T}=b(0|this.Hh,0|this.Hl,0|x,0|T)),this.set(r,i,n,o,a,s,u,c,h,l,f,I,A,P,x,T)}roundClean(){(0,i.uH)(B,C)}destroy(){this.destroyed=!0,(0,i.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class D extends N{Ah=0|u[0];Al=0|u[1];Bh=0|u[2];Bl=0|u[3];Ch=0|u[4];Cl=0|u[5];Dh=0|u[6];Dl=0|u[7];Eh=0|u[8];El=0|u[9];Fh=0|u[10];Fl=0|u[11];Gh=0|u[12];Gl=0|u[13];Hh=0|u[14];Hl=0|u[15];constructor(){super(64)}}const L=(0,i.qj)(()=>new x,(0,i.nx)(1)),j=(0,i.qj)(()=>new D,(0,i.nx)(3))},508(e,t,r){"use strict";function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function n(e,t=""){if("number"!=typeof e){throw new TypeError(`${t&&`"${t}" `}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){throw new RangeError(`${t&&`"${t}" `}expected integer >= 0, got ${e}`)}}function o(e,t,r=""){const n=i(e),o=e?.length,a=void 0!==t;if(!n||a&&o!==t){const i=(r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${o}`:"type="+typeof e);if(!n)throw new TypeError(i);throw new RangeError(i)}return e}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw new TypeError("Hash must wrapped by utils.createHasher");if(n(e.outputLen),n(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}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,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function c(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function h(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function l(e,t){return e<<32-t|e>>>t}r.d(t,{CC:()=>s,DO:()=>o,Fe:()=>n,Ht:()=>u,Id:()=>E,My:()=>d,O8:()=>h,Ow:()=>l,aT:()=>S,aY:()=>i,nx:()=>I,po:()=>O,qj:()=>k,sd:()=>a,uH:()=>c});const f=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(o(e),f)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=p[e[r]];return t}const g=48,m=57,y=65,v=70,b=97,_=102;function w(e){return e>=g&&e<=m?e-g:e>=y&&e<=v?e-(y-10):e>=b&&e<=_?e-(b-10):void 0}function S(e){if("string"!=typeof e)throw new TypeError("hex string expected, got "+typeof e);if(f)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw new RangeError(e.message);throw e}const t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=w(e.charCodeAt(n)),o=w(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new RangeError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function E(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];o(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r}function k(e,t={}){const r=(t,r)=>e(r).update(t).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}function O(e=32){n(e,"bytesLength");const t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const I=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})},9294(e,t,r){"use strict";r.d(t,{c:()=>i});var i=r(4233)},3219(e){"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},3241(e){"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},5579(e){"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},8330(e){"use strict";e.exports={rE:"6.1.0"}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(__webpack_require__.s=1540);return __webpack_exports__})());
45
+ const Te={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Re={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Me=BigInt(2);const Be=J(Te.p,{sqrt:function(e){const t=Te.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,h=c*c*e%t,l=U(h,r,t)*h%t,f=U(l,r,t)*h%t,p=U(f,Me,t)*c%t,d=U(p,n,t)*p%t,g=U(d,o,t)*d%t,m=U(g,s,t)*g%t,y=U(m,u,t)*m%t,v=U(y,s,t)*g%t,b=U(v,r,t)*h%t,_=U(b,a,t)*d%t,w=U(_,i,t)*c%t,S=U(w,Me,t);if(!Be.eql(Be.sqr(S),e))throw new Error("Cannot find square root");return S}}),Ce=Oe(Te,{Fp:Be,endo:Re}),Ne=xe(Ce,i.sha256)},7474(e,t,r){"use strict";r.d(t,{hmac:()=>o});var i=r(508);class n{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if((0,i.sd)(e),(0,i.DO)(t,void 0,"key"),this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),(0,i.uH)(n)}update(e){return(0,i.CC)(this),this.iHash.update(e),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:a}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(()=>{const e=(e,t,r)=>new n(e,t).update(r).digest();return e.create=(e,t)=>new n(e,t),e})()},8087(e,t,r){"use strict";r.d(t,{sha256:()=>L,sha512:()=>j});var i=r(508);function n(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}class a{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,i.CC)(this),(0,i.DO)(e);const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let a=0;a<o;){const s=Math.min(n-this.pos,o-a);if(s===n){const t=(0,i.O8)(e);for(;n<=o-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:a}=this;t[a++]=128,(0,i.uH)(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(r,0),a=0);for(let e=a;e<n;e++)t[e]=0;r.setBigUint64(n-8,BigInt(8*this.length),o),this.process(r,0);const s=(0,i.O8)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=u/4,h=this.get();if(c>h.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,h[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=n,e.length=i,e.pos=a,i%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const s=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),c=BigInt(2**32-1),h=BigInt(32);function l(e,t=!1){return t?{h:Number(e&c),l:Number(e>>h&c)}:{h:0|Number(e>>h&c),l:0|Number(e&c)}}function f(e,t=!1){const r=e.length;let i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){const{h:r,l:a}=l(e[o],t);[i[o],n[o]]=[r,a]}return[i,n]}const p=(e,t,r)=>e>>>r,d=(e,t,r)=>e<<32-r|t>>>r,g=(e,t,r)=>e>>>r|t<<32-r,m=(e,t,r)=>e<<32-r|t>>>r,y=(e,t,r)=>e<<64-r|t>>>r-32,v=(e,t,r)=>e>>>r-32|t<<64-r;function b(e,t,r,i){const n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:0|n}}const _=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),w=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,S=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),E=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,k=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),O=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0;const I=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),A=new Uint32Array(64);class P extends a{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:i,E:n,F:o,G:a,H:s}=this;return[e,t,r,i,n,o,a,s]}set(e,t,r,i,n,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)A[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=A[e-15],r=A[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;A[e]=o+A[e-7]+n+A[e-16]|0}let{A:r,B:a,C:s,D:u,E:c,F:h,G:l,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+n(c,h,l)+I[e]+A[e]|0,p=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,a,s)|0;f=l,l=h,h=c,c=u+t|0,u=s,s=a,a=r,r=t+p|0}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,u=u+this.D|0,c=c+this.E|0,h=h+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,a,s,u,c,h,l,f)}roundClean(){(0,i.uH)(A)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),(0,i.uH)(this.buffer)}}class x extends P{A=0|s[0];B=0|s[1];C=0|s[2];D=0|s[3];E=0|s[4];F=0|s[5];G=0|s[6];H=0|s[7];constructor(){super(32)}}const T=(()=>f(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),R=(()=>T[0])(),M=(()=>T[1])(),B=new Uint32Array(80),C=new Uint32Array(80);class N extends a{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:a,Dl:s,Eh:u,El:c,Fh:h,Fl:l,Gh:f,Gl:p,Hh:d,Hl:g}=this;return[e,t,r,i,n,o,a,s,u,c,h,l,f,p,d,g]}set(e,t,r,i,n,o,a,s,u,c,h,l,f,p,d,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|h,this.Fl=0|l,this.Gh=0|f,this.Gl=0|p,this.Hh=0|d,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)B[r]=e.getUint32(t),C[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|B[e-15],r=0|C[e-15],i=g(t,r,1)^g(t,r,8)^p(t,0,7),n=m(t,r,1)^m(t,r,8)^d(t,r,7),o=0|B[e-2],a=0|C[e-2],s=g(o,a,19)^y(o,a,61)^p(o,0,6),u=m(o,a,19)^v(o,a,61)^d(o,a,6),c=S(n,u,C[e-7],C[e-16]),h=E(c,i,s,B[e-7],B[e-16]);B[e]=0|h,C[e]=0|c}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:a,Cl:s,Dh:u,Dl:c,Eh:h,El:l,Fh:f,Fl:I,Gh:A,Gl:P,Hh:x,Hl:T}=this;for(let e=0;e<80;e++){const t=g(h,l,14)^g(h,l,18)^y(h,l,41),p=m(h,l,14)^m(h,l,18)^v(h,l,41),d=h&f^~h&A,S=k(T,p,l&I^~l&P,M[e],C[e]),E=O(S,x,t,d,R[e],B[e]),N=0|S,D=g(r,i,28)^y(r,i,34)^y(r,i,39),L=m(r,i,28)^v(r,i,34)^v(r,i,39),j=r&n^r&a^n&a,U=i&o^i&s^o&s;x=0|A,T=0|P,A=0|f,P=0|I,f=0|h,I=0|l,({h,l}=b(0|u,0|c,0|E,0|N)),u=0|a,c=0|s,a=0|n,s=0|o,n=0|r,o=0|i;const H=_(N,L,U);r=w(H,E,D,j),i=0|H}({h:r,l:i}=b(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=b(0|this.Bh,0|this.Bl,0|n,0|o)),({h:a,l:s}=b(0|this.Ch,0|this.Cl,0|a,0|s)),({h:u,l:c}=b(0|this.Dh,0|this.Dl,0|u,0|c)),({h,l}=b(0|this.Eh,0|this.El,0|h,0|l)),({h:f,l:I}=b(0|this.Fh,0|this.Fl,0|f,0|I)),({h:A,l:P}=b(0|this.Gh,0|this.Gl,0|A,0|P)),({h:x,l:T}=b(0|this.Hh,0|this.Hl,0|x,0|T)),this.set(r,i,n,o,a,s,u,c,h,l,f,I,A,P,x,T)}roundClean(){(0,i.uH)(B,C)}destroy(){this.destroyed=!0,(0,i.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class D extends N{Ah=0|u[0];Al=0|u[1];Bh=0|u[2];Bl=0|u[3];Ch=0|u[4];Cl=0|u[5];Dh=0|u[6];Dl=0|u[7];Eh=0|u[8];El=0|u[9];Fh=0|u[10];Fl=0|u[11];Gh=0|u[12];Gl=0|u[13];Hh=0|u[14];Hl=0|u[15];constructor(){super(64)}}const L=(0,i.qj)(()=>new x,(0,i.nx)(1)),j=(0,i.qj)(()=>new D,(0,i.nx)(3))},508(e,t,r){"use strict";function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT}function n(e,t=""){if("number"!=typeof e){throw new TypeError(`${t&&`"${t}" `}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){throw new RangeError(`${t&&`"${t}" `}expected integer >= 0, got ${e}`)}}function o(e,t,r=""){const n=i(e),o=e?.length,a=void 0!==t;if(!n||a&&o!==t){const i=(r&&`"${r}" `)+"expected Uint8Array"+(a?` of length ${t}`:"")+", got "+(n?`length=${o}`:"type="+typeof e);if(!n)throw new TypeError(i);throw new RangeError(i)}return e}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw new TypeError("Hash must wrapped by utils.createHasher");if(n(e.outputLen),n(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}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,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function c(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function h(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function l(e,t){return e<<32-t|e>>>t}r.d(t,{CC:()=>s,DO:()=>o,Fe:()=>n,Ht:()=>u,Id:()=>E,My:()=>d,O8:()=>h,Ow:()=>l,aT:()=>S,aY:()=>i,nx:()=>I,po:()=>O,qj:()=>k,sd:()=>a,uH:()=>c});const f=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),p=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(o(e),f)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=p[e[r]];return t}const g=48,m=57,y=65,v=70,b=97,_=102;function w(e){return e>=g&&e<=m?e-g:e>=y&&e<=v?e-(y-10):e>=b&&e<=_?e-(b-10):void 0}function S(e){if("string"!=typeof e)throw new TypeError("hex string expected, got "+typeof e);if(f)try{return Uint8Array.fromHex(e)}catch(e){if(e instanceof SyntaxError)throw new RangeError(e.message);throw e}const t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){const r=w(e.charCodeAt(n)),o=w(e.charCodeAt(n+1));if(void 0===r||void 0===o){const t=e[n]+e[n+1];throw new RangeError('hex string expected, got non-hex character "'+t+'" at index '+n)}i[t]=16*r+o}return i}function E(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];o(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){const n=e[t];r.set(n,i),i+=n.length}return r}function k(e,t={}){const r=(t,r)=>e(r).update(t).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}function O(e=32){n(e,"bytesLength");const t="object"==typeof globalThis?globalThis.crypto:null;if("function"!=typeof t?.getRandomValues)throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const I=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})},9294(e,t,r){"use strict";r.d(t,{c:()=>i});var i=r(4233)},3219(e){"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},3241(e){"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},5579(e){"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},8330(e){"use strict";e.exports={rE:"6.1.1"}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(__webpack_require__.s=1540);return __webpack_exports__})());