@xyo-network/xl1-cli 5.2.1 → 5.2.2
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 +291 -38
- package/dist/cli-min.mjs.map +1 -1
- package/package.json +8 -8
package/dist/cli-min.mjs
CHANGED
|
@@ -66368,7 +66368,7 @@ config$1(en_default());
|
|
|
66368
66368
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js
|
|
66369
66369
|
var zod_default = external_exports;
|
|
66370
66370
|
//#endregion
|
|
66371
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
66371
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._ff2a6e59f51e5daef4ffb30e331f5092/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
|
|
66372
66372
|
var ExchangeOutcomeSchema$1 = asSchema$1("network.xyo.exchange.outcome", true);
|
|
66373
66373
|
var isExchangeOutcome$1 = isPayloadOfZodType$1(/* @__PURE__ */ object$5({
|
|
66374
66374
|
/** Hash of the ExchangeTerms payload this outcome settles */
|
|
@@ -67254,7 +67254,7 @@ var TransactionRejectionSchema$1 = asSchema$1("network.xyo.transaction.rejection
|
|
|
67254
67254
|
var isTransactionRejection$1 = isPayloadOfSchemaType$1(TransactionRejectionSchema$1);
|
|
67255
67255
|
AsObjectFactory.create(isTransactionRejection$1);
|
|
67256
67256
|
//#endregion
|
|
67257
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
67257
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._ff2a6e59f51e5daef4ffb30e331f5092/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-lib.mjs
|
|
67258
67258
|
function derivedReceiveAddress(address, scope) {
|
|
67259
67259
|
return toAddress(keccak256(new TextEncoder().encode(isDefined$1(scope) ? `${scope}|${address}` : address)).slice(-40), { prefix: false });
|
|
67260
67260
|
}
|
|
@@ -67512,7 +67512,7 @@ var TransactionValidationViewerMoniker$1 = "TransactionValidationViewer";
|
|
|
67512
67512
|
var WindowedBlockViewerMoniker$1 = "WindowedBlockViewer";
|
|
67513
67513
|
var XyoViewerMoniker$1 = "XyoViewer";
|
|
67514
67514
|
//#endregion
|
|
67515
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
67515
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._ff2a6e59f51e5daef4ffb30e331f5092/node_modules/@xyo-network/xl1-protocol/dist/neutral/network-model.mjs
|
|
67516
67516
|
var local_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><g style=\"opacity:.5;\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#f47f00;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#f47f00;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#f47f00;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#f47f00;\"/></g><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#f47f00;\"/></svg>";
|
|
67517
67517
|
var mainnet_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#8d8fc6;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#eb407a;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#f27046;\"/><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#572aff;\"/></svg>";
|
|
67518
67518
|
var testnet_default = "<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"><g style=\"opacity:.5;\"><path d=\"M154.71,97c.46,2.59,2.5,4.62,5.1,5.05l14.05,2.34,31.71-46.17c4.57-6.65-3.62-14.62-10.14-9.87l-43.68,31.83,2.97,16.82Z\" style=\"fill:#579fd6;\"/><path d=\"M173.86,151.62l-14.05,2.34c-2.6.43-4.64,2.45-5.1,5.05l-2.97,16.82,43.68,31.83c6.52,4.75,14.71-3.21,10.14-9.87l-31.71-46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M82.14,104.38l14.05-2.34c2.6-.43,4.64-2.45,5.1-5.05l2.97-16.82-43.68-31.83c-6.52-4.75-14.71,3.21-10.14,9.87l31.71,46.17Z\" style=\"fill:#579fd6;\"/><path d=\"M101.29,159c-.46-2.59-2.5-4.62-5.1-5.05l-14.05-2.34-31.71,46.17c-4.57,6.65,3.62,14.62,10.14,9.87l43.68-31.83-2.97-16.82Z\" style=\"fill:#579fd6;\"/></g><path d=\"M107.33,104l15.94-90.32c.93-5.3,8.53-5.3,9.47,0l15.94,90.32c.35,2.01,1.94,3.57,3.95,3.91l92.24,15.35c5.36.89,5.36,8.59,0,9.49l-92.24,15.35c-2.01.33-3.59,1.9-3.95,3.91l-15.94,90.32c-.93,5.3-8.53,5.3-9.47,0l-15.94-90.32c-.35-2.01-1.94-3.57-3.95-3.91l-92.24-15.35c-5.36-.89-5.36-8.59,0-9.49l92.24-15.35c2.01-.33,3.59-1.9,3.95-3.91Z\" style=\"fill:#579fd6;\"/></svg>";
|
|
@@ -68162,7 +68162,7 @@ function admissionShadowHeadPath() {
|
|
|
68162
68162
|
return "admission/shadow/head.json";
|
|
68163
68163
|
}
|
|
68164
68164
|
//#endregion
|
|
68165
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
68165
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._ff2a6e59f51e5daef4ffb30e331f5092/node_modules/@xyo-network/xl1-protocol/dist/neutral/schema.mjs
|
|
68166
68166
|
var asRequiredStrings = (required) => {
|
|
68167
68167
|
if (typeof required === "string") return [required];
|
|
68168
68168
|
if (!Array.isArray(required)) return [];
|
|
@@ -68398,7 +68398,7 @@ var TransferPayloadJsonSchema = {
|
|
|
68398
68398
|
};
|
|
68399
68399
|
var TransferPayloadJsonSchemaPayload = new PayloadBuilder$1({ schema: SchemaSchema$1 }).fields({ definition: TransferPayloadJsonSchema }).build();
|
|
68400
68400
|
//#endregion
|
|
68401
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
68401
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._ff2a6e59f51e5daef4ffb30e331f5092/node_modules/@xyo-network/xl1-protocol/dist/neutral/validation.mjs
|
|
68402
68402
|
function maxTransactionFeeCost(tx) {
|
|
68403
68403
|
const { base, gasLimit, priority } = tx.fees;
|
|
68404
68404
|
return hexToBigInt(base) + hexToBigInt(priority) + hexToBigInt(gasLimit);
|
|
@@ -68644,7 +68644,7 @@ var validateTransaction = async (context, tx, additionalValidators) => {
|
|
|
68644
68644
|
}
|
|
68645
68645
|
};
|
|
68646
68646
|
//#endregion
|
|
68647
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
68647
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
|
|
68648
68648
|
var LruCacheMap$1 = class {
|
|
68649
68649
|
lruCache;
|
|
68650
68650
|
/** Creates an instance with the supplied configuration. */
|
|
@@ -71828,7 +71828,7 @@ var require_ExplorerSync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
71828
71828
|
exports.ExplorerSync = ExplorerSync;
|
|
71829
71829
|
}));
|
|
71830
71830
|
//#endregion
|
|
71831
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
71831
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
|
|
71832
71832
|
var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71833
71833
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71834
71834
|
exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = exports.cosmiconfigSync = exports.cosmiconfig = void 0;
|
|
@@ -73036,6 +73036,41 @@ async function hydratedBlockByNumber$1(context, blockNumber) {
|
|
|
73036
73036
|
timeBudgetLimit: 500
|
|
73037
73037
|
});
|
|
73038
73038
|
}
|
|
73039
|
+
function blockLabel$1(block, hash) {
|
|
73040
|
+
return `block ${block} [${hash}]`;
|
|
73041
|
+
}
|
|
73042
|
+
function headLabel$1(head) {
|
|
73043
|
+
return `finalized head ${head.block} [${head.hash}]`;
|
|
73044
|
+
}
|
|
73045
|
+
function transactionCount$1(hashes) {
|
|
73046
|
+
const count = hashes?.length ?? 0;
|
|
73047
|
+
return `${count} transaction${count === 1 ? "" : "s"}`;
|
|
73048
|
+
}
|
|
73049
|
+
function transactionList$1(hashes) {
|
|
73050
|
+
return hashes !== void 0 && hashes.length > 0 ? ` (tx ${hashes.join(", ")})` : "";
|
|
73051
|
+
}
|
|
73052
|
+
var DESCRIPTIONS$1 = {
|
|
73053
|
+
"behind-finalized-head": ({ blockHash, blockNumber, finalizedHead }) => `candidate ${blockLabel$1(blockNumber, blockHash)} is at or below ${headLabel$1(finalizedHead)} \u2014 the head advanced past it while it was being built, so it can no longer be appended`,
|
|
73054
|
+
"block-number-mismatch": ({ blockHash, blockNumber, candidateBase, finalizedHead }) => `candidate ${blockLabel$1(blockNumber, blockHash)} starts at block ${candidateBase?.block} but the block after ${headLabel$1(finalizedHead)} must be ${finalizedHead.block + 1} \u2014 it was built on a different head`,
|
|
73055
|
+
"previous-hash-mismatch": ({ blockHash, blockNumber, candidateBase, finalizedHead }) => `candidate ${blockLabel$1(blockNumber, blockHash)} links to previous ${candidateBase?.previous} instead of ${headLabel$1(finalizedHead)} \u2014 it was built on a superseded or competing head`,
|
|
73056
|
+
"tx-already-finalized": ({ blockHash, blockNumber, finalizedHead, offendingTransactionHashes, windowStartBlockNumber }) => `candidate ${blockLabel$1(blockNumber, blockHash)} carries ${transactionCount$1(offendingTransactionHashes)} already included in a finalized block within ${windowStartBlockNumber}..${finalizedHead.block} \u2014 its pending-transaction view was stale; exclude ${(offendingTransactionHashes?.length ?? 0) === 1 ? "it" : "them"} and rebuild` + transactionList$1(offendingTransactionHashes),
|
|
73057
|
+
"tx-before-window": ({ blockHash, blockNumber, finalizedHead, offendingTransactionHashes, windowStartBlockNumber }) => `candidate ${blockLabel$1(blockNumber, blockHash)} carries ${transactionCount$1(offendingTransactionHashes)} whose nbf precedes the finalized window ${windowStartBlockNumber}..${finalizedHead.block}, so inclusion in an earlier block cannot be ruled out` + transactionList$1(offendingTransactionHashes)
|
|
73058
|
+
};
|
|
73059
|
+
function describeUncleRejection$1(rejection) {
|
|
73060
|
+
return `${DESCRIPTIONS$1[rejection.reason](rejection)} [${rejection.reason}]`;
|
|
73061
|
+
}
|
|
73062
|
+
function describeUncleOutcome$1(finalizedChain, candidates, uncles, rejections) {
|
|
73063
|
+
const head = finalizedChain.at(-1)?.[0];
|
|
73064
|
+
const against = head === void 0 ? "the finalized head" : headLabel$1({
|
|
73065
|
+
block: head.block,
|
|
73066
|
+
hash: head._hash
|
|
73067
|
+
});
|
|
73068
|
+
const checked = `${candidates.length} candidate block${candidates.length === 1 ? "" : "s"} checked`;
|
|
73069
|
+
if (uncles.length === 0) return `No candidate block can be appended to ${against} (${checked}): ${rejections.length > 0 ? rejections.map((rejection) => describeUncleRejection$1(rejection)).join("; ") : candidates.length === 0 ? "no candidate blocks were supplied" : "the candidate blocks do not form a contiguous chain"}`;
|
|
73070
|
+
if (uncles.length === 1) return `Exactly one candidate chain extends ${against} (${checked})`;
|
|
73071
|
+
const tips = uncles.map((chain) => chain.at(-1)?.[0]).filter(exists$1).map((tip) => blockLabel$1(tip.block, tip._hash)).join(", ");
|
|
73072
|
+
return `${uncles.length} competing candidate chains extend ${against} (${checked}; tips ${tips}) \u2014 state validation needs exactly one chain, so none was validated`;
|
|
73073
|
+
}
|
|
73039
73074
|
function getProducerKey(block) {
|
|
73040
73075
|
return block[0].addresses.toSorted((a, b) => a.localeCompare(b)).join(",");
|
|
73041
73076
|
}
|
|
@@ -73083,15 +73118,25 @@ function toValidUncle$1(_context, finalizedWindowedChain, possibleUncle, onRejec
|
|
|
73083
73118
|
const finalizedWindowStartBlockNumber = finalizedWindowedChain.at(0)?.[0].block ?? -1;
|
|
73084
73119
|
const finalizedHead = assertEx$1(finalizedWindowedChain.at(-1), () => "finalizedWindowedChain is empty");
|
|
73085
73120
|
const tip = assertEx$1(possibleUncle.at(-1), () => "possibleUncle is empty");
|
|
73121
|
+
const prunedPossibleUncle = possibleUncle.filter((b) => b[0].block > finalizedHead[0].block);
|
|
73122
|
+
const base = prunedPossibleUncle.at(0);
|
|
73086
73123
|
const reject = (reason, offendingTransactionHashes) => {
|
|
73087
73124
|
onReject?.({
|
|
73088
73125
|
blockHash: tip[0]._hash,
|
|
73089
73126
|
blockNumber: tip[0].block,
|
|
73127
|
+
candidateBase: base === void 0 ? void 0 : {
|
|
73128
|
+
block: base[0].block,
|
|
73129
|
+
previous: base[0].previous
|
|
73130
|
+
},
|
|
73131
|
+
finalizedHead: {
|
|
73132
|
+
block: finalizedHead[0].block,
|
|
73133
|
+
hash: finalizedHead[0]._hash
|
|
73134
|
+
},
|
|
73090
73135
|
offendingTransactionHashes,
|
|
73091
|
-
reason
|
|
73136
|
+
reason,
|
|
73137
|
+
windowStartBlockNumber: finalizedWindowStartBlockNumber
|
|
73092
73138
|
});
|
|
73093
73139
|
};
|
|
73094
|
-
const prunedPossibleUncle = possibleUncle.filter((b) => b[0].block > finalizedHead[0].block);
|
|
73095
73140
|
if (prunedPossibleUncle.length === 0) {
|
|
73096
73141
|
reject("behind-finalized-head");
|
|
73097
73142
|
return;
|
|
@@ -75313,8 +75358,8 @@ var SimpleBlockValidationViewer$1 = class extends AbstractCreatableProvider$1 {
|
|
|
75313
75358
|
const rejections = [];
|
|
75314
75359
|
const uncles = findUncles$1(this.context, windowedUncleChain, blocks, (rejection) => rejections.push(rejection));
|
|
75315
75360
|
if (uncles.length !== 1) {
|
|
75316
|
-
const
|
|
75317
|
-
this.logger?.warn(
|
|
75361
|
+
const outcome = describeUncleOutcome$1(windowedUncleChain, blocks, uncles, rejections);
|
|
75362
|
+
this.logger?.warn(outcome);
|
|
75318
75363
|
this.logger?.debug(JSON.stringify({
|
|
75319
75364
|
uncles,
|
|
75320
75365
|
blocks: blocks.length
|
|
@@ -75323,12 +75368,13 @@ var SimpleBlockValidationViewer$1 = class extends AbstractCreatableProvider$1 {
|
|
|
75323
75368
|
return blocks.map((block) => {
|
|
75324
75369
|
const rejection = rejections.find((r) => r.blockHash === block[0]._hash);
|
|
75325
75370
|
const offendingTransactionHashes = rejection?.offendingTransactionHashes ?? [];
|
|
75326
|
-
if (rejection && offendingTransactionHashes.length > 0) return offendingTransactionHashes.map((txHash) => new HydratedBlockValidationError$1(txHash, block, `
|
|
75371
|
+
if (rejection && offendingTransactionHashes.length > 0) return offendingTransactionHashes.map((txHash) => new HydratedBlockValidationError$1(txHash, block, `Candidate rejected during state validation: ${describeUncleRejection$1(rejection)}`, {
|
|
75327
75372
|
blockHash: rejection.blockHash,
|
|
75328
75373
|
hash: txHash,
|
|
75329
75374
|
reason: rejection.reason
|
|
75330
75375
|
}));
|
|
75331
|
-
|
|
75376
|
+
const message = rejection ? `Candidate rejected during state validation: ${describeUncleRejection$1(rejection)}` : `Candidate not validated: ${outcome}`;
|
|
75377
|
+
return [new HydratedBlockValidationError$1(block[0]._hash, block, message, {
|
|
75332
75378
|
reason: rejection?.reason,
|
|
75333
75379
|
uncles: uncles.length,
|
|
75334
75380
|
blocks: blocks.length
|
|
@@ -82239,7 +82285,7 @@ function getOriginalId$1(rawRequest) {
|
|
|
82239
82285
|
return [void 0, false];
|
|
82240
82286
|
}
|
|
82241
82287
|
//#endregion
|
|
82242
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
82288
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
|
|
82243
82289
|
var __defProp$26 = Object.defineProperty;
|
|
82244
82290
|
var __getOwnPropDesc$25 = Object.getOwnPropertyDescriptor;
|
|
82245
82291
|
var __defNormalProp$24 = (obj, key, value) => key in obj ? __defProp$26(obj, key, {
|
|
@@ -82525,6 +82571,16 @@ var NetworkStakingStepRewardsByPositionViewerRpcSchemas$1 = {
|
|
|
82525
82571
|
from: /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1$1(val)))
|
|
82526
82572
|
}
|
|
82527
82573
|
},
|
|
82574
|
+
networkStakingStepRewardsByPositionViewer_allocationsForStep: {
|
|
82575
|
+
params: {
|
|
82576
|
+
to: /* @__PURE__ */ tuple$1([StepIdentityZod$1]),
|
|
82577
|
+
from: /* @__PURE__ */ tuple$1([StepIdentityZod$1])
|
|
82578
|
+
},
|
|
82579
|
+
result: {
|
|
82580
|
+
to: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), BigIntToJsonZod),
|
|
82581
|
+
from: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1$1(val))))
|
|
82582
|
+
}
|
|
82583
|
+
},
|
|
82528
82584
|
networkStakingStepRewardsByPositionViewer_totalForStepForPosition: {
|
|
82529
82585
|
params: {
|
|
82530
82586
|
to: /* @__PURE__ */ tuple$1([StepIdentityZod$1, /* @__PURE__ */ number$5()]),
|
|
@@ -83210,6 +83266,16 @@ var XyoViewerRpcSchemas$1 = {
|
|
|
83210
83266
|
from: /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1$1(val)))
|
|
83211
83267
|
}
|
|
83212
83268
|
},
|
|
83269
|
+
xyoViewer_networkStakeStepRewardAllocationsForStep: {
|
|
83270
|
+
params: {
|
|
83271
|
+
to: /* @__PURE__ */ tuple$1([StepIdentityZod$1]),
|
|
83272
|
+
from: /* @__PURE__ */ tuple$1([StepIdentityZod$1])
|
|
83273
|
+
},
|
|
83274
|
+
result: {
|
|
83275
|
+
to: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), BigIntToJsonZod),
|
|
83276
|
+
from: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1$1(val))))
|
|
83277
|
+
}
|
|
83278
|
+
},
|
|
83213
83279
|
xyoViewer_networkStakeStepRewardRandomizer: {
|
|
83214
83280
|
params: {
|
|
83215
83281
|
to: /* @__PURE__ */ tuple$1([StepIdentityZod$1]),
|
|
@@ -83474,6 +83540,28 @@ tuple([object$3({
|
|
|
83474
83540
|
id: string$2(),
|
|
83475
83541
|
payloads: array$1(union$1([PayloadZodLoose$1, JsonToArrayBufferZod2$1]))
|
|
83476
83542
|
})]), union$1([PayloadZodLoose$1, ArrayBufferToJsonZod$1]), union$1([PayloadZodLoose$1, JsonToArrayBufferZod2$1]);
|
|
83543
|
+
function trimTrailingNull$1(params) {
|
|
83544
|
+
let end = params.length;
|
|
83545
|
+
while (end > 0 && params[end - 1] === null) end--;
|
|
83546
|
+
return params.slice(0, end);
|
|
83547
|
+
}
|
|
83548
|
+
function parseRpcRequest$1(requestSchema, request) {
|
|
83549
|
+
const parsed = requestSchema.safeParse(request);
|
|
83550
|
+
if (parsed.success || !isObject$5(request)) return parsed;
|
|
83551
|
+
const { params } = request;
|
|
83552
|
+
if (!Array.isArray(params) || params.at(-1) !== null) return parsed;
|
|
83553
|
+
const retried = requestSchema.safeParse({
|
|
83554
|
+
...request,
|
|
83555
|
+
params: trimTrailingNull$1(params)
|
|
83556
|
+
});
|
|
83557
|
+
return retried.success ? retried : parsed;
|
|
83558
|
+
}
|
|
83559
|
+
function trimTrailingUndefined$1(params) {
|
|
83560
|
+
if (!Array.isArray(params)) return params;
|
|
83561
|
+
let end = params.length;
|
|
83562
|
+
while (end > 0 && params[end - 1] === void 0) end--;
|
|
83563
|
+
return end === params.length ? params : params.slice(0, end);
|
|
83564
|
+
}
|
|
83477
83565
|
var HttpRpcTransport$1 = class {
|
|
83478
83566
|
_passThrough;
|
|
83479
83567
|
_rpcUrl;
|
|
@@ -83497,7 +83585,7 @@ var HttpRpcTransport$1 = class {
|
|
|
83497
83585
|
};
|
|
83498
83586
|
const schema = schemas[method];
|
|
83499
83587
|
if (params !== void 0) {
|
|
83500
|
-
body.params = isDefined$1(schema) ? schema.params.to.parse(params) : this._passThrough ? (/* @__PURE__ */ json$3()).parse(params) : void 0;
|
|
83588
|
+
body.params = isDefined$1(schema) ? trimTrailingUndefined$1(schema.params.to.parse(params)) : this._passThrough ? (/* @__PURE__ */ json$3()).parse(trimTrailingUndefined$1(params)) : void 0;
|
|
83501
83589
|
if (!isDefined$1(body.params)) throw new Error(`[callRpc] RPC method ${String(method)} missing schema`);
|
|
83502
83590
|
}
|
|
83503
83591
|
body.params ??= [];
|
|
@@ -83918,6 +84006,10 @@ JsonRpcMempoolViewer$1 = __decorateClass$25([creatableProvider$1()], JsonRpcMemp
|
|
|
83918
84006
|
var JsonRpcNetworkStakeStepRewardsByPositionViewerMethods$1 = class extends AbstractJsonRpcViewer$1 {
|
|
83919
84007
|
/** Moniker implemented by this provider instance. */
|
|
83920
84008
|
moniker = NetworkStakeStepRewardsByPositionViewerMoniker$1;
|
|
84009
|
+
/** Per-position allocations for one completed step. */
|
|
84010
|
+
async allocationsForStep(step) {
|
|
84011
|
+
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_allocationsForStep", [step]);
|
|
84012
|
+
}
|
|
83921
84013
|
/** Returns the bonus result exposed by this provider. */
|
|
83922
84014
|
async bonus(options) {
|
|
83923
84015
|
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_bonus", [options]);
|
|
@@ -84528,6 +84620,10 @@ var JsonRpcXyoViewer$1 = class extends AbstractJsonRpcViewer$1 {
|
|
|
84528
84620
|
async networkStakeStepRewardAddressShare(context, address) {
|
|
84529
84621
|
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardAddressShare", [context, address]);
|
|
84530
84622
|
}
|
|
84623
|
+
/** Per-position allocations for one completed step. */
|
|
84624
|
+
async networkStakeStepRewardAllocationsForStep(context) {
|
|
84625
|
+
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardAllocationsForStep", [context]);
|
|
84626
|
+
}
|
|
84531
84627
|
/** Returns the network stake step reward claimed by address result exposed by this provider. */
|
|
84532
84628
|
async networkStakeStepRewardClaimedByAddress(address) {
|
|
84533
84629
|
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardClaimedByAddress", [address]);
|
|
@@ -84766,7 +84862,7 @@ var createRpcDispatchMiddleware = (schemas, handlers, options) => async ({ reque
|
|
|
84766
84862
|
requestSchema = createRequestSchema$1(method, schema.params.from);
|
|
84767
84863
|
requestSchemas$1[method] = requestSchema;
|
|
84768
84864
|
}
|
|
84769
|
-
const parsed = requestSchema
|
|
84865
|
+
const parsed = parseRpcRequest$1(requestSchema, request);
|
|
84770
84866
|
if (!parsed.success) {
|
|
84771
84867
|
options?.logger?.error("RPC Request Validation Error", parsed.error);
|
|
84772
84868
|
throw new Error(parsed.error.message);
|
|
@@ -84781,7 +84877,7 @@ var createRpcDispatchMiddleware = (schemas, handlers, options) => async ({ reque
|
|
|
84781
84877
|
}
|
|
84782
84878
|
};
|
|
84783
84879
|
//#endregion
|
|
84784
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
84880
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/rest-block-viewer.mjs
|
|
84785
84881
|
var __defProp$25 = Object.defineProperty;
|
|
84786
84882
|
var __getOwnPropDesc$24 = Object.getOwnPropertyDescriptor;
|
|
84787
84883
|
var __defNormalProp$23 = (obj, key, value) => key in obj ? __defProp$25(obj, key, {
|
|
@@ -105444,7 +105540,7 @@ var StakedXyoChainV2__factory = class extends ContractFactory {
|
|
|
105444
105540
|
}
|
|
105445
105541
|
};
|
|
105446
105542
|
//#endregion
|
|
105447
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
105543
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/providers.mjs
|
|
105448
105544
|
var __defProp$23 = Object.defineProperty;
|
|
105449
105545
|
var __getOwnPropDesc$23 = Object.getOwnPropertyDescriptor;
|
|
105450
105546
|
var __defNormalProp$22 = (obj, key, value) => key in obj ? __defProp$23(obj, key, {
|
|
@@ -106422,6 +106518,18 @@ var RestNetworkStakeStepRewardsByPositionViewer$1 = class extends AbstractCreata
|
|
|
106422
106518
|
get fetchFn() {
|
|
106423
106519
|
return this.context.fetchFn ?? fetch.bind(globalThis);
|
|
106424
106520
|
}
|
|
106521
|
+
/** Per-position allocations for one completed step from the durable index record. */
|
|
106522
|
+
async allocationsForStep(step) {
|
|
106523
|
+
const head = await this.getHead();
|
|
106524
|
+
this.assertPublishedStep(step, head);
|
|
106525
|
+
const record = await this.getStep(step);
|
|
106526
|
+
const result = {};
|
|
106527
|
+
for (const [positionId, amount] of Object.entries(record.positionRewards)) {
|
|
106528
|
+
const reward = asAttoXL1$1(BigInt(amount));
|
|
106529
|
+
if (reward > 0n) result[Number(positionId)] = reward;
|
|
106530
|
+
}
|
|
106531
|
+
return result;
|
|
106532
|
+
}
|
|
106425
106533
|
/** Returns the policy bonus. The unmultiplied-v1 index has no multipliers, so bonus is zero. */
|
|
106426
106534
|
async bonus(options = {}) {
|
|
106427
106535
|
const total = await this.total(options);
|
|
@@ -106913,6 +107021,18 @@ var SimpleStepRewardsByPositionViewer$1 = class extends AbstractCreatableProvide
|
|
|
106913
107021
|
get stakeViewer() {
|
|
106914
107022
|
return this._stakeViewer;
|
|
106915
107023
|
}
|
|
107024
|
+
/** Per-position allocations for one completed step (compute path). */
|
|
107025
|
+
async allocationsForStep(step) {
|
|
107026
|
+
const externalRange = await externalBlockRangeFromStep(this.context, this.blockViewer, step, this.timeAnchor);
|
|
107027
|
+
const positionCount = await this.stakeViewer.stakeEvents.positionCount(externalRange);
|
|
107028
|
+
if (positionCount === 0) return {};
|
|
107029
|
+
const positions = await this.loadPositions(positionCount);
|
|
107030
|
+
const eventsByPosition = indexStakeEventsByPosition$1(await this.stakeViewer.stakeEvents.stakeEvents([0, externalRange[1]]));
|
|
107031
|
+
const computed = await networkStakeStepRewardsForPositions$1(this.context, this.blockViewer, step, positions, eventsByPosition, this.rewardMultipliers, this.timeAnchor, externalRange);
|
|
107032
|
+
const result = {};
|
|
107033
|
+
for (const [positionId, amount] of computed.positionRewards) if (amount > 0n) result[positionId] = amount;
|
|
107034
|
+
return result;
|
|
107035
|
+
}
|
|
106916
107036
|
/** Returns the bonus result exposed by this provider. */
|
|
106917
107037
|
async bonus({ range, positions } = {}) {
|
|
106918
107038
|
const total = await this.total({
|
|
@@ -107659,6 +107779,10 @@ var SimpleXyoViewer$1 = class extends AbstractCreatableProvider$1 {
|
|
|
107659
107779
|
networkStakeStepRewardAddressShare(_context, _address) {
|
|
107660
107780
|
throw new Error("Method [networkStakeStepRewardAddressShare] not implemented.");
|
|
107661
107781
|
}
|
|
107782
|
+
/** Per-position allocations for one completed step (`positionId → reward`). */
|
|
107783
|
+
async networkStakeStepRewardAllocationsForStep(stepIdentity) {
|
|
107784
|
+
return await this.networkStepRewardsByPositionViewer.allocationsForStep(stepIdentity);
|
|
107785
|
+
}
|
|
107662
107786
|
/** Returns the network stake step reward claimed by address result exposed by this provider. */
|
|
107663
107787
|
networkStakeStepRewardClaimedByAddress(_address) {
|
|
107664
107788
|
throw new Error("Method [networkStakeStepRewardClaimedByAddress] not implemented.");
|
|
@@ -107968,7 +108092,7 @@ __publicField$22(RestChainParamsViewer$1, "monikers", [ChainParamsViewerMoniker]
|
|
|
107968
108092
|
__publicField$22(RestChainParamsViewer$1, "surface", "node");
|
|
107969
108093
|
RestChainParamsViewer$1 = __decorateClass$23([creatableProvider$1()], RestChainParamsViewer$1);
|
|
107970
108094
|
//#endregion
|
|
107971
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
108095
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/gateway.mjs
|
|
107972
108096
|
async function witnessPreviousStep(gateway, options) {
|
|
107973
108097
|
const { addToChain = false, step = 2, transactionOptions, witness: witnessOption } = options ?? {};
|
|
107974
108098
|
const size = stepSize$1(step);
|
|
@@ -107995,7 +108119,7 @@ async function witnessPreviousStep(gateway, options) {
|
|
|
107995
108119
|
return { witness };
|
|
107996
108120
|
}
|
|
107997
108121
|
//#endregion
|
|
107998
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
108122
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/neutral/wrappers.mjs
|
|
107999
108123
|
function parseHexOrBigInt(value) {
|
|
108000
108124
|
return AttoXL1$1(typeof value === "bigint" ? value : hexToBigInt(value));
|
|
108001
108125
|
}
|
|
@@ -116356,7 +116480,7 @@ __publicField$19(MemoryArchivist, "labels", {
|
|
|
116356
116480
|
});
|
|
116357
116481
|
MemoryArchivist = __decorateClass$19([creatableModule()], MemoryArchivist);
|
|
116358
116482
|
//#endregion
|
|
116359
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.
|
|
116483
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._2ed50aef22cdff8a2ce2a77e44721cb3/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
|
|
116360
116484
|
var ExchangeOutcomeSchema = asSchema("network.xyo.exchange.outcome", true);
|
|
116361
116485
|
var isExchangeOutcome = isPayloadOfZodType(/* @__PURE__ */ object$5({
|
|
116362
116486
|
/** Hash of the ExchangeTerms payload this outcome settles */
|
|
@@ -117356,7 +117480,7 @@ new import_ajv.Ajv({
|
|
|
117356
117480
|
strict: true
|
|
117357
117481
|
});
|
|
117358
117482
|
//#endregion
|
|
117359
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
117483
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_549107f828095a76ec89d9dd63b02b3d/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
|
|
117360
117484
|
var LruCacheMap = class {
|
|
117361
117485
|
lruCache;
|
|
117362
117486
|
/** Creates an instance with the supplied configuration. */
|
|
@@ -117438,7 +117562,7 @@ var MemoryMap = class {
|
|
|
117438
117562
|
}
|
|
117439
117563
|
};
|
|
117440
117564
|
//#endregion
|
|
117441
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
117565
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_549107f828095a76ec89d9dd63b02b3d/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
|
|
117442
117566
|
var __defProp$18 = Object.defineProperty;
|
|
117443
117567
|
var __getOwnPropDesc$18 = Object.getOwnPropertyDescriptor;
|
|
117444
117568
|
var __defNormalProp$18 = (obj, key, value) => key in obj ? __defProp$18(obj, key, {
|
|
@@ -118286,6 +118410,41 @@ async function hydratedBlockByNumber(context, blockNumber) {
|
|
|
118286
118410
|
timeBudgetLimit: 500
|
|
118287
118411
|
});
|
|
118288
118412
|
}
|
|
118413
|
+
function blockLabel(block, hash) {
|
|
118414
|
+
return `block ${block} [${hash}]`;
|
|
118415
|
+
}
|
|
118416
|
+
function headLabel(head) {
|
|
118417
|
+
return `finalized head ${head.block} [${head.hash}]`;
|
|
118418
|
+
}
|
|
118419
|
+
function transactionCount(hashes) {
|
|
118420
|
+
const count = hashes?.length ?? 0;
|
|
118421
|
+
return `${count} transaction${count === 1 ? "" : "s"}`;
|
|
118422
|
+
}
|
|
118423
|
+
function transactionList(hashes) {
|
|
118424
|
+
return hashes !== void 0 && hashes.length > 0 ? ` (tx ${hashes.join(", ")})` : "";
|
|
118425
|
+
}
|
|
118426
|
+
var DESCRIPTIONS = {
|
|
118427
|
+
"behind-finalized-head": ({ blockHash, blockNumber, finalizedHead }) => `candidate ${blockLabel(blockNumber, blockHash)} is at or below ${headLabel(finalizedHead)} \u2014 the head advanced past it while it was being built, so it can no longer be appended`,
|
|
118428
|
+
"block-number-mismatch": ({ blockHash, blockNumber, candidateBase, finalizedHead }) => `candidate ${blockLabel(blockNumber, blockHash)} starts at block ${candidateBase?.block} but the block after ${headLabel(finalizedHead)} must be ${finalizedHead.block + 1} \u2014 it was built on a different head`,
|
|
118429
|
+
"previous-hash-mismatch": ({ blockHash, blockNumber, candidateBase, finalizedHead }) => `candidate ${blockLabel(blockNumber, blockHash)} links to previous ${candidateBase?.previous} instead of ${headLabel(finalizedHead)} \u2014 it was built on a superseded or competing head`,
|
|
118430
|
+
"tx-already-finalized": ({ blockHash, blockNumber, finalizedHead, offendingTransactionHashes, windowStartBlockNumber }) => `candidate ${blockLabel(blockNumber, blockHash)} carries ${transactionCount(offendingTransactionHashes)} already included in a finalized block within ${windowStartBlockNumber}..${finalizedHead.block} \u2014 its pending-transaction view was stale; exclude ${(offendingTransactionHashes?.length ?? 0) === 1 ? "it" : "them"} and rebuild` + transactionList(offendingTransactionHashes),
|
|
118431
|
+
"tx-before-window": ({ blockHash, blockNumber, finalizedHead, offendingTransactionHashes, windowStartBlockNumber }) => `candidate ${blockLabel(blockNumber, blockHash)} carries ${transactionCount(offendingTransactionHashes)} whose nbf precedes the finalized window ${windowStartBlockNumber}..${finalizedHead.block}, so inclusion in an earlier block cannot be ruled out` + transactionList(offendingTransactionHashes)
|
|
118432
|
+
};
|
|
118433
|
+
function describeUncleRejection(rejection) {
|
|
118434
|
+
return `${DESCRIPTIONS[rejection.reason](rejection)} [${rejection.reason}]`;
|
|
118435
|
+
}
|
|
118436
|
+
function describeUncleOutcome(finalizedChain, candidates, uncles, rejections) {
|
|
118437
|
+
const head = finalizedChain.at(-1)?.[0];
|
|
118438
|
+
const against = head === void 0 ? "the finalized head" : headLabel({
|
|
118439
|
+
block: head.block,
|
|
118440
|
+
hash: head._hash
|
|
118441
|
+
});
|
|
118442
|
+
const checked = `${candidates.length} candidate block${candidates.length === 1 ? "" : "s"} checked`;
|
|
118443
|
+
if (uncles.length === 0) return `No candidate block can be appended to ${against} (${checked}): ${rejections.length > 0 ? rejections.map((rejection) => describeUncleRejection(rejection)).join("; ") : candidates.length === 0 ? "no candidate blocks were supplied" : "the candidate blocks do not form a contiguous chain"}`;
|
|
118444
|
+
if (uncles.length === 1) return `Exactly one candidate chain extends ${against} (${checked})`;
|
|
118445
|
+
const tips = uncles.map((chain) => chain.at(-1)?.[0]).filter(exists$1).map((tip) => blockLabel(tip.block, tip._hash)).join(", ");
|
|
118446
|
+
return `${uncles.length} competing candidate chains extend ${against} (${checked}; tips ${tips}) \u2014 state validation needs exactly one chain, so none was validated`;
|
|
118447
|
+
}
|
|
118289
118448
|
var DEFAULT_BACKOFF_MS = 12e4;
|
|
118290
118449
|
function extendUncleChain(block, map) {
|
|
118291
118450
|
const uncle = [block];
|
|
@@ -118310,15 +118469,25 @@ function toValidUncle(_context, finalizedWindowedChain, possibleUncle, onReject)
|
|
|
118310
118469
|
const finalizedWindowStartBlockNumber = finalizedWindowedChain.at(0)?.[0].block ?? -1;
|
|
118311
118470
|
const finalizedHead = assertEx$1(finalizedWindowedChain.at(-1), () => "finalizedWindowedChain is empty");
|
|
118312
118471
|
const tip = assertEx$1(possibleUncle.at(-1), () => "possibleUncle is empty");
|
|
118472
|
+
const prunedPossibleUncle = possibleUncle.filter((b) => b[0].block > finalizedHead[0].block);
|
|
118473
|
+
const base = prunedPossibleUncle.at(0);
|
|
118313
118474
|
const reject = (reason, offendingTransactionHashes) => {
|
|
118314
118475
|
onReject?.({
|
|
118315
118476
|
blockHash: tip[0]._hash,
|
|
118316
118477
|
blockNumber: tip[0].block,
|
|
118478
|
+
candidateBase: base === void 0 ? void 0 : {
|
|
118479
|
+
block: base[0].block,
|
|
118480
|
+
previous: base[0].previous
|
|
118481
|
+
},
|
|
118482
|
+
finalizedHead: {
|
|
118483
|
+
block: finalizedHead[0].block,
|
|
118484
|
+
hash: finalizedHead[0]._hash
|
|
118485
|
+
},
|
|
118317
118486
|
offendingTransactionHashes,
|
|
118318
|
-
reason
|
|
118487
|
+
reason,
|
|
118488
|
+
windowStartBlockNumber: finalizedWindowStartBlockNumber
|
|
118319
118489
|
});
|
|
118320
118490
|
};
|
|
118321
|
-
const prunedPossibleUncle = possibleUncle.filter((b) => b[0].block > finalizedHead[0].block);
|
|
118322
118491
|
if (prunedPossibleUncle.length === 0) {
|
|
118323
118492
|
reject("behind-finalized-head");
|
|
118324
118493
|
return;
|
|
@@ -119896,8 +120065,8 @@ var SimpleBlockValidationViewer = class extends AbstractCreatableProvider {
|
|
|
119896
120065
|
const rejections = [];
|
|
119897
120066
|
const uncles = findUncles(this.context, windowedUncleChain, blocks, (rejection) => rejections.push(rejection));
|
|
119898
120067
|
if (uncles.length !== 1) {
|
|
119899
|
-
const
|
|
119900
|
-
this.logger?.warn(
|
|
120068
|
+
const outcome = describeUncleOutcome(windowedUncleChain, blocks, uncles, rejections);
|
|
120069
|
+
this.logger?.warn(outcome);
|
|
119901
120070
|
this.logger?.debug(JSON.stringify({
|
|
119902
120071
|
uncles,
|
|
119903
120072
|
blocks: blocks.length
|
|
@@ -119906,12 +120075,13 @@ var SimpleBlockValidationViewer = class extends AbstractCreatableProvider {
|
|
|
119906
120075
|
return blocks.map((block) => {
|
|
119907
120076
|
const rejection = rejections.find((r) => r.blockHash === block[0]._hash);
|
|
119908
120077
|
const offendingTransactionHashes = rejection?.offendingTransactionHashes ?? [];
|
|
119909
|
-
if (rejection && offendingTransactionHashes.length > 0) return offendingTransactionHashes.map((txHash) => new HydratedBlockValidationError(txHash, block, `
|
|
120078
|
+
if (rejection && offendingTransactionHashes.length > 0) return offendingTransactionHashes.map((txHash) => new HydratedBlockValidationError(txHash, block, `Candidate rejected during state validation: ${describeUncleRejection(rejection)}`, {
|
|
119910
120079
|
blockHash: rejection.blockHash,
|
|
119911
120080
|
hash: txHash,
|
|
119912
120081
|
reason: rejection.reason
|
|
119913
120082
|
}));
|
|
119914
|
-
|
|
120083
|
+
const message = rejection ? `Candidate rejected during state validation: ${describeUncleRejection(rejection)}` : `Candidate not validated: ${outcome}`;
|
|
120084
|
+
return [new HydratedBlockValidationError(block[0]._hash, block, message, {
|
|
119915
120085
|
reason: rejection?.reason,
|
|
119916
120086
|
uncles: uncles.length,
|
|
119917
120087
|
blocks: blocks.length
|
|
@@ -124133,7 +124303,7 @@ function getOriginalId(rawRequest) {
|
|
|
124133
124303
|
return [void 0, false];
|
|
124134
124304
|
}
|
|
124135
124305
|
//#endregion
|
|
124136
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
124306
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_549107f828095a76ec89d9dd63b02b3d/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
|
|
124137
124307
|
var __defProp$17 = Object.defineProperty;
|
|
124138
124308
|
var __getOwnPropDesc$17 = Object.getOwnPropertyDescriptor;
|
|
124139
124309
|
var __defNormalProp$17 = (obj, key, value) => key in obj ? __defProp$17(obj, key, {
|
|
@@ -124189,6 +124359,7 @@ var rpcMethodHandlersFromNetworkStakingStepRewardsByPositionViewer = (viewer) =>
|
|
|
124189
124359
|
networkStakingStepRewardsByPositionViewer_total: (params) => viewer.total(...params ?? []),
|
|
124190
124360
|
networkStakingStepRewardsByPositionViewer_totalForPosition: (params) => viewer.totalForPosition(...params),
|
|
124191
124361
|
networkStakingStepRewardsByPositionViewer_totalForStep: (params) => viewer.totalForStep(...params),
|
|
124362
|
+
networkStakingStepRewardsByPositionViewer_allocationsForStep: (params) => viewer.allocationsForStep(...params),
|
|
124192
124363
|
networkStakingStepRewardsByPositionViewer_totalForStepForPosition: (params) => viewer.totalForStepForPosition(...params),
|
|
124193
124364
|
networkStakingStepRewardsByPositionViewer_unclaimed: (params) => viewer.unclaimed(...params ?? [])
|
|
124194
124365
|
};
|
|
@@ -124231,6 +124402,7 @@ var rpcMethodHandlersFromViewer = (viewer) => {
|
|
|
124231
124402
|
xyoViewer_networkStakeStepRewardPositionWeight: (params) => viewer.networkStakeStepRewardPositionWeight?.(...params ?? []),
|
|
124232
124403
|
xyoViewer_networkStakeStepRewardPotentialPositionLoss: (params) => viewer.networkStakeStepRewardPotentialPositionLoss?.(...params ?? []),
|
|
124233
124404
|
xyoViewer_networkStakeStepRewardForStep: (params) => viewer.networkStakeStepRewardForStep?.(...params ?? []),
|
|
124405
|
+
xyoViewer_networkStakeStepRewardAllocationsForStep: (params) => viewer.networkStakeStepRewardAllocationsForStep?.(...params ?? []),
|
|
124234
124406
|
xyoViewer_networkStakeStepRewardRandomizer: (params) => viewer.networkStakeStepRewardRandomizer?.(...params ?? []),
|
|
124235
124407
|
xyoViewer_networkStakeStepRewardStakerCount: (params) => viewer.networkStakeStepRewardStakerCount?.(...params ?? []),
|
|
124236
124408
|
xyoViewer_networkStakeStepRewardForStepForPosition: (params) => viewer.networkStakeStepRewardForStepForPosition?.(...params ?? []),
|
|
@@ -124511,6 +124683,16 @@ var NetworkStakingStepRewardsByPositionViewerRpcSchemas = {
|
|
|
124511
124683
|
from: /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1(val)))
|
|
124512
124684
|
}
|
|
124513
124685
|
},
|
|
124686
|
+
networkStakingStepRewardsByPositionViewer_allocationsForStep: {
|
|
124687
|
+
params: {
|
|
124688
|
+
to: /* @__PURE__ */ tuple$1([StepIdentityZod]),
|
|
124689
|
+
from: /* @__PURE__ */ tuple$1([StepIdentityZod])
|
|
124690
|
+
},
|
|
124691
|
+
result: {
|
|
124692
|
+
to: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), BigIntToJsonZod),
|
|
124693
|
+
from: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1(val))))
|
|
124694
|
+
}
|
|
124695
|
+
},
|
|
124514
124696
|
networkStakingStepRewardsByPositionViewer_totalForStepForPosition: {
|
|
124515
124697
|
params: {
|
|
124516
124698
|
to: /* @__PURE__ */ tuple$1([StepIdentityZod, /* @__PURE__ */ number$5()]),
|
|
@@ -125196,6 +125378,16 @@ var XyoViewerRpcSchemas = {
|
|
|
125196
125378
|
from: /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1(val)))
|
|
125197
125379
|
}
|
|
125198
125380
|
},
|
|
125381
|
+
xyoViewer_networkStakeStepRewardAllocationsForStep: {
|
|
125382
|
+
params: {
|
|
125383
|
+
to: /* @__PURE__ */ tuple$1([StepIdentityZod]),
|
|
125384
|
+
from: /* @__PURE__ */ tuple$1([StepIdentityZod])
|
|
125385
|
+
},
|
|
125386
|
+
result: {
|
|
125387
|
+
to: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), BigIntToJsonZod),
|
|
125388
|
+
from: /* @__PURE__ */ record$2(/* @__PURE__ */ number$5(), /* @__PURE__ */ pipe$1(JsonToBigIntZod, /* @__PURE__ */ transform$1((val) => asAttoXL1(val))))
|
|
125389
|
+
}
|
|
125390
|
+
},
|
|
125199
125391
|
xyoViewer_networkStakeStepRewardRandomizer: {
|
|
125200
125392
|
params: {
|
|
125201
125393
|
to: /* @__PURE__ */ tuple$1([StepIdentityZod]),
|
|
@@ -125460,6 +125652,28 @@ tuple([object$3({
|
|
|
125460
125652
|
id: string$2(),
|
|
125461
125653
|
payloads: array$1(union$1([PayloadZodLoose, JsonToArrayBufferZod2]))
|
|
125462
125654
|
})]), union$1([PayloadZodLoose, ArrayBufferToJsonZod]), union$1([PayloadZodLoose, JsonToArrayBufferZod2]);
|
|
125655
|
+
function trimTrailingNull(params) {
|
|
125656
|
+
let end = params.length;
|
|
125657
|
+
while (end > 0 && params[end - 1] === null) end--;
|
|
125658
|
+
return params.slice(0, end);
|
|
125659
|
+
}
|
|
125660
|
+
function parseRpcRequest(requestSchema, request) {
|
|
125661
|
+
const parsed = requestSchema.safeParse(request);
|
|
125662
|
+
if (parsed.success || !isObject$5(request)) return parsed;
|
|
125663
|
+
const { params } = request;
|
|
125664
|
+
if (!Array.isArray(params) || params.at(-1) !== null) return parsed;
|
|
125665
|
+
const retried = requestSchema.safeParse({
|
|
125666
|
+
...request,
|
|
125667
|
+
params: trimTrailingNull(params)
|
|
125668
|
+
});
|
|
125669
|
+
return retried.success ? retried : parsed;
|
|
125670
|
+
}
|
|
125671
|
+
function trimTrailingUndefined(params) {
|
|
125672
|
+
if (!Array.isArray(params)) return params;
|
|
125673
|
+
let end = params.length;
|
|
125674
|
+
while (end > 0 && params[end - 1] === void 0) end--;
|
|
125675
|
+
return end === params.length ? params : params.slice(0, end);
|
|
125676
|
+
}
|
|
125463
125677
|
var HttpRpcTransport = class {
|
|
125464
125678
|
_passThrough;
|
|
125465
125679
|
_rpcUrl;
|
|
@@ -125483,7 +125697,7 @@ var HttpRpcTransport = class {
|
|
|
125483
125697
|
};
|
|
125484
125698
|
const schema = schemas[method];
|
|
125485
125699
|
if (params !== void 0) {
|
|
125486
|
-
body.params = isDefined$1(schema) ? schema.params.to.parse(params) : this._passThrough ? (/* @__PURE__ */ json$3()).parse(params) : void 0;
|
|
125700
|
+
body.params = isDefined$1(schema) ? trimTrailingUndefined(schema.params.to.parse(params)) : this._passThrough ? (/* @__PURE__ */ json$3()).parse(trimTrailingUndefined(params)) : void 0;
|
|
125487
125701
|
if (!isDefined$1(body.params)) throw new Error(`[callRpc] RPC method ${String(method)} missing schema`);
|
|
125488
125702
|
}
|
|
125489
125703
|
body.params ??= [];
|
|
@@ -125904,6 +126118,10 @@ JsonRpcMempoolViewer = __decorateClass$17([creatableProvider()], JsonRpcMempoolV
|
|
|
125904
126118
|
var JsonRpcNetworkStakeStepRewardsByPositionViewerMethods = class extends AbstractJsonRpcViewer {
|
|
125905
126119
|
/** Moniker implemented by this provider instance. */
|
|
125906
126120
|
moniker = NetworkStakeStepRewardsByPositionViewerMoniker;
|
|
126121
|
+
/** Per-position allocations for one completed step. */
|
|
126122
|
+
async allocationsForStep(step) {
|
|
126123
|
+
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_allocationsForStep", [step]);
|
|
126124
|
+
}
|
|
125907
126125
|
/** Returns the bonus result exposed by this provider. */
|
|
125908
126126
|
async bonus(options) {
|
|
125909
126127
|
return await this.transport.sendRequest("networkStakingStepRewardsByPositionViewer_bonus", [options]);
|
|
@@ -126514,6 +126732,10 @@ var JsonRpcXyoViewer = class extends AbstractJsonRpcViewer {
|
|
|
126514
126732
|
async networkStakeStepRewardAddressShare(context, address) {
|
|
126515
126733
|
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardAddressShare", [context, address]);
|
|
126516
126734
|
}
|
|
126735
|
+
/** Per-position allocations for one completed step. */
|
|
126736
|
+
async networkStakeStepRewardAllocationsForStep(context) {
|
|
126737
|
+
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardAllocationsForStep", [context]);
|
|
126738
|
+
}
|
|
126517
126739
|
/** Returns the network stake step reward claimed by address result exposed by this provider. */
|
|
126518
126740
|
async networkStakeStepRewardClaimedByAddress(address) {
|
|
126519
126741
|
return await this.transport.sendRequest("xyoViewer_networkStakeStepRewardClaimedByAddress", [address]);
|
|
@@ -126775,7 +126997,7 @@ var createValidationMiddleware = (schemas) => ({ request, context, next }) => {
|
|
|
126775
126997
|
requestSchema = createRequestSchema(request.method, schema.params.from);
|
|
126776
126998
|
requestSchemas[request.method] = requestSchema;
|
|
126777
126999
|
}
|
|
126778
|
-
const parsed = requestSchema
|
|
127000
|
+
const parsed = parseRpcRequest(requestSchema, request);
|
|
126779
127001
|
if (!parsed.success) throw new Error(parsed.error.message);
|
|
126780
127002
|
context.set("schema", schema);
|
|
126781
127003
|
context.set("params", parsed.data.params);
|
|
@@ -225452,7 +225674,7 @@ var BaseMongoSdk = class {
|
|
|
225452
225674
|
}
|
|
225453
225675
|
};
|
|
225454
225676
|
//#endregion
|
|
225455
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-driver-mongodb@5.3.
|
|
225677
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-driver-mongodb@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zo_b41a198c42289d2824f3326456687c6d/node_modules/@xyo-network/xl1-driver-mongodb/dist/neutral/index.mjs
|
|
225456
225678
|
var __defProp$15 = Object.defineProperty;
|
|
225457
225679
|
var __getOwnPropDesc$15 = Object.getOwnPropertyDescriptor;
|
|
225458
225680
|
var __defNormalProp$15 = (obj, key, value) => key in obj ? __defProp$15(obj, key, {
|
|
@@ -230485,6 +230707,9 @@ var BaseNetworkStakeStepRewardService = class extends AbstractCreatableProvider$
|
|
|
230485
230707
|
networkStakeStepRewardAddressShare(_context, _address) {
|
|
230486
230708
|
throw new Error("Method [networkStakeStepRewardAddressShare] not implemented.");
|
|
230487
230709
|
}
|
|
230710
|
+
networkStakeStepRewardAllocationsForStep(_context) {
|
|
230711
|
+
throw new Error("Method [networkStakeStepRewardAllocationsForStep] not implemented.");
|
|
230712
|
+
}
|
|
230488
230713
|
networkStakeStepRewardClaimedByAddress(_address) {
|
|
230489
230714
|
throw new Error("Method [networkStakeStepRewardClaimedByAddress] not implemented.");
|
|
230490
230715
|
}
|
|
@@ -241940,7 +242165,7 @@ function withDeprecationWarning$1(module, host, options = {}) {
|
|
|
241940
242165
|
return module;
|
|
241941
242166
|
}
|
|
241942
242167
|
//#endregion
|
|
241943
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.
|
|
242168
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_d8f0054b13f6e551673802e6b9e450ca/node_modules/@xyo-network/xl1-sdk/dist/node/providers.mjs
|
|
241944
242169
|
var __defProp$3 = Object.defineProperty;
|
|
241945
242170
|
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
|
241946
242171
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
|
|
@@ -242918,6 +243143,18 @@ var RestNetworkStakeStepRewardsByPositionViewer = class extends AbstractCreatabl
|
|
|
242918
243143
|
get fetchFn() {
|
|
242919
243144
|
return this.context.fetchFn ?? fetch.bind(globalThis);
|
|
242920
243145
|
}
|
|
243146
|
+
/** Per-position allocations for one completed step from the durable index record. */
|
|
243147
|
+
async allocationsForStep(step) {
|
|
243148
|
+
const head = await this.getHead();
|
|
243149
|
+
this.assertPublishedStep(step, head);
|
|
243150
|
+
const record = await this.getStep(step);
|
|
243151
|
+
const result = {};
|
|
243152
|
+
for (const [positionId, amount] of Object.entries(record.positionRewards)) {
|
|
243153
|
+
const reward = asAttoXL1$1(BigInt(amount));
|
|
243154
|
+
if (reward > 0n) result[Number(positionId)] = reward;
|
|
243155
|
+
}
|
|
243156
|
+
return result;
|
|
243157
|
+
}
|
|
242921
243158
|
/** Returns the policy bonus. The unmultiplied-v1 index has no multipliers, so bonus is zero. */
|
|
242922
243159
|
async bonus(options = {}) {
|
|
242923
243160
|
const total = await this.total(options);
|
|
@@ -243409,6 +243646,18 @@ var SimpleStepRewardsByPositionViewer = class extends AbstractCreatableProvider$
|
|
|
243409
243646
|
get stakeViewer() {
|
|
243410
243647
|
return this._stakeViewer;
|
|
243411
243648
|
}
|
|
243649
|
+
/** Per-position allocations for one completed step (compute path). */
|
|
243650
|
+
async allocationsForStep(step) {
|
|
243651
|
+
const externalRange = await externalBlockRangeFromStep(this.context, this.blockViewer, step, this.timeAnchor);
|
|
243652
|
+
const positionCount = await this.stakeViewer.stakeEvents.positionCount(externalRange);
|
|
243653
|
+
if (positionCount === 0) return {};
|
|
243654
|
+
const positions = await this.loadPositions(positionCount);
|
|
243655
|
+
const eventsByPosition = indexStakeEventsByPosition(await this.stakeViewer.stakeEvents.stakeEvents([0, externalRange[1]]));
|
|
243656
|
+
const computed = await networkStakeStepRewardsForPositions(this.context, this.blockViewer, step, positions, eventsByPosition, this.rewardMultipliers, this.timeAnchor, externalRange);
|
|
243657
|
+
const result = {};
|
|
243658
|
+
for (const [positionId, amount] of computed.positionRewards) if (amount > 0n) result[positionId] = amount;
|
|
243659
|
+
return result;
|
|
243660
|
+
}
|
|
243412
243661
|
/** Returns the bonus result exposed by this provider. */
|
|
243413
243662
|
async bonus({ range, positions } = {}) {
|
|
243414
243663
|
const total = await this.total({
|
|
@@ -244155,6 +244404,10 @@ var SimpleXyoViewer = class extends AbstractCreatableProvider$1 {
|
|
|
244155
244404
|
networkStakeStepRewardAddressShare(_context, _address) {
|
|
244156
244405
|
throw new Error("Method [networkStakeStepRewardAddressShare] not implemented.");
|
|
244157
244406
|
}
|
|
244407
|
+
/** Per-position allocations for one completed step (`positionId → reward`). */
|
|
244408
|
+
async networkStakeStepRewardAllocationsForStep(stepIdentity) {
|
|
244409
|
+
return await this.networkStepRewardsByPositionViewer.allocationsForStep(stepIdentity);
|
|
244410
|
+
}
|
|
244158
244411
|
/** Returns the network stake step reward claimed by address result exposed by this provider. */
|
|
244159
244412
|
networkStakeStepRewardClaimedByAddress(_address) {
|
|
244160
244413
|
throw new Error("Method [networkStakeStepRewardClaimedByAddress] not implemented.");
|
|
@@ -244464,7 +244717,7 @@ __publicField$3(RestChainParamsViewer, "monikers", [ChainParamsViewerMoniker]);
|
|
|
244464
244717
|
__publicField$3(RestChainParamsViewer, "surface", "node");
|
|
244465
244718
|
RestChainParamsViewer = __decorateClass$3([creatableProvider$1()], RestChainParamsViewer);
|
|
244466
244719
|
//#endregion
|
|
244467
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-s3-providers@5.3.
|
|
244720
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-s3-providers@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@_d1d2fde6ed1017438dbf810bb4a75181/node_modules/@xyo-network/xl1-s3-providers/dist/node/index.mjs
|
|
244468
244721
|
var __defProp$2 = Object.defineProperty;
|
|
244469
244722
|
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
|
|
244470
244723
|
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
@@ -247701,7 +247954,7 @@ async function tryParseConfig(options) {
|
|
|
247701
247954
|
return finalize ? finalizeConfig(section) : section;
|
|
247702
247955
|
}
|
|
247703
247956
|
//#endregion
|
|
247704
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-system-status@5.3.
|
|
247957
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-system-status@5.3.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_19e6693dd338050e1795f614861c0e57/node_modules/@xyo-network/xl1-system-status/dist/node/index.mjs
|
|
247705
247958
|
function resolveStatusProbe(status, url) {
|
|
247706
247959
|
switch (url) {
|
|
247707
247960
|
case "/healthz": {
|
|
@@ -248885,8 +249138,8 @@ $0 <command> [options]`).parserConfiguration({
|
|
|
248885
249138
|
}
|
|
248886
249139
|
}).help().alias("help", "h").version(fullVersion2);
|
|
248887
249140
|
}
|
|
248888
|
-
var version = isDefined$1("5.2.
|
|
248889
|
-
var gitHash = isDefined$1("
|
|
249141
|
+
var version = isDefined$1("5.2.2") ? "5.2.2" : "unknown";
|
|
249142
|
+
var gitHash = isDefined$1("0eaaafa63") ? "0eaaafa63" : "";
|
|
248890
249143
|
var fullVersion = gitHash.length > 0 ? `${version} (${gitHash})` : version;
|
|
248891
249144
|
var mapXl1CliFailure = createSysExitFailureMapper();
|
|
248892
249145
|
var defaultDependencies2 = {
|