@xyo-network/xl1-protocol 5.1.2 → 5.1.4
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/modules/protocol-lib/runners/DeadLetterQueue.d.ts +9 -3
- package/dist/neutral/modules/protocol-lib/runners/DeadLetterQueue.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/runners/Evidence.d.ts +57 -0
- package/dist/neutral/modules/protocol-lib/runners/Evidence.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/runners/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-lib/runners/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/viewers/Evidence.d.ts +70 -0
- package/dist/neutral/modules/protocol-lib/viewers/Evidence.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/StakeSnapshot.d.ts +39 -0
- package/dist/neutral/modules/protocol-lib/viewers/StakeSnapshot.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts +3 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/evidence/CandidatePairPayload.d.ts +41 -0
- package/dist/neutral/modules/protocol-model/evidence/CandidatePairPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/evidence/CandidateSeenPayload.d.ts +37 -0
- package/dist/neutral/modules/protocol-model/evidence/CandidateSeenPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/evidence/EvidenceDisposition.d.ts +14 -0
- package/dist/neutral/modules/protocol-model/evidence/EvidenceDisposition.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/evidence/EvidenceNotePayload.d.ts +37 -0
- package/dist/neutral/modules/protocol-model/evidence/EvidenceNotePayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/evidence/SignedBlockRejectionRecord.d.ts +15 -0
- package/dist/neutral/modules/protocol-model/evidence/SignedBlockRejectionRecord.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/evidence/index.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/evidence/index.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/index.d.ts.map +1 -1
- package/dist/neutral/protocol-lib.mjs +61 -22
- package/dist/neutral/protocol-lib.mjs.map +4 -4
- package/dist/neutral/protocol-model.mjs +278 -179
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/package.json +3 -3
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import type { BlockRejection, Provider, TransactionRejection } from '../../protocol-model/index.js';
|
|
1
|
+
import type { BlockRejection, Provider, SignedBlockRejectionRecord, TransactionRejection } from '../../protocol-model/index.js';
|
|
2
2
|
/** Operations exposed by the Dead Letter Queue Runner contract. */
|
|
3
3
|
export interface DeadLetterQueueRunnerMethods {
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Rejects data through the reject block operation.
|
|
6
|
+
*
|
|
7
|
+
* When an observer-signed record is supplied it is additionally written to the evidence store,
|
|
8
|
+
* where it is retained as durable, attributable evidence; the unsigned rejection continues to
|
|
9
|
+
* land in the operational queue either way.
|
|
10
|
+
*/
|
|
11
|
+
rejectBlock(rejection: BlockRejection, signed?: SignedBlockRejectionRecord): Promise<boolean>;
|
|
6
12
|
/** Rejects data through the reject transaction operation. */
|
|
7
13
|
rejectTransaction(rejection: TransactionRejection): Promise<boolean>;
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeadLetterQueue.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/runners/DeadLetterQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAAE,QAAQ,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"DeadLetterQueue.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/runners/DeadLetterQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAAE,QAAQ,EAAE,0BAA0B,EAAE,oBAAoB,EAC3E,MAAM,iBAAiB,CAAA;AAExB,mEAAmE;AACnE,MAAM,WAAW,4BAA4B;IAC3C;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7F,6DAA6D;IAC7D,iBAAiB,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACrE;AAED,iEAAiE;AACjE,eAAO,MAAM,4BAA4B,EAAG,uBAAgC,CAAA;AAC5E,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,2CAA2C;AAC3C,MAAM,WAAW,2BAA2B;IAC1C,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B,EAAE,QAAQ,CAAC,4BAA4B,CAAC;IACjH,gEAAgE;IAChE,mBAAmB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACrF,sEAAsE;IACtE,yBAAyB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAC5F"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { Payload, WithHashMeta, XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { ChainId, EvidenceDisposition, Provider, SignedBlockRejectionRecord, SignedHydratedBlockWithHashMeta, XL1BlockNumber } from '../../protocol-model/index.js';
|
|
4
|
+
/** One candidate block to archive, paired with the reason it left the pending pool. */
|
|
5
|
+
export interface CandidateArchiveEntry {
|
|
6
|
+
/** The parsed candidate, when the bundle was well-formed enough to parse */
|
|
7
|
+
block?: SignedHydratedBlockWithHashMeta;
|
|
8
|
+
/** The stored bundle payload, archived verbatim so artifact identity survives */
|
|
9
|
+
bundle: WithHashMeta<Payload>;
|
|
10
|
+
/** Why the candidate left the pending pool */
|
|
11
|
+
disposition: EvidenceDisposition;
|
|
12
|
+
}
|
|
13
|
+
/** Two distinct same-height candidates from one producer, as detected at ingest. */
|
|
14
|
+
export interface CandidatePairDetected {
|
|
15
|
+
/** Chain both candidates were proposed on */
|
|
16
|
+
chain: ChainId;
|
|
17
|
+
/** Block number both candidates claim */
|
|
18
|
+
height: XL1BlockNumber;
|
|
19
|
+
/** Address that signed both candidates */
|
|
20
|
+
producer: XyoAddress;
|
|
21
|
+
/** The two candidates' bound witness data hashes, sorted ascending */
|
|
22
|
+
subjects: [Hash, Hash];
|
|
23
|
+
}
|
|
24
|
+
/** Options for evidence pruning. */
|
|
25
|
+
export interface EvidencePruneOptions {
|
|
26
|
+
/** Maximum number of entries processed in one batch. */
|
|
27
|
+
batchSize?: number;
|
|
28
|
+
/** Maximum number of candidates examined per maintenance pass. */
|
|
29
|
+
maxCheck?: number;
|
|
30
|
+
/** Maximum number of entries removed per maintenance pass. */
|
|
31
|
+
maxPrune?: number;
|
|
32
|
+
}
|
|
33
|
+
/** Operations exposed by the Evidence Store Runner contract. */
|
|
34
|
+
export interface EvidenceStoreRunnerMethods {
|
|
35
|
+
/** Archives pruned candidates with their dispositions, returning the stored hashes. */
|
|
36
|
+
archiveCandidates(entries: CandidateArchiveEntry[]): Promise<Hash[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Records observed candidates in the (producer, height, data hash) index, returning any
|
|
39
|
+
* same-height pairs newly detected by this call.
|
|
40
|
+
*/
|
|
41
|
+
noteCandidates(blocks: SignedHydratedBlockWithHashMeta[]): Promise<CandidatePairDetected[]>;
|
|
42
|
+
/** Stores an observer-signed rejection record. */
|
|
43
|
+
recordRejection(record: SignedBlockRejectionRecord): Promise<boolean>;
|
|
44
|
+
}
|
|
45
|
+
/** Moniker identifier for the EvidenceStoreRunner provider. */
|
|
46
|
+
export declare const EvidenceStoreRunnerMoniker: "EvidenceStoreRunner";
|
|
47
|
+
/** Type literal for the EvidenceStoreRunner provider moniker. */
|
|
48
|
+
export type EvidenceStoreRunnerMoniker = typeof EvidenceStoreRunnerMoniker;
|
|
49
|
+
/** Runner interface for executing evidence store write operations. */
|
|
50
|
+
export interface EvidenceStoreRunner extends EvidenceStoreRunnerMethods, Provider<EvidenceStoreRunnerMoniker> {
|
|
51
|
+
/**
|
|
52
|
+
* Removes evidence whose retention has expired on both the XL1 floor and the anchor clock,
|
|
53
|
+
* skipping anything a pending report still references. Returns `[pruned, checked]`.
|
|
54
|
+
*/
|
|
55
|
+
pruneEvidence(options?: EvidencePruneOptions): Promise<[number, number]>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=Evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Evidence.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/runners/Evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EACV,OAAO,EAAE,YAAY,EAAE,UAAU,EAClC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EACnB,QAAQ,EACR,0BAA0B,EAC1B,+BAA+B,EAC/B,cAAc,EACf,MAAM,iBAAiB,CAAA;AAExB,uFAAuF;AACvF,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,KAAK,CAAC,EAAE,+BAA+B,CAAA;IACvC,iFAAiF;IACjF,MAAM,EAAE,YAAY,CAAC,O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7 @@ export * from './BlockPublish.js';
|
|
|
3
3
|
export * from './ChainStatePublish.js';
|
|
4
4
|
export * from './DataLakePublish.js';
|
|
5
5
|
export * from './DeadLetterQueue.js';
|
|
6
|
+
export * from './Evidence.js';
|
|
6
7
|
export * from './EvmEventIndexPublish.js';
|
|
7
8
|
export * from './Finalization.js';
|
|
8
9
|
export * from './IndexPublish.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/runners/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/runners/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,sCAAsC,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
|
|
3
|
+
import { z } from 'zod/mini';
|
|
4
|
+
import type { CandidatePair, Provider } from '../../protocol-model/index.js';
|
|
5
|
+
/** Zod schema for validating Candidate Pairs Options values. */
|
|
6
|
+
export declare const CandidatePairsOptionsZod: z.ZodMiniObject<{
|
|
7
|
+
cursor: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
8
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
9
|
+
producer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
10
|
+
readonly __hex: true;
|
|
11
|
+
} & {
|
|
12
|
+
readonly __address: true;
|
|
13
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Validated Candidate Pairs Options data. */
|
|
16
|
+
export type CandidatePairsOptions = z.infer<typeof CandidatePairsOptionsZod>;
|
|
17
|
+
/** Zod schema for validating Evidence Entries Options values. */
|
|
18
|
+
export declare const EvidenceEntriesOptionsZod: z.ZodMiniObject<{
|
|
19
|
+
cursor: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
20
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
21
|
+
schema: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
/** Validated Evidence Entries Options data. */
|
|
24
|
+
export type EvidenceEntriesOptions = z.infer<typeof EvidenceEntriesOptionsZod>;
|
|
25
|
+
/** Zod schema for validating Evidence Rejections Options values. */
|
|
26
|
+
export declare const EvidenceRejectionsOptionsZod: z.ZodMiniObject<{
|
|
27
|
+
cursor: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
28
|
+
limit: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
29
|
+
rejector: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
30
|
+
readonly __hex: true;
|
|
31
|
+
} & {
|
|
32
|
+
readonly __address: true;
|
|
33
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/** Validated Evidence Rejections Options data. */
|
|
36
|
+
export type EvidenceRejectionsOptions = z.infer<typeof EvidenceRejectionsOptionsZod>;
|
|
37
|
+
/** Operations exposed by the Evidence Viewer contract. */
|
|
38
|
+
export interface EvidenceViewerMethods {
|
|
39
|
+
/** Reads recorded same-height candidate pairs — the equivocation detection feed. */
|
|
40
|
+
candidatePairs(options?: CandidatePairsOptions): Promise<WithHashMeta<CandidatePair>[]>;
|
|
41
|
+
/** Reads raw evidence entries, optionally filtered by schema. */
|
|
42
|
+
entries(options?: EvidenceEntriesOptions): Promise<WithHashMeta<Payload>[]>;
|
|
43
|
+
/** Reads observer-signed rejection records. */
|
|
44
|
+
rejections(options?: EvidenceRejectionsOptions): Promise<WithHashMeta<Payload>[]>;
|
|
45
|
+
}
|
|
46
|
+
/** Moniker identifier for the EvidenceViewer provider. */
|
|
47
|
+
export declare const EvidenceViewerMoniker: "EvidenceViewer";
|
|
48
|
+
/** Type literal for the EvidenceViewer provider moniker. */
|
|
49
|
+
export type EvidenceViewerMoniker = typeof EvidenceViewerMoniker;
|
|
50
|
+
/** Viewer interface for reading the evidence store. */
|
|
51
|
+
export interface EvidenceViewer extends EvidenceViewerMethods, Provider<EvidenceViewerMoniker> {
|
|
52
|
+
}
|
|
53
|
+
/** Operations exposed by the Evidence Protection Viewer contract. */
|
|
54
|
+
export interface EvidenceProtectionViewerMethods {
|
|
55
|
+
/**
|
|
56
|
+
* Artifact data hashes that pending reports still depend on, and which retention therefore
|
|
57
|
+
* MUST NOT prune. Implemented by the slash-payload workstream over finalized reports lacking
|
|
58
|
+
* a finalized adjudication; while no implementation is bound, nothing is protected — which is
|
|
59
|
+
* only safe before reporting is activated.
|
|
60
|
+
*/
|
|
61
|
+
protectedSubjectHashes(): Promise<Hash[]>;
|
|
62
|
+
}
|
|
63
|
+
/** Moniker identifier for the EvidenceProtectionViewer provider. */
|
|
64
|
+
export declare const EvidenceProtectionViewerMoniker: "EvidenceProtectionViewer";
|
|
65
|
+
/** Type literal for the EvidenceProtectionViewer provider moniker. */
|
|
66
|
+
export type EvidenceProtectionViewerMoniker = typeof EvidenceProtectionViewerMoniker;
|
|
67
|
+
/** Viewer interface for reading evidence retention protections. */
|
|
68
|
+
export interface EvidenceProtectionViewer extends EvidenceProtectionViewerMethods, Provider<EvidenceProtectionViewerMoniker> {
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=Evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Evidence.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/Evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE9D,gEAAgE;AAChE,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAA;AAEF,8CAA8C;AAC9C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE5E,iEAAiE;AACjE,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAA;AAEF,+CAA+C;AAC/C,MAAM,MAAM,sBAAsB,G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|
1
|
+
import type { Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { Position, Provider } from '../../protocol-model/index.js';
|
|
4
|
+
/** Operations exposed by the Stake Snapshot Viewer contract. */
|
|
5
|
+
export interface StakeSnapshotViewerMethods {
|
|
6
|
+
/**
|
|
7
|
+
* Stake on an address that was active at an EVM height — added by then and not yet removed.
|
|
8
|
+
* This is the quantity participation is measured against.
|
|
9
|
+
*/
|
|
10
|
+
activeByStakedAt(staked: XyoAddress, evmBlock: number): Promisable<bigint>;
|
|
11
|
+
/**
|
|
12
|
+
* Stake on an address that was at risk at an EVM height — everything not yet withdrawn,
|
|
13
|
+
* including stake whose removal is still inside the withdrawal delay. Slashing reaches this;
|
|
14
|
+
* participation does not count it.
|
|
15
|
+
*/
|
|
16
|
+
atRiskByStakedAt(staked: XyoAddress, evmBlock: number): Promisable<bigint>;
|
|
17
|
+
/** Every position on an address as it stood at an EVM height. */
|
|
18
|
+
positionsByStakedAt(staked: XyoAddress, evmBlock: number): Promisable<Position[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Active stake at an EVM height that has also been in place for at least `minAgeBlocks`.
|
|
21
|
+
* Seasoning is what stops participation rights from being acquired in a single block.
|
|
22
|
+
*/
|
|
23
|
+
seasonedActiveByStakedAt(staked: XyoAddress, evmBlock: number, minAgeBlocks: number): Promisable<bigint>;
|
|
24
|
+
/** The seasoned portion of an address's stake that the address placed on itself. */
|
|
25
|
+
seasonedSelfBondAt(address: XyoAddress, evmBlock: number, minAgeBlocks: number): Promisable<bigint>;
|
|
26
|
+
/**
|
|
27
|
+
* Stake an address placed on itself — the operator's own money, as opposed to stake delegated
|
|
28
|
+
* by others. Penalties fall on both, but only this part is the operator's own exposure.
|
|
29
|
+
*/
|
|
30
|
+
selfBondAt(address: XyoAddress, evmBlock: number): Promisable<bigint>;
|
|
31
|
+
}
|
|
32
|
+
/** Moniker identifier for the StakeSnapshotViewer provider. */
|
|
33
|
+
export declare const StakeSnapshotViewerMoniker: "StakeSnapshotViewer";
|
|
34
|
+
/** Type literal for the StakeSnapshotViewer provider moniker. */
|
|
35
|
+
export type StakeSnapshotViewerMoniker = typeof StakeSnapshotViewerMoniker;
|
|
36
|
+
/** Viewer interface for reading stake as it stood at a point in EVM history. */
|
|
37
|
+
export interface StakeSnapshotViewer extends StakeSnapshotViewerMethods, Provider<StakeSnapshotViewerMoniker> {
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=StakeSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StakeSnapshot.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/StakeSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEzD,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAC1E;;;;OAIG;IACH,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAC1E,iEAAiE;IACjE,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;IACjF;;;OAGG;IACH,wBAAwB,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACxG,oFAAoF;IACpF,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACnG;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACtE;AAED,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,EAAG,qBAA8B,CAAA;AACxE,iEAAiE;AACjE,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,gFAAgF;AAChF,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B,EAAE,QAAQ,CAAC,0BAA0B,CAAC;CAAG"}
|
|
@@ -6,6 +6,7 @@ export * from './ChainContract.js';
|
|
|
6
6
|
export * from './ChainStakeViewer.js';
|
|
7
7
|
export * from './ChainState.js';
|
|
8
8
|
export * from './DeadLetterQueue.js';
|
|
9
|
+
export * from './Evidence.js';
|
|
9
10
|
export * from './EvmChain.js';
|
|
10
11
|
export * from './Finalization.js';
|
|
11
12
|
export * from './Fork.js';
|
|
@@ -15,6 +16,8 @@ export * from './NetworkStake/index.js';
|
|
|
15
16
|
export * from './NetworkStakeStepReward.js';
|
|
16
17
|
export * from './Stake.js';
|
|
17
18
|
export * from './StakeEvents.js';
|
|
19
|
+
export * from './StakeIntent.js';
|
|
20
|
+
export * from './StakeSnapshot.js';
|
|
18
21
|
export * from './StakeTotals.js';
|
|
19
22
|
export * from './StepStake.js';
|
|
20
23
|
export * from './StepViewer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cA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AAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Payload } from '@xyo-network/sdk';
|
|
2
|
+
import { z } from 'zod/mini';
|
|
3
|
+
/** Schema identifier for candidate pair payloads. */
|
|
4
|
+
export declare const CandidatePairSchema: "network.xyo.chain.evidence.candidate.pair" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
7
|
+
/** Schema type for candidate pair payloads. */
|
|
8
|
+
export type CandidatePairSchema = typeof CandidatePairSchema;
|
|
9
|
+
/**
|
|
10
|
+
* Fields for a candidate pair record — two distinct signed candidates by the same producer at
|
|
11
|
+
* the same height.
|
|
12
|
+
*
|
|
13
|
+
* A pair is *not* an equivocation on its own: a producer that re-proposes on its own unadopted
|
|
14
|
+
* candidate is doing normal work. Pairs become equivocation evidence only once the supersedes
|
|
15
|
+
* field ships and a pair is found with no supersession chain linking it.
|
|
16
|
+
*
|
|
17
|
+
* `subjects` MUST be sorted ascending by the writer. Canonical JSON preserves array order, so
|
|
18
|
+
* sorting is what makes the record's identity symmetric — and therefore idempotent — regardless
|
|
19
|
+
* of which candidate was observed first.
|
|
20
|
+
*
|
|
21
|
+
* This is a local, storage-side payload: it is never block-admissible.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CandidatePairFieldsZod: z.ZodMiniObject<{
|
|
24
|
+
chain: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHex, string>>;
|
|
25
|
+
height: import("zod").ZodPipe<import("zod").ZodInt, import("zod").ZodTransform<import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber, number>>;
|
|
26
|
+
producer: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
27
|
+
readonly __hex: true;
|
|
28
|
+
} & {
|
|
29
|
+
readonly __address: true;
|
|
30
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>;
|
|
31
|
+
subjects: z.ZodMiniTuple<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>], null>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
/** Fields represented by the candidate pair contract. */
|
|
34
|
+
export type CandidatePairFields = z.infer<typeof CandidatePairFieldsZod>;
|
|
35
|
+
/** A candidate pair payload — records two distinct same-height candidates from one producer. */
|
|
36
|
+
export type CandidatePair = Payload<CandidatePairFields, CandidatePairSchema>;
|
|
37
|
+
/** Type guard that checks if a value is a valid CandidatePair. */
|
|
38
|
+
export declare const isCandidatePair: (x?: unknown) => x is CandidatePair;
|
|
39
|
+
/** Casts a value to CandidatePair or returns undefined if invalid. */
|
|
40
|
+
export declare const asCandidatePair: import("@ariestools/sdk").AsTypeFunction<CandidatePair>;
|
|
41
|
+
//# sourceMappingURL=CandidatePairPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CandidatePairPayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/CandidatePairPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAK5B,qDAAqD;AACrD,eAAO,MAAM,mBAAmB;;CAA8D,CAAA;AAC9F,+CAA+C;AAC/C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;iBASjC,CAAA;AAEF,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,gGAAgG;AAChG,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAE7E,kEAAkE;AAClE,eAAO,MAAM,eAAe,qCAAiF,CAAA;AAE7G,sEAAsE;AACtE,eAAO,MAAM,eAAe,yDAA0C,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Payload } from '@xyo-network/sdk';
|
|
2
|
+
import { z } from 'zod/mini';
|
|
3
|
+
/** Schema identifier for candidate seen payloads. */
|
|
4
|
+
export declare const CandidateSeenSchema: "network.xyo.chain.evidence.candidate" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
7
|
+
/** Schema type for candidate seen payloads. */
|
|
8
|
+
export type CandidateSeenSchema = typeof CandidateSeenSchema;
|
|
9
|
+
/**
|
|
10
|
+
* Fields for a candidate seen record — one entry in the (producer, height, data hash) index.
|
|
11
|
+
*
|
|
12
|
+
* Every field is canonical, so the payload's own data hash is deterministic and re-inserting
|
|
13
|
+
* the same observation is idempotent at the archivist. That property is what makes these
|
|
14
|
+
* records the index: dedupe comes free from payload identity rather than a secondary store.
|
|
15
|
+
*
|
|
16
|
+
* This is a local, storage-side payload: it is never block-admissible.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CandidateSeenFieldsZod: z.ZodMiniObject<{
|
|
19
|
+
chain: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHex, string>>;
|
|
20
|
+
height: import("zod").ZodPipe<import("zod").ZodInt, import("zod").ZodTransform<import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber, number>>;
|
|
21
|
+
previous: z.ZodMiniOptional<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
22
|
+
producer: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
23
|
+
readonly __hex: true;
|
|
24
|
+
} & {
|
|
25
|
+
readonly __address: true;
|
|
26
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>;
|
|
27
|
+
subject: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
/** Fields represented by the candidate seen contract. */
|
|
30
|
+
export type CandidateSeenFields = z.infer<typeof CandidateSeenFieldsZod>;
|
|
31
|
+
/** A candidate seen payload — records that a specific signed candidate was observed. */
|
|
32
|
+
export type CandidateSeen = Payload<CandidateSeenFields, CandidateSeenSchema>;
|
|
33
|
+
/** Type guard that checks if a value is a valid CandidateSeen. */
|
|
34
|
+
export declare const isCandidateSeen: (x?: unknown) => x is CandidateSeen;
|
|
35
|
+
/** Casts a value to CandidateSeen or returns undefined if invalid. */
|
|
36
|
+
export declare const asCandidateSeen: import("@ariestools/sdk").AsTypeFunction<CandidateSeen>;
|
|
37
|
+
//# sourceMappingURL=CandidateSeenPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CandidateSeenPayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/CandidateSeenPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAK5B,qDAAqD;AACrD,eAAO,MAAM,mBAAmB;;CAAyD,CAAA;AACzF,+CAA+C;AAC/C,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBAWjC,CAAA;AAEF,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,wFAAwF;AACxF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAE7E,kEAAkE;AAClE,eAAO,MAAM,eAAe,qCAAiF,CAAA;AAE7G,sEAAsE;AACtE,eAAO,MAAM,eAAe,yDAA0C,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* Reasons a candidate block can leave the pending pool and enter the evidence store.
|
|
4
|
+
*
|
|
5
|
+
* The union ships complete so the stored records never migrate: `expired` and `superseded`
|
|
6
|
+
* are reserved for the anchor-gate and supersedes-field workstreams and are not produced
|
|
7
|
+
* by any classifier yet.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EvidenceDispositions: readonly ["expired", "finalized", "foreign", "invalid", "losing", "malformed", "superseded"];
|
|
10
|
+
/** Reason a candidate block was archived as evidence. */
|
|
11
|
+
export type EvidenceDisposition = typeof EvidenceDispositions[number];
|
|
12
|
+
/** Zod schema for an evidence disposition. */
|
|
13
|
+
export declare const EvidenceDispositionZod: z.ZodMiniLiteral<"expired" | "finalized" | "foreign" | "invalid" | "losing" | "malformed" | "superseded">;
|
|
14
|
+
//# sourceMappingURL=EvidenceDisposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvidenceDisposition.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/EvidenceDisposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAE5B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,8FAQvB,CAAA;AAEV,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAErE,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,2GAAkC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Payload } from '@xyo-network/sdk';
|
|
2
|
+
import { z } from 'zod/mini';
|
|
3
|
+
/** Schema identifier for evidence note payloads. */
|
|
4
|
+
export declare const EvidenceNoteSchema: "network.xyo.chain.evidence.note" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
7
|
+
/** Schema type for evidence note payloads. */
|
|
8
|
+
export type EvidenceNoteSchema = typeof EvidenceNoteSchema;
|
|
9
|
+
/**
|
|
10
|
+
* Fields for an evidence note — the sibling record written alongside an archived candidate
|
|
11
|
+
* bundle. The bundle itself is stored verbatim so artifact identity (the contained bound
|
|
12
|
+
* witness's recomputed data hash) survives archiving; the note carries everything the
|
|
13
|
+
* retention sweep and the detection feeds need without re-parsing the bundle.
|
|
14
|
+
*
|
|
15
|
+
* This is a local, storage-side payload: it is never block-admissible.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EvidenceNoteFieldsZod: z.ZodMiniObject<{
|
|
18
|
+
bundle: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
19
|
+
disposition: z.ZodMiniLiteral<"expired" | "finalized" | "foreign" | "invalid" | "losing" | "malformed" | "superseded">;
|
|
20
|
+
height: z.ZodMiniOptional<import("zod").ZodPipe<import("zod").ZodInt, import("zod").ZodTransform<import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber, number>>>;
|
|
21
|
+
observed: import("zod").ZodPipe<import("zod").ZodInt, import("zod").ZodTransform<import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber, number>>;
|
|
22
|
+
producer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
23
|
+
readonly __hex: true;
|
|
24
|
+
} & {
|
|
25
|
+
readonly __address: true;
|
|
26
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>>;
|
|
27
|
+
subject: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
/** Fields represented by the evidence note contract. */
|
|
30
|
+
export type EvidenceNoteFields = z.infer<typeof EvidenceNoteFieldsZod>;
|
|
31
|
+
/** An evidence note payload — describes one archived candidate in the evidence store. */
|
|
32
|
+
export type EvidenceNote = Payload<EvidenceNoteFields, EvidenceNoteSchema>;
|
|
33
|
+
/** Type guard that checks if a value is a valid EvidenceNote. */
|
|
34
|
+
export declare const isEvidenceNote: (x?: unknown) => x is EvidenceNote;
|
|
35
|
+
/** Casts a value to EvidenceNote or returns undefined if invalid. */
|
|
36
|
+
export declare const asEvidenceNote: import("@ariestools/sdk").AsTypeFunction<EvidenceNote>;
|
|
37
|
+
//# sourceMappingURL=EvidenceNotePayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvidenceNotePayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/EvidenceNotePayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAK5B,oDAAoD;AACpD,eAAO,MAAM,kBAAkB;;CAAoD,CAAA;AACnF,8CAA8C;AAC9C,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAahC,CAAA;AAEF,wDAAwD;AACxD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,yFAAyF;AACzF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;AAE1E,iEAAiE;AACjE,eAAO,MAAM,cAAc,oCAA8E,CAAA;AAEzG,qEAAqE;AACrE,eAAO,MAAM,cAAc,wDAAyC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Signed, UnsignedBoundWitness, WithHashMeta } from '@xyo-network/sdk';
|
|
2
|
+
import type { BlockRejection } from '../rejection/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* An observer-signed rejection record: a bound witness whose payload set is exactly one
|
|
5
|
+
* {@link BlockRejection}, hash-meta'd on both sides.
|
|
6
|
+
*
|
|
7
|
+
* Signing is what turns a local diagnostic into evidence. The unsigned rejection record the
|
|
8
|
+
* dead letter queue already keeps says only "some node disliked this block"; a signed record
|
|
9
|
+
* says *which* node, verifiably, and that is the difference between a log line and something
|
|
10
|
+
* an invalid-block report can rest on.
|
|
11
|
+
*
|
|
12
|
+
* The tuple shape mirrors the hydrated-block convention: `[boundWitness, payloads]`.
|
|
13
|
+
*/
|
|
14
|
+
export type SignedBlockRejectionRecord = [WithHashMeta<Signed<UnsignedBoundWitness>>, [WithHashMeta<BlockRejection>]];
|
|
15
|
+
//# sourceMappingURL=SignedBlockRejectionRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedBlockRejectionRecord.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/SignedBlockRejectionRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAC3C,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/evidence/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA"}
|
|
@@ -2,6 +2,7 @@ export * from './amount/index.js';
|
|
|
2
2
|
export * from './block/index.js';
|
|
3
3
|
export * from './BlockNumber/index.js';
|
|
4
4
|
export * from './chain/index.js';
|
|
5
|
+
export * from './evidence/index.js';
|
|
5
6
|
export * from './fields/index.js';
|
|
6
7
|
export * from './map/index.js';
|
|
7
8
|
export * from './model/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/protocol-model/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/protocol-model/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA"}
|
|
@@ -88,6 +88,9 @@ var DataLakePublishRunnerMoniker = "DataLakePublishRunner";
|
|
|
88
88
|
// src/modules/protocol-lib/runners/DeadLetterQueue.ts
|
|
89
89
|
var DeadLetterQueueRunnerMoniker = "DeadLetterQueueRunner";
|
|
90
90
|
|
|
91
|
+
// src/modules/protocol-lib/runners/Evidence.ts
|
|
92
|
+
var EvidenceStoreRunnerMoniker = "EvidenceStoreRunner";
|
|
93
|
+
|
|
91
94
|
// src/modules/protocol-lib/runners/EvmEventIndexPublish.ts
|
|
92
95
|
var EvmEventIndexPublishRunnerMoniker = "EvmEventIndexPublishRunner";
|
|
93
96
|
|
|
@@ -384,6 +387,28 @@ var RejectedTransactionsOptionsZod = z5.object({
|
|
|
384
387
|
});
|
|
385
388
|
var DeadLetterQueueViewerMoniker = "DeadLetterQueueViewer";
|
|
386
389
|
|
|
390
|
+
// src/modules/protocol-lib/viewers/Evidence.ts
|
|
391
|
+
import { HashZod as HashZod4 } from "@ariestools/sdk";
|
|
392
|
+
import { XyoAddressZod } from "@xyo-network/sdk";
|
|
393
|
+
import { z as z6 } from "zod/mini";
|
|
394
|
+
var CandidatePairsOptionsZod = z6.object({
|
|
395
|
+
cursor: z6.optional(HashZod4),
|
|
396
|
+
limit: z6.optional(z6.int().check(z6.positive())),
|
|
397
|
+
producer: z6.optional(XyoAddressZod)
|
|
398
|
+
});
|
|
399
|
+
var EvidenceEntriesOptionsZod = z6.object({
|
|
400
|
+
cursor: z6.optional(HashZod4),
|
|
401
|
+
limit: z6.optional(z6.int().check(z6.positive())),
|
|
402
|
+
schema: z6.optional(z6.string())
|
|
403
|
+
});
|
|
404
|
+
var EvidenceRejectionsOptionsZod = z6.object({
|
|
405
|
+
cursor: z6.optional(HashZod4),
|
|
406
|
+
limit: z6.optional(z6.int().check(z6.positive())),
|
|
407
|
+
rejector: z6.optional(XyoAddressZod)
|
|
408
|
+
});
|
|
409
|
+
var EvidenceViewerMoniker = "EvidenceViewer";
|
|
410
|
+
var EvidenceProtectionViewerMoniker = "EvidenceProtectionViewer";
|
|
411
|
+
|
|
387
412
|
// src/modules/protocol-lib/viewers/EvmChain.ts
|
|
388
413
|
var EvmChainViewerMoniker = "EvmChainViewer";
|
|
389
414
|
|
|
@@ -394,18 +419,18 @@ var FinalizationViewerMoniker = "FinalizationViewer";
|
|
|
394
419
|
var IndexViewerMoniker = "IndexViewer";
|
|
395
420
|
|
|
396
421
|
// src/modules/protocol-lib/viewers/Mempool.ts
|
|
397
|
-
import { HashZod as
|
|
398
|
-
import { z as
|
|
422
|
+
import { HashZod as HashZod5 } from "@ariestools/sdk";
|
|
423
|
+
import { z as z7 } from "zod/mini";
|
|
399
424
|
import { XL1BlockRangeZod } from "#protocol-model";
|
|
400
|
-
var PendingTransactionsOptionsZod =
|
|
401
|
-
cursor:
|
|
402
|
-
limit:
|
|
403
|
-
window:
|
|
425
|
+
var PendingTransactionsOptionsZod = z7.object({
|
|
426
|
+
cursor: z7.optional(HashZod5),
|
|
427
|
+
limit: z7.optional(z7.int().check(z7.positive())),
|
|
428
|
+
window: z7.optional(XL1BlockRangeZod)
|
|
404
429
|
});
|
|
405
|
-
var PendingBlocksOptionsZod =
|
|
406
|
-
cursor:
|
|
407
|
-
limit:
|
|
408
|
-
window:
|
|
430
|
+
var PendingBlocksOptionsZod = z7.object({
|
|
431
|
+
cursor: z7.optional(HashZod5),
|
|
432
|
+
limit: z7.optional(z7.int().check(z7.positive())),
|
|
433
|
+
window: z7.optional(XL1BlockRangeZod)
|
|
409
434
|
});
|
|
410
435
|
var MempoolViewerMoniker = "MempoolViewer";
|
|
411
436
|
|
|
@@ -438,6 +463,12 @@ var StakeRunnerMoniker = "StakeRunner";
|
|
|
438
463
|
var StakeEventNames = ["StakeAdded", "StakeRemoved", "StakeWithdrawn"];
|
|
439
464
|
var StakeEventsViewerMoniker = "StakeEventsViewer";
|
|
440
465
|
|
|
466
|
+
// src/modules/protocol-lib/viewers/StakeIntent.ts
|
|
467
|
+
var StakeIntentViewerMoniker = "StakeIntentViewer";
|
|
468
|
+
|
|
469
|
+
// src/modules/protocol-lib/viewers/StakeSnapshot.ts
|
|
470
|
+
var StakeSnapshotViewerMoniker = "StakeSnapshotViewer";
|
|
471
|
+
|
|
441
472
|
// src/modules/protocol-lib/viewers/StakeTotals.ts
|
|
442
473
|
var StakeTotalsViewerMoniker = "StakeTotalsViewer";
|
|
443
474
|
|
|
@@ -458,34 +489,34 @@ var TransactionViewerMoniker = "TransactionViewer";
|
|
|
458
489
|
|
|
459
490
|
// src/modules/protocol-lib/viewers/TransactionInvalidation.ts
|
|
460
491
|
import { zodIsFactory as zodIsFactory5 } from "@ariestools/sdk";
|
|
461
|
-
import { z as
|
|
492
|
+
import { z as z8 } from "zod";
|
|
462
493
|
import { ChainQualifiedHeadConfigZod as ChainQualifiedHeadConfigZod3, ChainQualifiedRangeConfigZod as ChainQualifiedRangeConfigZod3 } from "#protocol-model";
|
|
463
|
-
var TransactionInvalidationConfigFieldsZod =
|
|
464
|
-
state:
|
|
465
|
-
value:
|
|
494
|
+
var TransactionInvalidationConfigFieldsZod = z8.object({
|
|
495
|
+
state: z8.boolean().optional(),
|
|
496
|
+
value: z8.boolean().optional()
|
|
466
497
|
});
|
|
467
|
-
var TransactionInvalidationConfigZod =
|
|
498
|
+
var TransactionInvalidationConfigZod = z8.union([
|
|
468
499
|
TransactionInvalidationConfigFieldsZod.extend(ChainQualifiedHeadConfigZod3.shape),
|
|
469
500
|
TransactionInvalidationConfigFieldsZod.extend(ChainQualifiedRangeConfigZod3.shape),
|
|
470
501
|
TransactionInvalidationConfigFieldsZod,
|
|
471
|
-
|
|
502
|
+
z8.object({})
|
|
472
503
|
]);
|
|
473
504
|
var isTransactionInvalidationConfig = zodIsFactory5(TransactionInvalidationConfigZod);
|
|
474
505
|
var TransactionInvalidationViewerMoniker = "TransactionInvalidationViewer";
|
|
475
506
|
|
|
476
507
|
// src/modules/protocol-lib/viewers/TransactionValidation.ts
|
|
477
508
|
import { zodIsFactory as zodIsFactory6 } from "@ariestools/sdk";
|
|
478
|
-
import { z as
|
|
509
|
+
import { z as z9 } from "zod";
|
|
479
510
|
import { ChainQualifiedHeadConfigZod as ChainQualifiedHeadConfigZod4, ChainQualifiedRangeConfigZod as ChainQualifiedRangeConfigZod4 } from "#protocol-model";
|
|
480
|
-
var TransactionValidationConfigFieldsZod =
|
|
481
|
-
value:
|
|
482
|
-
state:
|
|
511
|
+
var TransactionValidationConfigFieldsZod = z9.object({
|
|
512
|
+
value: z9.boolean().optional(),
|
|
513
|
+
state: z9.boolean().optional()
|
|
483
514
|
});
|
|
484
|
-
var TransactionValidationConfigZod =
|
|
515
|
+
var TransactionValidationConfigZod = z9.union([
|
|
485
516
|
TransactionValidationConfigFieldsZod.extend(ChainQualifiedHeadConfigZod4.shape),
|
|
486
517
|
TransactionValidationConfigFieldsZod.extend(ChainQualifiedRangeConfigZod4.shape),
|
|
487
518
|
TransactionValidationConfigFieldsZod,
|
|
488
|
-
|
|
519
|
+
z9.object({})
|
|
489
520
|
]);
|
|
490
521
|
var isTransactionValidationConfig = zodIsFactory6(TransactionValidationConfigZod);
|
|
491
522
|
var TransactionValidationViewerMoniker = "TransactionValidationViewer";
|
|
@@ -516,6 +547,7 @@ export {
|
|
|
516
547
|
BlockViewerMoniker,
|
|
517
548
|
BlocksStepSummarySchema,
|
|
518
549
|
BoundWitnessValidationError,
|
|
550
|
+
CandidatePairsOptionsZod,
|
|
519
551
|
ChainContractViewerMoniker,
|
|
520
552
|
ChainStakeViewerMoniker,
|
|
521
553
|
ChainStatePublishRunnerMoniker,
|
|
@@ -526,6 +558,11 @@ export {
|
|
|
526
558
|
DataLakeViewerMoniker,
|
|
527
559
|
DeadLetterQueueRunnerMoniker,
|
|
528
560
|
DeadLetterQueueViewerMoniker,
|
|
561
|
+
EvidenceEntriesOptionsZod,
|
|
562
|
+
EvidenceProtectionViewerMoniker,
|
|
563
|
+
EvidenceRejectionsOptionsZod,
|
|
564
|
+
EvidenceStoreRunnerMoniker,
|
|
565
|
+
EvidenceViewerMoniker,
|
|
529
566
|
EvmChainViewerMoniker,
|
|
530
567
|
EvmEventIndexPublishRunnerMoniker,
|
|
531
568
|
FinalizationRunnerMoniker,
|
|
@@ -556,7 +593,9 @@ export {
|
|
|
556
593
|
RejectedTransactionsOptionsZod,
|
|
557
594
|
StakeEventNames,
|
|
558
595
|
StakeEventsViewerMoniker,
|
|
596
|
+
StakeIntentViewerMoniker,
|
|
559
597
|
StakeRunnerMoniker,
|
|
598
|
+
StakeSnapshotViewerMoniker,
|
|
560
599
|
StakeTotalsViewerMoniker,
|
|
561
600
|
StakeViewerMoniker,
|
|
562
601
|
StepStakeViewerMoniker,
|