@xyo-network/xl1-protocol 5.3.6 → 5.3.7
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-model/block/AllowedBlockPayload.d.ts +4 -2
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/payload/elevatable/Claim.d.ts +89 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/Claim.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/index.d.ts.map +1 -1
- package/dist/neutral/modules/schema/payload/ClaimPayload.d.ts +18 -0
- package/dist/neutral/modules/schema/payload/ClaimPayload.d.ts.map +1 -0
- package/dist/neutral/modules/schema/payload/index.d.ts +1 -0
- package/dist/neutral/modules/schema/payload/index.d.ts.map +1 -1
- package/dist/neutral/protocol-model.mjs +480 -439
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/dist/neutral/schema.mjs +51 -18
- package/dist/neutral/schema.mjs.map +4 -4
- package/package.json +1 -1
|
@@ -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, SlashAdjudication, SlashChallenge, SlashCommit, SlashEvidence, SlashRequest, StepComplete, StepWitness, TimePayload } from '../payload/index.js';
|
|
3
|
+
import type { BridgeDestinationObservation, BridgeIntent, BridgeSourceObservation, ChainStakeIntent, Claim, 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 | SlashAdjudication | SlashChallenge | SlashCommit | SlashEvidence | SlashRequest | StepWitness | StepComplete | TimePayload | TransactionBoundWitness | Transfer;
|
|
7
|
+
export type AllowedBlockPayload = BridgeDestinationObservation | BridgeIntent | BridgeSourceObservation | ChainStakeIntent | Claim | 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;
|
|
@@ -14,6 +14,8 @@ export declare const AllowedBlockPayloadSchemas: (("network.xyo.chain.bridge.obs
|
|
|
14
14
|
readonly __schema: true;
|
|
15
15
|
}) | ("network.xyo.chain.stake.intent" & {
|
|
16
16
|
readonly __schema: true;
|
|
17
|
+
}) | ("network.xyo.statement.claim" & {
|
|
18
|
+
readonly __schema: true;
|
|
17
19
|
}) | ("network.xyo.hash" & {
|
|
18
20
|
readonly __schema: true;
|
|
19
21
|
}) | ("network.xyo.chain.step.complete" & {
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"AllowedBlockPayload.d.ts","sourceRoot":"","s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AiC,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,KAAK,IAAI,eAAe,CAAC,mBAAmB,GAAG,CAAC,CAE/G,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
/** Schema identifier for statement claim payloads. */
|
|
3
|
+
export declare const ClaimSchema: "network.xyo.statement.claim" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
/** The literal type of the claim schema string. */
|
|
7
|
+
export type ClaimSchema = typeof ClaimSchema;
|
|
8
|
+
/** Upper bound on one claim's hash array. Caps per-event elevation work
|
|
9
|
+
* so a single malformed claim cannot amplify unboundedly. */
|
|
10
|
+
export declare const MAX_CLAIM_HASHES: 256;
|
|
11
|
+
/** Zod schema for the fields specific to a claim payload. */
|
|
12
|
+
export declare const ClaimFieldsZod: z.ZodMiniObject<{
|
|
13
|
+
hashes: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
14
|
+
source: z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<Lowercase<string> & {
|
|
15
|
+
readonly __hex: true;
|
|
16
|
+
} & {
|
|
17
|
+
readonly __address: true;
|
|
18
|
+
}, string>>, z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xyo-network/sdk").XyoQuantAddress, string>>]>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
/** Zod schema for a complete claim payload including schema and fields. */
|
|
21
|
+
export declare const ClaimZod: z.ZodMiniObject<{
|
|
22
|
+
schema: z.ZodMiniLiteral<"network.xyo.statement.claim" & {
|
|
23
|
+
readonly __schema: true;
|
|
24
|
+
}>;
|
|
25
|
+
hashes: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>>;
|
|
26
|
+
source: 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
|
+
}, z.core.$strip>;
|
|
32
|
+
/** A claim payload: `source` asserts the content-addressed objects in `hashes`.
|
|
33
|
+
* Referenced object bodies stay off-chain; only this payload is elevatable. */
|
|
34
|
+
export type Claim = z.infer<typeof ClaimZod>;
|
|
35
|
+
/**
|
|
36
|
+
* Type guard that checks if a value is a Claim payload.
|
|
37
|
+
*
|
|
38
|
+
* @deprecated Checks only the schema string — a matching payload may still be
|
|
39
|
+
* missing `source` or `hashes`. Use `isClaimPayload` to validate the full shape
|
|
40
|
+
* before dereferencing Claim fields.
|
|
41
|
+
*/
|
|
42
|
+
export declare const isClaim: (x?: unknown) => x is {
|
|
43
|
+
schema: "network.xyo.statement.claim" & {
|
|
44
|
+
readonly __schema: true;
|
|
45
|
+
};
|
|
46
|
+
hashes: import("@ariestools/sdk").BrandedHash[];
|
|
47
|
+
source: (Lowercase<string> & {
|
|
48
|
+
readonly __hex: true;
|
|
49
|
+
} & {
|
|
50
|
+
readonly __address: true;
|
|
51
|
+
}) | import("@xyo-network/sdk").XyoQuantAddress;
|
|
52
|
+
};
|
|
53
|
+
/** Type guard that validates the full Claim payload shape (schema and all fields). */
|
|
54
|
+
export declare const isClaimPayload: <T>(value: T) => value is T & {
|
|
55
|
+
schema: "network.xyo.statement.claim" & {
|
|
56
|
+
readonly __schema: true;
|
|
57
|
+
};
|
|
58
|
+
hashes: import("@ariestools/sdk").BrandedHash[];
|
|
59
|
+
source: (Lowercase<string> & {
|
|
60
|
+
readonly __hex: true;
|
|
61
|
+
} & {
|
|
62
|
+
readonly __address: true;
|
|
63
|
+
}) | import("@xyo-network/sdk").XyoQuantAddress;
|
|
64
|
+
};
|
|
65
|
+
/** Casts a value to Claim or returns undefined if invalid. */
|
|
66
|
+
export declare const asClaim: import("@ariestools/sdk").AsTypeFunction<{
|
|
67
|
+
schema: "network.xyo.statement.claim" & {
|
|
68
|
+
readonly __schema: true;
|
|
69
|
+
};
|
|
70
|
+
hashes: import("@ariestools/sdk").BrandedHash[];
|
|
71
|
+
source: (Lowercase<string> & {
|
|
72
|
+
readonly __hex: true;
|
|
73
|
+
} & {
|
|
74
|
+
readonly __address: true;
|
|
75
|
+
}) | import("@xyo-network/sdk").XyoQuantAddress;
|
|
76
|
+
}>;
|
|
77
|
+
/** Casts a value to a fully-validated Claim or returns undefined if invalid. */
|
|
78
|
+
export declare const asClaimPayload: import("@ariestools/sdk").AsTypeFunction<{
|
|
79
|
+
schema: "network.xyo.statement.claim" & {
|
|
80
|
+
readonly __schema: true;
|
|
81
|
+
};
|
|
82
|
+
hashes: import("@ariestools/sdk").BrandedHash[];
|
|
83
|
+
source: (Lowercase<string> & {
|
|
84
|
+
readonly __hex: true;
|
|
85
|
+
} & {
|
|
86
|
+
readonly __address: true;
|
|
87
|
+
}) | import("@xyo-network/sdk").XyoQuantAddress;
|
|
88
|
+
}>;
|
|
89
|
+
//# sourceMappingURL=Claim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Claim.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-model/payload/elevatable/Claim.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAE5B,sDAAsD;AACtD,eAAO,MAAM,WAAW;;CAAgD,CAAA;AACxE,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA;AAE5C;8DAC8D;AAC9D,eAAO,MAAM,gBAAgB,EAAG,GAAY,CAAA;AAE5C,6DAA6D;AAC7D,eAAO,MAAM,cAAc;;;;;;;iBAUzB,CAAA;AAEF,2EAA2E;AAC3E,eAAO,MAAM,QAAQ;;;;;;;;;;iBAAkE,CAAA;AAEvF;gFACgF;AAChF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;CAA4C,CAAA;AAEhE,sFAAsF;AACtF,eAAO,MAAM,cAAc;;;;;;;;;;CAAyB,CAAA;AAEpD,8DAA8D;AAC9D,eAAO,MAAM,OAAO;;;;;;;;;;EAAkC,CAAA;AAEtD,gFAAgF;AAChF,eAAO,MAAM,cAAc;;;;;;;;;;EAAyC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-model/payload/elevatable/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/protocol-model/payload/elevatable/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { JSONSchemaType } from 'ajv';
|
|
2
|
+
import type { Claim } from '../../protocol-lib/index.js';
|
|
3
|
+
/** JSON schema for validating Claim payloads. */
|
|
4
|
+
export declare const ClaimPayloadJsonSchema: JSONSchemaType<Claim>;
|
|
5
|
+
/** Schema payload that publishes {@link ClaimPayloadJsonSchema} for registry-based validation. */
|
|
6
|
+
export declare const ClaimPayloadJsonSchemaPayload: {
|
|
7
|
+
schema: "network.xyo.schema" & {
|
|
8
|
+
readonly __schema: true;
|
|
9
|
+
};
|
|
10
|
+
definition: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
$id?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
extends?: string | undefined;
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
version?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ClaimPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClaimPayload.d.ts","sourceRoot":"","sources":["../../../../../src/modules/schema/payload/ClaimPayload.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,KAAK,CAkBxD,CAAA;AAID,kGAAkG;AAClG,eAAO,MAAM,6BAA6B;;;;;;;;;;;CACe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/schema/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/schema/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|