@leofcoin/chain 1.10.16 → 1.10.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/exports/beacon-envelope.js +6 -6
  2. package/exports/beacon-epoch.js +1 -1
  3. package/exports/beacon-lifecycle.js +1 -1
  4. package/exports/beacon-round.js +1 -1
  5. package/exports/beacon.js +15 -14
  6. package/exports/browser/_commonjsHelpers-B85MJLTf.js +5 -0
  7. package/exports/browser/beacon-envelope.js +61 -150
  8. package/exports/browser/beacon-epoch.js +2 -2
  9. package/exports/browser/beacon-lifecycle.js +3 -3
  10. package/exports/browser/beacon-round.js +2 -2
  11. package/exports/browser/beacon-wire.js +3 -3
  12. package/exports/browser/beacon.js +2483 -1228
  13. package/exports/browser/{browser-CCfR9KOM-CvhDZrGu.js → browser-CCfR9KOM-CpStHgTj.js} +4 -4
  14. package/exports/browser/{browser-crypto-CeE-yId5.js → browser-crypto-CH0ua22L.js} +1 -1
  15. package/exports/browser/chain.js +5 -8
  16. package/exports/browser/{client-CAC7RVMf-Dmz_2A_5.js → client-C_pBoi1g-_pfKzCvX.js} +256 -80
  17. package/exports/browser/{connection-monitor-Cmv00mwl.js → connection-monitor-D-krNiRH.js} +1 -1
  18. package/exports/browser/{hkdf-CnZvwpZ9.js → hkdf-BUHINPFj.js} +2 -94
  19. package/exports/browser/{index-BC-KRBgE.js → index-DmuI-29u.js} +1 -1
  20. package/exports/browser/{index-dTQVgkpf-CuHJWO2l.js → index-dTQVgkpf-BbdshWB0.js} +4 -4
  21. package/exports/browser/index.browser-CFfJpgKV.js +857 -0
  22. package/exports/browser/{messages-Dw86z0zq-DrPw_nlZ.js → messages-BGHaihSi-eHZVl0y9.js} +4 -4
  23. package/exports/browser/{node-browser-DWSdi-XP.js → node-browser-BNe-en1l.js} +5 -5
  24. package/exports/browser/node-browser.js +4 -4
  25. package/exports/browser/{sha2-piimb6xL.js → sha2-BKcEJzgd.js} +144 -3
  26. package/exports/browser/weierstrass-BVfhtHbl.js +3596 -0
  27. package/exports/browser/workers/machine-worker.js +42 -14
  28. package/exports/workers/machine-worker.js +42 -14
  29. package/package.json +14 -13
  30. package/exports/browser/weierstrass-Q0QND1ZT.js +0 -2156
