@leofcoin/chain 1.8.8 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/exports/browser/chain.js +18 -12
- package/exports/browser/{flags-wmeqg14g.js → constants-ByuwyBVy.js} +772 -82
- package/exports/browser/node-browser.js +84 -4
- package/exports/chain.js +14 -7
- package/exports/constants-eo0U5-D_.js +12 -0
- package/exports/constants.d.ts +2 -0
- package/exports/node.js +2 -9
- package/package.json +4 -4
- package/exports/browser/browser-CfYI-6aD-DHRKebpJ.js +0 -132
- package/exports/browser/browser-Qcpp3EKK-DOtgsScX.js +0 -38
- package/exports/browser/client-CWkdUcxK-BEmg-tGc.js +0 -989
- package/exports/browser/identity-nIyW_Xm8-BU8xakCv.js +0 -17199
- package/exports/browser/index-ChRjMyiM-EjbBu23l.js +0 -36
- package/exports/browser/index-DTbjK0sK-BK_5FT46.js +0 -7580
- package/exports/browser/messages-C507MMRx-ypXoH7gN.js +0 -207
- package/exports/browser/networks-F1y7bMrB.js +0 -25
- package/exports/browser/node-browser-A1KVCavN.js +0 -9132
- package/exports/browser/password-oDixGC8h.js +0 -3
- package/exports/browser/qr-scanner-worker.min-Dy0qkKA4-Dy0qkKA4.js +0 -100
- package/exports/flags-DKVwPDLE.js +0 -3
- package/exports/flags.d.ts +0 -2
package/exports/browser/chain.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as toBase58, T as TransactionMessage, C as ContractMessage, R as RawTransactionMessage, B as BlockMessage,
|
|
1
|
+
import { t as toBase58, T as TransactionMessage, C as ContractMessage, R as RawTransactionMessage, B as BlockMessage, P as PROTOCOL_VERSION, a as REACHED_ONE_ZERO_ZERO, b as BWMessage, c as BWRequestMessage } from './constants-ByuwyBVy.js';
|
|
2
2
|
import { log } from 'console';
|
|
3
3
|
import { log as log$1 } from 'node:console';
|
|
4
4
|
|
|
@@ -1201,8 +1201,8 @@ function requireRe () {
|
|
|
1201
1201
|
|
|
1202
1202
|
// ## Pre-release Version Identifier
|
|
1203
1203
|
// A numeric identifier, or a non-numeric identifier.
|
|
1204
|
-
// Non-
|
|
1205
|
-
// Therefore non-
|
|
1204
|
+
// Non-numeric identifiers include numeric identifiers but can be longer.
|
|
1205
|
+
// Therefore non-numeric identifiers must go first.
|
|
1206
1206
|
|
|
1207
1207
|
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
|
1208
1208
|
}|${src[t.NUMERICIDENTIFIER]})`);
|
|
@@ -1898,7 +1898,7 @@ function requireDiff () {
|
|
|
1898
1898
|
return prefix + 'patch'
|
|
1899
1899
|
}
|
|
1900
1900
|
|
|
1901
|
-
// high and low are
|
|
1901
|
+
// high and low are prereleases
|
|
1902
1902
|
return 'prerelease'
|
|
1903
1903
|
};
|
|
1904
1904
|
|
|
@@ -3457,7 +3457,7 @@ function requireSubset () {
|
|
|
3457
3457
|
// - If LT
|
|
3458
3458
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
3459
3459
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
3460
|
-
// - If
|
|
3460
|
+
// - If LT.semver has a prerelease, and not in prerelease mode
|
|
3461
3461
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
3462
3462
|
// - Else return true
|
|
3463
3463
|
|
|
@@ -5270,14 +5270,20 @@ class State extends Contract {
|
|
|
5270
5270
|
}
|
|
5271
5271
|
try {
|
|
5272
5272
|
const block = await this.getAndPutBlock(hash);
|
|
5273
|
-
await Promise.all(block.decoded.transactions
|
|
5273
|
+
await Promise.all(block.decoded.transactions
|
|
5274
|
+
.filter((hash) => Boolean(hash))
|
|
5275
|
+
.map(async (hash) => {
|
|
5274
5276
|
// should be in a transaction store already
|
|
5275
|
-
|
|
5277
|
+
const exists = await transactionStore.has(hash);
|
|
5278
|
+
if (!exists) {
|
|
5276
5279
|
const data = await peernet.get(hash, 'transaction');
|
|
5280
|
+
if (!data)
|
|
5281
|
+
throw new Error(`missing transaction data for ${hash}`);
|
|
5277
5282
|
await transactionStore.put(hash, data);
|
|
5278
5283
|
}
|
|
5279
|
-
;
|
|
5280
|
-
|
|
5284
|
+
const inPool = await transactionPoolStore.has(hash);
|
|
5285
|
+
if (inPool)
|
|
5286
|
+
await transactionPoolStore.delete(hash);
|
|
5281
5287
|
}));
|
|
5282
5288
|
index = block.decoded.index;
|
|
5283
5289
|
const size = block.encoded.length > 0 ? block.encoded.length : block.encoded.byteLength;
|
|
@@ -5697,8 +5703,8 @@ class VersionControl extends State {
|
|
|
5697
5703
|
constructor(config) {
|
|
5698
5704
|
super(config);
|
|
5699
5705
|
}
|
|
5700
|
-
#currentVersion =
|
|
5701
|
-
#reachedOneZeroZero =
|
|
5706
|
+
#currentVersion = PROTOCOL_VERSION;
|
|
5707
|
+
#reachedOneZeroZero = REACHED_ONE_ZERO_ZERO;
|
|
5702
5708
|
async #setCurrentVersion() {
|
|
5703
5709
|
this.version = this.#currentVersion;
|
|
5704
5710
|
await globalThis.chainStore.put('version', this.version);
|
|
@@ -5990,7 +5996,7 @@ class ConnectionMonitor {
|
|
|
5990
5996
|
const networkName = globalThis.peernet?.network;
|
|
5991
5997
|
if (networkName && typeof networkName === 'string') {
|
|
5992
5998
|
// Try to import network config
|
|
5993
|
-
const { default: networks } = await import('./
|
|
5999
|
+
const { default: networks } = await import('./constants-ByuwyBVy.js').then(function (n) { return n.n; });
|
|
5994
6000
|
const [mainKey, subKey] = networkName.split(':');
|
|
5995
6001
|
const networkConfig = networks?.[mainKey]?.[subKey];
|
|
5996
6002
|
if (networkConfig?.stars && Array.isArray(networkConfig.stars)) {
|