@xyo-network/xl1-protocol-sdk 2.1.8 → 2.2.0
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/neutral/CreatableProvider/AbstractCreatableProvider.d.ts +62 -8
- package/dist/neutral/CreatableProvider/AbstractCreatableProvider.d.ts.map +1 -1
- package/dist/neutral/capabilities/resolveProviders.d.ts +6 -0
- package/dist/neutral/capabilities/resolveProviders.d.ts.map +1 -1
- package/dist/neutral/config/Actor.d.ts +372 -48
- package/dist/neutral/config/Actor.d.ts.map +1 -1
- package/dist/neutral/config/Actors.d.ts +62 -8
- package/dist/neutral/config/Actors.d.ts.map +1 -1
- package/dist/neutral/config/Base.d.ts +62 -8
- package/dist/neutral/config/Base.d.ts.map +1 -1
- package/dist/neutral/config/Chain.d.ts +1 -1
- package/dist/neutral/config/Config.d.ts +248 -32
- package/dist/neutral/config/Config.d.ts.map +1 -1
- package/dist/neutral/config/HostActor.d.ts +372 -48
- package/dist/neutral/config/HostActor.d.ts.map +1 -1
- package/dist/neutral/config/ProviderBinding.d.ts +18 -0
- package/dist/neutral/config/ProviderBinding.d.ts.map +1 -0
- package/dist/neutral/config/Validation.d.ts +2 -2
- package/dist/neutral/config/adaptLegacyConfig.d.ts +9 -0
- package/dist/neutral/config/adaptLegacyConfig.d.ts.map +1 -0
- package/dist/neutral/config/index.d.ts +5 -1
- package/dist/neutral/config/index.d.ts.map +1 -1
- package/dist/neutral/config/storage/Storage.d.ts +26 -5
- package/dist/neutral/config/storage/Storage.d.ts.map +1 -1
- package/dist/neutral/config/storage/driver/S3.d.ts +77 -0
- package/dist/neutral/config/storage/driver/S3.d.ts.map +1 -0
- package/dist/neutral/config/storage/driver/index.d.ts +1 -1
- package/dist/neutral/config/transports/Transport.d.ts +111 -0
- package/dist/neutral/config/transports/Transport.d.ts.map +1 -0
- package/dist/neutral/config/transports/index.d.ts +2 -0
- package/dist/neutral/config/transports/index.d.ts.map +1 -0
- package/dist/neutral/context/Actor.d.ts +372 -48
- package/dist/neutral/context/Actor.d.ts.map +1 -1
- package/dist/neutral/context/HostActor.d.ts +372 -48
- package/dist/neutral/context/HostActor.d.ts.map +1 -1
- package/dist/neutral/createDeclarationPayload.d.ts +1 -1
- package/dist/neutral/createDeclarationPayload.d.ts.map +1 -1
- package/dist/neutral/createTransferPayload.d.ts +1 -1
- package/dist/neutral/createTransferPayload.d.ts.map +1 -1
- package/dist/neutral/getFileConfig.d.ts +124 -16
- package/dist/neutral/getFileConfig.d.ts.map +1 -1
- package/dist/neutral/getFileConfig.mjs +157 -108
- package/dist/neutral/getFileConfig.mjs.map +4 -4
- package/dist/neutral/index.mjs +427 -216
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/instances/Address.d.ts +1 -1
- package/dist/neutral/instances/Address.d.ts.map +1 -1
- package/dist/neutral/instances/Signature.d.ts +1 -1
- package/dist/neutral/instances/Signature.d.ts.map +1 -1
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts +372 -48
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts.map +1 -1
- package/dist/neutral/payloads/AddressPairPayload.d.ts +1 -2
- package/dist/neutral/payloads/AddressPairPayload.d.ts.map +1 -1
- package/dist/neutral/payloads/netBalancesForPayloads.d.ts +2 -2
- package/dist/neutral/payloads/netBalancesForPayloads.d.ts.map +1 -1
- package/dist/neutral/payloads/netSchemasForPayloads.d.ts +2 -2
- package/dist/neutral/payloads/netSchemasForPayloads.d.ts.map +1 -1
- package/dist/neutral/payloads/netTransfersForPayloads.d.ts +1 -2
- package/dist/neutral/payloads/netTransfersForPayloads.d.ts.map +1 -1
- package/dist/neutral/primitives/chain/step/chainStepRewardAddress.d.ts +1 -1
- package/dist/neutral/primitives/chain/step/chainStepRewardAddress.d.ts.map +1 -1
- package/dist/neutral/primitives/payload/mergeTransfers.d.ts +1 -1
- package/dist/neutral/primitives/payload/mergeTransfers.d.ts.map +1 -1
- package/dist/neutral/primitives/stake/activeStakeAtTimeByAddress.d.ts +1 -1
- package/dist/neutral/primitives/stake/activeStakeAtTimeByAddress.d.ts.map +1 -1
- package/dist/neutral/primitives/stake/allStakersForRange.d.ts +1 -1
- package/dist/neutral/primitives/stake/allStakersForRange.d.ts.map +1 -1
- package/dist/neutral/primitives/stake/allStakersForStep.d.ts +1 -1
- package/dist/neutral/primitives/stake/allStakersForStep.d.ts.map +1 -1
- package/dist/neutral/primitives/stake/mergedAddRemoveStakeEventsByStaker.d.ts +1 -1
- package/dist/neutral/primitives/stake/mergedAddRemoveStakeEventsByStaker.d.ts.map +1 -1
- package/dist/neutral/primitives/stake/weightedStakeForRangeByPosition.d.ts +1 -1
- package/dist/neutral/primitives/stake/weightedStakeForRangeByPosition.d.ts.map +1 -1
- package/dist/neutral/primitives/uncle/findUncles.d.ts +2 -2
- package/dist/neutral/services/AccountTransfersService.d.ts +1 -1
- package/dist/neutral/services/AccountTransfersService.d.ts.map +1 -1
- package/dist/neutral/services/Election.d.ts +1 -2
- package/dist/neutral/services/Election.d.ts.map +1 -1
- package/dist/neutral/services/StakeIntentService/StakeIntentService.d.ts +1 -1
- package/dist/neutral/services/StakeIntentService/StakeIntentService.d.ts.map +1 -1
- package/dist/neutral/simple/StakeTotalsViewer/SimpleStakeTotalsViewer.d.ts +1 -1
- package/dist/neutral/simple/StakeTotalsViewer/SimpleStakeTotalsViewer.d.ts.map +1 -1
- package/dist/neutral/simple/StakeViewer/SimpleStakeViewer.d.ts +1 -1
- package/dist/neutral/simple/StakeViewer/SimpleStakeViewer.d.ts.map +1 -1
- package/dist/neutral/simple/accountBalance/SimpleAccountBalanceViewer.d.ts +9 -10
- package/dist/neutral/simple/accountBalance/SimpleAccountBalanceViewer.d.ts.map +1 -1
- package/dist/neutral/simple/blockInvalidation/SimpleBlockInvalidationViewer.d.ts +1 -1
- package/dist/neutral/simple/blockValidation/SimpleBlockValidationViewer.d.ts +1 -1
- package/dist/neutral/simple/chainContractViewer/SimpleChainContractViewer.d.ts +3 -3
- package/dist/neutral/simple/chainContractViewer/SimpleChainContractViewer.d.ts.map +1 -1
- package/dist/neutral/simple/gateway/SimpleXyoGatewayRunner.d.ts +1 -2
- package/dist/neutral/simple/gateway/SimpleXyoGatewayRunner.d.ts.map +1 -1
- package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts +1 -1
- package/dist/neutral/simple/signer/SimpleXyoSigner.d.ts +1 -2
- package/dist/neutral/simple/signer/SimpleXyoSigner.d.ts.map +1 -1
- package/dist/neutral/simple/timeSync2/SimpleTimeSyncViewer.d.ts +1 -1
- package/dist/neutral/simple/timeSync2/SimpleTimeSyncViewer.d.ts.map +1 -1
- package/dist/neutral/simple/transactionInvalidation/SimpleTransactionInvalidationViewer.d.ts +1 -1
- package/dist/neutral/simple/transactionValidation/SimpleTransactionValidationViewer.d.ts +1 -1
- package/dist/neutral/summary/model/BalancesStepSummary.d.ts +1 -2
- package/dist/neutral/summary/model/BalancesStepSummary.d.ts.map +1 -1
- package/dist/neutral/summary/model/TransfersSummary.d.ts +1 -2
- package/dist/neutral/summary/model/TransfersSummary.d.ts.map +1 -1
- package/dist/neutral/summary/primitives/balances/balancesSummary.d.ts +1 -1
- package/dist/neutral/summary/primitives/balances/balancesSummary.d.ts.map +1 -1
- package/dist/neutral/summary/primitives/transfers/transfersSummary.d.ts +1 -1
- package/dist/neutral/summary/primitives/transfers/transfersSummary.d.ts.map +1 -1
- package/dist/neutral/test/BuildBlockOptions.d.ts +1 -2
- package/dist/neutral/test/BuildBlockOptions.d.ts.map +1 -1
- package/dist/neutral/test/buildNextBlock.d.ts +1 -2
- package/dist/neutral/test/buildNextBlock.d.ts.map +1 -1
- package/dist/neutral/test/buildRandomChain.d.ts +1 -2
- package/dist/neutral/test/buildRandomChain.d.ts.map +1 -1
- package/dist/neutral/test/buildRandomTransaction.d.ts +1 -2
- package/dist/neutral/test/buildRandomTransaction.d.ts.map +1 -1
- package/dist/neutral/test/createGenesisBlock.d.ts +1 -2
- package/dist/neutral/test/createGenesisBlock.d.ts.map +1 -1
- package/dist/neutral/test/createProducerChainStakeIntentTransaction.d.ts +1 -2
- package/dist/neutral/test/createProducerChainStakeIntentTransaction.d.ts.map +1 -1
- package/dist/neutral/test/getSimpleBlockViewerLocator.d.ts +1 -2
- package/dist/neutral/test/getSimpleBlockViewerLocator.d.ts.map +1 -1
- package/dist/neutral/test/index.mjs +159 -110
- package/dist/neutral/test/index.mjs.map +4 -4
- package/dist/neutral/transaction/buildTransaction.d.ts +1 -2
- package/dist/neutral/transaction/buildTransaction.d.ts.map +1 -1
- package/dist/neutral/transaction/buildUnsignedTransaction.d.ts +1 -2
- package/dist/neutral/transaction/buildUnsignedTransaction.d.ts.map +1 -1
- package/package.json +14 -16
- package/dist/neutral/config/storage/driver/R2.d.ts +0 -27
- package/dist/neutral/config/storage/driver/R2.d.ts.map +0 -1
package/dist/neutral/index.mjs
CHANGED
|
@@ -1023,7 +1023,7 @@ function resolveProviders(needs, candidates, ctx, options = {}) {
|
|
|
1023
1023
|
const { surviving, rejected: preconditionRejected } = filterByPreconditions(backingFiltered, ctx);
|
|
1024
1024
|
const rejected = [...backingRejected, ...preconditionRejected];
|
|
1025
1025
|
const byCapability = groupByCapability(surviving, wanted);
|
|
1026
|
-
const { bindings, selectedById } = pickWinners(wanted, byCapability, rejected, candidates);
|
|
1026
|
+
const { bindings, selectedById } = pickWinners(wanted, byCapability, rejected, candidates, options);
|
|
1027
1027
|
const selected = topoSort([...selectedById.values()], ctx);
|
|
1028
1028
|
return {
|
|
1029
1029
|
bindings,
|
|
@@ -1095,11 +1095,19 @@ function groupByCapability(surviving, wanted) {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
return byCapability;
|
|
1097
1097
|
}
|
|
1098
|
-
function pickWinners(wanted, byCapability, rejected, allCandidates) {
|
|
1098
|
+
function pickWinners(wanted, byCapability, rejected, allCandidates, options) {
|
|
1099
1099
|
const bindings = {};
|
|
1100
1100
|
const selectedById = /* @__PURE__ */ new Map();
|
|
1101
1101
|
for (const moniker of wanted) {
|
|
1102
|
-
|
|
1102
|
+
let group = byCapability.get(moniker);
|
|
1103
|
+
const pinned = options.implementations?.[moniker];
|
|
1104
|
+
if (pinned) {
|
|
1105
|
+
const pinnedGroup = group?.filter((descriptor) => descriptor.id === pinned);
|
|
1106
|
+
if (!pinnedGroup || pinnedGroup.length === 0) {
|
|
1107
|
+
throw new MissingCapabilityError(moniker, [`requested implementation '${pinned}' not available`]);
|
|
1108
|
+
}
|
|
1109
|
+
group = pinnedGroup;
|
|
1110
|
+
}
|
|
1103
1111
|
if (!group || group.length === 0) {
|
|
1104
1112
|
throw new MissingCapabilityError(moniker, reasonsFor(moniker, rejected, allCandidates));
|
|
1105
1113
|
}
|
|
@@ -1162,14 +1170,14 @@ import {
|
|
|
1162
1170
|
zodIsFactory as zodIsFactory2,
|
|
1163
1171
|
zodToFactory as zodToFactory2
|
|
1164
1172
|
} from "@xylabs/sdk-js";
|
|
1165
|
-
import { globalRegistry as
|
|
1173
|
+
import { globalRegistry as globalRegistry14, z as z20 } from "zod/mini";
|
|
1166
1174
|
|
|
1167
1175
|
// src/config/Base.ts
|
|
1168
|
-
import { z as
|
|
1176
|
+
import { z as z19 } from "zod/mini";
|
|
1169
1177
|
|
|
1170
1178
|
// src/config/Chain.ts
|
|
1171
1179
|
import { HexZod } from "@xylabs/sdk-js";
|
|
1172
|
-
import { XyoAddressZod } from "@xyo-network/
|
|
1180
|
+
import { XyoAddressZod } from "@xyo-network/sdk-js";
|
|
1173
1181
|
import { globalRegistry, z as z2 } from "zod/mini";
|
|
1174
1182
|
var ChainConfigZod = z2.object({
|
|
1175
1183
|
id: z2.optional(HexZod).register(globalRegistry, {
|
|
@@ -1278,8 +1286,24 @@ var LogConfigZod = z8.object({
|
|
|
1278
1286
|
})
|
|
1279
1287
|
});
|
|
1280
1288
|
|
|
1289
|
+
// src/config/ProviderBinding.ts
|
|
1290
|
+
import { globalRegistry as globalRegistry7, z as z9 } from "zod";
|
|
1291
|
+
var ProviderBindingConfigZod = z9.object({
|
|
1292
|
+
implementation: z9.string().optional().register(globalRegistry7, {
|
|
1293
|
+
description: "Installed provider implementation id (descriptor id)",
|
|
1294
|
+
title: "providerBindings.implementation",
|
|
1295
|
+
type: "string"
|
|
1296
|
+
}),
|
|
1297
|
+
transport: z9.string().optional().register(globalRegistry7, {
|
|
1298
|
+
description: "Named transport from the top-level transports map",
|
|
1299
|
+
title: "providerBindings.transport",
|
|
1300
|
+
type: "string"
|
|
1301
|
+
})
|
|
1302
|
+
}).describe("Provider implementation and transport binding");
|
|
1303
|
+
var ProviderBindingsConfigZod = z9.record(z9.string(), ProviderBindingConfigZod).default({});
|
|
1304
|
+
|
|
1281
1305
|
// src/config/Providers.ts
|
|
1282
|
-
import
|
|
1306
|
+
import z11 from "zod";
|
|
1283
1307
|
|
|
1284
1308
|
// src/config/Provider.ts
|
|
1285
1309
|
import {
|
|
@@ -1287,148 +1311,144 @@ import {
|
|
|
1287
1311
|
zodIsFactory,
|
|
1288
1312
|
zodToFactory
|
|
1289
1313
|
} from "@xylabs/sdk-js";
|
|
1290
|
-
import { z as
|
|
1291
|
-
var ProviderConfigZod =
|
|
1292
|
-
moniker:
|
|
1293
|
-
labels:
|
|
1314
|
+
import { z as z10 } from "zod";
|
|
1315
|
+
var ProviderConfigZod = z10.object({
|
|
1316
|
+
moniker: z10.string(),
|
|
1317
|
+
labels: z10.array(z10.string()).optional()
|
|
1294
1318
|
}).describe("Configuration for a Provider");
|
|
1295
1319
|
var isProviderConfig = zodIsFactory(ProviderConfigZod);
|
|
1296
1320
|
var asProviderConfig = zodAsFactory2(ProviderConfigZod, "asProviderConfig");
|
|
1297
1321
|
var toProviderConfig = zodToFactory(ProviderConfigZod, "toProviderConfig");
|
|
1298
1322
|
|
|
1299
1323
|
// src/config/Providers.ts
|
|
1300
|
-
var ProvidersConfigZod =
|
|
1324
|
+
var ProvidersConfigZod = z11.array(ProviderConfigZod.loose()).describe("Configuration for providers").default([]);
|
|
1301
1325
|
|
|
1302
1326
|
// src/config/Remote.ts
|
|
1303
|
-
import { globalRegistry as
|
|
1304
|
-
var RpcRemoteConfigBaseZod =
|
|
1305
|
-
protocol:
|
|
1327
|
+
import { globalRegistry as globalRegistry8, z as z12 } from "zod";
|
|
1328
|
+
var RpcRemoteConfigBaseZod = z12.object({
|
|
1329
|
+
protocol: z12.string("http").register(globalRegistry8, {
|
|
1306
1330
|
description: "Protocol for the RPC connection",
|
|
1307
1331
|
type: "string"
|
|
1308
1332
|
})
|
|
1309
1333
|
}).describe("Base configuration for the remote RPC");
|
|
1310
1334
|
var HttpRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
|
|
1311
|
-
protocol:
|
|
1335
|
+
protocol: z12.string("http").register(globalRegistry8, {
|
|
1312
1336
|
description: "Protocol for the RPC connection",
|
|
1313
1337
|
type: "string"
|
|
1314
1338
|
}).default("http"),
|
|
1315
|
-
url:
|
|
1339
|
+
url: z12.string().register(globalRegistry8, {
|
|
1316
1340
|
description: "URL for the Chain RPC API",
|
|
1317
1341
|
type: "string"
|
|
1318
1342
|
})
|
|
1319
1343
|
}).describe("Configuration for the remote RPC using Http");
|
|
1320
1344
|
var PostMessageRpcRemoteConfigZod = RpcRemoteConfigBaseZod.extend({
|
|
1321
|
-
protocol:
|
|
1345
|
+
protocol: z12.string().register(globalRegistry8, {
|
|
1322
1346
|
description: "Protocol for the RPC connection",
|
|
1323
1347
|
type: "string"
|
|
1324
1348
|
}).default("postMessage"),
|
|
1325
|
-
networkId:
|
|
1349
|
+
networkId: z12.string().register(globalRegistry8, {
|
|
1326
1350
|
description: "Network ID to use for the postMessage RPC connection",
|
|
1327
1351
|
type: "string"
|
|
1328
1352
|
}),
|
|
1329
|
-
sessionId:
|
|
1353
|
+
sessionId: z12.string().register(globalRegistry8, {
|
|
1330
1354
|
description: "Session ID to use for the postMessage RPC connection",
|
|
1331
1355
|
type: "string"
|
|
1332
1356
|
})
|
|
1333
1357
|
}).describe("Configuration for the remote RPC using postMessage");
|
|
1334
|
-
var RpcRemoteConfigZod =
|
|
1335
|
-
var RemoteConfigZod =
|
|
1358
|
+
var RpcRemoteConfigZod = z12.union([HttpRpcRemoteConfigZod, PostMessageRpcRemoteConfigZod]).describe("Configuration for a remote RPC connection, either Http or postMessage");
|
|
1359
|
+
var RemoteConfigZod = z12.object({ rpc: RpcRemoteConfigZod.optional() }).describe("Configuration for remote connections, including RPC");
|
|
1336
1360
|
|
|
1337
1361
|
// src/config/storage/driver/Mongo.ts
|
|
1338
1362
|
import { isDefined as isDefined4, isUndefined as isUndefined5 } from "@xylabs/sdk-js";
|
|
1339
|
-
import { globalRegistry as
|
|
1363
|
+
import { globalRegistry as globalRegistry9, z as z13 } from "zod";
|
|
1340
1364
|
var hasMongoConfig = (config) => {
|
|
1341
1365
|
if (isUndefined5(config)) return false;
|
|
1342
1366
|
return isDefined4(config.connectionString) && isDefined4(config.database) && isDefined4(config.domain);
|
|
1343
1367
|
};
|
|
1344
|
-
var MongoConfigZod =
|
|
1368
|
+
var MongoConfigZod = z13.object({
|
|
1345
1369
|
// TODO: Create from other arguments
|
|
1346
|
-
connectionString:
|
|
1370
|
+
connectionString: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1347
1371
|
description: "MongoDB connection string",
|
|
1348
1372
|
title: "storage.mongo.connectionString",
|
|
1349
1373
|
type: "string"
|
|
1350
1374
|
}),
|
|
1351
|
-
database:
|
|
1375
|
+
database: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1352
1376
|
description: "MongoDB database name",
|
|
1353
1377
|
title: "storage.mongo.database",
|
|
1354
1378
|
type: "string"
|
|
1355
1379
|
}),
|
|
1356
|
-
domain:
|
|
1380
|
+
domain: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1357
1381
|
description: "MongoDB domain",
|
|
1358
1382
|
title: "storage.mongo.domain",
|
|
1359
1383
|
type: "string"
|
|
1360
1384
|
}),
|
|
1361
|
-
password:
|
|
1385
|
+
password: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1362
1386
|
description: "MongoDB password",
|
|
1363
1387
|
title: "storage.mongo.password",
|
|
1364
1388
|
type: "string"
|
|
1365
1389
|
}),
|
|
1366
|
-
username:
|
|
1390
|
+
username: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1367
1391
|
description: "MongoDB username",
|
|
1368
1392
|
title: "storage.mongo.username",
|
|
1369
1393
|
type: "string"
|
|
1370
1394
|
})
|
|
1371
1395
|
});
|
|
1372
1396
|
|
|
1373
|
-
// src/config/storage/driver/
|
|
1374
|
-
import { isDefined as isDefined5
|
|
1375
|
-
import {
|
|
1376
|
-
var
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
accountId:
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
description: "Cloudflare R2 bucket name",
|
|
1393
|
-
title: "storage.r2.bucket",
|
|
1394
|
-
type: "string"
|
|
1395
|
-
}),
|
|
1396
|
-
chainStateBucket: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1397
|
-
description: "Cloudflare R2 bucket for the mutable chain state (the head pointer); defaults to `bucket` when unset",
|
|
1398
|
-
title: "storage.r2.chainStateBucket",
|
|
1399
|
-
type: "string"
|
|
1400
|
-
}),
|
|
1401
|
-
indexBucket: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1402
|
-
description: "Cloudflare R2 bucket for the chain index (the step-summary families); defaults to `bucket` when unset",
|
|
1403
|
-
title: "storage.r2.indexBucket",
|
|
1404
|
-
type: "string"
|
|
1405
|
-
}),
|
|
1406
|
-
prefix: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1407
|
-
description: "Optional key prefix namespacing this store within the bucket",
|
|
1408
|
-
title: "storage.r2.prefix",
|
|
1409
|
-
type: "string"
|
|
1410
|
-
}),
|
|
1411
|
-
secretAccessKey: z13.string().nonempty().optional().register(globalRegistry9, {
|
|
1412
|
-
description: "Cloudflare R2 secret access key (from an R2 API token)",
|
|
1413
|
-
title: "storage.r2.secretAccessKey",
|
|
1414
|
-
type: "string"
|
|
1415
|
-
})
|
|
1397
|
+
// src/config/storage/driver/S3.ts
|
|
1398
|
+
import { isDefined as isDefined5 } from "@xylabs/sdk-js";
|
|
1399
|
+
import { z as z14 } from "zod";
|
|
1400
|
+
var S3BucketConfigZod = z14.object({
|
|
1401
|
+
accessKeyId: z14.string().nonempty().optional().describe("S3-compatible access key id for this bucket (overrides the shared default)"),
|
|
1402
|
+
accountId: z14.string().nonempty().optional().describe("Account id for this bucket; on Cloudflare R2 it forms the endpoint (overrides the shared default)"),
|
|
1403
|
+
bucket: z14.string().nonempty().optional().describe("S3-compatible bucket name"),
|
|
1404
|
+
prefix: z14.string().nonempty().optional().describe("Optional key prefix within the bucket"),
|
|
1405
|
+
readUrl: z14.string().nonempty().optional().describe("Public HTTP/CDN base URL for anonymous reads of this bucket"),
|
|
1406
|
+
secretAccessKey: z14.string().nonempty().optional().describe("S3-compatible secret access key for this bucket (overrides the shared default)")
|
|
1407
|
+
});
|
|
1408
|
+
var S3ConfigZod = z14.object({
|
|
1409
|
+
accessKeyId: z14.string().nonempty().optional().describe("Shared S3-compatible access key id (default for all buckets)"),
|
|
1410
|
+
accountId: z14.string().nonempty().optional().describe("Shared account id (default for all buckets; on Cloudflare R2 it forms the endpoint)"),
|
|
1411
|
+
chainState: S3BucketConfigZod.optional().describe("Bucket for the mutable chain state (the head pointer)"),
|
|
1412
|
+
finalized: S3BucketConfigZod.optional().describe("Bucket for the finalized files (blocks, payloads, manifest)"),
|
|
1413
|
+
index: S3BucketConfigZod.optional().describe("Bucket for the chain index (the step-summary families)"),
|
|
1414
|
+
prefix: z14.string().nonempty().optional().describe("Shared key prefix (default for all buckets)"),
|
|
1415
|
+
secretAccessKey: z14.string().nonempty().optional().describe("Shared S3-compatible secret access key (default for all buckets)")
|
|
1416
1416
|
});
|
|
1417
|
+
function resolveS3Bucket(config, which) {
|
|
1418
|
+
if (config === void 0) return void 0;
|
|
1419
|
+
const entry = config[which];
|
|
1420
|
+
const accessKeyId = entry?.accessKeyId ?? config.accessKeyId;
|
|
1421
|
+
const accountId = entry?.accountId ?? config.accountId;
|
|
1422
|
+
const secretAccessKey = entry?.secretAccessKey ?? config.secretAccessKey;
|
|
1423
|
+
const bucket = entry?.bucket ?? config.finalized?.bucket;
|
|
1424
|
+
if (!isDefined5(accessKeyId) || !isDefined5(accountId) || !isDefined5(secretAccessKey) || !isDefined5(bucket)) return void 0;
|
|
1425
|
+
return {
|
|
1426
|
+
accessKeyId,
|
|
1427
|
+
accountId,
|
|
1428
|
+
bucket,
|
|
1429
|
+
prefix: entry?.prefix ?? config.prefix,
|
|
1430
|
+
readUrl: entry?.readUrl,
|
|
1431
|
+
secretAccessKey
|
|
1432
|
+
};
|
|
1433
|
+
}
|
|
1434
|
+
function hasS3Config(config, which = "finalized") {
|
|
1435
|
+
return resolveS3Bucket(config, which) !== void 0;
|
|
1436
|
+
}
|
|
1417
1437
|
|
|
1418
1438
|
// src/config/storage/Storage.ts
|
|
1419
|
-
import { globalRegistry as globalRegistry10, z as
|
|
1420
|
-
var StorageConfigZod =
|
|
1439
|
+
import { globalRegistry as globalRegistry10, z as z15 } from "zod";
|
|
1440
|
+
var StorageConfigZod = z15.object({
|
|
1421
1441
|
mongo: MongoConfigZod.optional().describe("Configuration for the MongoD storage driver"),
|
|
1422
|
-
|
|
1423
|
-
root: z14.string().optional().register(globalRegistry10, {
|
|
1442
|
+
root: z15.string().optional().register(globalRegistry10, {
|
|
1424
1443
|
description: "Root directory for local storage",
|
|
1425
1444
|
title: "storage.root",
|
|
1426
1445
|
type: "string"
|
|
1427
|
-
})
|
|
1446
|
+
}),
|
|
1447
|
+
s3: S3ConfigZod.optional().describe("Configuration for S3-compatible object storage (e.g. Cloudflare R2)")
|
|
1428
1448
|
}).describe("Storage configuration options");
|
|
1429
1449
|
|
|
1430
1450
|
// src/config/Telemetry.ts
|
|
1431
|
-
import { globalRegistry as globalRegistry11, z as
|
|
1451
|
+
import { globalRegistry as globalRegistry11, z as z16 } from "zod";
|
|
1432
1452
|
var DefaultMetricsScrapePorts = {
|
|
1433
1453
|
api: 9465,
|
|
1434
1454
|
bridge: 9468,
|
|
@@ -1436,38 +1456,89 @@ var DefaultMetricsScrapePorts = {
|
|
|
1436
1456
|
producer: 9464,
|
|
1437
1457
|
rewardRedemptionApi: 9467
|
|
1438
1458
|
};
|
|
1439
|
-
var MetricsScrapeConfigZod =
|
|
1440
|
-
path:
|
|
1459
|
+
var MetricsScrapeConfigZod = z16.object({
|
|
1460
|
+
path: z16.string().default("/metrics").register(globalRegistry11, {
|
|
1441
1461
|
default: "/metrics",
|
|
1442
1462
|
description: "Path for the metrics scrape endpoint",
|
|
1443
1463
|
title: "telemetry.metrics.scrape.path",
|
|
1444
1464
|
type: "string"
|
|
1445
1465
|
}),
|
|
1446
|
-
port:
|
|
1466
|
+
port: z16.coerce.number().int().positive().optional().register(globalRegistry11, {
|
|
1447
1467
|
description: "Port for the metrics scrape endpoint",
|
|
1448
1468
|
title: "telemetry.metrics.scrape.port",
|
|
1449
1469
|
type: "number"
|
|
1450
1470
|
})
|
|
1451
1471
|
}).describe("Metrics scrape configuration");
|
|
1452
|
-
var MetricsConfigZod =
|
|
1453
|
-
var OpenTelemetryConfigZod =
|
|
1472
|
+
var MetricsConfigZod = z16.object({ scrape: MetricsScrapeConfigZod }).describe("Metrics configuration options");
|
|
1473
|
+
var OpenTelemetryConfigZod = z16.object({
|
|
1454
1474
|
// OpenTelemetry options
|
|
1455
|
-
otlpEndpoint:
|
|
1475
|
+
otlpEndpoint: z16.url().optional().register(globalRegistry11, {
|
|
1456
1476
|
description: "OTLP endpoint for exporting telemetry data",
|
|
1457
1477
|
title: "telemetry.otel.otlpEndpoint",
|
|
1458
1478
|
type: "string"
|
|
1459
1479
|
})
|
|
1460
1480
|
});
|
|
1461
|
-
var TelemetryConfigZod =
|
|
1481
|
+
var TelemetryConfigZod = z16.object({
|
|
1462
1482
|
// Metrics configuration
|
|
1463
1483
|
metrics: MetricsConfigZod.optional().describe("Metrics configuration"),
|
|
1464
1484
|
// OpenTelemetry configuration
|
|
1465
1485
|
otel: OpenTelemetryConfigZod.optional().describe("OpenTelemetry configuration")
|
|
1466
1486
|
}).describe("Telemetry configuration options");
|
|
1467
1487
|
|
|
1488
|
+
// src/config/transports/Transport.ts
|
|
1489
|
+
import { globalRegistry as globalRegistry12, z as z17 } from "zod";
|
|
1490
|
+
var LmdbTransportConfigZod = z17.object({
|
|
1491
|
+
type: z17.literal("lmdb"),
|
|
1492
|
+
root: z17.string().register(globalRegistry12, {
|
|
1493
|
+
description: "Root directory for local LMDB storage",
|
|
1494
|
+
title: "transports.lmdb.root",
|
|
1495
|
+
type: "string"
|
|
1496
|
+
})
|
|
1497
|
+
}).describe("LMDB local storage transport");
|
|
1498
|
+
var MongoTransportConfigZod = z17.object({
|
|
1499
|
+
type: z17.literal("mongo"),
|
|
1500
|
+
connectionString: MongoConfigZod.shape.connectionString,
|
|
1501
|
+
database: MongoConfigZod.shape.database,
|
|
1502
|
+
domain: MongoConfigZod.shape.domain,
|
|
1503
|
+
password: MongoConfigZod.shape.password,
|
|
1504
|
+
username: MongoConfigZod.shape.username
|
|
1505
|
+
}).describe("MongoDB storage transport");
|
|
1506
|
+
var RpcTransportConfigZod = HttpRpcRemoteConfigZod.extend({ type: z17.literal("rpc") }).describe("XL1 JSON-RPC transport");
|
|
1507
|
+
var RestTransportConfigZod = z17.object({
|
|
1508
|
+
type: z17.literal("rest"),
|
|
1509
|
+
baseUrl: z17.string().register(globalRegistry12, {
|
|
1510
|
+
description: "HTTP base URL for REST reads",
|
|
1511
|
+
title: "transports.rest.baseUrl",
|
|
1512
|
+
type: "string"
|
|
1513
|
+
})
|
|
1514
|
+
}).describe("HTTP REST read transport");
|
|
1515
|
+
var S3TransportConfigZod = S3BucketConfigZod.extend({
|
|
1516
|
+
type: z17.literal("s3"),
|
|
1517
|
+
accessKeyId: z17.string().optional(),
|
|
1518
|
+
accountId: z17.string().optional(),
|
|
1519
|
+
secretAccessKey: z17.string().optional()
|
|
1520
|
+
}).describe("S3-compatible object storage transport");
|
|
1521
|
+
var EvmRpcTransportConfigZod = z17.object({
|
|
1522
|
+
type: z17.literal("evm-rpc"),
|
|
1523
|
+
url: z17.string().register(globalRegistry12, {
|
|
1524
|
+
description: "EVM JSON-RPC URL",
|
|
1525
|
+
title: "transports.evm-rpc.url",
|
|
1526
|
+
type: "string"
|
|
1527
|
+
})
|
|
1528
|
+
}).describe("EVM JSON-RPC transport");
|
|
1529
|
+
var TransportConfigZod = z17.discriminatedUnion("type", [
|
|
1530
|
+
LmdbTransportConfigZod,
|
|
1531
|
+
MongoTransportConfigZod,
|
|
1532
|
+
RpcTransportConfigZod,
|
|
1533
|
+
RestTransportConfigZod,
|
|
1534
|
+
S3TransportConfigZod,
|
|
1535
|
+
EvmRpcTransportConfigZod
|
|
1536
|
+
]);
|
|
1537
|
+
var TransportsConfigZod = z17.record(z17.string(), TransportConfigZod).default({});
|
|
1538
|
+
|
|
1468
1539
|
// src/config/Validation.ts
|
|
1469
|
-
import { XyoAddressZod as XyoAddressZod2 } from "@xyo-network/
|
|
1470
|
-
import { globalRegistry as
|
|
1540
|
+
import { XyoAddressZod as XyoAddressZod2 } from "@xyo-network/sdk-js";
|
|
1541
|
+
import { globalRegistry as globalRegistry13, z as z18 } from "zod";
|
|
1471
1542
|
|
|
1472
1543
|
// src/primitives/block/range/blockRangeSteps.ts
|
|
1473
1544
|
import { asXL1BlockNumber as asXL1BlockNumber2, StepSizes as StepSizes3 } from "@xyo-network/xl1-protocol-lib";
|
|
@@ -1713,7 +1784,7 @@ async function getWindowedChain(context, blockViewer, maxWindowSize, previousCha
|
|
|
1713
1784
|
|
|
1714
1785
|
// src/primitives/chain/step/chainStepRewardAddress.ts
|
|
1715
1786
|
import { assertEx as assertEx14, exists } from "@xylabs/sdk-js";
|
|
1716
|
-
import { toXyoAddress as toXyoAddress2 } from "@xyo-network/
|
|
1787
|
+
import { toXyoAddress as toXyoAddress2 } from "@xyo-network/sdk-js";
|
|
1717
1788
|
import {
|
|
1718
1789
|
asTransfer,
|
|
1719
1790
|
isTransfer,
|
|
@@ -1722,7 +1793,7 @@ import {
|
|
|
1722
1793
|
|
|
1723
1794
|
// src/primitives/payload/mergeTransfers.ts
|
|
1724
1795
|
import { hexToBigInt } from "@xylabs/sdk-js";
|
|
1725
|
-
import { toXyoAddress } from "@xyo-network/
|
|
1796
|
+
import { toXyoAddress } from "@xyo-network/sdk-js";
|
|
1726
1797
|
function mergeTransfers(transfers) {
|
|
1727
1798
|
const result = {};
|
|
1728
1799
|
for (const transfer of transfers) {
|
|
@@ -1808,7 +1879,9 @@ var asOptionalAddressPairPayload = AsObjectFactory.createOptional(isAddressPairP
|
|
|
1808
1879
|
// src/payloads/netBalancesForPayloads.ts
|
|
1809
1880
|
import { hexToBigInt as hexToBigInt2 } from "@xylabs/sdk-js";
|
|
1810
1881
|
import { span } from "@xylabs/sdk-js";
|
|
1811
|
-
import {
|
|
1882
|
+
import {
|
|
1883
|
+
toXyoAddress as toXyoAddress3
|
|
1884
|
+
} from "@xyo-network/sdk-js";
|
|
1812
1885
|
import { isTransfer as isTransfer2 } from "@xyo-network/xl1-protocol-lib";
|
|
1813
1886
|
var netBalancesForPayloads = (context, payloads) => {
|
|
1814
1887
|
return span("netBalancesForPayloads", () => {
|
|
@@ -1829,7 +1902,9 @@ var netBalancesForPayloads = (context, payloads) => {
|
|
|
1829
1902
|
// src/payloads/netSchemasForPayloads.ts
|
|
1830
1903
|
import { hexToBigInt as hexToBigInt3 } from "@xylabs/sdk-js";
|
|
1831
1904
|
import { span as span2 } from "@xylabs/sdk-js";
|
|
1832
|
-
import {
|
|
1905
|
+
import {
|
|
1906
|
+
toXyoAddress as toXyoAddress4
|
|
1907
|
+
} from "@xyo-network/sdk-js";
|
|
1833
1908
|
import { isTransfer as isTransfer3 } from "@xyo-network/xl1-protocol-lib";
|
|
1834
1909
|
var netSchemasForPayloads = (context, payloads) => {
|
|
1835
1910
|
return span2("netSchemasForPayloads", () => {
|
|
@@ -2101,7 +2176,7 @@ async function activeStakeAtTimeByAddress(chain, staked, time, staker) {
|
|
|
2101
2176
|
}
|
|
2102
2177
|
|
|
2103
2178
|
// src/primitives/stake/activeStakeAtTimeByPosition.ts
|
|
2104
|
-
import { isUndefined as
|
|
2179
|
+
import { isUndefined as isUndefined6 } from "@xylabs/sdk-js";
|
|
2105
2180
|
|
|
2106
2181
|
// src/primitives/stake/mergedAddRemoveStakeEventsByPosition.ts
|
|
2107
2182
|
async function mergedAddRemoveStakeEventsByPosition(chainEvents, range, position) {
|
|
@@ -2119,7 +2194,7 @@ async function activeStakeAtTimeByPosition(chainStakeEvents, externalTime, posit
|
|
|
2119
2194
|
let result = 0n;
|
|
2120
2195
|
for (const event of stakeEvents) {
|
|
2121
2196
|
if (event.time > externalTime) break;
|
|
2122
|
-
if (
|
|
2197
|
+
if (isUndefined6(position) || position === Number(event.args.id)) {
|
|
2123
2198
|
if (event.name === "StakeAdded") {
|
|
2124
2199
|
result += event.args.amount;
|
|
2125
2200
|
} else if (event.name === "StakeRemoved") {
|
|
@@ -2131,7 +2206,7 @@ async function activeStakeAtTimeByPosition(chainStakeEvents, externalTime, posit
|
|
|
2131
2206
|
}
|
|
2132
2207
|
|
|
2133
2208
|
// src/primitives/stake/allStakersForRange.ts
|
|
2134
|
-
import { toXyoAddress as toXyoAddress5 } from "@xyo-network/
|
|
2209
|
+
import { toXyoAddress as toXyoAddress5 } from "@xyo-network/sdk-js";
|
|
2135
2210
|
async function allStakersForRange(chain, externalRange, staked) {
|
|
2136
2211
|
const mergedEvents = await mergedAddRemoveStakeEventsByStaker(chain, [0, externalRange[1]], staked);
|
|
2137
2212
|
const resultWithZeros = {};
|
|
@@ -2366,24 +2441,24 @@ function findUncles(context, finalizedWindowedChain, blocks) {
|
|
|
2366
2441
|
}
|
|
2367
2442
|
|
|
2368
2443
|
// src/config/Validation.ts
|
|
2369
|
-
var ValidationConfigZod =
|
|
2370
|
-
allowedRewardRedeemers:
|
|
2444
|
+
var ValidationConfigZod = z18.object({
|
|
2445
|
+
allowedRewardRedeemers: z18.array(XyoAddressZod2).optional().register(globalRegistry13, {
|
|
2371
2446
|
description: "List of allowed reward redeemer addresses, if undefined anyone can participate",
|
|
2372
2447
|
title: "allowedRewardRedeemers",
|
|
2373
2448
|
type: "array"
|
|
2374
2449
|
}),
|
|
2375
|
-
allowedRewardEscrowAccountSigners:
|
|
2450
|
+
allowedRewardEscrowAccountSigners: z18.array(XyoAddressZod2).optional().register(globalRegistry13, {
|
|
2376
2451
|
description: "List of allowed reward escrow account signer addresses, if undefined anyone can participate",
|
|
2377
2452
|
title: "allowedRewardEscrowAccountSigners",
|
|
2378
2453
|
type: "array"
|
|
2379
2454
|
}),
|
|
2380
|
-
minCandidates:
|
|
2455
|
+
minCandidates: z18.coerce.number().default(DEFAULT_MIN_CANDIDATES).register(globalRegistry13, {
|
|
2381
2456
|
default: DEFAULT_MIN_CANDIDATES,
|
|
2382
2457
|
description: "Minimum number of uncle candidates before selecting the best uncle",
|
|
2383
2458
|
title: "validation.minCandidates",
|
|
2384
2459
|
type: "number"
|
|
2385
2460
|
}),
|
|
2386
|
-
backoffMs:
|
|
2461
|
+
backoffMs: z18.coerce.number().default(DEFAULT_BACKOFF_MS).register(globalRegistry13, {
|
|
2387
2462
|
default: DEFAULT_BACKOFF_MS,
|
|
2388
2463
|
description: "Back-off timeout in ms. If head age exceeds this, minCandidates is ignored",
|
|
2389
2464
|
title: "validation.backoffMs",
|
|
@@ -2392,26 +2467,28 @@ var ValidationConfigZod = z16.object({
|
|
|
2392
2467
|
});
|
|
2393
2468
|
|
|
2394
2469
|
// src/config/Base.ts
|
|
2395
|
-
var BaseConfigZod =
|
|
2396
|
-
chain:
|
|
2397
|
-
dataLake:
|
|
2398
|
-
evm:
|
|
2399
|
-
log:
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2470
|
+
var BaseConfigZod = z19.object({
|
|
2471
|
+
chain: z19._default(ChainConfigZod, ChainConfigZod.parse({})).check(z19.describe("Configuration for the chain")),
|
|
2472
|
+
dataLake: z19.optional(DataLakeConfigZod).check(z19.describe("Configuration for data lakes")),
|
|
2473
|
+
evm: z19._default(EvmConfigZod, EvmConfigZod.parse({})).check(z19.describe("Configuration for EVM-backed services")),
|
|
2474
|
+
log: z19._default(LogConfigZod, LogConfigZod.parse({})).check(z19.describe("Configuration for logging")),
|
|
2475
|
+
providerBindings: z19._default(ProviderBindingsConfigZod, ProviderBindingsConfigZod.parse({})).check(z19.describe("Per-moniker provider implementation and transport bindings")),
|
|
2476
|
+
providers: z19._default(ProvidersConfigZod, ProvidersConfigZod.parse([])).check(z19.describe("Configuration for providers")),
|
|
2477
|
+
remote: z19._default(RemoteConfigZod, RemoteConfigZod.parse({})).check(z19.describe("Configuration for remote services")),
|
|
2478
|
+
transports: z19._default(TransportsConfigZod, TransportsConfigZod.parse({})).check(z19.describe("Named connection profiles (rpc, rest, s3, lmdb, mongo, evm-rpc)")),
|
|
2479
|
+
storage: z19._default(StorageConfigZod, StorageConfigZod.parse({})).check(z19.describe("Configuration for the storage")),
|
|
2480
|
+
telemetry: z19._default(TelemetryConfigZod, TelemetryConfigZod.parse({})).check(z19.describe("Configuration for telemetry")),
|
|
2481
|
+
validation: z19._default(ValidationConfigZod, ValidationConfigZod.parse({})).check(z19.describe("Configuration for validation"))
|
|
2405
2482
|
});
|
|
2406
2483
|
|
|
2407
2484
|
// src/config/Actor.ts
|
|
2408
|
-
var AccountPathZod =
|
|
2485
|
+
var AccountPathZod = z20.string().check(z20.regex(
|
|
2409
2486
|
/^(m(\/\d+'?)+|\d+'?(\/\d+'?)*)$/,
|
|
2410
2487
|
`Invalid BIP-32 derivation path. Use either an absolute path like "m/44'/60'/0'/0/0" or a relative path like "0", "0/1", or "44'/60'/0'/0/0".`
|
|
2411
2488
|
));
|
|
2412
|
-
var ActorConfigZod =
|
|
2413
|
-
name:
|
|
2414
|
-
accountPath:
|
|
2489
|
+
var ActorConfigZod = z20.extend(BaseConfigZod, {
|
|
2490
|
+
name: z20.string(),
|
|
2491
|
+
accountPath: z20.optional(AccountPathZod).register(globalRegistry14, {
|
|
2415
2492
|
description: 'BIP-32 derivation path for the actor wallet. Absolute when it starts with "m/"; otherwise relative to the root wallet base path. Each actor must derive to a distinct path.',
|
|
2416
2493
|
title: "accountPath",
|
|
2417
2494
|
type: "string"
|
|
@@ -2422,22 +2499,25 @@ var asActorConfig = zodAsFactory3(ActorConfigZod, "asActorConfig");
|
|
|
2422
2499
|
var toActorConfig = zodToFactory2(ActorConfigZod, "toActorConfig");
|
|
2423
2500
|
|
|
2424
2501
|
// src/config/Actors.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var ActorsConfigZod =
|
|
2427
|
-
|
|
2502
|
+
import { z as z21 } from "zod/mini";
|
|
2503
|
+
var ActorsConfigZod = z21._default(
|
|
2504
|
+
z21.array(z21.looseObject(ActorConfigZod.shape)).check(z21.describe("Actor-specific configurations that override the base configuration when the actor is running")),
|
|
2428
2505
|
[]
|
|
2429
2506
|
);
|
|
2430
2507
|
|
|
2508
|
+
// src/config/adaptLegacyConfig.ts
|
|
2509
|
+
import { isDefined as isDefined15 } from "@xylabs/sdk-js";
|
|
2510
|
+
|
|
2431
2511
|
// src/config/Config.ts
|
|
2432
|
-
import { globalRegistry as
|
|
2433
|
-
var ConfigZod =
|
|
2512
|
+
import { globalRegistry as globalRegistry15, z as z22 } from "zod/mini";
|
|
2513
|
+
var ConfigZod = z22.extend(BaseConfigZod, {
|
|
2434
2514
|
actors: ActorsConfigZod,
|
|
2435
|
-
healthCheckPort:
|
|
2515
|
+
healthCheckPort: z22.optional(z22.coerce.number()).register(globalRegistry15, {
|
|
2436
2516
|
description: "Port for the system-wide health, readiness, and liveness endpoints (/healthz, /livez, /readyz). Set to 0 to disable.",
|
|
2437
2517
|
title: "healthCheckPort",
|
|
2438
2518
|
type: "number"
|
|
2439
2519
|
})
|
|
2440
|
-
}).check(
|
|
2520
|
+
}).check(z22.describe("The complete configuration for the protocol, including global settings and actor-specific overrides"));
|
|
2441
2521
|
function resolveConfig(config) {
|
|
2442
2522
|
const parsedConfig = ConfigZod.parse(config);
|
|
2443
2523
|
const {
|
|
@@ -2446,26 +2526,145 @@ function resolveConfig(config) {
|
|
|
2446
2526
|
...rootConfig
|
|
2447
2527
|
} = parsedConfig;
|
|
2448
2528
|
parsedConfig.actors = actors.map((actorConfig) => {
|
|
2449
|
-
return
|
|
2529
|
+
return z22.looseObject(ActorConfigZod.shape).parse({ ...rootConfig, ...actorConfig });
|
|
2450
2530
|
});
|
|
2451
2531
|
return parsedConfig;
|
|
2452
2532
|
}
|
|
2453
2533
|
|
|
2534
|
+
// src/config/adaptLegacyConfig.ts
|
|
2535
|
+
var DEFAULT_LMDB_TRANSPORT = "local-store";
|
|
2536
|
+
var DEFAULT_RPC_TRANSPORT = "default-rpc";
|
|
2537
|
+
var DEFAULT_EVM_RPC_TRANSPORT = "default-evm-rpc";
|
|
2538
|
+
var S3_FINALIZED_TRANSPORT = "s3-finalized";
|
|
2539
|
+
var S3_CHAIN_STATE_TRANSPORT = "s3-chain-state";
|
|
2540
|
+
var S3_INDEX_TRANSPORT = "s3-index";
|
|
2541
|
+
function rpcTransportFromRemote(rpc) {
|
|
2542
|
+
if (rpc.protocol === "http" && "url" in rpc) {
|
|
2543
|
+
const http = rpc;
|
|
2544
|
+
return {
|
|
2545
|
+
type: "rpc",
|
|
2546
|
+
protocol: "http",
|
|
2547
|
+
url: http.url
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2550
|
+
return {
|
|
2551
|
+
type: "rpc",
|
|
2552
|
+
protocol: rpc.protocol,
|
|
2553
|
+
url: "url" in rpc ? String(rpc.url) : ""
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2556
|
+
function s3TransportFromBucket(shared, entry, fallbackBucket) {
|
|
2557
|
+
if (!isDefined15(entry?.bucket) && !isDefined15(entry?.readUrl)) {
|
|
2558
|
+
return void 0;
|
|
2559
|
+
}
|
|
2560
|
+
return {
|
|
2561
|
+
type: "s3",
|
|
2562
|
+
accessKeyId: entry?.accessKeyId ?? shared.accessKeyId,
|
|
2563
|
+
accountId: entry?.accountId ?? shared.accountId,
|
|
2564
|
+
bucket: entry?.bucket ?? fallbackBucket,
|
|
2565
|
+
prefix: entry?.prefix ?? shared.prefix,
|
|
2566
|
+
readUrl: entry?.readUrl,
|
|
2567
|
+
secretAccessKey: entry?.secretAccessKey ?? shared.secretAccessKey
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
function synthesizeS3Transports(s3) {
|
|
2571
|
+
const shared = {
|
|
2572
|
+
accessKeyId: s3.accessKeyId,
|
|
2573
|
+
accountId: s3.accountId,
|
|
2574
|
+
prefix: s3.prefix,
|
|
2575
|
+
secretAccessKey: s3.secretAccessKey
|
|
2576
|
+
};
|
|
2577
|
+
const transports = {};
|
|
2578
|
+
const finalized = s3TransportFromBucket(shared, s3.finalized);
|
|
2579
|
+
const fallbackBucket = s3.finalized?.bucket;
|
|
2580
|
+
if (finalized) {
|
|
2581
|
+
transports[S3_FINALIZED_TRANSPORT] = finalized;
|
|
2582
|
+
}
|
|
2583
|
+
const chainState = s3TransportFromBucket(shared, s3.chainState, fallbackBucket);
|
|
2584
|
+
if (chainState) {
|
|
2585
|
+
transports[S3_CHAIN_STATE_TRANSPORT] = chainState;
|
|
2586
|
+
}
|
|
2587
|
+
const index = s3TransportFromBucket(shared, s3.index, fallbackBucket);
|
|
2588
|
+
if (index) {
|
|
2589
|
+
transports[S3_INDEX_TRANSPORT] = index;
|
|
2590
|
+
}
|
|
2591
|
+
return transports;
|
|
2592
|
+
}
|
|
2593
|
+
function synthesizeProviderBindings(transports) {
|
|
2594
|
+
const bindings = {};
|
|
2595
|
+
if (transports[DEFAULT_RPC_TRANSPORT]) {
|
|
2596
|
+
bindings.BlockViewer = { transport: DEFAULT_RPC_TRANSPORT };
|
|
2597
|
+
bindings.MempoolViewer = { transport: DEFAULT_RPC_TRANSPORT };
|
|
2598
|
+
bindings.FinalizationViewer = { transport: DEFAULT_RPC_TRANSPORT };
|
|
2599
|
+
bindings.TransactionViewer = { transport: DEFAULT_RPC_TRANSPORT };
|
|
2600
|
+
bindings.AccountBalanceViewer = { transport: DEFAULT_RPC_TRANSPORT };
|
|
2601
|
+
}
|
|
2602
|
+
if (transports[S3_FINALIZED_TRANSPORT]) {
|
|
2603
|
+
bindings.BlockPublishRunner = { transport: S3_FINALIZED_TRANSPORT };
|
|
2604
|
+
}
|
|
2605
|
+
if (transports[S3_CHAIN_STATE_TRANSPORT]) {
|
|
2606
|
+
bindings.ChainStateViewer = { transport: S3_CHAIN_STATE_TRANSPORT };
|
|
2607
|
+
bindings.ChainStatePublishRunner = { transport: S3_CHAIN_STATE_TRANSPORT };
|
|
2608
|
+
}
|
|
2609
|
+
if (transports[S3_INDEX_TRANSPORT]) {
|
|
2610
|
+
bindings.IndexPublishRunner = { transport: S3_INDEX_TRANSPORT };
|
|
2611
|
+
}
|
|
2612
|
+
return bindings;
|
|
2613
|
+
}
|
|
2614
|
+
function adaptLegacyConfig(config) {
|
|
2615
|
+
const parsed = ConfigZod.parse(config);
|
|
2616
|
+
if (Object.keys(parsed.transports).length > 0) {
|
|
2617
|
+
return parsed;
|
|
2618
|
+
}
|
|
2619
|
+
const transports = { ...parsed.transports };
|
|
2620
|
+
if (isDefined15(parsed.storage?.root) && parsed.storage.root !== "") {
|
|
2621
|
+
transports[DEFAULT_LMDB_TRANSPORT] = { type: "lmdb", root: parsed.storage.root };
|
|
2622
|
+
}
|
|
2623
|
+
if (hasMongoConfig(parsed.storage?.mongo)) {
|
|
2624
|
+
transports["chain-mongo"] = {
|
|
2625
|
+
type: "mongo",
|
|
2626
|
+
connectionString: parsed.storage.mongo.connectionString,
|
|
2627
|
+
database: parsed.storage.mongo.database,
|
|
2628
|
+
domain: parsed.storage.mongo.domain,
|
|
2629
|
+
password: parsed.storage.mongo.password,
|
|
2630
|
+
username: parsed.storage.mongo.username
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
if (isDefined15(parsed.remote?.rpc)) {
|
|
2634
|
+
transports[DEFAULT_RPC_TRANSPORT] = rpcTransportFromRemote(parsed.remote.rpc);
|
|
2635
|
+
}
|
|
2636
|
+
if (isDefined15(parsed.evm?.jsonRpc?.url)) {
|
|
2637
|
+
transports[DEFAULT_EVM_RPC_TRANSPORT] = { type: "evm-rpc", url: parsed.evm.jsonRpc.url };
|
|
2638
|
+
}
|
|
2639
|
+
if (isDefined15(parsed.storage?.s3)) {
|
|
2640
|
+
Object.assign(transports, synthesizeS3Transports(parsed.storage.s3));
|
|
2641
|
+
}
|
|
2642
|
+
const providerBindings = {
|
|
2643
|
+
...synthesizeProviderBindings(transports),
|
|
2644
|
+
...parsed.providerBindings
|
|
2645
|
+
};
|
|
2646
|
+
return ConfigZod.parse({
|
|
2647
|
+
...parsed,
|
|
2648
|
+
providerBindings,
|
|
2649
|
+
transports
|
|
2650
|
+
});
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2454
2653
|
// src/config/HostActor.ts
|
|
2455
2654
|
import {
|
|
2456
2655
|
zodAsFactory as zodAsFactory4,
|
|
2457
2656
|
zodIsFactory as zodIsFactory3,
|
|
2458
2657
|
zodToFactory as zodToFactory3
|
|
2459
2658
|
} from "@xylabs/sdk-js";
|
|
2460
|
-
import { globalRegistry as
|
|
2461
|
-
var HostActorConfigZod =
|
|
2462
|
-
host:
|
|
2659
|
+
import { globalRegistry as globalRegistry16, z as z23 } from "zod/mini";
|
|
2660
|
+
var HostActorConfigZod = z23.extend(ActorConfigZod, {
|
|
2661
|
+
host: z23._default(z23.string(), "localhost").register(globalRegistry16, {
|
|
2463
2662
|
default: "localhost",
|
|
2464
2663
|
description: "Host for the Actor",
|
|
2465
2664
|
title: "host",
|
|
2466
2665
|
type: "string"
|
|
2467
2666
|
}),
|
|
2468
|
-
port:
|
|
2667
|
+
port: z23._default(z23.coerce.number(), 8080).register(globalRegistry16, {
|
|
2469
2668
|
default: 8080,
|
|
2470
2669
|
description: "Port for the Actor",
|
|
2471
2670
|
title: "port",
|
|
@@ -2477,30 +2676,30 @@ var asHostActorConfig = zodAsFactory4(HostActorConfigZod, "asHostActorConfig");
|
|
|
2477
2676
|
var toHostActorConfig = zodToFactory3(HostActorConfigZod, "toHostActorConfig");
|
|
2478
2677
|
|
|
2479
2678
|
// src/config/UsageMeta.ts
|
|
2480
|
-
import { z as
|
|
2481
|
-
var DescriptionSchema =
|
|
2482
|
-
var TitleSchema =
|
|
2483
|
-
var JSONSchemaMetaSchema =
|
|
2484
|
-
id:
|
|
2679
|
+
import { z as z24 } from "zod";
|
|
2680
|
+
var DescriptionSchema = z24.string();
|
|
2681
|
+
var TitleSchema = z24.string();
|
|
2682
|
+
var JSONSchemaMetaSchema = z24.object({
|
|
2683
|
+
id: z24.string().optional(),
|
|
2485
2684
|
title: TitleSchema.optional(),
|
|
2486
2685
|
description: DescriptionSchema.optional(),
|
|
2487
|
-
deprecated:
|
|
2488
|
-
}).catchall(
|
|
2686
|
+
deprecated: z24.boolean().optional()
|
|
2687
|
+
}).catchall(z24.unknown());
|
|
2489
2688
|
var GlobalMetaSchema = JSONSchemaMetaSchema.extend({});
|
|
2490
|
-
var ChoicesSchema =
|
|
2689
|
+
var ChoicesSchema = z24.array(z24.union([z24.string(), z24.number(), z24.literal(true), z24.undefined()])).readonly();
|
|
2491
2690
|
var UsageMetaSchema = GlobalMetaSchema.extend({
|
|
2492
2691
|
choices: ChoicesSchema.optional(),
|
|
2493
|
-
default:
|
|
2692
|
+
default: z24.unknown().optional(),
|
|
2494
2693
|
description: DescriptionSchema,
|
|
2495
|
-
group:
|
|
2496
|
-
hidden:
|
|
2694
|
+
group: z24.string().optional(),
|
|
2695
|
+
hidden: z24.boolean().optional(),
|
|
2497
2696
|
title: TitleSchema,
|
|
2498
|
-
type:
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2697
|
+
type: z24.union([
|
|
2698
|
+
z24.literal("array"),
|
|
2699
|
+
z24.literal("count"),
|
|
2700
|
+
z24.literal("boolean"),
|
|
2701
|
+
z24.literal("number"),
|
|
2702
|
+
z24.literal("string")
|
|
2504
2703
|
])
|
|
2505
2704
|
});
|
|
2506
2705
|
function isUsageMeta(v) {
|
|
@@ -2513,7 +2712,7 @@ import {
|
|
|
2513
2712
|
zodIsFactory as zodIsFactory5,
|
|
2514
2713
|
zodToFactory as zodToFactory5
|
|
2515
2714
|
} from "@xylabs/sdk-js";
|
|
2516
|
-
import { z as
|
|
2715
|
+
import { z as z26 } from "zod/mini";
|
|
2517
2716
|
|
|
2518
2717
|
// src/model/CreatableProviderContext.zod.ts
|
|
2519
2718
|
import {
|
|
@@ -2522,17 +2721,17 @@ import {
|
|
|
2522
2721
|
zodToFactory as zodToFactory4
|
|
2523
2722
|
} from "@xylabs/sdk-js";
|
|
2524
2723
|
import { CachingContextZod } from "@xyo-network/xl1-protocol-lib";
|
|
2525
|
-
import { z as
|
|
2526
|
-
var RuntimeStatusMonitorZod =
|
|
2527
|
-
var ProviderFactoryLocatorZod =
|
|
2528
|
-
var BaseConfigContextZod =
|
|
2529
|
-
config:
|
|
2530
|
-
locator:
|
|
2724
|
+
import { z as z25 } from "zod/mini";
|
|
2725
|
+
var RuntimeStatusMonitorZod = z25.custom((val) => val && typeof val === "object");
|
|
2726
|
+
var ProviderFactoryLocatorZod = z25.lazy(() => z25.custom((val) => val && typeof val === "object" && "context" in val && "registry" in val));
|
|
2727
|
+
var BaseConfigContextZod = z25.extend(CachingContextZod, {
|
|
2728
|
+
config: z25.looseObject(BaseConfigZod.shape),
|
|
2729
|
+
locator: z25.optional(ProviderFactoryLocatorZod)
|
|
2531
2730
|
});
|
|
2532
|
-
var CreatableProviderContextZod =
|
|
2533
|
-
_id:
|
|
2731
|
+
var CreatableProviderContextZod = z25.lazy(() => z25.extend(BaseConfigContextZod, {
|
|
2732
|
+
_id: z25.optional(z25.string()),
|
|
2534
2733
|
locator: ProviderFactoryLocatorZod,
|
|
2535
|
-
statusReporter:
|
|
2734
|
+
statusReporter: z25.optional(RuntimeStatusMonitorZod)
|
|
2536
2735
|
}));
|
|
2537
2736
|
var isBaseConfigContext = zodIsFactory4(BaseConfigContextZod);
|
|
2538
2737
|
var asBaseConfigContext = zodAsFactory5(BaseConfigContextZod, "asBaseConfigContext");
|
|
@@ -2653,7 +2852,7 @@ async function buildUnsignedTransaction(chain, onChainPayloads, offChainPayloads
|
|
|
2653
2852
|
// src/transaction/confirmSubmittedTransaction.ts
|
|
2654
2853
|
import {
|
|
2655
2854
|
delay,
|
|
2656
|
-
isDefined as
|
|
2855
|
+
isDefined as isDefined16,
|
|
2657
2856
|
isNumber
|
|
2658
2857
|
} from "@xylabs/sdk-js";
|
|
2659
2858
|
var DEFAULT_CONFIRMATION_ATTEMPTS = 20;
|
|
@@ -2675,7 +2874,7 @@ var confirmSubmittedTransaction = async (viewer, txHash, options) => {
|
|
|
2675
2874
|
let attempts = 0;
|
|
2676
2875
|
while (true) {
|
|
2677
2876
|
const tx = await viewer.transaction.byHash(txHash) ?? void 0;
|
|
2678
|
-
if (
|
|
2877
|
+
if (isDefined16(tx)) {
|
|
2679
2878
|
options?.logger?.debug("Transaction confirmed", txHash);
|
|
2680
2879
|
return tx;
|
|
2681
2880
|
} else {
|
|
@@ -2990,7 +3189,7 @@ var bundle2 = (root, transaction) => {
|
|
|
2990
3189
|
};
|
|
2991
3190
|
|
|
2992
3191
|
// src/context/Actor.ts
|
|
2993
|
-
var ActorConfigContext =
|
|
3192
|
+
var ActorConfigContext = z26.extend(BaseConfigContextZod, { config: ActorConfigZod });
|
|
2994
3193
|
var isActorConfigContext = zodIsFactory5(ActorConfigContext);
|
|
2995
3194
|
var asActorConfigContext = zodAsFactory6(ActorConfigContext, "asActorConfigContext");
|
|
2996
3195
|
var toActorConfigContext = zodToFactory5(ActorConfigContext, "toActorConfigContext");
|
|
@@ -3380,20 +3579,20 @@ import {
|
|
|
3380
3579
|
zodIsFactory as zodIsFactory6,
|
|
3381
3580
|
zodToFactory as zodToFactory6
|
|
3382
3581
|
} from "@xylabs/sdk-js";
|
|
3383
|
-
import { z as
|
|
3384
|
-
var HostActorConfigContext =
|
|
3582
|
+
import { z as z27 } from "zod/mini";
|
|
3583
|
+
var HostActorConfigContext = z27.extend(BaseConfigContextZod, { config: HostActorConfigZod });
|
|
3385
3584
|
var isHostActorConfigContext = zodIsFactory6(HostActorConfigContext);
|
|
3386
3585
|
var asHostActorConfigContext = zodAsFactory7(HostActorConfigContext, "asHostActorConfigContext");
|
|
3387
3586
|
var toHostActorConfigContext = zodToFactory6(HostActorConfigContext, "toHostActorConfigContext");
|
|
3388
3587
|
|
|
3389
3588
|
// src/createDeclarationPayload.ts
|
|
3390
|
-
import { isDefined as
|
|
3589
|
+
import { isDefined as isDefined17 } from "@xylabs/sdk-js";
|
|
3391
3590
|
import { PayloadBuilder as PayloadBuilder13 } from "@xyo-network/sdk-js";
|
|
3392
3591
|
import {
|
|
3393
3592
|
ChainStakeIntentSchema
|
|
3394
3593
|
} from "@xyo-network/xl1-protocol-lib";
|
|
3395
3594
|
var createDeclarationIntent = (address, intent, nbf, exp) => {
|
|
3396
|
-
const expiration =
|
|
3595
|
+
const expiration = isDefined17(exp) ? exp : nbf + 1e4;
|
|
3397
3596
|
const redeclarationIntent = new PayloadBuilder13({ schema: ChainStakeIntentSchema }).fields({
|
|
3398
3597
|
from: address,
|
|
3399
3598
|
intent,
|
|
@@ -3422,26 +3621,26 @@ import {
|
|
|
3422
3621
|
asSchema as asSchema2,
|
|
3423
3622
|
isPayloadOfZodType
|
|
3424
3623
|
} from "@xyo-network/sdk-js";
|
|
3425
|
-
import { z as
|
|
3624
|
+
import { z as z29 } from "zod";
|
|
3426
3625
|
|
|
3427
3626
|
// src/eip-712/Types.ts
|
|
3428
|
-
import { z as
|
|
3429
|
-
var TypedDataDomainZod =
|
|
3430
|
-
name:
|
|
3431
|
-
version:
|
|
3432
|
-
chainId:
|
|
3433
|
-
verifyingContract:
|
|
3434
|
-
salt:
|
|
3627
|
+
import { z as z28 } from "zod";
|
|
3628
|
+
var TypedDataDomainZod = z28.object({
|
|
3629
|
+
name: z28.string().nullable().optional(),
|
|
3630
|
+
version: z28.string().nullable().optional(),
|
|
3631
|
+
chainId: z28.union([z28.string(), z28.number(), z28.bigint()]).nullable().optional(),
|
|
3632
|
+
verifyingContract: z28.string().nullable().optional(),
|
|
3633
|
+
salt: z28.union([z28.string(), z28.instanceof(Uint8Array)]).nullable().optional()
|
|
3435
3634
|
});
|
|
3436
|
-
var TypedDataFieldZod =
|
|
3437
|
-
name:
|
|
3438
|
-
type:
|
|
3635
|
+
var TypedDataFieldZod = z28.object({
|
|
3636
|
+
name: z28.string(),
|
|
3637
|
+
type: z28.string()
|
|
3439
3638
|
});
|
|
3440
|
-
var TypedDataTypesZod =
|
|
3441
|
-
var TypedDataValueZod =
|
|
3639
|
+
var TypedDataTypesZod = z28.record(z28.string(), z28.array(TypedDataFieldZod));
|
|
3640
|
+
var TypedDataValueZod = z28.record(z28.string(), z28.any());
|
|
3442
3641
|
|
|
3443
3642
|
// src/eip-712/Payloads/EIP712Data.ts
|
|
3444
|
-
var EIP712DataPayloadFieldsZod =
|
|
3643
|
+
var EIP712DataPayloadFieldsZod = z29.object({
|
|
3445
3644
|
domain: TypedDataDomainZod,
|
|
3446
3645
|
types: TypedDataTypesZod,
|
|
3447
3646
|
values: TypedDataValueZod
|
|
@@ -3459,11 +3658,11 @@ import {
|
|
|
3459
3658
|
asSchema as asSchema3,
|
|
3460
3659
|
isPayloadOfZodType as isPayloadOfZodType2
|
|
3461
3660
|
} from "@xyo-network/sdk-js";
|
|
3462
|
-
import { z as
|
|
3463
|
-
var EIP712SignaturePayloadFieldsZod =
|
|
3464
|
-
address:
|
|
3661
|
+
import { z as z30 } from "zod";
|
|
3662
|
+
var EIP712SignaturePayloadFieldsZod = z30.object({
|
|
3663
|
+
address: z30.string(),
|
|
3465
3664
|
hash: HashZod,
|
|
3466
|
-
signature:
|
|
3665
|
+
signature: z30.string()
|
|
3467
3666
|
});
|
|
3468
3667
|
var EIP712SignaturePayloadSchema = asSchema3("network.xyo.chains.ethereum.eip712.signature", true);
|
|
3469
3668
|
var isEIP712SignaturePayload = isPayloadOfZodType2(
|
|
@@ -3492,7 +3691,7 @@ var signEIP712Message = async (signer, data) => {
|
|
|
3492
3691
|
};
|
|
3493
3692
|
|
|
3494
3693
|
// src/eip-712/verify.ts
|
|
3495
|
-
import { asHash as asHash3, isUndefined as
|
|
3694
|
+
import { asHash as asHash3, isUndefined as isUndefined7 } from "@xylabs/sdk-js";
|
|
3496
3695
|
import { PayloadBuilder as PayloadBuilder16 } from "@xyo-network/sdk-js";
|
|
3497
3696
|
import { verifyTypedData } from "ethers";
|
|
3498
3697
|
var verifyEIP712Message = async (data, sig) => {
|
|
@@ -3503,7 +3702,7 @@ var verifyEIP712Message = async (data, sig) => {
|
|
|
3503
3702
|
} = sig;
|
|
3504
3703
|
const { schema, ...fields } = data;
|
|
3505
3704
|
const signedHash = asHash3(hash);
|
|
3506
|
-
if (
|
|
3705
|
+
if (isUndefined7(signedHash) || signedHash !== await PayloadBuilder16.hash(data)) return false;
|
|
3507
3706
|
const recoveredAddress = verifyTypedData(fields.domain, fields.types, fields.values, signature);
|
|
3508
3707
|
return recoveredAddress.toLowerCase() === address.toLowerCase();
|
|
3509
3708
|
};
|
|
@@ -3574,7 +3773,7 @@ import {
|
|
|
3574
3773
|
asHash as asHash4,
|
|
3575
3774
|
assertEx as assertEx33,
|
|
3576
3775
|
exists as exists3,
|
|
3577
|
-
isDefined as
|
|
3776
|
+
isDefined as isDefined18,
|
|
3578
3777
|
ZERO_ADDRESS
|
|
3579
3778
|
} from "@xylabs/sdk-js";
|
|
3580
3779
|
import {
|
|
@@ -3709,7 +3908,7 @@ async function balancesStepSummaryFromRange(context, semaphores, blockViewer, su
|
|
|
3709
3908
|
|
|
3710
3909
|
// src/summary/primitives/balances/balancesSummary.ts
|
|
3711
3910
|
import { assertEx as assertEx27, spanRootAsync as spanRootAsync3 } from "@xylabs/sdk-js";
|
|
3712
|
-
import { asXyoAddress } from "@xyo-network/
|
|
3911
|
+
import { asXyoAddress } from "@xyo-network/sdk-js";
|
|
3713
3912
|
import {
|
|
3714
3913
|
asBlockBoundWitnessWithStorageMeta as asBlockBoundWitnessWithStorageMeta3,
|
|
3715
3914
|
asXL1BlockRange as asXL1BlockRange7,
|
|
@@ -3995,7 +4194,7 @@ async function transfersStepSummaryFromRange(context, semaphores, blockViewer, s
|
|
|
3995
4194
|
|
|
3996
4195
|
// src/summary/primitives/transfers/transfersSummary.ts
|
|
3997
4196
|
import { assertEx as assertEx32, spanRootAsync as spanRootAsync7 } from "@xylabs/sdk-js";
|
|
3998
|
-
import { asXyoAddress as asXyoAddress2 } from "@xyo-network/
|
|
4197
|
+
import { asXyoAddress as asXyoAddress2 } from "@xyo-network/sdk-js";
|
|
3999
4198
|
import {
|
|
4000
4199
|
asBlockBoundWitnessWithStorageMeta as asBlockBoundWitnessWithStorageMeta5,
|
|
4001
4200
|
asXL1BlockRange as asXL1BlockRange9,
|
|
@@ -4072,7 +4271,7 @@ var SimpleAccountBalanceViewer = class extends AbstractCreatableProvider {
|
|
|
4072
4271
|
block[1].find((p) => p._hash === hash),
|
|
4073
4272
|
() => `Error: Could not find Transfer with hash ${hash} in block ${block[0]._hash}`
|
|
4074
4273
|
);
|
|
4075
|
-
}).filter(exists3).filter((t) => t.from === address ||
|
|
4274
|
+
}).filter(exists3).filter((t) => t.from === address || isDefined18(t.transfers[address]));
|
|
4076
4275
|
if (transfers.length === 0) {
|
|
4077
4276
|
continue;
|
|
4078
4277
|
}
|
|
@@ -4191,7 +4390,7 @@ var SimpleAccountBalanceViewer = class extends AbstractCreatableProvider {
|
|
|
4191
4390
|
return await this.spanAsync("qualifiedAccountBalanceHistory", async () => {
|
|
4192
4391
|
const range = asRange(headOrRange);
|
|
4193
4392
|
const headHash = asHash4(headOrRange);
|
|
4194
|
-
const [head] = assertEx33(
|
|
4393
|
+
const [head] = assertEx33(isDefined18(headHash) ? await this.blockViewer.blockByHash(headHash) : await this.blockViewer.currentBlock(), () => "Could not resolve head block");
|
|
4195
4394
|
const startingRange = asXL1BlockRange10(range ?? [0, head.block], true);
|
|
4196
4395
|
const blockNumbers = await this.distillTransferHistory(address, startingRange);
|
|
4197
4396
|
const blocks = (await Promise.all(blockNumbers.map(async (bn) => await this.blockViewer.blockByNumber(bn)))).filter(exists3);
|
|
@@ -4204,7 +4403,7 @@ var SimpleAccountBalanceViewer = class extends AbstractCreatableProvider {
|
|
|
4204
4403
|
block[1].find((p) => p._hash === hash),
|
|
4205
4404
|
() => `Error: Could not find Transfer with hash ${hash} in block ${block[0]._hash}`
|
|
4206
4405
|
);
|
|
4207
|
-
}).filter(exists3).filter((t) => t.from === address ||
|
|
4406
|
+
}).filter(exists3).filter((t) => t.from === address || isDefined18(t.transfers[address]));
|
|
4208
4407
|
if (transfers.length === 0) {
|
|
4209
4408
|
continue;
|
|
4210
4409
|
}
|
|
@@ -4232,7 +4431,7 @@ SimpleAccountBalanceViewer = __decorateClass([
|
|
|
4232
4431
|
import {
|
|
4233
4432
|
assertEx as assertEx34,
|
|
4234
4433
|
exists as exists4,
|
|
4235
|
-
isUndefined as
|
|
4434
|
+
isUndefined as isUndefined8
|
|
4236
4435
|
} from "@xylabs/sdk-js";
|
|
4237
4436
|
import { LruCacheMap as LruCacheMap2 } from "@xyo-network/xl1-driver-memory";
|
|
4238
4437
|
import {
|
|
@@ -4271,12 +4470,12 @@ var HydratedCache = class {
|
|
|
4271
4470
|
};
|
|
4272
4471
|
|
|
4273
4472
|
// src/utils/isZodError.ts
|
|
4274
|
-
import { z as
|
|
4473
|
+
import { z as z31 } from "zod";
|
|
4275
4474
|
var isZodError = (error) => {
|
|
4276
|
-
return error instanceof
|
|
4475
|
+
return error instanceof z31.ZodError;
|
|
4277
4476
|
};
|
|
4278
4477
|
var prettifyZodError = (error) => {
|
|
4279
|
-
return
|
|
4478
|
+
return z31.prettifyError(error);
|
|
4280
4479
|
};
|
|
4281
4480
|
|
|
4282
4481
|
// src/simple/block/SimpleBlockViewer.ts
|
|
@@ -4344,7 +4543,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
|
|
|
4344
4543
|
async blockByNumber(blockNumber) {
|
|
4345
4544
|
return await this.spanAsync("blockByNumber", async () => {
|
|
4346
4545
|
const chainContext = await this.getChainContextRead();
|
|
4347
|
-
if (
|
|
4546
|
+
if (isUndefined8(chainContext.head)) {
|
|
4348
4547
|
return null;
|
|
4349
4548
|
}
|
|
4350
4549
|
return await this.blockByNumberWithContext(chainContext, blockNumber);
|
|
@@ -4370,7 +4569,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
|
|
|
4370
4569
|
assertEx34(limit > 0, () => "limit must be greater than 0");
|
|
4371
4570
|
assertEx34(limit <= 100, () => "limit must be less than 100");
|
|
4372
4571
|
const chainContext = await this.getChainContextRead();
|
|
4373
|
-
if (
|
|
4572
|
+
if (isUndefined8(chainContext.head)) {
|
|
4374
4573
|
return [];
|
|
4375
4574
|
}
|
|
4376
4575
|
const blocks = [];
|
|
@@ -4393,7 +4592,7 @@ var SimpleBlockViewer = class extends AbstractCreatableProvider {
|
|
|
4393
4592
|
() => `blocksByStep does not support step levels above ${blocksMaxStep} (requested ${stepLevel})`
|
|
4394
4593
|
);
|
|
4395
4594
|
const chainContext = await this.getChainContextRead();
|
|
4396
|
-
if (
|
|
4595
|
+
if (isUndefined8(chainContext.head)) {
|
|
4397
4596
|
return [];
|
|
4398
4597
|
}
|
|
4399
4598
|
const start = stepIndex * size;
|
|
@@ -4746,7 +4945,7 @@ var SimpleXyoClient = class {
|
|
|
4746
4945
|
import { assertEx as assertEx37, exists as exists6 } from "@xylabs/sdk-js";
|
|
4747
4946
|
import { isAnyPayload as isAnyPayload8, PayloadZodLoose } from "@xyo-network/sdk-js";
|
|
4748
4947
|
import { DataLakeRunnerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
4749
|
-
import { z as
|
|
4948
|
+
import { z as z32 } from "zod/mini";
|
|
4750
4949
|
|
|
4751
4950
|
// src/simple/datalake/AbstractRestDataLake.ts
|
|
4752
4951
|
import { FetchClientError, FetchJsonClient } from "@xylabs/sdk-js";
|
|
@@ -4819,7 +5018,7 @@ var RestDataLakeRunner = class extends AbstractRestDataLake {
|
|
|
4819
5018
|
}).filter(exists6);
|
|
4820
5019
|
if (allowedItems.length > 0) {
|
|
4821
5020
|
const result = await this.client.post(`${this.params.endpoint}/insert`, allowedItems);
|
|
4822
|
-
return
|
|
5021
|
+
return z32.array(PayloadZodLoose).parse(result.data);
|
|
4823
5022
|
} else {
|
|
4824
5023
|
return [];
|
|
4825
5024
|
}
|
|
@@ -5062,7 +5261,7 @@ var SimpleXyoGateway = class _SimpleXyoGateway extends AbstractCreatableProvider
|
|
|
5062
5261
|
import {
|
|
5063
5262
|
assertEx as assertEx39,
|
|
5064
5263
|
BigIntToJsonZod,
|
|
5065
|
-
isDefined as
|
|
5264
|
+
isDefined as isDefined19
|
|
5066
5265
|
} from "@xylabs/sdk-js";
|
|
5067
5266
|
import { PayloadBuilder as PayloadBuilder20 } from "@xyo-network/sdk-js";
|
|
5068
5267
|
import {
|
|
@@ -5100,9 +5299,9 @@ var SimpleXyoGatewayRunner = class _SimpleXyoGatewayRunner extends AbstractCreat
|
|
|
5100
5299
|
chain,
|
|
5101
5300
|
fees
|
|
5102
5301
|
} = options ?? {};
|
|
5103
|
-
const resolvedChainId =
|
|
5104
|
-
const resolvedNbf = asXL1BlockNumber10(
|
|
5105
|
-
const resolvedExp = asXL1BlockNumber10(
|
|
5302
|
+
const resolvedChainId = isDefined19(chain) ? chain : await viewer.chainId();
|
|
5303
|
+
const resolvedNbf = asXL1BlockNumber10(isDefined19(nbf) ? nbf : await viewer.currentBlockNumber(), true);
|
|
5304
|
+
const resolvedExp = asXL1BlockNumber10(isDefined19(exp) ? exp : resolvedNbf + 10, true);
|
|
5106
5305
|
const tx = await buildUnsignedTransaction(resolvedChainId, onChain, offChain, resolvedNbf, resolvedExp, await this.signer.address(), fees);
|
|
5107
5306
|
return await this.addTransactionToChain(tx, await PayloadBuilder20.addHashMeta(offChain));
|
|
5108
5307
|
}
|
|
@@ -5590,7 +5789,7 @@ SimpleMempoolRunner = __decorateClass([
|
|
|
5590
5789
|
// src/simple/mempool/SimpleMempoolViewer.ts
|
|
5591
5790
|
import {
|
|
5592
5791
|
exists as exists9,
|
|
5593
|
-
isDefined as
|
|
5792
|
+
isDefined as isDefined20,
|
|
5594
5793
|
isHash as isHash2
|
|
5595
5794
|
} from "@xylabs/sdk-js";
|
|
5596
5795
|
import { isHashMeta as isHashMeta2, isPayloadBundle as isPayloadBundle2 } from "@xyo-network/sdk-js";
|
|
@@ -5651,7 +5850,7 @@ var SimpleMempoolViewer = class extends AbstractCreatableProvider {
|
|
|
5651
5850
|
let cursor = void 0;
|
|
5652
5851
|
if (isHash2(providedCursor)) {
|
|
5653
5852
|
const [p] = await this.pendingBlocksArchivist.get([providedCursor]);
|
|
5654
|
-
if (
|
|
5853
|
+
if (isDefined20(p)) {
|
|
5655
5854
|
cursor = p._sequence;
|
|
5656
5855
|
}
|
|
5657
5856
|
}
|
|
@@ -5670,7 +5869,7 @@ var SimpleMempoolViewer = class extends AbstractCreatableProvider {
|
|
|
5670
5869
|
let cursor = void 0;
|
|
5671
5870
|
if (isHash2(providedCursor)) {
|
|
5672
5871
|
const [p] = await this.pendingTransactionsArchivist.get([providedCursor]);
|
|
5673
|
-
if (
|
|
5872
|
+
if (isDefined20(p)) {
|
|
5674
5873
|
cursor = p._sequence;
|
|
5675
5874
|
}
|
|
5676
5875
|
}
|
|
@@ -5685,7 +5884,7 @@ var SimpleMempoolViewer = class extends AbstractCreatableProvider {
|
|
|
5685
5884
|
const hydratedWithBundle = (await Promise.all(
|
|
5686
5885
|
filteredBundles.map(async (bundle3) => {
|
|
5687
5886
|
const tx = await bundledPayloadToHydratedTransaction(bundle3);
|
|
5688
|
-
return
|
|
5887
|
+
return isDefined20(tx) ? { bundle: bundle3, tx } : void 0;
|
|
5689
5888
|
})
|
|
5690
5889
|
)).filter(exists9);
|
|
5691
5890
|
const currentBlock = await this.windowedBlockViewer.currentBlock();
|
|
@@ -5805,7 +6004,7 @@ function deduplicateWithBundleBySigner(items) {
|
|
|
5805
6004
|
}
|
|
5806
6005
|
|
|
5807
6006
|
// src/simple/network/SimpleXyoNetwork.ts
|
|
5808
|
-
import { fetchJsonGet, isUndefined as
|
|
6007
|
+
import { fetchJsonGet, isUndefined as isUndefined9 } from "@xylabs/sdk-js";
|
|
5809
6008
|
import { isNetworkStatus } from "@xyo-network/xl1-protocol-lib";
|
|
5810
6009
|
|
|
5811
6010
|
// src/simple/network/lib/FailedNetworkStatusPayloads.ts
|
|
@@ -5853,7 +6052,7 @@ var SimpleXyoNetwork = class {
|
|
|
5853
6052
|
}
|
|
5854
6053
|
async status() {
|
|
5855
6054
|
const statusNetwork = StatusNetworks[this._networkId];
|
|
5856
|
-
if (
|
|
6055
|
+
if (isUndefined9(statusNetwork)) {
|
|
5857
6056
|
throw new Error(`Unknown status network ID: ${this._networkId}`);
|
|
5858
6057
|
}
|
|
5859
6058
|
return await this.makeRequest(statusNetwork.statusUrl);
|
|
@@ -6036,7 +6235,7 @@ var SimpleXyoSigner = class _SimpleXyoSigner extends AbstractCreatableProvider {
|
|
|
6036
6235
|
};
|
|
6037
6236
|
|
|
6038
6237
|
// src/simple/StakeEventsViewer/SimpleStakeEventsViewer.ts
|
|
6039
|
-
import { isDefined as
|
|
6238
|
+
import { isDefined as isDefined21 } from "@xylabs/sdk-js";
|
|
6040
6239
|
import { StakeEventsViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
6041
6240
|
var SimpleStakeEventsViewer = class extends AbstractCreatableProvider {
|
|
6042
6241
|
moniker = SimpleStakeEventsViewer.defaultMoniker;
|
|
@@ -6049,7 +6248,7 @@ var SimpleStakeEventsViewer = class extends AbstractCreatableProvider {
|
|
|
6049
6248
|
stakeEvents(range, { name } = {}) {
|
|
6050
6249
|
const positions = this.positionsFromRange(range);
|
|
6051
6250
|
const events = this.eventsFromPositions(positions);
|
|
6052
|
-
if (
|
|
6251
|
+
if (isDefined21(name)) {
|
|
6053
6252
|
return events.filter((event) => event.name === name);
|
|
6054
6253
|
}
|
|
6055
6254
|
return events;
|
|
@@ -6115,7 +6314,7 @@ SimpleStakeEventsViewer = __decorateClass([
|
|
|
6115
6314
|
|
|
6116
6315
|
// src/simple/StakeTotalsViewer/SimpleStakeTotalsViewer.ts
|
|
6117
6316
|
import { assertEx as assertEx43 } from "@xylabs/sdk-js";
|
|
6118
|
-
import { asXyoAddress as asXyoAddress3 } from "@xyo-network/
|
|
6317
|
+
import { asXyoAddress as asXyoAddress3 } from "@xyo-network/sdk-js";
|
|
6119
6318
|
import {
|
|
6120
6319
|
StakeTotalsViewerMoniker,
|
|
6121
6320
|
StakeViewerMoniker
|
|
@@ -6213,7 +6412,7 @@ SimpleStakeTotalsViewer = __decorateClass([
|
|
|
6213
6412
|
|
|
6214
6413
|
// src/simple/StakeViewer/SimpleStakeViewer.ts
|
|
6215
6414
|
import { assertEx as assertEx44, toAddress } from "@xylabs/sdk-js";
|
|
6216
|
-
import { asXyoAddress as asXyoAddress4 } from "@xyo-network/
|
|
6415
|
+
import { asXyoAddress as asXyoAddress4 } from "@xyo-network/sdk-js";
|
|
6217
6416
|
import { StakeEventsViewerMoniker as StakeEventsViewerMoniker2, StakeViewerMoniker as StakeViewerMoniker2 } from "@xyo-network/xl1-protocol-lib";
|
|
6218
6417
|
var SimpleStakeViewer = class extends AbstractCreatableProvider {
|
|
6219
6418
|
moniker = SimpleStakeViewer.defaultMoniker;
|
|
@@ -6397,7 +6596,7 @@ RestSyncViewer = __decorateClass([
|
|
|
6397
6596
|
import {
|
|
6398
6597
|
asHash as asHash5,
|
|
6399
6598
|
assertEx as assertEx45,
|
|
6400
|
-
isDefined as
|
|
6599
|
+
isDefined as isDefined22
|
|
6401
6600
|
} from "@xylabs/sdk-js";
|
|
6402
6601
|
import {
|
|
6403
6602
|
asTimePayload as asTimePayload2,
|
|
@@ -6421,7 +6620,7 @@ var SimpleTimeSyncViewer = class extends AbstractCreatableProvider {
|
|
|
6421
6620
|
const [block, payloads] = assertEx45(await this.blockViewer.blockByNumber(asXL1BlockNumber11(from, true)), () => "Block not found");
|
|
6422
6621
|
const timeSchemaIndex = block.payload_schemas.indexOf(TimeSchema);
|
|
6423
6622
|
const hash = timeSchemaIndex === -1 ? void 0 : block.payload_hashes[timeSchemaIndex];
|
|
6424
|
-
const timePayload = asTimePayload2(
|
|
6623
|
+
const timePayload = asTimePayload2(isDefined22(hash) ? payloads.find((p) => p._hash === hash) : void 0);
|
|
6425
6624
|
if (timePayload === void 0) return 0;
|
|
6426
6625
|
switch (toDomain) {
|
|
6427
6626
|
case "xl1": {
|
|
@@ -6494,7 +6693,7 @@ var SimpleTimeSyncViewer = class extends AbstractCreatableProvider {
|
|
|
6494
6693
|
xl1Hash: assertEx45(xl1Hash, () => "No xl1 hash available from time sync service"),
|
|
6495
6694
|
epoch: Date.now()
|
|
6496
6695
|
};
|
|
6497
|
-
if (
|
|
6696
|
+
if (isDefined22(this.ethProvider)) {
|
|
6498
6697
|
const [ethereum, ethHashOrNull] = await this.currentTimeAndHash("ethereum");
|
|
6499
6698
|
const ethereumHash = asHash5(ethHashOrNull, () => "No ethereum hash available from time sync service");
|
|
6500
6699
|
timePayload.ethereum = ethereum;
|
|
@@ -6984,7 +7183,7 @@ import {
|
|
|
6984
7183
|
} from "@xyo-network/xl1-protocol-lib";
|
|
6985
7184
|
|
|
6986
7185
|
// src/test/buildBlock.ts
|
|
6987
|
-
import { assertEx as assertEx49, isDefined as
|
|
7186
|
+
import { assertEx as assertEx49, isDefined as isDefined23 } from "@xylabs/sdk-js";
|
|
6988
7187
|
import {
|
|
6989
7188
|
asAnyPayload as asAnyPayload5,
|
|
6990
7189
|
BoundWitnessBuilder as BoundWitnessBuilder3,
|
|
@@ -7090,7 +7289,7 @@ async function buildBlock(options) {
|
|
|
7090
7289
|
}
|
|
7091
7290
|
step_hashes.push(assertEx49(previousBlockHash, () => `Previous block hash is required for step ${step} at block ${blockNumber}`));
|
|
7092
7291
|
} else {
|
|
7093
|
-
if (
|
|
7292
|
+
if (isDefined23(inStepHashes.at(i))) {
|
|
7094
7293
|
step_hashes.push(inStepHashes[i]);
|
|
7095
7294
|
}
|
|
7096
7295
|
}
|
|
@@ -7350,8 +7549,8 @@ var getUrl = (host, port) => {
|
|
|
7350
7549
|
var TODO = true;
|
|
7351
7550
|
|
|
7352
7551
|
// src/validation/schema/Mnemonic.ts
|
|
7353
|
-
import { z as
|
|
7354
|
-
var MnemonicStringZod =
|
|
7552
|
+
import { z as z33 } from "zod";
|
|
7553
|
+
var MnemonicStringZod = z33.string().transform((s) => s.trim().replaceAll(/\s+/g, " ")).refine(
|
|
7355
7554
|
(s) => [12, 15, 18, 21, 24].includes(s.split(" ").length),
|
|
7356
7555
|
{ message: "Mnemonic must contain 12, 15, 18, 21, or 24 words." }
|
|
7357
7556
|
).describe("BIP-39 mnemonic string");
|
|
@@ -7406,6 +7605,7 @@ export {
|
|
|
7406
7605
|
EIP712DataPayloadSchema,
|
|
7407
7606
|
EIP712SignaturePayloadFieldsZod,
|
|
7408
7607
|
EIP712SignaturePayloadSchema,
|
|
7608
|
+
EvmRpcTransportConfigZod,
|
|
7409
7609
|
GlobalMetaSchema,
|
|
7410
7610
|
HostActorConfigContext,
|
|
7411
7611
|
HostActorConfigZod,
|
|
@@ -7413,13 +7613,17 @@ export {
|
|
|
7413
7613
|
HydratedBoundWitnessWithStorageMetaZod,
|
|
7414
7614
|
HydratedCache,
|
|
7415
7615
|
JSONSchemaMetaSchema,
|
|
7616
|
+
LmdbTransportConfigZod,
|
|
7416
7617
|
LoggerStatusReporter,
|
|
7417
7618
|
MemoryPermissionsStore,
|
|
7418
7619
|
MissingCapabilityError,
|
|
7419
7620
|
MnemonicStringZod,
|
|
7621
|
+
MongoTransportConfigZod,
|
|
7420
7622
|
PRODUCER_DIVERSITY_BONUS,
|
|
7421
7623
|
PayloadLocator,
|
|
7422
7624
|
PostMessageRpcRemoteConfigZod,
|
|
7625
|
+
ProviderBindingConfigZod,
|
|
7626
|
+
ProviderBindingsConfigZod,
|
|
7423
7627
|
ProviderConfigZod,
|
|
7424
7628
|
ProviderFactory,
|
|
7425
7629
|
ProviderFactoryLocator,
|
|
@@ -7430,12 +7634,15 @@ export {
|
|
|
7430
7634
|
RestDataLakeRunner,
|
|
7431
7635
|
RestDataLakeViewer,
|
|
7432
7636
|
RestSyncViewer,
|
|
7637
|
+
RestTransportConfigZod,
|
|
7433
7638
|
RewardMultipliers,
|
|
7434
7639
|
RouterDataLakeConfigZod,
|
|
7435
7640
|
RpcRemoteConfigBaseZod,
|
|
7436
7641
|
RpcRemoteConfigZod,
|
|
7642
|
+
RpcTransportConfigZod,
|
|
7437
7643
|
RuntimeStatusMonitor,
|
|
7438
7644
|
RuntimeStatusMonitorZod,
|
|
7645
|
+
S3TransportConfigZod,
|
|
7439
7646
|
SchemasStepSummarySchema,
|
|
7440
7647
|
ShiftedBigInt,
|
|
7441
7648
|
SimpleAccountBalanceViewer,
|
|
@@ -7467,6 +7674,8 @@ export {
|
|
|
7467
7674
|
TestGenesisBlockRewardAddress,
|
|
7468
7675
|
TransactionBuilder,
|
|
7469
7676
|
TransfersStepSummarySchema,
|
|
7677
|
+
TransportConfigZod,
|
|
7678
|
+
TransportsConfigZod,
|
|
7470
7679
|
TypedDataDomainZod,
|
|
7471
7680
|
TypedDataFieldZod,
|
|
7472
7681
|
TypedDataTypesZod,
|
|
@@ -7482,6 +7691,7 @@ export {
|
|
|
7482
7691
|
XL1_NETWORK_STAKING_GENESIS_PERIOD_TOTAL_REWARDS,
|
|
7483
7692
|
activeStakeAtTimeByAddress,
|
|
7484
7693
|
activeStakeAtTimeByPosition,
|
|
7694
|
+
adaptLegacyConfig,
|
|
7485
7695
|
addDataLakePayloads,
|
|
7486
7696
|
addDataLakePayloadsToPayloads,
|
|
7487
7697
|
allHashesPresent,
|
|
@@ -7568,7 +7778,7 @@ export {
|
|
|
7568
7778
|
getWindowedChain,
|
|
7569
7779
|
hasLabels,
|
|
7570
7780
|
hasMongoConfig,
|
|
7571
|
-
|
|
7781
|
+
hasS3Config,
|
|
7572
7782
|
hashFromBlockNumber,
|
|
7573
7783
|
hydrateBlock,
|
|
7574
7784
|
hydrateElevatedTransaction,
|
|
@@ -7622,6 +7832,7 @@ export {
|
|
|
7622
7832
|
registerCreatableProviderFactory,
|
|
7623
7833
|
resolveConfig,
|
|
7624
7834
|
resolveProviders,
|
|
7835
|
+
resolveS3Bucket,
|
|
7625
7836
|
rewardFromBlockNumber,
|
|
7626
7837
|
schemasMaxStep,
|
|
7627
7838
|
schemasStepSummaryFromRange,
|