@xyo-network/xl1-cli 1.18.2 → 1.18.5
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/dist/cli-min.mjs +9 -101
- package/package.json +3 -3
package/dist/cli-min.mjs
CHANGED
|
@@ -85347,7 +85347,6 @@ var BlockBoundWitnessWithStorageMetaZod = BlockBoundWitnessZod.safeExtend(Storag
|
|
|
85347
85347
|
var asBlockBoundWitnessWithStorageMeta = zodAsFactory(BlockBoundWitnessWithStorageMetaZod, "asBlockBoundWitnessWithStorageMeta");
|
|
85348
85348
|
var SignedBlockBoundWitnessZod = SignedBoundWitnessZod.safeExtend(BlockBoundWitnessFieldsZod.shape).safeExtend(BlockBoundWitnessMetaZod.shape);
|
|
85349
85349
|
var isSignedBlockBoundWitness = zodIsFactory(SignedBlockBoundWitnessZod);
|
|
85350
|
-
var asSignedBlockBoundWitness = zodAsFactory(SignedBlockBoundWitnessZod, "asSignedBlockBoundWitness");
|
|
85351
85350
|
var SignedBlockBoundWitnessWithHashMetaZod = SignedBlockBoundWitnessZod.safeExtend(HashMetaZod.shape);
|
|
85352
85351
|
var isSignedBlockBoundWitnessWithHashMeta = zodIsFactory(SignedBlockBoundWitnessWithHashMetaZod);
|
|
85353
85352
|
var asSignedBlockBoundWitnessWithHashMeta = zodAsFactory(SignedBlockBoundWitnessWithHashMetaZod, "asSignedBlockBoundWitnessWithHashMeta");
|
|
@@ -96751,7 +96750,6 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider {
|
|
|
96751
96750
|
_tracer;
|
|
96752
96751
|
_accountBalanceViewer;
|
|
96753
96752
|
_blockViewer;
|
|
96754
|
-
_finalizedArchivist;
|
|
96755
96753
|
_finalizedPayloadMap;
|
|
96756
96754
|
_mempoolViewer;
|
|
96757
96755
|
_networkStakeViewer;
|
|
@@ -96783,6 +96781,9 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider {
|
|
|
96783
96781
|
get time() {
|
|
96784
96782
|
return this._timeSyncViewer;
|
|
96785
96783
|
}
|
|
96784
|
+
get finalizedArchivist() {
|
|
96785
|
+
return this.params.finalizedArchivist;
|
|
96786
|
+
}
|
|
96786
96787
|
get initRewardsCache() {
|
|
96787
96788
|
return this.params.initRewardsCache ?? true;
|
|
96788
96789
|
}
|
|
@@ -97046,12 +97047,9 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider {
|
|
|
97046
97047
|
}, { timeBudgetLimit: 200 });
|
|
97047
97048
|
}
|
|
97048
97049
|
async getCurrentHead() {
|
|
97049
|
-
const chainArchivist = this.
|
|
97050
|
+
const chainArchivist = this.finalizedArchivist;
|
|
97050
97051
|
return await findMostRecentBlock(chainArchivist);
|
|
97051
97052
|
}
|
|
97052
|
-
getFinalizedArchivist() {
|
|
97053
|
-
return this._finalizedArchivist;
|
|
97054
|
-
}
|
|
97055
97053
|
getHydratedBlockCache() {
|
|
97056
97054
|
if (this._signedHydratedBlockCache) return this._signedHydratedBlockCache;
|
|
97057
97055
|
const chainMap = this._finalizedPayloadMap;
|
|
@@ -97070,11 +97068,12 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider {
|
|
|
97070
97068
|
async getStakedChainContext() {
|
|
97071
97069
|
const stake = this.stake;
|
|
97072
97070
|
const store = { chainMap: this._finalizedPayloadMap };
|
|
97071
|
+
const head = assertEx(await this.getCurrentHead(), () => "No current head");
|
|
97073
97072
|
return {
|
|
97074
97073
|
caches: this.context.caches,
|
|
97075
97074
|
singletons: this.context.singletons,
|
|
97076
|
-
head:
|
|
97077
|
-
|
|
97075
|
+
head: () => {
|
|
97076
|
+
return [head._hash, head.block];
|
|
97078
97077
|
},
|
|
97079
97078
|
store,
|
|
97080
97079
|
chainId: await this.chainId(),
|
|
@@ -97084,7 +97083,7 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider {
|
|
|
97084
97083
|
async startHandler() {
|
|
97085
97084
|
try {
|
|
97086
97085
|
const currentBlockNumber = await this.currentBlockNumber();
|
|
97087
|
-
await this.accountBalance(XYO_ZERO_ADDRESS);
|
|
97086
|
+
await this.account.balance.accountBalance(XYO_ZERO_ADDRESS);
|
|
97088
97087
|
if (this.initRewardsCache) {
|
|
97089
97088
|
const externalRange = await externalBlockRangeFromXL1BlockRange(
|
|
97090
97089
|
await this.getStakedChainContext(),
|
|
@@ -204580,97 +204579,6 @@ var EvmBlockRewardViewer = class _EvmBlockRewardViewer extends AbstractCreatable
|
|
|
204580
204579
|
EvmBlockRewardViewer = _ts_decorate$3([
|
|
204581
204580
|
creatable()
|
|
204582
204581
|
], EvmBlockRewardViewer);
|
|
204583
|
-
function blockViewerFromChainIteratorAndArchivist(chainIterator, chainArchivist) {
|
|
204584
|
-
const result = {
|
|
204585
|
-
blockByHash: /* @__PURE__ */ __name$8(async function(hash) {
|
|
204586
|
-
const [payload] = await chainArchivist.get([
|
|
204587
|
-
hash
|
|
204588
|
-
]);
|
|
204589
|
-
const block = asSignedBlockBoundWitnessWithStorageMeta(payload);
|
|
204590
|
-
if (isDefined(block)) {
|
|
204591
|
-
const payloads = await chainArchivist.get(block.payload_hashes);
|
|
204592
|
-
return [
|
|
204593
|
-
block,
|
|
204594
|
-
payloads
|
|
204595
|
-
];
|
|
204596
|
-
}
|
|
204597
|
-
return null;
|
|
204598
|
-
}, "blockByHash"),
|
|
204599
|
-
blockByNumber: /* @__PURE__ */ __name$8(async function(blockNumber) {
|
|
204600
|
-
const payload = asSignedBlockBoundWitness(await chainIterator.get(blockNumber));
|
|
204601
|
-
const block = payload ? await PayloadBuilder.addHashMeta(payload) : void 0;
|
|
204602
|
-
if (isDefined(block)) {
|
|
204603
|
-
const payloads = await chainArchivist.get(block.payload_hashes);
|
|
204604
|
-
return [
|
|
204605
|
-
block,
|
|
204606
|
-
payloads
|
|
204607
|
-
];
|
|
204608
|
-
}
|
|
204609
|
-
return null;
|
|
204610
|
-
}, "blockByNumber"),
|
|
204611
|
-
blocksByHash: /* @__PURE__ */ __name$8(async function(hash, limit = 10) {
|
|
204612
|
-
const results = [];
|
|
204613
|
-
for (let i = 0; i < limit; i++) {
|
|
204614
|
-
const block = await this.blockByHash(hash);
|
|
204615
|
-
if (block) {
|
|
204616
|
-
results.push(block);
|
|
204617
|
-
} else {
|
|
204618
|
-
break;
|
|
204619
|
-
}
|
|
204620
|
-
}
|
|
204621
|
-
return results;
|
|
204622
|
-
}, "blocksByHash"),
|
|
204623
|
-
blocksByNumber: /* @__PURE__ */ __name$8(async function(number, limit = 10) {
|
|
204624
|
-
const results = [];
|
|
204625
|
-
for (let i = 0; i < limit; i++) {
|
|
204626
|
-
const block = await this.blockByNumber(number);
|
|
204627
|
-
if (block) {
|
|
204628
|
-
results.push(block);
|
|
204629
|
-
} else {
|
|
204630
|
-
break;
|
|
204631
|
-
}
|
|
204632
|
-
}
|
|
204633
|
-
return results;
|
|
204634
|
-
}, "blocksByNumber"),
|
|
204635
|
-
chainId: /* @__PURE__ */ __name$8(async function(blockNumber = "latest") {
|
|
204636
|
-
const block = blockNumber === "latest" ? await this.currentBlock() : await this.blockByNumber(blockNumber);
|
|
204637
|
-
if (!block) {
|
|
204638
|
-
throw new Error(`Block not found for block number: ${blockNumber}`);
|
|
204639
|
-
}
|
|
204640
|
-
return block[0].chain;
|
|
204641
|
-
}, "chainId"),
|
|
204642
|
-
currentBlock: /* @__PURE__ */ __name$8(async function() {
|
|
204643
|
-
const head = await chainIterator.head();
|
|
204644
|
-
return this.blockByHash(head._hash);
|
|
204645
|
-
}, "currentBlock"),
|
|
204646
|
-
currentBlockHash: /* @__PURE__ */ __name$8(async function() {
|
|
204647
|
-
const head = await chainIterator.head();
|
|
204648
|
-
return head._hash;
|
|
204649
|
-
}, "currentBlockHash"),
|
|
204650
|
-
currentBlockNumber: /* @__PURE__ */ __name$8(async function() {
|
|
204651
|
-
const head = await chainIterator.head();
|
|
204652
|
-
return head.block;
|
|
204653
|
-
}, "currentBlockNumber"),
|
|
204654
|
-
moniker: BlockViewerMoniker,
|
|
204655
|
-
payloadByHash: /* @__PURE__ */ __name$8(function(_hash) {
|
|
204656
|
-
throw new Error("Function not implemented.");
|
|
204657
|
-
}, "payloadByHash"),
|
|
204658
|
-
payloadsByHash: /* @__PURE__ */ __name$8(function(_hashes) {
|
|
204659
|
-
throw new Error("Function not implemented.");
|
|
204660
|
-
}, "payloadsByHash"),
|
|
204661
|
-
rate(..._args) {
|
|
204662
|
-
throw new Error("Function not implemented.");
|
|
204663
|
-
},
|
|
204664
|
-
stepSizeRate(..._args) {
|
|
204665
|
-
throw new Error("Function not implemented.");
|
|
204666
|
-
},
|
|
204667
|
-
timeDurationRate(..._args) {
|
|
204668
|
-
throw new Error("Function not implemented.");
|
|
204669
|
-
}
|
|
204670
|
-
};
|
|
204671
|
-
return result;
|
|
204672
|
-
}
|
|
204673
|
-
__name$8(blockViewerFromChainIteratorAndArchivist, "blockViewerFromChainIteratorAndArchivist");
|
|
204674
204582
|
(class extends AbstractCreatableProvider {
|
|
204675
204583
|
static {
|
|
204676
204584
|
__name$8(this, "XyoValidator");
|
|
@@ -350244,7 +350152,7 @@ var waitForHostPort = /* @__PURE__ */ __name((host, port) => {
|
|
|
350244
350152
|
|
|
350245
350153
|
// src/runCLI.ts
|
|
350246
350154
|
var configuration;
|
|
350247
|
-
var version = isDefined("1.18.
|
|
350155
|
+
var version = isDefined("1.18.4") ? "1.18.4" : "unknown";
|
|
350248
350156
|
var getContextFromConfig = /* @__PURE__ */ __name(async (configuration2) => {
|
|
350249
350157
|
const logger = initLogger(configuration2);
|
|
350250
350158
|
const orchestrator = await Orchestrator.create({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xl1-cli",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"description": "XYO Layer One CLI",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"@xyo-network/payload-model": "~5.2.25",
|
|
76
76
|
"@xyo-network/wallet": "~5.2.25",
|
|
77
77
|
"@xyo-network/wallet-model": "~5.2.25",
|
|
78
|
-
"@xyo-network/xl1-cli-lib": "~1.18.
|
|
79
|
-
"@xyo-network/xl1-sdk": "~1.19.
|
|
78
|
+
"@xyo-network/xl1-cli-lib": "~1.18.5",
|
|
79
|
+
"@xyo-network/xl1-sdk": "~1.19.6",
|
|
80
80
|
"async-mutex": "~0.5.0",
|
|
81
81
|
"dotenv": "~17.2.3",
|
|
82
82
|
"eslint": "^9.39.2",
|