@@ -1,97 +1,5 @@
1
- import { a as ahash, b as abytes, c as clean, d as aexists, e as aoutput, f as anumber } from './sha2-piimb6xL.js';
2
-
3
- /**
4
- * HMAC: RFC2104 message authentication code.
5
- * @module
6
- */
7
- /**
8
- * Internal class for HMAC.
9
- * Accepts any byte key, although RFC 2104 §3 recommends keys at least
10
- * `HashLen` bytes long.
11
- */
12
- class _HMAC {
13
- oHash;
14
- iHash;
15
- blockLen;
16
- outputLen;
17
- canXOF = false;
18
- finished = false;
19
- destroyed = false;
20
- constructor(hash, key) {
21
- ahash(hash);
22
- abytes(key, undefined, 'key');
23
- this.iHash = hash.create();
24
- if (typeof this.iHash.update !== 'function')
25
- throw new Error('expected Hash instance');
26
- this.blockLen = this.iHash.blockLen;
27
- this.outputLen = this.iHash.outputLen;
28
- const blockLen = this.blockLen;
29
- const pad = new Uint8Array(blockLen);
30
- // blockLen can be bigger than outputLen
31
- pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
32
- for (let i = 0; i < pad.length; i++)
33
- pad[i] ^= 0x36;
34
- this.iHash.update(pad);
35
- // By doing update (processing of the first block) of the outer hash here,
36
- // we can re-use it between multiple calls via clone.
37
- this.oHash = hash.create();
38
- // Undo internal XOR && apply outer XOR
39
- for (let i = 0; i < pad.length; i++)
40
- pad[i] ^= 0x36 ^ 0x5c;
41
- this.oHash.update(pad);
42
- clean(pad);
43
- }
44
- update(buf) {
45
- aexists(this);
46
- this.iHash.update(buf);
47
- return this;
48
- }
49
- digestInto(out) {
50
- aexists(this);
51
- aoutput(out, this);
52
- this.finished = true;
53
- const buf = out.subarray(0, this.outputLen);
54
- // Reuse the first outputLen bytes for the inner digest; the outer hash consumes them before
55
- // overwriting that same prefix with the final tag, leaving any oversized tail untouched.
56
- this.iHash.digestInto(buf);
57
- this.oHash.update(buf);
58
- this.oHash.digestInto(buf);
59
- this.destroy();
60
- }
61
- digest() {
62
- const out = new Uint8Array(this.oHash.outputLen);
63
- this.digestInto(out);
64
- return out;
65
- }
66
- _cloneInto(to) {
67
- // Create new instance without calling constructor since the key
68
- // is already in state and we don't know it.
69
- to ||= Object.create(Object.getPrototypeOf(this), {});
70
- const { oHash, iHash, finished, destroyed, blockLen, outputLen, canXOF } = this;
71
- to = to;
72
- to.finished = finished;
73
- to.destroyed = destroyed;
74
- to.blockLen = blockLen;
75
- to.outputLen = outputLen;
76
- to.canXOF = canXOF;
77
- to.oHash = oHash._cloneInto(to.oHash);
78
- to.iHash = iHash._cloneInto(to.iHash);
79
- return to;
80
- }
81
- clone() {
82
- return this._cloneInto();
83
- }
84
- destroy() {
85
- this.destroyed = true;
86
- this.oHash.destroy();
87
- this.iHash.destroy();
88
- }
89
- }
90
- const hmac = /* @__PURE__ */ (() => {
91
- const hmac_ = ((hash, key, message) => new _HMAC(hash, key).update(message).digest());
92
- hmac_.create = (hash, key) => new _HMAC(hash, key);
93
- return hmac_;
94
- })();
1
+ import { h as hmac } from './weierstrass-BVfhtHbl.js';
2
+ import { a as ahash, b as anumber, c as abytes, d as clean } from './sha2-BKcEJzgd.js';
95
3
 
96
4
  /**
97
5
  * HKDF (RFC 5869): extract + expand in one step.
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface, e as proto, T as TransactionMessage, C as ContractMessage, i as index$1, f as index$2, g as createRIPEMD160, h as createHMAC, k as createSHA512, l as createKeccak, B as BinaryWriter, v as varUintLength, m as BinaryReader, n as createHash$1 } from './browser-crypto-CeE-yId5.js';
1
+ import { F as FormatInterface, e as proto, T as TransactionMessage, C as ContractMessage, i as index$1, f as index$2, g as createRIPEMD160, h as createHMAC, k as createSHA512, l as createKeccak, B as BinaryWriter, v as varUintLength, m as BinaryReader, n as createHash$1 } from './browser-crypto-CH0ua22L.js';
2
2
  import { t as toBase58, b as base58$1, i as index$3 } from './index-CvKt4UDE.js';
3
3
 
4
4
  /* Do NOT modify this file; see /src.ts/_admin/update-version.ts */
@@ -1,8 +1,8 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-DWSdi-XP.js';
2
- import './browser-crypto-CeE-yId5.js';
3
- import './connection-monitor-Cmv00mwl.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-BNe-en1l.js';
2
+ import './browser-crypto-CH0ua22L.js';
3
+ import './connection-monitor-D-krNiRH.js';
4
4
  import './index-CvKt4UDE.js';
5
- import './sha2-piimb6xL.js';
5
+ import './sha2-BKcEJzgd.js';
6
6
 
7
7
  /**
8
8
  * @params {String} network