@xyo-network/xl1-cli-lib 1.16.4 → 1.16.6
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/node/index.mjs +15 -14
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/orchestration/actor/implementation/BalanceActor.d.ts +1 -1
- package/dist/node/orchestration/actor/implementation/BalanceActor.d.ts.map +1 -1
- package/dist/node/orchestration/actor/implementation/ProducerActor.d.ts +1 -1
- package/dist/node/orchestration/actor/implementation/ProducerActor.d.ts.map +1 -1
- package/dist/node/orchestration/actor/implementation/ValidatorActor.d.ts +1 -1
- package/dist/node/orchestration/actor/implementation/ValidatorActor.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/balance.d.ts +3 -3
- package/dist/node/orchestration/services/implementation/balance.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/chain/evm.d.ts +2 -2
- package/dist/node/orchestration/services/implementation/chain/evm.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/chain/index.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/chain/index.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/iterator.d.ts +2 -1
- package/dist/node/orchestration/services/implementation/iterator.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/pendingTransactions.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/pendingTransactions.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/producer.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/producer.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/reward.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/reward.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/time.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/time.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/transfer.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/transfer.d.ts.map +1 -1
- package/dist/node/orchestration/services/implementation/validator.d.ts +1 -1
- package/dist/node/orchestration/services/implementation/validator.d.ts.map +1 -1
- package/dist/node/xl1.mjs +15 -14
- package/dist/node/xl1.mjs.map +1 -1
- package/package.json +24 -22
- package/src/orchestration/actor/implementation/BalanceActor.ts +1 -1
- package/src/orchestration/actor/implementation/ProducerActor.ts +3 -2
- package/src/orchestration/initServices.ts +1 -1
- package/src/orchestration/services/implementation/balance.ts +5 -6
- package/src/orchestration/services/implementation/chain/evm.ts +2 -2
- package/src/orchestration/services/implementation/chain/index.ts +1 -2
- package/src/orchestration/services/implementation/iterator.ts +6 -9
- package/src/orchestration/services/implementation/pendingTransactions.ts +1 -2
- package/src/orchestration/services/implementation/producer.ts +1 -2
- package/src/orchestration/services/implementation/reward.ts +3 -2
- package/src/orchestration/services/implementation/time.ts +1 -2
- package/src/orchestration/services/implementation/transfer.ts +1 -2
- package/src/orchestration/services/implementation/validator.ts +1 -1
- package/src/spec/BootstrapChain.spec.ts +2 -2
package/dist/node/index.mjs
CHANGED
|
@@ -225,7 +225,7 @@ var BalanceActor = class _BalanceActor extends Actor {
|
|
|
225
225
|
if (this._updateMutex.isLocked()) return;
|
|
226
226
|
await this._updateMutex.runExclusive(async () => {
|
|
227
227
|
const head = await PayloadBuilder.hash(await this.chainIterator.head());
|
|
228
|
-
await this.balanceService.
|
|
228
|
+
await this.balanceService.accountBalances([], head);
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
};
|
|
@@ -291,7 +291,8 @@ var ChainHeadUpdateActor = class _ChainHeadUpdateActor extends Actor {
|
|
|
291
291
|
import { assertEx as assertEx3 } from "@xylabs/assert";
|
|
292
292
|
import { toHex as toHex2 } from "@xylabs/hex";
|
|
293
293
|
import { isDefined, isUndefined } from "@xylabs/typeof";
|
|
294
|
-
import {
|
|
294
|
+
import { createDeclarationIntent } from "@xyo-network/chain-sdk";
|
|
295
|
+
import { BaseBlockProducerService } from "@xyo-network/chain-services";
|
|
295
296
|
import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
|
|
296
297
|
import { PayloadBundleSchema } from "@xyo-network/payload-model";
|
|
297
298
|
import { buildTransaction, flattenHydratedBlock, flattenHydratedTransaction } from "@xyo-network/xl1-protocol-sdk";
|
|
@@ -438,9 +439,9 @@ var ProducerActor = class _ProducerActor extends Actor {
|
|
|
438
439
|
async validateCurrentBalance() {
|
|
439
440
|
const head = this._lastProducedBlock?.[0]._hash;
|
|
440
441
|
if (isDefined(head)) {
|
|
441
|
-
const balances = await this.balanceService.
|
|
442
|
+
const balances = await this.balanceService.accountBalances([
|
|
442
443
|
this.account.address
|
|
443
|
-
]);
|
|
444
|
+
], head);
|
|
444
445
|
const currentBalance = balances[this.account.address] ?? 0n;
|
|
445
446
|
if (currentBalance <= 0n) {
|
|
446
447
|
this.logger?.error(`Producer ${this.account.address} has no balance.`);
|
|
@@ -959,7 +960,7 @@ ${randomMnemonic}
|
|
|
959
960
|
}, "initAccount");
|
|
960
961
|
|
|
961
962
|
// src/orchestration/services/implementation/balance.ts
|
|
962
|
-
import { BaseAccountBalanceService } from "@xyo-network/chain-
|
|
963
|
+
import { BaseAccountBalanceService } from "@xyo-network/chain-services";
|
|
963
964
|
var balanceServiceSingleton;
|
|
964
965
|
var initBalanceService = /* @__PURE__ */ __name(async (params) => {
|
|
965
966
|
if (balanceServiceSingleton) return balanceServiceSingleton;
|
|
@@ -968,13 +969,13 @@ var initBalanceService = /* @__PURE__ */ __name(async (params) => {
|
|
|
968
969
|
}, "initBalanceService");
|
|
969
970
|
|
|
970
971
|
// src/orchestration/services/implementation/chain/index.ts
|
|
971
|
-
import { MemoryChainService } from "@xyo-network/chain-
|
|
972
|
+
import { MemoryChainService } from "@xyo-network/chain-services";
|
|
972
973
|
|
|
973
974
|
// src/orchestration/services/implementation/chain/evm.ts
|
|
974
975
|
import { assertEx as assertEx15 } from "@xylabs/assert";
|
|
975
976
|
import { asAddress, ZERO_ADDRESS } from "@xylabs/hex";
|
|
976
977
|
import { isDefined as isDefined11 } from "@xylabs/typeof";
|
|
977
|
-
import { EvmChainService } from "@xyo-network/chain-
|
|
978
|
+
import { EvmChainService } from "@xyo-network/chain-services";
|
|
978
979
|
import { Wallet } from "ethers/wallet";
|
|
979
980
|
|
|
980
981
|
// src/orchestration/services/implementation/evm/initEvmProvider.ts
|
|
@@ -1342,7 +1343,7 @@ var initHead = /* @__PURE__ */ __name(async (params) => {
|
|
|
1342
1343
|
}, "initHead");
|
|
1343
1344
|
|
|
1344
1345
|
// src/orchestration/services/implementation/iterator.ts
|
|
1345
|
-
import { BaseElectionService, ChainBlockNumberIterationService, XyoStakeIntentService } from "@xyo-network/chain-
|
|
1346
|
+
import { BaseElectionService, ChainBlockNumberIterationService, XyoStakeIntentService } from "@xyo-network/chain-services";
|
|
1346
1347
|
var chainIteratorServiceSingleton;
|
|
1347
1348
|
var stakeIntentServiceSingleton;
|
|
1348
1349
|
var electionServiceSingleton;
|
|
@@ -1363,7 +1364,7 @@ var initElectionService = /* @__PURE__ */ __name((params) => {
|
|
|
1363
1364
|
}, "initElectionService");
|
|
1364
1365
|
|
|
1365
1366
|
// src/orchestration/services/implementation/pendingTransactions.ts
|
|
1366
|
-
import { BasePendingTransactionsService } from "@xyo-network/chain-
|
|
1367
|
+
import { BasePendingTransactionsService } from "@xyo-network/chain-services";
|
|
1367
1368
|
var serviceSingleton;
|
|
1368
1369
|
var initPendingTransactions = /* @__PURE__ */ __name(async (params) => {
|
|
1369
1370
|
if (serviceSingleton) return serviceSingleton;
|
|
@@ -1372,7 +1373,7 @@ var initPendingTransactions = /* @__PURE__ */ __name(async (params) => {
|
|
|
1372
1373
|
}, "initPendingTransactions");
|
|
1373
1374
|
|
|
1374
1375
|
// src/orchestration/services/implementation/producer.ts
|
|
1375
|
-
import { BaseBlockProducerService as BaseBlockProducerService2 } from "@xyo-network/chain-
|
|
1376
|
+
import { BaseBlockProducerService as BaseBlockProducerService2 } from "@xyo-network/chain-services";
|
|
1376
1377
|
var serviceSingleton2;
|
|
1377
1378
|
var initBlockProducer = /* @__PURE__ */ __name(async (params) => {
|
|
1378
1379
|
if (serviceSingleton2) return serviceSingleton2;
|
|
@@ -1382,7 +1383,7 @@ var initBlockProducer = /* @__PURE__ */ __name(async (params) => {
|
|
|
1382
1383
|
|
|
1383
1384
|
// src/orchestration/services/implementation/reward.ts
|
|
1384
1385
|
import { assertEx as assertEx17 } from "@xylabs/assert";
|
|
1385
|
-
import { EvmBlockRewardService, MemoryBlockRewardService } from "@xyo-network/chain-
|
|
1386
|
+
import { EvmBlockRewardService, MemoryBlockRewardService } from "@xyo-network/chain-services";
|
|
1386
1387
|
var rewardServiceSingleton;
|
|
1387
1388
|
var initBlockRewardService = /* @__PURE__ */ __name((params) => {
|
|
1388
1389
|
if (rewardServiceSingleton) return rewardServiceSingleton;
|
|
@@ -1415,7 +1416,7 @@ var initEvmBlockRewardService = /* @__PURE__ */ __name(async (params) => {
|
|
|
1415
1416
|
}, "initEvmBlockRewardService");
|
|
1416
1417
|
|
|
1417
1418
|
// src/orchestration/services/implementation/time.ts
|
|
1418
|
-
import { BaseTimeSyncService } from "@xyo-network/chain-
|
|
1419
|
+
import { BaseTimeSyncService } from "@xyo-network/chain-services";
|
|
1419
1420
|
var timeSyncServiceSingleton;
|
|
1420
1421
|
var initTimeService = /* @__PURE__ */ __name(async ({ chainArchivist, chainIterator, config: config2, logger, meterProvider, traceProvider }) => {
|
|
1421
1422
|
if (timeSyncServiceSingleton) return timeSyncServiceSingleton;
|
|
@@ -1436,7 +1437,7 @@ var initTimeService = /* @__PURE__ */ __name(async ({ chainArchivist, chainItera
|
|
|
1436
1437
|
}, "initTimeService");
|
|
1437
1438
|
|
|
1438
1439
|
// src/orchestration/services/implementation/transfer.ts
|
|
1439
|
-
import { BaseAccountTransfersService } from "@xyo-network/chain-
|
|
1440
|
+
import { BaseAccountTransfersService } from "@xyo-network/chain-services";
|
|
1440
1441
|
var transferServiceSingleton;
|
|
1441
1442
|
var initTransferService = /* @__PURE__ */ __name(async (params) => {
|
|
1442
1443
|
if (transferServiceSingleton) return transferServiceSingleton;
|
|
@@ -1926,7 +1927,7 @@ var waitForHostPort = /* @__PURE__ */ __name((host, port) => {
|
|
|
1926
1927
|
|
|
1927
1928
|
// src/runCLI.ts
|
|
1928
1929
|
var configuration;
|
|
1929
|
-
var version = isDefined17("1.16.
|
|
1930
|
+
var version = isDefined17("1.16.5") ? "1.16.5" : "unknown";
|
|
1930
1931
|
var getContextFromConfig = /* @__PURE__ */ __name((configuration2) => {
|
|
1931
1932
|
const logger = initLogger(configuration2);
|
|
1932
1933
|
const orchestrator = new Orchestrator(logger);
|