@xyo-network/xl1-protocol 5.1.4 → 5.2.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/modules/network-model/staticRest/layout/admissionShadow.d.ts +147 -0
- package/dist/neutral/modules/network-model/staticRest/layout/admissionShadow.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParams.d.ts +371 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParams.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParamsRules.d.ts +36 -0
- package/dist/neutral/modules/network-model/staticRest/layout/chainParamsRules.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/index.d.ts +5 -0
- package/dist/neutral/modules/network-model/staticRest/layout/index.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/layout/slashIndex.d.ts +160 -0
- package/dist/neutral/modules/network-model/staticRest/layout/slashIndex.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/trustedPosture.d.ts +81 -0
- package/dist/neutral/modules/network-model/staticRest/layout/trustedPosture.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/paths/chainState.d.ts +7 -0
- package/dist/neutral/modules/network-model/staticRest/paths/chainState.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/paths/index.d.ts +1 -0
- package/dist/neutral/modules/network-model/staticRest/paths/index.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/paths/slashIndex.d.ts +31 -0
- package/dist/neutral/modules/network-model/staticRest/paths/slashIndex.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts +37 -3
- package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/validation/payload/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-lib/validation/payload/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/validation/payload/ruleGate.d.ts +29 -0
- package/dist/neutral/modules/protocol-lib/validation/payload/ruleGate.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/ChainParams.d.ts +26 -0
- package/dist/neutral/modules/protocol-lib/viewers/ChainParams.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-lib/viewers/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts +14 -2
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/BlockBoundWitness.d.ts +19 -0
- package/dist/neutral/modules/protocol-model/block/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/HydratedBlock.d.ts +44 -0
- package/dist/neutral/modules/protocol-model/block/HydratedBlock.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitness.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +10 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +12 -0
- package/dist/neutral/modules/protocol-model/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/block/unsigned/UnsignedBlockBoundWitness.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/evidence/EvidenceDisposition.d.ts +1 -1
- package/dist/neutral/modules/protocol-model/evidence/EvidenceNotePayload.d.ts +1 -1
- package/dist/neutral/modules/protocol-model/model/AccountBalance.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/model/AccountBalance.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/Context/ChainContext.zod.d.ts +3 -0
- package/dist/neutral/modules/protocol-model/model/Context/ChainContext.zod.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/Context/HeadContext.zod.d.ts +2 -0
- package/dist/neutral/modules/protocol-model/model/Context/HeadContext.zod.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/OffenseCode.d.ts +13 -0
- package/dist/neutral/modules/protocol-model/model/OffenseCode.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/model/RuleActivation.d.ts +63 -0
- package/dist/neutral/modules/protocol-model/model/RuleActivation.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/model/SyncStepSummary.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/model/SyncStepSummary.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/index.d.ts +2 -0
- package/dist/neutral/modules/protocol-model/model/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/version.d.ts +2 -2
- package/dist/neutral/modules/protocol-model/payload/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/payload/index.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/payload/slash/SlashAdjudicationPayload.d.ts +51 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashAdjudicationPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashChallengePayload.d.ts +33 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashChallengePayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashCommitPayload.d.ts +35 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashCommitPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashEvidencePayload.d.ts +33 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashEvidencePayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashRequestPayload.d.ts +46 -0
- package/dist/neutral/modules/protocol-model/payload/slash/SlashRequestPayload.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/slash/index.d.ts +6 -0
- package/dist/neutral/modules/protocol-model/payload/slash/index.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/rejection/BlockRejectionPayload.d.ts +4 -0
- package/dist/neutral/modules/protocol-model/rejection/BlockRejectionPayload.d.ts.map +1 -1
- package/dist/neutral/network-model.mjs +523 -144
- package/dist/neutral/network-model.mjs.map +4 -4
- package/dist/neutral/protocol-lib.mjs +19 -0
- package/dist/neutral/protocol-lib.mjs.map +3 -3
- package/dist/neutral/protocol-model.mjs +505 -296
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/package.json +3 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Schema id for the slash index head pointer. */
|
|
3
|
+
export declare const SlashIndexHeadSchema: "network.xyo.s3.slash.index.head" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
/** Type literal for the slash index head schema. */
|
|
7
|
+
export type SlashIndexHeadSchema = typeof SlashIndexHeadSchema;
|
|
8
|
+
/** Bumped when the index layout changes, so readers can detect a mismatch. */
|
|
9
|
+
export declare const SLASH_INDEX_VERSION = 1;
|
|
10
|
+
/**
|
|
11
|
+
* Zod schema for the slash index head pointer.
|
|
12
|
+
*
|
|
13
|
+
* Written last in every pass. A reader that sees this pointer can rely on everything it names
|
|
14
|
+
* already being there, which is what makes a crashed pass safe to simply re-run: the pointer only
|
|
15
|
+
* ever advances over work that finished.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SlashIndexHeadZod: z.ZodObject<{
|
|
18
|
+
height: z.ZodInt;
|
|
19
|
+
indexVersion: z.ZodInt;
|
|
20
|
+
schema: z.ZodLiteral<"network.xyo.s3.slash.index.head" & {
|
|
21
|
+
readonly __schema: true;
|
|
22
|
+
}>;
|
|
23
|
+
anchor: z.ZodOptional<z.ZodInt>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
/** The slash index head pointer. */
|
|
26
|
+
export type SlashIndexHead = z.infer<typeof SlashIndexHeadZod>;
|
|
27
|
+
/** Type guard that checks if a value is a valid SlashIndexHead. */
|
|
28
|
+
export declare const isSlashIndexHead: <T>(value: T) => value is T & {
|
|
29
|
+
height: number;
|
|
30
|
+
indexVersion: number;
|
|
31
|
+
schema: "network.xyo.s3.slash.index.head" & {
|
|
32
|
+
readonly __schema: true;
|
|
33
|
+
};
|
|
34
|
+
anchor?: number | undefined;
|
|
35
|
+
};
|
|
36
|
+
/** Converts a value to SlashIndexHead, throwing if invalid. */
|
|
37
|
+
export declare const asSlashIndexHead: {
|
|
38
|
+
<T>(value: T): (T & {
|
|
39
|
+
height: number;
|
|
40
|
+
indexVersion: number;
|
|
41
|
+
schema: "network.xyo.s3.slash.index.head" & {
|
|
42
|
+
readonly __schema: true;
|
|
43
|
+
};
|
|
44
|
+
anchor?: number | undefined;
|
|
45
|
+
}) | undefined;
|
|
46
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
47
|
+
height: number;
|
|
48
|
+
indexVersion: number;
|
|
49
|
+
schema: "network.xyo.s3.slash.index.head" & {
|
|
50
|
+
readonly __schema: true;
|
|
51
|
+
};
|
|
52
|
+
anchor?: number | undefined;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/** Non-validating cast to SlashIndexHead. */
|
|
56
|
+
export declare const toSlashIndexHead: {
|
|
57
|
+
(value: unknown): {
|
|
58
|
+
height: number;
|
|
59
|
+
indexVersion: number;
|
|
60
|
+
schema: "network.xyo.s3.slash.index.head" & {
|
|
61
|
+
readonly __schema: true;
|
|
62
|
+
};
|
|
63
|
+
anchor?: number | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
(value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
|
|
66
|
+
height: number;
|
|
67
|
+
indexVersion: number;
|
|
68
|
+
schema: "network.xyo.s3.slash.index.head" & {
|
|
69
|
+
readonly __schema: true;
|
|
70
|
+
};
|
|
71
|
+
anchor?: number | undefined;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** Schema id for the per-offense aggregate. */
|
|
75
|
+
export declare const SlashIndexKeyRecordSchema: "network.xyo.s3.slash.index.key" & {
|
|
76
|
+
readonly __schema: true;
|
|
77
|
+
};
|
|
78
|
+
/** Type literal for the per-offense aggregate schema. */
|
|
79
|
+
export type SlashIndexKeyRecordSchema = typeof SlashIndexKeyRecordSchema;
|
|
80
|
+
/**
|
|
81
|
+
* Zod schema for everything recorded about one offense.
|
|
82
|
+
*
|
|
83
|
+
* The aggregates are the only discovery surface, because the published read path cannot list
|
|
84
|
+
* objects. That is why they are allowed to be rewritten while everything else is immutable — and
|
|
85
|
+
* why every rewrite only appends, so a pass that runs twice converges instead of losing history.
|
|
86
|
+
*/
|
|
87
|
+
export declare const SlashIndexKeyRecordZod: z.ZodObject<{
|
|
88
|
+
accused: z.ZodString;
|
|
89
|
+
adjudication: z.ZodOptional<z.ZodString>;
|
|
90
|
+
block: z.ZodInt;
|
|
91
|
+
challenges: z.ZodArray<z.ZodString>;
|
|
92
|
+
chain: z.ZodString;
|
|
93
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
94
|
+
confirmed: "confirmed";
|
|
95
|
+
refuted: "refuted";
|
|
96
|
+
indeterminate: "indeterminate";
|
|
97
|
+
invalid: "invalid";
|
|
98
|
+
}>>;
|
|
99
|
+
offense: z.ZodEnum<{
|
|
100
|
+
equivocation: "equivocation";
|
|
101
|
+
"invalid-block": "invalid-block";
|
|
102
|
+
"reward-overmint": "reward-overmint";
|
|
103
|
+
"false-anchor": "false-anchor";
|
|
104
|
+
"ineligible-production": "ineligible-production";
|
|
105
|
+
"invalid-slash-request": "invalid-slash-request";
|
|
106
|
+
"false-attestation": "false-attestation";
|
|
107
|
+
}>;
|
|
108
|
+
requests: z.ZodArray<z.ZodString>;
|
|
109
|
+
schema: z.ZodLiteral<"network.xyo.s3.slash.index.key" & {
|
|
110
|
+
readonly __schema: true;
|
|
111
|
+
}>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
/** Everything recorded about one offense. */
|
|
114
|
+
export type SlashIndexKeyRecord = z.infer<typeof SlashIndexKeyRecordZod>;
|
|
115
|
+
/** Type guard that checks if a value is a valid SlashIndexKeyRecord. */
|
|
116
|
+
export declare const isSlashIndexKeyRecord: <T>(value: T) => value is T & {
|
|
117
|
+
accused: string;
|
|
118
|
+
block: number;
|
|
119
|
+
challenges: string[];
|
|
120
|
+
chain: string;
|
|
121
|
+
offense: "equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation";
|
|
122
|
+
requests: string[];
|
|
123
|
+
schema: "network.xyo.s3.slash.index.key" & {
|
|
124
|
+
readonly __schema: true;
|
|
125
|
+
};
|
|
126
|
+
adjudication?: string | undefined;
|
|
127
|
+
outcome?: "confirmed" | "refuted" | "indeterminate" | "invalid" | undefined;
|
|
128
|
+
};
|
|
129
|
+
/** Converts a value to SlashIndexKeyRecord, throwing if invalid. */
|
|
130
|
+
export declare const asSlashIndexKeyRecord: {
|
|
131
|
+
<T>(value: T): (T & {
|
|
132
|
+
accused: string;
|
|
133
|
+
block: number;
|
|
134
|
+
challenges: string[];
|
|
135
|
+
chain: string;
|
|
136
|
+
offense: "equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation";
|
|
137
|
+
requests: string[];
|
|
138
|
+
schema: "network.xyo.s3.slash.index.key" & {
|
|
139
|
+
readonly __schema: true;
|
|
140
|
+
};
|
|
141
|
+
adjudication?: string | undefined;
|
|
142
|
+
outcome?: "confirmed" | "refuted" | "indeterminate" | "invalid" | undefined;
|
|
143
|
+
}) | undefined;
|
|
144
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
145
|
+
accused: string;
|
|
146
|
+
block: number;
|
|
147
|
+
challenges: string[];
|
|
148
|
+
chain: string;
|
|
149
|
+
offense: "equivocation" | "invalid-block" | "reward-overmint" | "false-anchor" | "ineligible-production" | "invalid-slash-request" | "false-attestation";
|
|
150
|
+
requests: string[];
|
|
151
|
+
schema: "network.xyo.s3.slash.index.key" & {
|
|
152
|
+
readonly __schema: true;
|
|
153
|
+
};
|
|
154
|
+
adjudication?: string | undefined;
|
|
155
|
+
outcome?: "confirmed" | "refuted" | "indeterminate" | "invalid" | undefined;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
/** Builds a validated slash index head. */
|
|
159
|
+
export declare function createSlashIndexHead(height: number, anchor?: number): SlashIndexHead;
|
|
160
|
+
//# sourceMappingURL=slashIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slashIndex.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/slashIndex.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,kDAAkD;AAClD,eAAO,MAAM,oBAAoB;;CAAoD,CAAA;AACrF,oDAAoD;AACpD,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAE9D,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAIpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;iBAQ5B,CAAA;AAEF,oCAAoC;AACpC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE9D,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;;;;;;CAAkC,CAAA;AAC/D,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAAsD,CAAA;AACnF,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAAsD,CAAA;AAEnF,+CAA+C;AAC/C,eAAO,MAAM,yBAAyB;;CAAmD,CAAA;AACzF,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBjC,CAAA;AAEF,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,wEAAwE;AACxE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;CAAuC,CAAA;AACzE,oEAAoE;AACpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgE,CAAA;AAElG,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAIpF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { ChainId } from '../../../protocol-lib/index.js';
|
|
2
|
+
import type { ChainParams } from './chainParams.js';
|
|
3
|
+
/**
|
|
4
|
+
* Planning values for the decentralization parameters.
|
|
5
|
+
*
|
|
6
|
+
* These are the numbers the papers propose, not values any network is bound to. They are carried
|
|
7
|
+
* here so a register can be authored without inventing them, and so the one place they live is
|
|
8
|
+
* the one place a governance change edits.
|
|
9
|
+
*
|
|
10
|
+
* The stake amounts are deliberately absent: they are denominated in the staking token's smallest
|
|
11
|
+
* unit and are a governance decision per network, so a default would be a guess wearing a
|
|
12
|
+
* default's clothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_CHAIN_PARAMS: {
|
|
15
|
+
attestationRewardBps: number;
|
|
16
|
+
bountyShareBps: number;
|
|
17
|
+
burnFloorBps: number;
|
|
18
|
+
catalogVersion: number;
|
|
19
|
+
challengeWindowEvmBlocks: number;
|
|
20
|
+
evidenceFreshnessEvmBlocks: number;
|
|
21
|
+
evidenceRetentionXl1Blocks: number;
|
|
22
|
+
executionDelayEvmBlocks: number;
|
|
23
|
+
freshnessBandEvmBlocks: number;
|
|
24
|
+
graceBandXl1Blocks: number;
|
|
25
|
+
maturityEvmBlocks: number;
|
|
26
|
+
minStakeAgeEvmBlocks: number;
|
|
27
|
+
opsAllowanceEvmBlocks: number;
|
|
28
|
+
protocolMin: number;
|
|
29
|
+
revealDelayEvmBlocks: number;
|
|
30
|
+
revealDelayXl1Blocks: number;
|
|
31
|
+
revealWindowEvmBlocks: number;
|
|
32
|
+
revealWindowXl1Blocks: number;
|
|
33
|
+
slashFractionsBps: {
|
|
34
|
+
equivocation: number;
|
|
35
|
+
'false-anchor': number;
|
|
36
|
+
'false-attestation': number;
|
|
37
|
+
'ineligible-production': number;
|
|
38
|
+
'invalid-block': number;
|
|
39
|
+
'invalid-slash-request': number;
|
|
40
|
+
'reward-overmint': number;
|
|
41
|
+
};
|
|
42
|
+
slashQuorumCount: number;
|
|
43
|
+
};
|
|
44
|
+
/** What a trusted-posture register needs beyond the planning defaults. */
|
|
45
|
+
export interface TrustedPostureConfig {
|
|
46
|
+
/** Address whose adjudication records would be honored, once any rule is on. */
|
|
47
|
+
arbiter: string;
|
|
48
|
+
/** Absolute bounty ceiling, in the smallest unit. */
|
|
49
|
+
bountyCapAtto?: string;
|
|
50
|
+
/** Chain these parameters govern. */
|
|
51
|
+
chainId: ChainId;
|
|
52
|
+
/** Minimum producer self-bond, in the smallest unit. */
|
|
53
|
+
minProducerSelfBondAtto?: string;
|
|
54
|
+
/** Minimum producer stake, in the smallest unit. */
|
|
55
|
+
minProducerStakeAtto?: string;
|
|
56
|
+
/** Minimum validator stake, in the smallest unit. */
|
|
57
|
+
minValidatorStakeAtto?: string;
|
|
58
|
+
/** Refundable reporter deposit, in the smallest unit. */
|
|
59
|
+
reporterDepositAtto?: string;
|
|
60
|
+
/** Where the allowed block reward comes from. */
|
|
61
|
+
rewardSource?: 'schedule' | 'contract';
|
|
62
|
+
/** Version number; the first published register is 1. */
|
|
63
|
+
version?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Builds a register describing a network that enforces nothing.
|
|
67
|
+
*
|
|
68
|
+
* This is the first version a network publishes, and it changes nothing about how that network
|
|
69
|
+
* behaves: no rule has an activation height, so every gate reads as inactive and the chain runs
|
|
70
|
+
* exactly as it did before the register existed. What it does provide is the control plane —
|
|
71
|
+
* somewhere for a later version to record an activation, and something for nodes to be reading
|
|
72
|
+
* long before the first rule turns on.
|
|
73
|
+
*
|
|
74
|
+
* The stake amounts default to zero because they are meaningless while nothing consumes them. A
|
|
75
|
+
* network that intends to enforce sets them in the version that first activates admission, when
|
|
76
|
+
* they have been sized against the value an offense could extract.
|
|
77
|
+
* @param config Chain identity and any amounts already decided
|
|
78
|
+
* @returns A register version with no activations
|
|
79
|
+
*/
|
|
80
|
+
export declare function createTrustedPostureParams(config: TrustedPostureConfig): ChainParams;
|
|
81
|
+
//# sourceMappingURL=trustedPosture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trustedPosture.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/trustedPosture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BhC,CAAA;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAA;IACf,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,wDAAwD;IACxD,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,oDAAoD;IACpD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,qDAAqD;IACrD,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iDAAiD;IACjD,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IACtC,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,WAAW,CAcpF"}
|
|
@@ -11,4 +11,11 @@ export declare const headPath: () => string;
|
|
|
11
11
|
* ancestors are sibling files under the same folder. `chainId` is normalized to lowercase.
|
|
12
12
|
*/
|
|
13
13
|
export declare const chainContractByIdPath: (chainId: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* One immutable version of the chain parameter register. Versions are never rewritten, so a
|
|
16
|
+
* reader that resolved one can keep using it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const chainParamsVersionPath: (chainId: string, version: number) => string;
|
|
19
|
+
/** The mutable pointer naming the current register version for a chain. */
|
|
20
|
+
export declare const chainParamsHeadPath: (chainId: string) => string;
|
|
14
21
|
//# sourceMappingURL=chainState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainState.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/chainState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kFAAkF;AAClF,eAAO,MAAM,QAAQ,QAAO,MAA2B,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,KAAG,MAAyD,CAAA"}
|
|
1
|
+
{"version":3,"file":"chainState.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/chainState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kFAAkF;AAClF,eAAO,MAAM,QAAQ,QAAO,MAA2B,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,KAAG,MAAyD,CAAA;AAEjH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,EAAE,SAAS,MAAM,KAAG,MAChB,CAAA;AAE1D,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,KAAG,MAA2D,CAAA"}
|
|
@@ -3,5 +3,6 @@ export * from './evmEventIndex.js';
|
|
|
3
3
|
export * from './finalized.js';
|
|
4
4
|
export * from './indexPaths.js';
|
|
5
5
|
export * from './networkStakeRewardsIndex.js';
|
|
6
|
+
export * from './slashIndex.js';
|
|
6
7
|
export * from './transactionInclusionIndex.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk';
|
|
3
|
+
import type { OffenseCode } from '../../../protocol-model/index.js';
|
|
4
|
+
/** Path of the mutable slash-index head. */
|
|
5
|
+
export declare function slashIndexHeadPath(): string;
|
|
6
|
+
/** Path of the static slash-index manifest. */
|
|
7
|
+
export declare function slashIndexManifestPath(): string;
|
|
8
|
+
/** Path of one immutable recorded slash request. */
|
|
9
|
+
export declare function slashIndexRequestPath(hash: Hash): string;
|
|
10
|
+
/** Path of one immutable recorded slash commitment. */
|
|
11
|
+
export declare function slashIndexCommitPath(hash: Hash): string;
|
|
12
|
+
/** Path of one immutable recorded slash challenge. */
|
|
13
|
+
export declare function slashIndexChallengePath(hash: Hash): string;
|
|
14
|
+
/** Path of one immutable recorded slash adjudication. */
|
|
15
|
+
export declare function slashIndexAdjudicationPath(hash: Hash): string;
|
|
16
|
+
/**
|
|
17
|
+
* Path of the aggregate for one offense.
|
|
18
|
+
*
|
|
19
|
+
* Keyed by the canonical offense identity rather than by any report, so several reports of the
|
|
20
|
+
* same misconduct converge on one object instead of accumulating as separate accusations.
|
|
21
|
+
*/
|
|
22
|
+
export declare function slashIndexKeyPath(accused: XyoAddress, offense: OffenseCode, block: number): string;
|
|
23
|
+
/** Path of one producer's offense history. */
|
|
24
|
+
export declare function slashIndexAccusedPath(address: XyoAddress): string;
|
|
25
|
+
/** Path of one reporter's claim history. */
|
|
26
|
+
export declare function slashIndexClaimantPath(address: XyoAddress): string;
|
|
27
|
+
/** Path of one published admission shadow report. */
|
|
28
|
+
export declare function admissionShadowPath(height: number): string;
|
|
29
|
+
/** Path of the mutable pointer to the newest admission shadow report. */
|
|
30
|
+
export declare function admissionShadowHeadPath(): string;
|
|
31
|
+
//# sourceMappingURL=slashIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slashIndex.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/slashIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIlD,4CAA4C;AAC5C,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,+CAA+C;AAC/C,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAExD;AAED,uDAAuD;AACvD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEvD;AAED,sDAAsD;AACtD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE1D;AAED,yDAAyD;AACzD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElG;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEjE;AAED,4CAA4C;AAC5C,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAElE;AAED,qDAAqD;AACrD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
package/dist/neutral/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.d.ts
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
import type { Promisable } from '@ariestools/sdk';
|
|
1
|
+
import type { Hash, Promisable } from '@ariestools/sdk';
|
|
2
2
|
import type { Payload, WithHashMeta } from '@xyo-network/sdk';
|
|
3
|
-
import type { BaseContext, HydratedBlockWithHashMeta } from '../../../protocol-model/index.js';
|
|
3
|
+
import type { BaseContext, HydratedBlockWithHashMeta, RuleActivationParams, XL1BlockNumber } from '../../../protocol-model/index.js';
|
|
4
4
|
import type { InBlockPayloadValidationError } from './error.js';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The register facts an in-block validator is allowed to ask about.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately a view rather than the register document: a validator needs to know which rules
|
|
9
|
+
* are on and the few numbers those rules quote, and widening this to the whole document would
|
|
10
|
+
* let block validity start depending on parameters nobody meant to make consensus-critical. A
|
|
11
|
+
* full register version satisfies this structurally, so no conversion is needed.
|
|
12
|
+
*/
|
|
13
|
+
export interface InBlockRuleParams extends RuleActivationParams {
|
|
14
|
+
/** Address whose adjudication records are honored. */
|
|
15
|
+
arbiter?: string;
|
|
16
|
+
/** Refundable deposit a report must escrow, in the smallest unit. */
|
|
17
|
+
reporterDepositAtto?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Context for InBlockPayloadValidationFunction operations.
|
|
21
|
+
*
|
|
22
|
+
* Both fields are optional because a node running the trusted posture wires neither, and the
|
|
23
|
+
* validators are written so that absence reproduces pre-upgrade behavior exactly.
|
|
24
|
+
*/
|
|
6
25
|
export interface InBlockPayloadValidationFunctionContext extends BaseContext {
|
|
26
|
+
/**
|
|
27
|
+
* Whether an evidence artifact was carried by an already-finalized block.
|
|
28
|
+
*
|
|
29
|
+
* Absent on a node that has not deployed the evidence subsystem. Validators gated on a rule
|
|
30
|
+
* that needs this must fail closed when it is missing: a node that cannot check a requirement
|
|
31
|
+
* cannot certify the block.
|
|
32
|
+
*/
|
|
33
|
+
hasFinalizedEvidenceArtifact?: (hash: Hash, height: XL1BlockNumber) => Promisable<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* The register version in force at a height.
|
|
36
|
+
*
|
|
37
|
+
* Absent when no register is wired, which is how a chain declares it is running exactly as it
|
|
38
|
+
* did before any of this existed.
|
|
39
|
+
*/
|
|
40
|
+
paramsAtHeight?: (height: XL1BlockNumber) => Promisable<InBlockRuleParams | undefined>;
|
|
7
41
|
}
|
|
8
42
|
/** Function type for InBlockPayloadValidation operations. */
|
|
9
43
|
export type InBlockPayloadValidationFunction = (context: InBlockPayloadValidationFunctionContext, payload: WithHashMeta<Payload>, block: HydratedBlockWithHashMeta) => Promisable<InBlockPayloadValidationError[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"InBlockPayloadValidationFunction.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/InBlockPayloadValidationFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,KAAK,EACV,WAAW,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,cAAc,EAC7E,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,uCAAwC,SAAQ,WAAW;IAC1E;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,KAAK,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1F;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,UAAU,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;CACvF;AAED,6DAA6D;AAC7D,MAAM,MAAM,gCAAgC,GAAG,CAC7C,OAAO,EAAE,uCAAuC,EAChD,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,yBAAyB,KAC7D,UAAU,CAAC,6BAA6B,EAAE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,uCAAuC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,uCAAuC,CAAA;AACrD,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { RuleId, XL1BlockNumber } from '../../../protocol-model/index.js';
|
|
2
|
+
import type { InBlockPayloadValidationFunctionContext, InBlockRuleParams } from './InBlockPayloadValidationFunction.js';
|
|
3
|
+
/**
|
|
4
|
+
* The register version in force at a height, or undefined when none can be resolved.
|
|
5
|
+
* @param context The validation context, which may carry no register at all
|
|
6
|
+
* @param height The XL1 height being judged
|
|
7
|
+
* @returns The rules in force, or undefined
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveRuleParams(context: InBlockPayloadValidationFunctionContext, height: XL1BlockNumber): Promise<InBlockRuleParams | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Why a rule-gated payload is not admissible at a height, or undefined when it is.
|
|
12
|
+
*
|
|
13
|
+
* This is the one place the fail-open rule is written down, and every rule-gated validator must
|
|
14
|
+
* come through it. An unresolved register is treated as activating nothing, so a node with no
|
|
15
|
+
* register rejects a gated payload for the same reason pre-upgrade software does — it does not
|
|
16
|
+
* recognize it. Getting that equivalence wrong in either direction splits consensus: reject where
|
|
17
|
+
* others accept, and an upgraded node forks itself off; accept where others reject, and a
|
|
18
|
+
* payload becomes admissible before the network agreed it was.
|
|
19
|
+
*
|
|
20
|
+
* Note this asks the strict question. Inside a grace band the rule is observed but not enforced,
|
|
21
|
+
* and a payload nobody has agreed to admit yet stays inadmissible.
|
|
22
|
+
* @param params The rules in force, or undefined when none resolved
|
|
23
|
+
* @param ruleId The rule that must be active
|
|
24
|
+
* @param height The XL1 height being judged
|
|
25
|
+
* @param subject What is being gated, named for the error message
|
|
26
|
+
* @returns The reason it is inadmissible, or undefined when it is admissible
|
|
27
|
+
*/
|
|
28
|
+
export declare function requireRuleActive(params: InBlockRuleParams | undefined, ruleId: RuleId, height: number, subject: string): string | undefined;
|
|
29
|
+
//# sourceMappingURL=ruleGate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleGate.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-lib/validation/payload/ruleGate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAG7D,OAAO,KAAK,EAAE,uCAAuC,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAEvH;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,uCAAuC,EAChD,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAExC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAMpB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { ChainParams } from '../../network-model/index.js';
|
|
3
|
+
import type { Provider } from '../../protocol-model/index.js';
|
|
4
|
+
/** Operations exposed by the Chain Params Viewer contract. */
|
|
5
|
+
export interface ChainParamsViewerMethods {
|
|
6
|
+
/** The current register version, throwing when none can be resolved. */
|
|
7
|
+
currentParams(): Promisable<ChainParams>;
|
|
8
|
+
/** A specific register version, or null when it is not published. */
|
|
9
|
+
paramsByVersion(version: number): Promisable<ChainParams | null>;
|
|
10
|
+
/**
|
|
11
|
+
* The current register version, or undefined when none can be resolved.
|
|
12
|
+
*
|
|
13
|
+
* Callers use this rather than the throwing form when a missing register has a defined
|
|
14
|
+
* meaning: before enforcement exists, no register means no rules are on, and a node that
|
|
15
|
+
* cannot read one must keep running rather than stop.
|
|
16
|
+
*/
|
|
17
|
+
tryCurrentParams(): Promisable<ChainParams | undefined>;
|
|
18
|
+
}
|
|
19
|
+
/** Moniker identifier for the ChainParamsViewer provider. */
|
|
20
|
+
export declare const ChainParamsViewerMoniker: "ChainParamsViewer";
|
|
21
|
+
/** Type literal for the ChainParamsViewer provider moniker. */
|
|
22
|
+
export type ChainParamsViewerMoniker = typeof ChainParamsViewerMoniker;
|
|
23
|
+
/** Viewer interface for reading the chain parameter register. */
|
|
24
|
+
export interface ChainParamsViewer extends ChainParamsViewerMethods, Provider<ChainParamsViewerMoniker> {
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ChainParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainParams.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/ChainParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,8DAA8D;AAC9D,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IACxE,aAAa,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;IACxC,qEAAqE;IACrE,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAChE;;;;;;OAMG;IACH,gBAAgB,IAAI,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACxD;AAED,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,EAAG,mBAA4B,CAAA;AACpE,+DAA+D;AAC/D,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,iEAAiE;AACjE,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB,EAAE,QAAQ,CAAC,wBAAwB,CAAC;CAAG"}
|
|
@@ -3,6 +3,7 @@ export * from './BlockInvalidation.js';
|
|
|
3
3
|
export * from './BlockReward.js';
|
|
4
4
|
export * from './BlockValidation.js';
|
|
5
5
|
export * from './ChainContract.js';
|
|
6
|
+
export * from './ChainParams.js';
|
|
6
7
|
export * from './ChainStakeViewer.js';
|
|
7
8
|
export * from './ChainState.js';
|
|
8
9
|
export * from './DeadLetterQueue.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,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,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"}
|
|
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,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { SchemaPayload, WithStorageMeta } from '@xyo-network/sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import type { BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation, ChainStakeIntent, HashPayload, StepComplete, TimePayload } from '../payload/index.js';
|
|
3
|
+
import type { BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation, ChainStakeIntent, HashPayload, SlashAdjudication, SlashChallenge, SlashCommit, SlashEvidence, SlashRequest, StepComplete, StepWitness, TimePayload } from '../payload/index.js';
|
|
4
4
|
import { type TransactionBoundWitness } from '../transaction/index.js';
|
|
5
5
|
import { type Transfer } from '../TransferPayload.js';
|
|
6
6
|
/** Validated data representation for Allowed Block Payload. */
|
|
7
|
-
export type AllowedBlockPayload = BridgeDestinationObservation | BridgeIntent | BridgeSourceObservation | ChainStakeIntent | HashPayload | SchemaPayload | StepComplete | TimePayload | TransactionBoundWitness | Transfer;
|
|
7
|
+
export type AllowedBlockPayload = BridgeDestinationObservation | BridgeIntent | BridgeSourceObservation | ChainStakeIntent | HashPayload | SchemaPayload | SlashAdjudication | SlashChallenge | SlashCommit | SlashEvidence | SlashRequest | StepWitness | StepComplete | TimePayload | TransactionBoundWitness | Transfer;
|
|
8
8
|
/** Schema identifiers accepted by the Allowed Block Payload contract. */
|
|
9
9
|
export declare const AllowedBlockPayloadSchemas: (("network.xyo.chain.bridge.observation.destination" & {
|
|
10
10
|
readonly __schema: true;
|
|
@@ -20,6 +20,18 @@ export declare const AllowedBlockPayloadSchemas: (("network.xyo.chain.bridge.obs
|
|
|
20
20
|
readonly __schema: true;
|
|
21
21
|
}) | ("network.xyo.time" & {
|
|
22
22
|
readonly __schema: true;
|
|
23
|
+
}) | ("network.xyo.chain.slash.adjudication" & {
|
|
24
|
+
readonly __schema: true;
|
|
25
|
+
}) | ("network.xyo.chain.slash.challenge" & {
|
|
26
|
+
readonly __schema: true;
|
|
27
|
+
}) | ("network.xyo.chain.slash.commit" & {
|
|
28
|
+
readonly __schema: true;
|
|
29
|
+
}) | ("network.xyo.chain.slash.evidence" & {
|
|
30
|
+
readonly __schema: true;
|
|
31
|
+
}) | ("network.xyo.chain.slash.request" & {
|
|
32
|
+
readonly __schema: true;
|
|
33
|
+
}) | ("network.xyo.chain.validation.step.witness" & {
|
|
34
|
+
readonly __schema: true;
|
|
23
35
|
}) | ("network.xyo.transfer" & {
|
|
24
36
|
readonly __schema: true;
|
|
25
37
|
}) | ("network.xyo.boundwitness" & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/block/AllowedBlockPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACF,aAAa,EAAE,eAAe,EACvC,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EACV,4BAA4B,EAAE,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/block/AllowedBlockPayload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACF,aAAa,EAAE,eAAe,EACvC,MAAM,kBAAkB,CAAA;AAIzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EACV,4BAA4B,EAAE,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,WAAW,EAClG,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EACpH,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,EAA6B,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACjG,OAAO,EACO,KAAK,QAAQ,EAC1B,MAAM,uBAAuB,CAAA;AAE9B,+DAA+D;AAC/D,MAAM,MAAM,mBAAmB,GACzB,4BAA4B,GAC5B,YAAY,GACZ,uBAAuB,GACvB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,iBAAiB,GACjB,cAAc,GACd,WAAW,GACX,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,uBAAuB,GACvB,QAAQ,CAAA;AAEd,yEAAyE;AACzE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiBnB,CAAA;AAEpB,qEAAqE;AACrE,eAAO,MAAM,4BAA4B,eAAqC,CAAA;AAC9E,oDAAoD;AACpD,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AACpF,4DAA4D;AAC5D,eAAO,MAAM,2BAA2B,6BAA6C,CAAA;AAErF,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,KAAK,IAAI,mBAAmB,GAAG,CAqBlF,CAAA;AAED,oFAAoF;AACpF,eAAO,MAAM,iCAAiC,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,KAAK,IAAI,eAAe,CAAC,mBAAmB,GAAG,CAAC,CAE/G,CAAA"}
|