@xyo-network/xl1-protocol-sdk 1.30.4 → 2.0.1
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/block/hydrate/BoundWitnessHydrator.d.ts +18 -1
- package/dist/neutral/block/hydrate/BoundWitnessHydrator.d.ts.map +1 -1
- package/dist/neutral/block/hydrate/createBoundWitnessHydrator.d.ts +30 -30
- package/dist/neutral/block/hydrate/createBoundWitnessHydrator.d.ts.map +1 -1
- package/dist/neutral/config/Actor.d.ts +50 -56
- package/dist/neutral/config/Actor.d.ts.map +1 -1
- package/dist/neutral/config/Actors.d.ts +65 -66
- package/dist/neutral/config/Actors.d.ts.map +1 -1
- package/dist/neutral/config/Base.d.ts +47 -47
- package/dist/neutral/config/Base.d.ts.map +1 -1
- package/dist/neutral/config/Chain.d.ts +4 -4
- package/dist/neutral/config/Chain.d.ts.map +1 -1
- package/dist/neutral/config/Config.d.ts +96 -98
- package/dist/neutral/config/Config.d.ts.map +1 -1
- package/dist/neutral/config/HostActor.d.ts +51 -57
- package/dist/neutral/config/HostActor.d.ts.map +1 -1
- package/dist/neutral/config/Validation.d.ts +2 -2
- package/dist/neutral/context/Actor.d.ts +51 -57
- package/dist/neutral/context/Actor.d.ts.map +1 -1
- package/dist/neutral/context/HostActor.d.ts +53 -59
- package/dist/neutral/context/HostActor.d.ts.map +1 -1
- package/dist/neutral/eip-712/Payloads/EIP712Signature.d.ts +1 -1
- package/dist/neutral/getFileConfig.d.ts +0 -1
- package/dist/neutral/getFileConfig.d.ts.map +1 -1
- package/dist/neutral/getFileConfig.mjs +29 -35
- package/dist/neutral/getFileConfig.mjs.map +3 -3
- package/dist/neutral/index.mjs +183 -126
- package/dist/neutral/index.mjs.map +3 -3
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts +52 -52
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts.map +1 -1
- package/dist/neutral/simple/StakeEventsViewer/SimpleStakeEventsViewer.d.ts +3 -2
- package/dist/neutral/simple/StakeEventsViewer/SimpleStakeEventsViewer.d.ts.map +1 -1
- package/dist/neutral/simple/StakeTotalsViewer/SimpleStakeTotalsViewer.d.ts +3 -2
- package/dist/neutral/simple/StakeTotalsViewer/SimpleStakeTotalsViewer.d.ts.map +1 -1
- package/dist/neutral/simple/StakeViewer/SimpleStakeViewer.d.ts +4 -3
- package/dist/neutral/simple/StakeViewer/SimpleStakeViewer.d.ts.map +1 -1
- package/dist/neutral/simple/TransactionViewer/SimpleTransactionViewer.d.ts +4 -3
- package/dist/neutral/simple/TransactionViewer/SimpleTransactionViewer.d.ts.map +1 -1
- package/dist/neutral/simple/block/SimpleBlockViewer.d.ts +2 -2
- package/dist/neutral/simple/block/SimpleBlockViewer.d.ts.map +1 -1
- package/dist/neutral/simple/blockInvalidation/SimpleBlockInvalidationViewer.d.ts +1 -1
- package/dist/neutral/simple/blockInvalidation/SimpleBlockInvalidationViewer.d.ts.map +1 -1
- package/dist/neutral/simple/blockReward/SimpleBlockRewardViewer.d.ts +4 -3
- package/dist/neutral/simple/blockReward/SimpleBlockRewardViewer.d.ts.map +1 -1
- package/dist/neutral/simple/blockValidation/SimpleBlockValidationViewer.d.ts +2 -1
- package/dist/neutral/simple/blockValidation/SimpleBlockValidationViewer.d.ts.map +1 -1
- package/dist/neutral/simple/chainContractViewer/SimpleChainContractViewer.d.ts +3 -2
- package/dist/neutral/simple/chainContractViewer/SimpleChainContractViewer.d.ts.map +1 -1
- package/dist/neutral/simple/datalake/RestDataLakeRunner.d.ts +3 -3
- package/dist/neutral/simple/datalake/RestDataLakeRunner.d.ts.map +1 -1
- package/dist/neutral/simple/datalake/RestDataLakeViewer.d.ts +3 -2
- package/dist/neutral/simple/datalake/RestDataLakeViewer.d.ts.map +1 -1
- package/dist/neutral/simple/datalake/SimpleDataLakeRunner.d.ts +2 -2
- package/dist/neutral/simple/datalake/SimpleDataLakeRunner.d.ts.map +1 -1
- package/dist/neutral/simple/datalake/SimpleDataLakeViewer.d.ts +3 -2
- package/dist/neutral/simple/datalake/SimpleDataLakeViewer.d.ts.map +1 -1
- package/dist/neutral/simple/finalization/SimpleFinalizationRunner.d.ts +4 -4
- package/dist/neutral/simple/finalization/SimpleFinalizationRunner.d.ts.map +1 -1
- package/dist/neutral/simple/finalization/SimpleFinalizationViewer.d.ts +5 -4
- package/dist/neutral/simple/finalization/SimpleFinalizationViewer.d.ts.map +1 -1
- package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts +4 -4
- package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts.map +1 -1
- package/dist/neutral/simple/mempool/SimpleMempoolViewer.d.ts +3 -2
- package/dist/neutral/simple/mempool/SimpleMempoolViewer.d.ts.map +1 -1
- package/dist/neutral/simple/runner/SimpleXyoRunner.d.ts +1 -1
- package/dist/neutral/simple/runner/SimpleXyoRunner.d.ts.map +1 -1
- package/dist/neutral/simple/transactionInvalidation/SimpleTransactionInvalidationViewer.d.ts +1 -1
- package/dist/neutral/simple/transactionInvalidation/SimpleTransactionInvalidationViewer.d.ts.map +1 -1
- package/dist/neutral/simple/transactionValidation/SimpleTransactionValidationViewer.d.ts +1 -1
- package/dist/neutral/simple/transactionValidation/SimpleTransactionValidationViewer.d.ts.map +1 -1
- package/dist/neutral/test/index.mjs +29 -41
- package/dist/neutral/test/index.mjs.map +2 -2
- package/package.json +58 -58
package/dist/neutral/index.mjs
CHANGED
|
@@ -339,6 +339,14 @@ var BoundWitnessHydrator = class {
|
|
|
339
339
|
const [hydrated] = await this.hydrateInternal(input, maxDepth, minDepth);
|
|
340
340
|
return hydrated;
|
|
341
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* Like hydrateWithProvenance, but queries every datalake for every hash and returns the full
|
|
344
|
+
* list of sources per hash. Bypasses the single-source LRU caches so that a prior first-found
|
|
345
|
+
* cache hit cannot suppress discovery of additional sources.
|
|
346
|
+
*/
|
|
347
|
+
async hydrateWithAllProvenance(input, maxDepth = 1, minDepth = maxDepth) {
|
|
348
|
+
return await this.hydrateInternalAll(input, maxDepth, minDepth);
|
|
349
|
+
}
|
|
342
350
|
async hydrateWithProvenance(input, maxDepth = 1, minDepth = maxDepth) {
|
|
343
351
|
return await this.hydrateInternal(input, maxDepth, minDepth);
|
|
344
352
|
}
|
|
@@ -353,6 +361,13 @@ var BoundWitnessHydrator = class {
|
|
|
353
361
|
return void 0;
|
|
354
362
|
}
|
|
355
363
|
}
|
|
364
|
+
async tryHydrateWithAllProvenance(input, maxDepth = 1) {
|
|
365
|
+
try {
|
|
366
|
+
return await this.hydrateWithAllProvenance(input, maxDepth);
|
|
367
|
+
} catch {
|
|
368
|
+
return void 0;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
356
371
|
async tryHydrateWithProvenance(input, maxDepth = 1) {
|
|
357
372
|
try {
|
|
358
373
|
return await this.hydrateWithProvenance(input, maxDepth);
|
|
@@ -373,6 +388,19 @@ var BoundWitnessHydrator = class {
|
|
|
373
388
|
orderedPayloads.push(p);
|
|
374
389
|
}
|
|
375
390
|
}
|
|
391
|
+
async appendDirectPayloadsAll(bw, sources, minDepth, orderedHashes, orderedPayloads) {
|
|
392
|
+
const fetched = await this.fetchByHashesAll(bw.payload_hashes, sources);
|
|
393
|
+
if (minDepth >= 1) {
|
|
394
|
+
const missing = bw.payload_hashes.filter((h) => !fetched.has(h));
|
|
395
|
+
assertEx4(missing.length === 0, () => `Unable to find all payloads for BoundWitness: missing ${missing.join(", ")}`);
|
|
396
|
+
}
|
|
397
|
+
for (const h of bw.payload_hashes) {
|
|
398
|
+
const p = fetched.get(h);
|
|
399
|
+
if (isUndefined3(p) || orderedHashes.has(h)) continue;
|
|
400
|
+
orderedHashes.add(h);
|
|
401
|
+
orderedPayloads.push(p);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
376
404
|
async appendNestedPayloads(sources, minDepth, orderedHashes, orderedPayloads) {
|
|
377
405
|
const nestedHashes = [];
|
|
378
406
|
for (const p of orderedPayloads) {
|
|
@@ -393,6 +421,26 @@ var BoundWitnessHydrator = class {
|
|
|
393
421
|
orderedPayloads.push(p);
|
|
394
422
|
}
|
|
395
423
|
}
|
|
424
|
+
async appendNestedPayloadsAll(sources, minDepth, orderedHashes, orderedPayloads) {
|
|
425
|
+
const nestedHashes = [];
|
|
426
|
+
for (const p of orderedPayloads) {
|
|
427
|
+
if (!this.isNestedBoundWitness(p)) continue;
|
|
428
|
+
for (const h of p.payload_hashes) {
|
|
429
|
+
if (!orderedHashes.has(h)) nestedHashes.push(h);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
const fetched = await this.fetchByHashesAll(nestedHashes, sources);
|
|
433
|
+
if (minDepth >= 2) {
|
|
434
|
+
const missing = nestedHashes.filter((h) => !fetched.has(h));
|
|
435
|
+
assertEx4(missing.length === 0, () => `Unable to find all nested payloads for BoundWitness: missing ${missing.join(", ")}`);
|
|
436
|
+
}
|
|
437
|
+
for (const h of nestedHashes) {
|
|
438
|
+
const p = fetched.get(h);
|
|
439
|
+
if (isUndefined3(p) || orderedHashes.has(h)) continue;
|
|
440
|
+
orderedHashes.add(h);
|
|
441
|
+
orderedPayloads.push(p);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
396
444
|
async fetchByHash(hash, sources) {
|
|
397
445
|
const cached = this.payloadCache.get(hash);
|
|
398
446
|
if (isDefined(cached)) {
|
|
@@ -430,6 +478,22 @@ var BoundWitnessHydrator = class {
|
|
|
430
478
|
}
|
|
431
479
|
return result;
|
|
432
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Exhaustive variant: bypasses both LRU caches and queries every datalake. The picked payload
|
|
483
|
+
* (locations[0].payload) is the first in registration order; the DataLakeViewer's content-addressed
|
|
484
|
+
* fetch guarantees all entries for a given hash are equivalent.
|
|
485
|
+
*/
|
|
486
|
+
async fetchByHashesAll(hashes, sources) {
|
|
487
|
+
const result = /* @__PURE__ */ new Map();
|
|
488
|
+
if (hashes.length === 0) return result;
|
|
489
|
+
const located = await this.locator.findAll(hashes);
|
|
490
|
+
for (const [h, locations] of located) {
|
|
491
|
+
if (locations.length === 0) continue;
|
|
492
|
+
result.set(h, locations[0].payload);
|
|
493
|
+
sources.set(h, locations);
|
|
494
|
+
}
|
|
495
|
+
return result;
|
|
496
|
+
}
|
|
433
497
|
async hydrateInternal(input, maxDepth, minDepth) {
|
|
434
498
|
assertEx4(maxDepth >= 0 && maxDepth <= 2, () => `maxDepth must be 0, 1, or 2 (got ${maxDepth})`);
|
|
435
499
|
assertEx4(minDepth >= 0 && minDepth <= 2, () => `minDepth must be 0, 1, or 2 (got ${minDepth})`);
|
|
@@ -447,6 +511,23 @@ var BoundWitnessHydrator = class {
|
|
|
447
511
|
}
|
|
448
512
|
return [this.asHydrated([bw, orderedPayloads], true), sources];
|
|
449
513
|
}
|
|
514
|
+
async hydrateInternalAll(input, maxDepth, minDepth) {
|
|
515
|
+
assertEx4(maxDepth >= 0 && maxDepth <= 2, () => `maxDepth must be 0, 1, or 2 (got ${maxDepth})`);
|
|
516
|
+
assertEx4(minDepth >= 0 && minDepth <= 2, () => `minDepth must be 0, 1, or 2 (got ${minDepth})`);
|
|
517
|
+
assertEx4(maxDepth >= minDepth, () => `maxDepth (${maxDepth}) must be >= minDepth (${minDepth})`);
|
|
518
|
+
const sources = /* @__PURE__ */ new Map();
|
|
519
|
+
const bw = await this.resolveBoundWitnessAll(input, sources);
|
|
520
|
+
if (maxDepth === 0) {
|
|
521
|
+
return [this.asHydrated([bw, []], true), sources];
|
|
522
|
+
}
|
|
523
|
+
const orderedHashes = /* @__PURE__ */ new Set();
|
|
524
|
+
const orderedPayloads = [];
|
|
525
|
+
await this.appendDirectPayloadsAll(bw, sources, minDepth, orderedHashes, orderedPayloads);
|
|
526
|
+
if (maxDepth === 2) {
|
|
527
|
+
await this.appendNestedPayloadsAll(sources, minDepth, orderedHashes, orderedPayloads);
|
|
528
|
+
}
|
|
529
|
+
return [this.asHydrated([bw, orderedPayloads], true), sources];
|
|
530
|
+
}
|
|
450
531
|
async resolveBoundWitness(input, sources) {
|
|
451
532
|
if (typeof input === "string") {
|
|
452
533
|
const fetched = assertEx4(
|
|
@@ -458,6 +539,18 @@ var BoundWitnessHydrator = class {
|
|
|
458
539
|
const withMeta = "_hash" in input ? input : await PayloadBuilder2.addStorageMeta(input);
|
|
459
540
|
return this.asBoundWitness(withMeta, true);
|
|
460
541
|
}
|
|
542
|
+
async resolveBoundWitnessAll(input, sources) {
|
|
543
|
+
if (typeof input === "string") {
|
|
544
|
+
const fetched = await this.fetchByHashesAll([input], sources);
|
|
545
|
+
const payload = assertEx4(
|
|
546
|
+
fetched.get(input),
|
|
547
|
+
() => `BoundWitness ${input} not found in any datalake`
|
|
548
|
+
);
|
|
549
|
+
return this.asBoundWitness(payload, true);
|
|
550
|
+
}
|
|
551
|
+
const withMeta = "_hash" in input ? input : await PayloadBuilder2.addStorageMeta(input);
|
|
552
|
+
return this.asBoundWitness(withMeta, true);
|
|
553
|
+
}
|
|
461
554
|
};
|
|
462
555
|
|
|
463
556
|
// src/block/hydrate/createBlockHydrator.ts
|
|
@@ -477,12 +570,12 @@ import {
|
|
|
477
570
|
PayloadZod,
|
|
478
571
|
WithStorageMetaZod
|
|
479
572
|
} from "@xyo-network/sdk-js";
|
|
480
|
-
import { z } from "zod";
|
|
573
|
+
import { z } from "zod/mini";
|
|
481
574
|
var BoundWitnessWithStorageMetaZod = WithStorageMetaZod(BoundWitnessZod);
|
|
482
575
|
var asBoundWitnessWithStorageMeta = zodAsFactory(BoundWitnessWithStorageMetaZod, "asBoundWitnessWithStorageMeta");
|
|
483
576
|
var HydratedBoundWitnessWithStorageMetaZod = z.tuple([
|
|
484
577
|
BoundWitnessWithStorageMetaZod,
|
|
485
|
-
z.array(WithStorageMetaZod(PayloadZod).
|
|
578
|
+
z.array(z.looseObject(WithStorageMetaZod(PayloadZod).shape))
|
|
486
579
|
]);
|
|
487
580
|
var asHydratedBoundWitnessWithStorageMeta = zodAsFactory(
|
|
488
581
|
HydratedBoundWitnessWithStorageMetaZod,
|
|
@@ -1147,21 +1240,21 @@ import {
|
|
|
1147
1240
|
zodIsFactory as zodIsFactory2,
|
|
1148
1241
|
zodToFactory as zodToFactory2
|
|
1149
1242
|
} from "@xylabs/sdk-js";
|
|
1150
|
-
import { globalRegistry as globalRegistry12, z as z17 } from "zod";
|
|
1243
|
+
import { globalRegistry as globalRegistry12, z as z17 } from "zod/mini";
|
|
1151
1244
|
|
|
1152
1245
|
// src/config/Base.ts
|
|
1153
|
-
import { z as z16 } from "zod";
|
|
1246
|
+
import { z as z16 } from "zod/mini";
|
|
1154
1247
|
|
|
1155
1248
|
// src/config/Chain.ts
|
|
1156
1249
|
import { AddressZod, HexZod } from "@xylabs/sdk-js";
|
|
1157
|
-
import { globalRegistry, z as z2 } from "zod";
|
|
1250
|
+
import { globalRegistry, z as z2 } from "zod/mini";
|
|
1158
1251
|
var ChainConfigZod = z2.object({
|
|
1159
|
-
id:
|
|
1252
|
+
id: z2.optional(HexZod).register(globalRegistry, {
|
|
1160
1253
|
description: "The unique identifier for the chain. Should be the staking contract address for contract-backed chains.",
|
|
1161
1254
|
title: "chain.id",
|
|
1162
1255
|
type: "string"
|
|
1163
1256
|
}),
|
|
1164
|
-
genesisRewardAddress:
|
|
1257
|
+
genesisRewardAddress: z2.optional(AddressZod).register(globalRegistry, {
|
|
1165
1258
|
description: "Address to send the initial genesis rewards to, if a new chain is being created.",
|
|
1166
1259
|
title: "chain.genesisRewardAddress",
|
|
1167
1260
|
type: "Address"
|
|
@@ -2341,38 +2434,28 @@ var ValidationConfigZod = z15.object({
|
|
|
2341
2434
|
|
|
2342
2435
|
// src/config/Base.ts
|
|
2343
2436
|
var BaseConfigZod = z16.object({
|
|
2344
|
-
chain:
|
|
2345
|
-
dataLake:
|
|
2346
|
-
evm:
|
|
2347
|
-
log:
|
|
2348
|
-
providers:
|
|
2349
|
-
remote:
|
|
2350
|
-
storage:
|
|
2351
|
-
telemetry:
|
|
2352
|
-
validation:
|
|
2437
|
+
chain: z16._default(ChainConfigZod, ChainConfigZod.parse({})).check(z16.describe("Configuration for the chain")),
|
|
2438
|
+
dataLake: z16.optional(DataLakeConfigZod).check(z16.describe("Configuration for data lakes")),
|
|
2439
|
+
evm: z16._default(EvmConfigZod, EvmConfigZod.parse({})).check(z16.describe("Configuration for EVM-backed services")),
|
|
2440
|
+
log: z16._default(LogConfigZod, LogConfigZod.parse({})).check(z16.describe("Configuration for logging")),
|
|
2441
|
+
providers: z16._default(ProvidersConfigZod, ProvidersConfigZod.parse([])).check(z16.describe("Configuration for providers")),
|
|
2442
|
+
remote: z16._default(RemoteConfigZod, RemoteConfigZod.parse({})).check(z16.describe("Configuration for remote services")),
|
|
2443
|
+
storage: z16._default(StorageConfigZod, StorageConfigZod.parse({})).check(z16.describe("Configuration for the storage")),
|
|
2444
|
+
telemetry: z16._default(TelemetryConfigZod, TelemetryConfigZod.parse({})).check(z16.describe("Configuration for telemetry")),
|
|
2445
|
+
validation: z16._default(ValidationConfigZod, ValidationConfigZod.parse({})).check(z16.describe("Configuration for validation"))
|
|
2353
2446
|
});
|
|
2354
2447
|
|
|
2355
2448
|
// src/config/Actor.ts
|
|
2356
|
-
var AccountPathZod = z17.string().regex(
|
|
2449
|
+
var AccountPathZod = z17.string().check(z17.regex(
|
|
2357
2450
|
/^(m(\/\d+'?)+|\d+'?(\/\d+'?)*)$/,
|
|
2358
2451
|
`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".`
|
|
2359
|
-
);
|
|
2360
|
-
var ActorConfigZod =
|
|
2452
|
+
));
|
|
2453
|
+
var ActorConfigZod = z17.extend(BaseConfigZod, {
|
|
2361
2454
|
name: z17.string(),
|
|
2362
|
-
accountPath:
|
|
2455
|
+
accountPath: z17.optional(AccountPathZod).register(globalRegistry12, {
|
|
2363
2456
|
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.',
|
|
2364
2457
|
title: "accountPath",
|
|
2365
2458
|
type: "string"
|
|
2366
|
-
}),
|
|
2367
|
-
/**
|
|
2368
|
-
* @deprecated Use the top-level `healthCheckPort` on `ConfigZod` instead.
|
|
2369
|
-
* The system-wide health server covers all actors in a single process; per-actor
|
|
2370
|
-
* health ports will be removed in a future major release.
|
|
2371
|
-
*/
|
|
2372
|
-
healthCheckPort: z17.coerce.number().optional().register(globalRegistry12, {
|
|
2373
|
-
description: "[DEPRECATED \u2014 use top-level healthCheckPort] Per-actor health server port.",
|
|
2374
|
-
title: "actor.healthCheckPort",
|
|
2375
|
-
type: "number"
|
|
2376
2459
|
})
|
|
2377
2460
|
});
|
|
2378
2461
|
var isActorConfig = zodIsFactory2(ActorConfigZod);
|
|
@@ -2380,24 +2463,31 @@ var asActorConfig = zodAsFactory3(ActorConfigZod, "asActorConfig");
|
|
|
2380
2463
|
var toActorConfig = zodToFactory2(ActorConfigZod, "toActorConfig");
|
|
2381
2464
|
|
|
2382
2465
|
// src/config/Actors.ts
|
|
2383
|
-
import z18 from "zod";
|
|
2384
|
-
var ActorsConfigZod = z18.
|
|
2466
|
+
import { z as z18 } from "zod/mini";
|
|
2467
|
+
var ActorsConfigZod = z18._default(
|
|
2468
|
+
z18.array(z18.looseObject(ActorConfigZod.shape)).check(z18.describe("Actor-specific configurations that override the base configuration when the actor is running")),
|
|
2469
|
+
[]
|
|
2470
|
+
);
|
|
2385
2471
|
|
|
2386
2472
|
// src/config/Config.ts
|
|
2387
|
-
import { globalRegistry as globalRegistry13, z as z19 } from "zod";
|
|
2388
|
-
var ConfigZod =
|
|
2473
|
+
import { globalRegistry as globalRegistry13, z as z19 } from "zod/mini";
|
|
2474
|
+
var ConfigZod = z19.extend(BaseConfigZod, {
|
|
2389
2475
|
actors: ActorsConfigZod,
|
|
2390
|
-
healthCheckPort: z19.coerce.number()
|
|
2476
|
+
healthCheckPort: z19.optional(z19.coerce.number()).register(globalRegistry13, {
|
|
2391
2477
|
description: "Port for the system-wide health, readiness, and liveness endpoints (/healthz, /livez, /readyz). Set to 0 to disable.",
|
|
2392
2478
|
title: "healthCheckPort",
|
|
2393
2479
|
type: "number"
|
|
2394
2480
|
})
|
|
2395
|
-
}).describe("The complete configuration for the protocol, including global settings and actor-specific overrides");
|
|
2481
|
+
}).check(z19.describe("The complete configuration for the protocol, including global settings and actor-specific overrides"));
|
|
2396
2482
|
function resolveConfig(config) {
|
|
2397
2483
|
const parsedConfig = ConfigZod.parse(config);
|
|
2398
|
-
const {
|
|
2484
|
+
const {
|
|
2485
|
+
actors,
|
|
2486
|
+
healthCheckPort: _healthCheckPort,
|
|
2487
|
+
...rootConfig
|
|
2488
|
+
} = parsedConfig;
|
|
2399
2489
|
parsedConfig.actors = actors.map((actorConfig) => {
|
|
2400
|
-
return ActorConfigZod.
|
|
2490
|
+
return z19.looseObject(ActorConfigZod.shape).parse({ ...rootConfig, ...actorConfig });
|
|
2401
2491
|
});
|
|
2402
2492
|
return parsedConfig;
|
|
2403
2493
|
}
|
|
@@ -2408,15 +2498,15 @@ import {
|
|
|
2408
2498
|
zodIsFactory as zodIsFactory3,
|
|
2409
2499
|
zodToFactory as zodToFactory3
|
|
2410
2500
|
} from "@xylabs/sdk-js";
|
|
2411
|
-
import { globalRegistry as globalRegistry14, z as z20 } from "zod";
|
|
2412
|
-
var HostActorConfigZod =
|
|
2413
|
-
host: z20.string()
|
|
2501
|
+
import { globalRegistry as globalRegistry14, z as z20 } from "zod/mini";
|
|
2502
|
+
var HostActorConfigZod = z20.extend(ActorConfigZod, {
|
|
2503
|
+
host: z20._default(z20.string(), "localhost").register(globalRegistry14, {
|
|
2414
2504
|
default: "localhost",
|
|
2415
2505
|
description: "Host for the Actor",
|
|
2416
2506
|
title: "host",
|
|
2417
2507
|
type: "string"
|
|
2418
2508
|
}),
|
|
2419
|
-
port: z20.coerce.number()
|
|
2509
|
+
port: z20._default(z20.coerce.number(), 8080).register(globalRegistry14, {
|
|
2420
2510
|
default: 8080,
|
|
2421
2511
|
description: "Port for the Actor",
|
|
2422
2512
|
title: "port",
|
|
@@ -2464,6 +2554,7 @@ import {
|
|
|
2464
2554
|
zodIsFactory as zodIsFactory5,
|
|
2465
2555
|
zodToFactory as zodToFactory5
|
|
2466
2556
|
} from "@xylabs/sdk-js";
|
|
2557
|
+
import { z as z23 } from "zod/mini";
|
|
2467
2558
|
|
|
2468
2559
|
// src/model/CreatableProviderContext.zod.ts
|
|
2469
2560
|
import {
|
|
@@ -2472,17 +2563,17 @@ import {
|
|
|
2472
2563
|
zodToFactory as zodToFactory4
|
|
2473
2564
|
} from "@xylabs/sdk-js";
|
|
2474
2565
|
import { CachingContextZod } from "@xyo-network/xl1-protocol-lib";
|
|
2475
|
-
import { z as z22 } from "zod";
|
|
2566
|
+
import { z as z22 } from "zod/mini";
|
|
2476
2567
|
var RuntimeStatusMonitorZod = z22.custom((val) => val && typeof val === "object");
|
|
2477
2568
|
var ProviderFactoryLocatorZod = z22.lazy(() => z22.custom((val) => val && typeof val === "object" && "context" in val && "registry" in val));
|
|
2478
|
-
var BaseConfigContextZod =
|
|
2479
|
-
config: BaseConfigZod.
|
|
2480
|
-
locator:
|
|
2569
|
+
var BaseConfigContextZod = z22.extend(CachingContextZod, {
|
|
2570
|
+
config: z22.looseObject(BaseConfigZod.shape),
|
|
2571
|
+
locator: z22.optional(ProviderFactoryLocatorZod)
|
|
2481
2572
|
});
|
|
2482
|
-
var CreatableProviderContextZod = z22.lazy(() =>
|
|
2483
|
-
_id: z22.
|
|
2573
|
+
var CreatableProviderContextZod = z22.lazy(() => z22.extend(BaseConfigContextZod, {
|
|
2574
|
+
_id: z22.optional(z22.string()),
|
|
2484
2575
|
locator: ProviderFactoryLocatorZod,
|
|
2485
|
-
statusReporter:
|
|
2576
|
+
statusReporter: z22.optional(RuntimeStatusMonitorZod)
|
|
2486
2577
|
}));
|
|
2487
2578
|
var isBaseConfigContext = zodIsFactory4(BaseConfigContextZod);
|
|
2488
2579
|
var asBaseConfigContext = zodAsFactory5(BaseConfigContextZod, "asBaseConfigContext");
|
|
@@ -2922,7 +3013,7 @@ var bundle2 = (root, transaction) => {
|
|
|
2922
3013
|
};
|
|
2923
3014
|
|
|
2924
3015
|
// src/context/Actor.ts
|
|
2925
|
-
var ActorConfigContext =
|
|
3016
|
+
var ActorConfigContext = z23.extend(BaseConfigContextZod, { config: ActorConfigZod });
|
|
2926
3017
|
var isActorConfigContext = zodIsFactory5(ActorConfigContext);
|
|
2927
3018
|
var asActorConfigContext = zodAsFactory6(ActorConfigContext, "asActorConfigContext");
|
|
2928
3019
|
var toActorConfigContext = zodToFactory5(ActorConfigContext, "toActorConfigContext");
|
|
@@ -3312,7 +3403,8 @@ import {
|
|
|
3312
3403
|
zodIsFactory as zodIsFactory6,
|
|
3313
3404
|
zodToFactory as zodToFactory6
|
|
3314
3405
|
} from "@xylabs/sdk-js";
|
|
3315
|
-
|
|
3406
|
+
import { z as z24 } from "zod/mini";
|
|
3407
|
+
var HostActorConfigContext = z24.extend(BaseConfigContextZod, { config: HostActorConfigZod });
|
|
3316
3408
|
var isHostActorConfigContext = zodIsFactory6(HostActorConfigContext);
|
|
3317
3409
|
var asHostActorConfigContext = zodAsFactory7(HostActorConfigContext, "asHostActorConfigContext");
|
|
3318
3410
|
var toHostActorConfigContext = zodToFactory6(HostActorConfigContext, "toHostActorConfigContext");
|
|
@@ -3353,26 +3445,26 @@ import {
|
|
|
3353
3445
|
asSchema as asSchema2,
|
|
3354
3446
|
isPayloadOfZodType
|
|
3355
3447
|
} from "@xyo-network/sdk-js";
|
|
3356
|
-
import { z as
|
|
3448
|
+
import { z as z26 } from "zod";
|
|
3357
3449
|
|
|
3358
3450
|
// src/eip-712/Types.ts
|
|
3359
|
-
import { z as
|
|
3360
|
-
var TypedDataDomainZod =
|
|
3361
|
-
name:
|
|
3362
|
-
version:
|
|
3363
|
-
chainId:
|
|
3364
|
-
verifyingContract:
|
|
3365
|
-
salt:
|
|
3451
|
+
import { z as z25 } from "zod";
|
|
3452
|
+
var TypedDataDomainZod = z25.object({
|
|
3453
|
+
name: z25.string().nullable().optional(),
|
|
3454
|
+
version: z25.string().nullable().optional(),
|
|
3455
|
+
chainId: z25.union([z25.string(), z25.number(), z25.bigint()]).nullable().optional(),
|
|
3456
|
+
verifyingContract: z25.string().nullable().optional(),
|
|
3457
|
+
salt: z25.union([z25.string(), z25.instanceof(Uint8Array)]).nullable().optional()
|
|
3366
3458
|
});
|
|
3367
|
-
var TypedDataFieldZod =
|
|
3368
|
-
name:
|
|
3369
|
-
type:
|
|
3459
|
+
var TypedDataFieldZod = z25.object({
|
|
3460
|
+
name: z25.string(),
|
|
3461
|
+
type: z25.string()
|
|
3370
3462
|
});
|
|
3371
|
-
var TypedDataTypesZod =
|
|
3372
|
-
var TypedDataValueZod =
|
|
3463
|
+
var TypedDataTypesZod = z25.record(z25.string(), z25.array(TypedDataFieldZod));
|
|
3464
|
+
var TypedDataValueZod = z25.record(z25.string(), z25.any());
|
|
3373
3465
|
|
|
3374
3466
|
// src/eip-712/Payloads/EIP712Data.ts
|
|
3375
|
-
var EIP712DataPayloadFieldsZod =
|
|
3467
|
+
var EIP712DataPayloadFieldsZod = z26.object({
|
|
3376
3468
|
domain: TypedDataDomainZod,
|
|
3377
3469
|
types: TypedDataTypesZod,
|
|
3378
3470
|
values: TypedDataValueZod
|
|
@@ -3390,11 +3482,11 @@ import {
|
|
|
3390
3482
|
asSchema as asSchema3,
|
|
3391
3483
|
isPayloadOfZodType as isPayloadOfZodType2
|
|
3392
3484
|
} from "@xyo-network/sdk-js";
|
|
3393
|
-
import { z as
|
|
3394
|
-
var EIP712SignaturePayloadFieldsZod =
|
|
3395
|
-
address:
|
|
3485
|
+
import { z as z27 } from "zod";
|
|
3486
|
+
var EIP712SignaturePayloadFieldsZod = z27.object({
|
|
3487
|
+
address: z27.string(),
|
|
3396
3488
|
hash: HashZod,
|
|
3397
|
-
signature:
|
|
3489
|
+
signature: z27.string()
|
|
3398
3490
|
});
|
|
3399
3491
|
var EIP712SignaturePayloadSchema = asSchema3("network.xyo.chains.ethereum.eip712.signature", true);
|
|
3400
3492
|
var isEIP712SignaturePayload = isPayloadOfZodType2(
|
|
@@ -4132,12 +4224,12 @@ var HydratedCache = class {
|
|
|
4132
4224
|
};
|
|
4133
4225
|
|
|
4134
4226
|
// src/utils/isZodError.ts
|
|
4135
|
-
import { z as
|
|
4227
|
+
import { z as z28 } from "zod";
|
|
4136
4228
|
var isZodError = (error) => {
|
|
4137
|
-
return error instanceof
|
|
4229
|
+
return error instanceof z28.ZodError;
|
|
4138
4230
|
};
|
|
4139
4231
|
var prettifyZodError = (error) => {
|
|
4140
|
-
return
|
|
4232
|
+
return z28.prettifyError(error);
|
|
4141
4233
|
};
|
|
4142
4234
|
|
|
4143
4235
|
// src/simple/block/SimpleBlockViewer.ts
|
|
@@ -4352,9 +4444,7 @@ SimpleBlockViewer = __decorateClass([
|
|
|
4352
4444
|
], SimpleBlockViewer);
|
|
4353
4445
|
|
|
4354
4446
|
// src/simple/blockReward/SimpleBlockRewardViewer.ts
|
|
4355
|
-
import {
|
|
4356
|
-
BlockRewardViewerMoniker
|
|
4357
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4447
|
+
import { BlockRewardViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
4358
4448
|
var SimpleBlockRewardViewer = class extends AbstractCreatableProvider {
|
|
4359
4449
|
moniker = SimpleBlockRewardViewer.defaultMoniker;
|
|
4360
4450
|
allowedRewardForBlock(block) {
|
|
@@ -4508,10 +4598,7 @@ SimpleBlockValidationViewer = __decorateClass([
|
|
|
4508
4598
|
import {
|
|
4509
4599
|
assertEx as assertEx35
|
|
4510
4600
|
} from "@xylabs/sdk-js";
|
|
4511
|
-
import {
|
|
4512
|
-
ChainContractViewerMoniker as ChainContractViewerMoniker2,
|
|
4513
|
-
FinalizationViewerMoniker as FinalizationViewerMoniker2
|
|
4514
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4601
|
+
import { ChainContractViewerMoniker as ChainContractViewerMoniker2, FinalizationViewerMoniker as FinalizationViewerMoniker2 } from "@xyo-network/xl1-protocol-lib";
|
|
4515
4602
|
var SimpleChainContractViewer = class extends AbstractCreatableProvider {
|
|
4516
4603
|
moniker = SimpleChainContractViewer.defaultMoniker;
|
|
4517
4604
|
_finalizationViewer;
|
|
@@ -4580,15 +4667,10 @@ var SimpleXyoClient = class {
|
|
|
4580
4667
|
};
|
|
4581
4668
|
|
|
4582
4669
|
// src/simple/datalake/RestDataLakeRunner.ts
|
|
4583
|
-
import {
|
|
4584
|
-
assertEx as assertEx36,
|
|
4585
|
-
exists as exists6
|
|
4586
|
-
} from "@xylabs/sdk-js";
|
|
4670
|
+
import { assertEx as assertEx36, exists as exists6 } from "@xylabs/sdk-js";
|
|
4587
4671
|
import { isAnyPayload as isAnyPayload7, PayloadZodLoose } from "@xyo-network/sdk-js";
|
|
4588
|
-
import {
|
|
4589
|
-
|
|
4590
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4591
|
-
import z27 from "zod";
|
|
4672
|
+
import { DataLakeRunnerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
4673
|
+
import { z as z29 } from "zod/mini";
|
|
4592
4674
|
|
|
4593
4675
|
// src/simple/datalake/AbstractRestDataLake.ts
|
|
4594
4676
|
import { FetchClientError, FetchJsonClient } from "@xylabs/fetch";
|
|
@@ -4661,7 +4743,7 @@ var RestDataLakeRunner = class extends AbstractRestDataLake {
|
|
|
4661
4743
|
}).filter(exists6);
|
|
4662
4744
|
if (allowedItems.length > 0) {
|
|
4663
4745
|
const result = await this.client.post(`${this.params.endpoint}/insert`, allowedItems);
|
|
4664
|
-
return
|
|
4746
|
+
return z29.array(PayloadZodLoose).parse(result.data);
|
|
4665
4747
|
} else {
|
|
4666
4748
|
return [];
|
|
4667
4749
|
}
|
|
@@ -4675,9 +4757,7 @@ RestDataLakeRunner = __decorateClass([
|
|
|
4675
4757
|
], RestDataLakeRunner);
|
|
4676
4758
|
|
|
4677
4759
|
// src/simple/datalake/RestDataLakeViewer.ts
|
|
4678
|
-
import {
|
|
4679
|
-
DataLakeViewerMoniker
|
|
4680
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4760
|
+
import { DataLakeViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
4681
4761
|
var RestDataLakeViewer = class extends AbstractRestDataLake {
|
|
4682
4762
|
moniker = RestDataLakeViewer.defaultMoniker;
|
|
4683
4763
|
};
|
|
@@ -4691,9 +4771,7 @@ RestDataLakeViewer = __decorateClass([
|
|
|
4691
4771
|
// src/simple/datalake/SimpleDataLakeRunner.ts
|
|
4692
4772
|
import { exists as exists7 } from "@xylabs/sdk-js";
|
|
4693
4773
|
import { isAnyPayload as isAnyPayload9, PayloadBuilder as PayloadBuilder19 } from "@xyo-network/sdk-js";
|
|
4694
|
-
import {
|
|
4695
|
-
DataLakeRunnerMoniker as DataLakeRunnerMoniker2
|
|
4696
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4774
|
+
import { DataLakeRunnerMoniker as DataLakeRunnerMoniker2 } from "@xyo-network/xl1-protocol-lib";
|
|
4697
4775
|
|
|
4698
4776
|
// src/simple/datalake/AbstractSimpleDataLake.ts
|
|
4699
4777
|
import { isAnyPayload as isAnyPayload8 } from "@xyo-network/sdk-js";
|
|
@@ -4760,9 +4838,7 @@ SimpleDataLakeRunner = __decorateClass([
|
|
|
4760
4838
|
], SimpleDataLakeRunner);
|
|
4761
4839
|
|
|
4762
4840
|
// src/simple/datalake/SimpleDataLakeViewer.ts
|
|
4763
|
-
import {
|
|
4764
|
-
DataLakeViewerMoniker as DataLakeViewerMoniker2
|
|
4765
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
4841
|
+
import { DataLakeViewerMoniker as DataLakeViewerMoniker2 } from "@xyo-network/xl1-protocol-lib";
|
|
4766
4842
|
var SimpleDataLakeViewer = class extends AbstractSimpleDataLake {
|
|
4767
4843
|
moniker = SimpleDataLakeViewer.defaultMoniker;
|
|
4768
4844
|
};
|
|
@@ -4803,9 +4879,7 @@ SimpleFinalizationRunner = __decorateClass([
|
|
|
4803
4879
|
], SimpleFinalizationRunner);
|
|
4804
4880
|
|
|
4805
4881
|
// src/simple/finalization/SimpleFinalizationViewer.ts
|
|
4806
|
-
import {
|
|
4807
|
-
assertEx as assertEx37
|
|
4808
|
-
} from "@xylabs/sdk-js";
|
|
4882
|
+
import { assertEx as assertEx37 } from "@xylabs/sdk-js";
|
|
4809
4883
|
import {
|
|
4810
4884
|
asSignedHydratedBlockWithStorageMeta as asSignedHydratedBlockWithStorageMeta2,
|
|
4811
4885
|
ChainContractViewerMoniker as ChainContractViewerMoniker3,
|
|
@@ -5014,10 +5088,7 @@ import {
|
|
|
5014
5088
|
assertEx as assertEx39,
|
|
5015
5089
|
exists as exists8
|
|
5016
5090
|
} from "@xylabs/sdk-js";
|
|
5017
|
-
import {
|
|
5018
|
-
isPayloadBundle,
|
|
5019
|
-
PayloadBuilder as PayloadBuilder21
|
|
5020
|
-
} from "@xyo-network/sdk-js";
|
|
5091
|
+
import { isPayloadBundle, PayloadBuilder as PayloadBuilder21 } from "@xyo-network/sdk-js";
|
|
5021
5092
|
import {
|
|
5022
5093
|
BlockValidationViewerMoniker as BlockValidationViewerMoniker2,
|
|
5023
5094
|
ChainContractViewerMoniker as ChainContractViewerMoniker4,
|
|
@@ -5445,10 +5516,7 @@ import {
|
|
|
5445
5516
|
isHash as isHash2
|
|
5446
5517
|
} from "@xylabs/sdk-js";
|
|
5447
5518
|
import { isHashMeta as isHashMeta2, isPayloadBundle as isPayloadBundle2 } from "@xyo-network/sdk-js";
|
|
5448
|
-
import {
|
|
5449
|
-
MempoolViewerMoniker as MempoolViewerMoniker2,
|
|
5450
|
-
WindowedBlockViewerMoniker
|
|
5451
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
5519
|
+
import { MempoolViewerMoniker as MempoolViewerMoniker2, WindowedBlockViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
5452
5520
|
var DEFAULT_MEMPOOL_SELECTION_RATIO = 0.66;
|
|
5453
5521
|
var DEFAULT_DEMOTION_THRESHOLD = 3;
|
|
5454
5522
|
var DEFAULT_HANDOUT_STATS_TTL_BLOCKS = 1e3;
|
|
@@ -5817,10 +5885,7 @@ var MemoryPermissionsStore = class {
|
|
|
5817
5885
|
|
|
5818
5886
|
// src/simple/runner/SimpleXyoRunner.ts
|
|
5819
5887
|
import { PayloadBuilder as PayloadBuilder22 } from "@xyo-network/sdk-js";
|
|
5820
|
-
import {
|
|
5821
|
-
MempoolRunnerMoniker as MempoolRunnerMoniker2,
|
|
5822
|
-
XyoRunnerMoniker
|
|
5823
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
5888
|
+
import { MempoolRunnerMoniker as MempoolRunnerMoniker2, XyoRunnerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
5824
5889
|
var SimpleXyoRunner = class extends AbstractCreatableProvider {
|
|
5825
5890
|
moniker = SimpleXyoRunner.defaultMoniker;
|
|
5826
5891
|
_mempoolRunner;
|
|
@@ -5895,9 +5960,7 @@ var SimpleXyoSigner = class _SimpleXyoSigner extends AbstractCreatableProvider {
|
|
|
5895
5960
|
|
|
5896
5961
|
// src/simple/StakeEventsViewer/SimpleStakeEventsViewer.ts
|
|
5897
5962
|
import { isDefined as isDefined20 } from "@xylabs/sdk-js";
|
|
5898
|
-
import {
|
|
5899
|
-
StakeEventsViewerMoniker
|
|
5900
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
5963
|
+
import { StakeEventsViewerMoniker } from "@xyo-network/xl1-protocol-lib";
|
|
5901
5964
|
var SimpleStakeEventsViewer = class extends AbstractCreatableProvider {
|
|
5902
5965
|
moniker = SimpleStakeEventsViewer.defaultMoniker;
|
|
5903
5966
|
get positions() {
|
|
@@ -6074,13 +6137,10 @@ SimpleStakeTotalsViewer = __decorateClass([
|
|
|
6074
6137
|
// src/simple/StakeViewer/SimpleStakeViewer.ts
|
|
6075
6138
|
import {
|
|
6076
6139
|
asAddress as asAddress4,
|
|
6140
|
+
assertEx as assertEx43,
|
|
6077
6141
|
toAddress as toAddress6
|
|
6078
6142
|
} from "@xylabs/sdk-js";
|
|
6079
|
-
import {
|
|
6080
|
-
import {
|
|
6081
|
-
StakeEventsViewerMoniker as StakeEventsViewerMoniker2,
|
|
6082
|
-
StakeViewerMoniker as StakeViewerMoniker2
|
|
6083
|
-
} from "@xyo-network/xl1-protocol-lib";
|
|
6143
|
+
import { StakeEventsViewerMoniker as StakeEventsViewerMoniker2, StakeViewerMoniker as StakeViewerMoniker2 } from "@xyo-network/xl1-protocol-lib";
|
|
6084
6144
|
var SimpleStakeViewer = class extends AbstractCreatableProvider {
|
|
6085
6145
|
moniker = SimpleStakeViewer.defaultMoniker;
|
|
6086
6146
|
_chainStakeEventsViewer;
|
|
@@ -6442,10 +6502,7 @@ SimpleTransactionValidationViewer = __decorateClass([
|
|
|
6442
6502
|
], SimpleTransactionValidationViewer);
|
|
6443
6503
|
|
|
6444
6504
|
// src/simple/TransactionViewer/SimpleTransactionViewer.ts
|
|
6445
|
-
import {
|
|
6446
|
-
assertEx as assertEx46,
|
|
6447
|
-
exists as exists10
|
|
6448
|
-
} from "@xylabs/sdk-js";
|
|
6505
|
+
import { assertEx as assertEx46, exists as exists10 } from "@xylabs/sdk-js";
|
|
6449
6506
|
import { BoundWitnessSchema } from "@xyo-network/sdk-js";
|
|
6450
6507
|
import {
|
|
6451
6508
|
asSignedHydratedTransactionWithHashMeta,
|
|
@@ -6795,8 +6852,8 @@ var getUrl = (host, port) => {
|
|
|
6795
6852
|
var TODO = true;
|
|
6796
6853
|
|
|
6797
6854
|
// src/validation/schema/Mnemonic.ts
|
|
6798
|
-
import { z as
|
|
6799
|
-
var MnemonicStringZod =
|
|
6855
|
+
import { z as z30 } from "zod";
|
|
6856
|
+
var MnemonicStringZod = z30.string().transform((s) => s.trim().replaceAll(/\s+/g, " ")).refine(
|
|
6800
6857
|
(s) => [12, 15, 18, 21, 24].includes(s.split(" ").length),
|
|
6801
6858
|
{ message: "Mnemonic must contain 12, 15, 18, 21, or 24 words." }
|
|
6802
6859
|
).describe("BIP-39 mnemonic string");
|