@rootintf/protocol-2phw 3.0.13-api.2 → 3.1.2-api.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.
Files changed (29) hide show
  1. package/README.md +78 -35
  2. package/dist/twoPhW.cjs.js +233 -517
  3. package/dist/twoPhW.d.ts +62 -43
  4. package/dist/twoPhW.es.mjs +233 -511
  5. package/package.json +5 -6
  6. package/src/twoPhW.ts +283 -188
  7. package/dist/generated/iface-TwoPhW/index.d.mts +0 -25
  8. package/dist/generated/iface-TwoPhW/validate.d.cts +0 -76
  9. package/dist/generated/iface-TwoPhW/validate.d.mts +0 -75
  10. package/schema/schema_MsgOptions.json +0 -12
  11. package/schema/schema_Options_delay.json +0 -17
  12. package/src/generated/.gitattributes +0 -4
  13. package/src/generated/iface-TwoPhW/index.cjs +0 -26
  14. package/src/generated/iface-TwoPhW/index.d.cts +0 -25
  15. package/src/generated/iface-TwoPhW/index.d.mts +0 -25
  16. package/src/generated/iface-TwoPhW/index.d.ts +0 -25
  17. package/src/generated/iface-TwoPhW/index.mjs +0 -23
  18. package/src/generated/iface-TwoPhW/package.json +0 -36
  19. package/src/generated/iface-TwoPhW/schema/schema_TwoPhW.json +0 -131
  20. package/src/generated/iface-TwoPhW/validate.cjs +0 -1
  21. package/src/generated/iface-TwoPhW/validate.mjs +0 -1
  22. package/src/generated/iface-introspection/index.cjs +0 -13
  23. package/src/generated/iface-introspection/index.d.cts +0 -6
  24. package/src/generated/iface-introspection/index.d.mts +0 -6
  25. package/src/generated/iface-introspection/index.d.ts +0 -6
  26. package/src/generated/iface-introspection/index.mjs +0 -10
  27. package/src/generated/iface-introspection/package.json +0 -30
  28. package/src/schema-cache/.gitattributes +0 -4
  29. package/src/schema-cache/5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a.json +0 -131
@@ -1,76 +0,0 @@
1
- declare function validate18(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
2
- instancePath?: string;
3
- rootData?: any;
4
- dynamicAnchors?: {};
5
- }): boolean;
6
- declare namespace validate18 {
7
- namespace evaluated {
8
- let props: {
9
- warp: boolean;
10
- "2PhW": boolean;
11
- };
12
- let dynamicProps: boolean;
13
- let dynamicItems: boolean;
14
- }
15
- }
16
- declare function validate20(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
17
- instancePath?: string;
18
- rootData?: any;
19
- dynamicAnchors?: {};
20
- }): boolean;
21
- declare namespace validate20 {
22
- export namespace evaluated_1 {
23
- let props_1: {
24
- _cause: boolean;
25
- ack: boolean;
26
- "2PhW": boolean;
27
- };
28
- export { props_1 as props };
29
- let dynamicProps_1: boolean;
30
- export { dynamicProps_1 as dynamicProps };
31
- let dynamicItems_1: boolean;
32
- export { dynamicItems_1 as dynamicItems };
33
- }
34
- export { evaluated_1 as evaluated };
35
- }
36
- declare function validate22(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
37
- instancePath?: string;
38
- rootData?: any;
39
- dynamicAnchors?: {};
40
- }): boolean;
41
- declare namespace validate22 {
42
- export namespace evaluated_2 {
43
- let props_2: {
44
- _cause: boolean;
45
- engage: boolean;
46
- "2PhW": boolean;
47
- };
48
- export { props_2 as props };
49
- let dynamicProps_2: boolean;
50
- export { dynamicProps_2 as dynamicProps };
51
- let dynamicItems_2: boolean;
52
- export { dynamicItems_2 as dynamicItems };
53
- }
54
- export { evaluated_2 as evaluated };
55
- }
56
- declare function validate24(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
57
- instancePath?: string;
58
- rootData?: any;
59
- dynamicAnchors?: {};
60
- }): boolean;
61
- declare namespace validate24 {
62
- export namespace evaluated_3 {
63
- let props_3: {
64
- _cause: boolean;
65
- ack: boolean;
66
- "2PhW": boolean;
67
- };
68
- export { props_3 as props };
69
- let dynamicProps_3: boolean;
70
- export { dynamicProps_3 as dynamicProps };
71
- let dynamicItems_3: boolean;
72
- export { dynamicItems_3 as dynamicItems };
73
- }
74
- export { evaluated_3 as evaluated };
75
- }
76
- export { validate18 as _v_JSON_MsgWarp, validate20 as _v_JSON_AckWarp, validate22 as _v_JSON_EffEngage, validate24 as _v_JSON_AckEngage };
@@ -1,75 +0,0 @@
1
- export function _v_JSON_MsgWarp(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
2
- instancePath?: string;
3
- rootData?: any;
4
- dynamicAnchors?: {};
5
- }): boolean;
6
- export namespace _v_JSON_MsgWarp {
7
- namespace evaluated {
8
- let props: {
9
- warp: boolean;
10
- "2PhW": boolean;
11
- };
12
- let dynamicProps: boolean;
13
- let dynamicItems: boolean;
14
- }
15
- }
16
- export function _v_JSON_AckWarp(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
17
- instancePath?: string;
18
- rootData?: any;
19
- dynamicAnchors?: {};
20
- }): boolean;
21
- export namespace _v_JSON_AckWarp {
22
- export namespace evaluated_1 {
23
- let props_1: {
24
- _cause: boolean;
25
- ack: boolean;
26
- "2PhW": boolean;
27
- };
28
- export { props_1 as props };
29
- let dynamicProps_1: boolean;
30
- export { dynamicProps_1 as dynamicProps };
31
- let dynamicItems_1: boolean;
32
- export { dynamicItems_1 as dynamicItems };
33
- }
34
- export { evaluated_1 as evaluated };
35
- }
36
- export function _v_JSON_EffEngage(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
37
- instancePath?: string;
38
- rootData?: any;
39
- dynamicAnchors?: {};
40
- }): boolean;
41
- export namespace _v_JSON_EffEngage {
42
- export namespace evaluated_2 {
43
- let props_2: {
44
- _cause: boolean;
45
- engage: boolean;
46
- "2PhW": boolean;
47
- };
48
- export { props_2 as props };
49
- let dynamicProps_2: boolean;
50
- export { dynamicProps_2 as dynamicProps };
51
- let dynamicItems_2: boolean;
52
- export { dynamicItems_2 as dynamicItems };
53
- }
54
- export { evaluated_2 as evaluated };
55
- }
56
- export function _v_JSON_AckEngage(data: any, { instancePath, parentData, parentDataProperty, rootData, dynamicAnchors }?: {
57
- instancePath?: string;
58
- rootData?: any;
59
- dynamicAnchors?: {};
60
- }): boolean;
61
- export namespace _v_JSON_AckEngage {
62
- export namespace evaluated_3 {
63
- let props_3: {
64
- _cause: boolean;
65
- ack: boolean;
66
- "2PhW": boolean;
67
- };
68
- export { props_3 as props };
69
- let dynamicProps_3: boolean;
70
- export { dynamicProps_3 as dynamicProps };
71
- let dynamicItems_3: boolean;
72
- export { dynamicItems_3 as dynamicItems };
73
- }
74
- export { evaluated_3 as evaluated };
75
- }
@@ -1,12 +0,0 @@
1
- {
2
- "$id" : "https://root-interface.se/protocols/2PhW/schema_MsgOptions",
3
- "$schema": "https://json-schema.org/draft/2019-09/schema",
4
- "type" : "object",
5
- "required" : ["options"],
6
- "properties" : {
7
- "options" : {
8
- "type" : "object"
9
- },
10
- "2PhW" : { "$ref": "definitions_2PhW#/definitions/2PhW" }
11
- }
12
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$id" : "https://root-interface.se/protocols/2PhW/schema_Options_delay",
3
- "$schema": "https://json-schema.org/draft/2019-09/schema",
4
- "type" : "object",
5
- "required" : ["ttl_msec_incr"],
6
- "properties" : {
7
- "ttl_msec_incr" : {
8
- "type" : "array",
9
- "items": {
10
- "type" : "integer"
11
- }
12
- },
13
- "reason" : {
14
- "type" : "string"
15
- }
16
- }
17
- }
@@ -1,4 +0,0 @@
1
- # generated by iface-gen: byte-stability pin -- everything in this gen-managed dir is
2
- # written LF (content-addressed cache blobs, embedded schema bytes, generated sources).
3
- # eol=lf stops a core.autocrlf=true checkout from smudging it to CRLF (hash breaks / churn).
4
- * text eol=lf
@@ -1,26 +0,0 @@
1
- // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
- "use strict";
3
- const { _v_JSON_MsgWarp, _v_JSON_AckWarp, _v_JSON_EffEngage, _v_JSON_AckEngage } = require("./validate.cjs");
4
- const { JSON_Msg, JSON_Eff } = require("@rootintf/json-msg");
5
-
6
- const VERSION = "2";
7
-
8
- const JSON_MsgWarp = {
9
- validate: _v_JSON_MsgWarp,
10
- merge: (body) => JSON_Msg.merge({ "warp": body, "2PhW": VERSION }),
11
- };
12
-
13
- const JSON_AckWarp = {
14
- validate: _v_JSON_AckWarp,
15
- };
16
-
17
- const JSON_EffEngage = {
18
- validate: _v_JSON_EffEngage,
19
- create_with_cause_merge: (cause, body) => JSON_Eff.create_with_cause_merge(cause, { "engage": body, "2PhW": VERSION }),
20
- };
21
-
22
- const JSON_AckEngage = {
23
- validate: _v_JSON_AckEngage,
24
- };
25
-
26
- module.exports = { VERSION, JSON_MsgWarp, JSON_AckWarp, JSON_EffEngage, JSON_AckEngage };
@@ -1,25 +0,0 @@
1
- // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
- import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
- export declare const VERSION: "2";
4
-
5
- export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
- export declare const JSON_MsgWarp: {
7
- validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
- merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
- };
10
-
11
- export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
- export declare const JSON_AckWarp: {
13
- validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
- };
15
-
16
- export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
- export declare const JSON_EffEngage: {
18
- validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
- create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
- };
21
-
22
- export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
- export declare const JSON_AckEngage: {
24
- validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
- };
@@ -1,25 +0,0 @@
1
- // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
- import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
- export declare const VERSION: "2";
4
-
5
- export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
- export declare const JSON_MsgWarp: {
7
- validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
- merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
- };
10
-
11
- export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
- export declare const JSON_AckWarp: {
13
- validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
- };
15
-
16
- export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
- export declare const JSON_EffEngage: {
18
- validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
- create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
- };
21
-
22
- export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
- export declare const JSON_AckEngage: {
24
- validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
- };
@@ -1,25 +0,0 @@
1
- // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
- import type { JSON_Msg, JSON_Ack, JSON_Eff } from "@rootintf/json-msg";
3
- export declare const VERSION: "2";
4
-
5
- export type JSON_MsgWarp = JSON_Msg & { "warp": { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }; "2PhW": "2" };
6
- export declare const JSON_MsgWarp: {
7
- validate(msg: JSON_Msg): msg is JSON_MsgWarp;
8
- merge(body: { "id": string; "ttl_msec": number; "instantaneous"?: boolean; "user": unknown; "hyperport": unknown }): JSON_MsgWarp;
9
- };
10
-
11
- export type JSON_AckWarp = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
12
- export declare const JSON_AckWarp: {
13
- validate(msg: JSON_Ack): msg is JSON_AckWarp;
14
- };
15
-
16
- export type JSON_EffEngage = JSON_Eff & { "_cause"?: unknown; "engage": { "ok": boolean; "rtt_msec": number }; "2PhW": "2" };
17
- export declare const JSON_EffEngage: {
18
- validate(msg: JSON_Eff): msg is JSON_EffEngage;
19
- create_with_cause_merge(cause: JSON_Msg, body: { "ok": boolean; "rtt_msec": number }): JSON_EffEngage;
20
- };
21
-
22
- export type JSON_AckEngage = JSON_Ack & { "_cause"?: unknown; "ack": Record<string, unknown>; "2PhW": "2" };
23
- export declare const JSON_AckEngage: {
24
- validate(msg: JSON_Ack): msg is JSON_AckEngage;
25
- };
@@ -1,23 +0,0 @@
1
- // GENERATED by iface-gen from schema_TwoPhW.json — DO NOT EDIT
2
- import { _v_JSON_MsgWarp, _v_JSON_AckWarp, _v_JSON_EffEngage, _v_JSON_AckEngage } from "./validate.mjs";
3
- import { JSON_Msg, JSON_Eff } from "@rootintf/json-msg";
4
-
5
- export const VERSION = "2";
6
-
7
- export const JSON_MsgWarp = {
8
- validate: _v_JSON_MsgWarp,
9
- merge: (body) => JSON_Msg.merge({ "warp": body, "2PhW": VERSION }),
10
- };
11
-
12
- export const JSON_AckWarp = {
13
- validate: _v_JSON_AckWarp,
14
- };
15
-
16
- export const JSON_EffEngage = {
17
- validate: _v_JSON_EffEngage,
18
- create_with_cause_merge: (cause, body) => JSON_Eff.create_with_cause_merge(cause, { "engage": body, "2PhW": VERSION }),
19
- };
20
-
21
- export const JSON_AckEngage = {
22
- validate: _v_JSON_AckEngage,
23
- };
@@ -1,36 +0,0 @@
1
- {
2
- "name": "@rootintf/iface-twophw",
3
- "version": "3.1.29-api.2",
4
- "description": "IPSME interface TwoPhW — generated from schema_TwoPhW.json",
5
- "type": "module",
6
- "main": "index.cjs",
7
- "module": "index.mjs",
8
- "types": "index.d.cts",
9
- "exports": {
10
- ".": {
11
- "import": {
12
- "types": "./index.d.mts",
13
- "default": "./index.mjs"
14
- },
15
- "require": {
16
- "types": "./index.d.cts",
17
- "default": "./index.cjs"
18
- }
19
- }
20
- },
21
- "files": [
22
- "index.mjs",
23
- "index.cjs",
24
- "validate.mjs",
25
- "validate.cjs",
26
- "index.d.ts",
27
- "index.d.cts",
28
- "index.d.mts",
29
- "schema"
30
- ],
31
- "sideEffects": false,
32
- "license": "ISC",
33
- "dependencies": {
34
- "@rootintf/json-msg": "^4.0.2-api.4"
35
- }
36
- }
@@ -1,131 +0,0 @@
1
- {
2
- "$id": "https://root-interface.se/protocols/TwoPhW",
3
- "$schema": "https://json-schema.org/draft/2019-09/schema",
4
- "schemas": {
5
- "https://root-interface.se/protocols/TwoPhW/definitions": {
6
- "$id": "https://root-interface.se/protocols/TwoPhW/definitions",
7
- "$schema": "https://json-schema.org/draft/2019-09/schema",
8
- "definitions": {
9
- "_v": {
10
- "const": "2"
11
- }
12
- }
13
- },
14
- "https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp": {
15
- "$id": "https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp",
16
- "$schema": "https://json-schema.org/draft/2019-09/schema",
17
- "$comment": "phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.",
18
- "type": "object",
19
- "required": [
20
- "warp",
21
- "2PhW"
22
- ],
23
- "properties": {
24
- "warp": {
25
- "type": "object",
26
- "required": [
27
- "id",
28
- "user",
29
- "hyperport",
30
- "ttl_msec"
31
- ],
32
- "properties": {
33
- "id": {
34
- "type": "string"
35
- },
36
- "ttl_msec": {
37
- "type": "integer",
38
- "exclusiveMinimum": 0
39
- },
40
- "instantaneous": {
41
- "type": "boolean"
42
- }
43
- }
44
- },
45
- "2PhW": {
46
- "$ref": "definitions#/definitions/_v"
47
- }
48
- },
49
- "x-base": "JSON_Msg"
50
- },
51
- "https://root-interface.se/protocols/TwoPhW/JSON_AckWarp": {
52
- "$id": "https://root-interface.se/protocols/TwoPhW/JSON_AckWarp",
53
- "$schema": "https://json-schema.org/draft/2019-09/schema",
54
- "$comment": "phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.",
55
- "type": "object",
56
- "required": [
57
- "ack",
58
- "2PhW"
59
- ],
60
- "properties": {
61
- "_cause": {
62
- "$ref": "JSON_MsgWarp"
63
- },
64
- "ack": {
65
- "type": "object"
66
- },
67
- "2PhW": {
68
- "$ref": "definitions#/definitions/_v"
69
- }
70
- },
71
- "x-base": "JSON_Ack"
72
- },
73
- "https://root-interface.se/protocols/TwoPhW/JSON_EffEngage": {
74
- "$id": "https://root-interface.se/protocols/TwoPhW/JSON_EffEngage",
75
- "$schema": "https://json-schema.org/draft/2019-09/schema",
76
- "$comment": "phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).",
77
- "type": "object",
78
- "required": [
79
- "engage",
80
- "2PhW"
81
- ],
82
- "properties": {
83
- "_cause": {
84
- "$ref": "JSON_MsgWarp"
85
- },
86
- "engage": {
87
- "type": "object",
88
- "required": [
89
- "ok",
90
- "rtt_msec"
91
- ],
92
- "properties": {
93
- "ok": {
94
- "type": "boolean"
95
- },
96
- "rtt_msec": {
97
- "type": "integer",
98
- "minimum": 0
99
- }
100
- }
101
- },
102
- "2PhW": {
103
- "$ref": "definitions#/definitions/_v"
104
- }
105
- },
106
- "x-base": "JSON_Eff"
107
- },
108
- "https://root-interface.se/protocols/TwoPhW/JSON_AckEngage": {
109
- "$id": "https://root-interface.se/protocols/TwoPhW/JSON_AckEngage",
110
- "$schema": "https://json-schema.org/draft/2019-09/schema",
111
- "$comment": "phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.",
112
- "type": "object",
113
- "required": [
114
- "ack",
115
- "2PhW"
116
- ],
117
- "properties": {
118
- "_cause": {
119
- "$ref": "JSON_EffEngage"
120
- },
121
- "ack": {
122
- "type": "object"
123
- },
124
- "2PhW": {
125
- "$ref": "definitions#/definitions/_v"
126
- }
127
- },
128
- "x-base": "JSON_Ack"
129
- }
130
- }
131
- }
@@ -1 +0,0 @@
1
- "use strict";exports._v_JSON_MsgWarp = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.","type":"object","required":["warp","2PhW"],"properties":{"warp":{"type":"object","required":["id","user","hyperport","ttl_msec"],"properties":{"id":{"type":"string"},"ttl_msec":{"type":"integer","exclusiveMinimum":0},"instantaneous":{"type":"boolean"}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Msg"};const schema23 = {"const":"2"};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate18.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.warp === undefined) && (missing0 = "warp")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.warp !== undefined){let data0 = data.warp;const _errs3 = errors;if(errors === _errs3){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((((data0.id === undefined) && (missing1 = "id")) || ((data0.user === undefined) && (missing1 = "user"))) || ((data0.hyperport === undefined) && (missing1 = "hyperport"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.id !== undefined){const _errs5 = errors;if(typeof data0.id !== "string"){validate18.errors = [{instancePath:instancePath+"/warp/id",schemaPath:"#/properties/warp/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data2 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data2 == "number") && (isFinite(data2))){if(data2 <= 0 || isNaN(data2)){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.instantaneous !== undefined){const _errs9 = errors;if(typeof data0.instantaneous !== "boolean"){validate18.errors = [{instancePath:instancePath+"/warp/instantaneous",schemaPath:"#/properties/warp/properties/instantaneous/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}}else {validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs11 = errors;if("2" !== data["2PhW"]){validate18.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}validate18.evaluated = {"props":{"warp":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_AckWarp = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate20.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_EffEngage = validate22;const schema26 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_EffEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).","type":"object","required":["engage","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"engage":{"type":"object","required":["ok","rtt_msec"],"properties":{"ok":{"type":"boolean"},"rtt_msec":{"type":"integer","minimum":0}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Eff"};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_EffEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.engage === undefined) && (missing0 = "engage")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.engage !== undefined){let data1 = data.engage;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing1;if(((data1.ok === undefined) && (missing1 = "ok")) || ((data1.rtt_msec === undefined) && (missing1 = "rtt_msec"))){validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data1.ok !== undefined){const _errs6 = errors;if(typeof data1.ok !== "boolean"){validate22.errors = [{instancePath:instancePath+"/engage/ok",schemaPath:"#/properties/engage/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data1.rtt_msec !== undefined){let data3 = data1.rtt_msec;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs8){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}else {validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs10 = errors;if("2" !== data["2PhW"]){validate22.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":{"_cause":true,"engage":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};exports._v_JSON_AckEngage = validate24;const schema28 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_EffEngage"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate22(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate24.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate24.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};
@@ -1 +0,0 @@
1
- "use strict";export const _v_JSON_MsgWarp = validate18;const schema21 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, sender -> receiver: the request to warp `user` to `hyperport`. `id` names the whole exchange (every later message reaches it through its _cause chain). `ttl_msec` is measured from this message's own dt. `instantaneous` = single phase: the AckWarp concludes the exchange, no Engage follows.","type":"object","required":["warp","2PhW"],"properties":{"warp":{"type":"object","required":["id","user","hyperport","ttl_msec"],"properties":{"id":{"type":"string"},"ttl_msec":{"type":"integer","exclusiveMinimum":0},"instantaneous":{"type":"boolean"}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Msg"};const schema23 = {"const":"2"};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_MsgWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate18.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.warp === undefined) && (missing0 = "warp")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.warp !== undefined){let data0 = data.warp;const _errs3 = errors;if(errors === _errs3){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((((data0.id === undefined) && (missing1 = "id")) || ((data0.user === undefined) && (missing1 = "user"))) || ((data0.hyperport === undefined) && (missing1 = "hyperport"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.id !== undefined){const _errs5 = errors;if(typeof data0.id !== "string"){validate18.errors = [{instancePath:instancePath+"/warp/id",schemaPath:"#/properties/warp/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data2 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data2 == "number") && (isFinite(data2))){if(data2 <= 0 || isNaN(data2)){validate18.errors = [{instancePath:instancePath+"/warp/ttl_msec",schemaPath:"#/properties/warp/properties/ttl_msec/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.instantaneous !== undefined){const _errs9 = errors;if(typeof data0.instantaneous !== "boolean"){validate18.errors = [{instancePath:instancePath+"/warp/instantaneous",schemaPath:"#/properties/warp/properties/instantaneous/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}}else {validate18.errors = [{instancePath:instancePath+"/warp",schemaPath:"#/properties/warp/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs11 = errors;if("2" !== data["2PhW"]){validate18.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}validate18.evaluated = {"props":{"warp":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_AckWarp = validate20;const schema24 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckWarp","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 1, receiver -> sender: the verdict on a JSON_MsgWarp, which rides in the base JSON_Ack's _cause. The base's ok flag IS the verdict; ok:false ends the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckWarp" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate20.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_EffEngage = validate22;const schema26 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_EffEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, sender -> receiver: commit the warp. _cause is the JSON_MsgWarp itself (not its ack). `rtt_msec` is the round trip the sender measured, from the warp's dt to the creation of this engage; it extends the window in which the JSON_AckEngage is accepted. It is capped at 2 * ttl_msec; a schema cannot relate two fields, so the cap is enforced by the protocol (an engage that claims more is refused).","type":"object","required":["engage","2PhW"],"properties":{"_cause":{"$ref":"JSON_MsgWarp"},"engage":{"type":"object","required":["ok","rtt_msec"],"properties":{"ok":{"type":"boolean"},"rtt_msec":{"type":"integer","minimum":0}}},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Eff"};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_EffEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.engage === undefined) && (missing0 = "engage")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate18(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.engage !== undefined){let data1 = data.engage;const _errs4 = errors;if(errors === _errs4){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){let missing1;if(((data1.ok === undefined) && (missing1 = "ok")) || ((data1.rtt_msec === undefined) && (missing1 = "rtt_msec"))){validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data1.ok !== undefined){const _errs6 = errors;if(typeof data1.ok !== "boolean"){validate22.errors = [{instancePath:instancePath+"/engage/ok",schemaPath:"#/properties/engage/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data1.rtt_msec !== undefined){let data3 = data1.rtt_msec;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs8){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate22.errors = [{instancePath:instancePath+"/engage/rtt_msec",schemaPath:"#/properties/engage/properties/rtt_msec/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}else {validate22.errors = [{instancePath:instancePath+"/engage",schemaPath:"#/properties/engage/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs10 = errors;if("2" !== data["2PhW"]){validate22.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":{"_cause":true,"engage":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};export const _v_JSON_AckEngage = validate24;const schema28 = {"$id":"https://root-interface.se/protocols/TwoPhW/JSON_AckEngage","$schema":"https://json-schema.org/draft/2019-09/schema","$comment":"phase 2, receiver -> sender: the verdict on a JSON_EffEngage, which rides in the base JSON_Ack's _cause (its own _cause is the JSON_MsgWarp). Concludes the exchange.","type":"object","required":["ack","2PhW"],"properties":{"_cause":{"$ref":"JSON_EffEngage"},"ack":{"type":"object"},"2PhW":{"$ref":"definitions#/definitions/_v"}},"x-base":"JSON_Ack"};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://root-interface.se/protocols/TwoPhW/JSON_AckEngage" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.ack === undefined) && (missing0 = "ack")) || ((data["2PhW"] === undefined) && (missing0 = "2PhW"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data._cause !== undefined){const _errs3 = errors;if(!(validate22(data._cause, {instancePath:instancePath+"/_cause",parentData:data,parentDataProperty:"_cause",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.ack !== undefined){let data1 = data.ack;const _errs4 = errors;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){validate24.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data["2PhW"] !== undefined){const _errs6 = errors;if("2" !== data["2PhW"]){validate24.errors = [{instancePath:instancePath+"/2PhW",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"_cause":true,"ack":true,"2PhW":true},"dynamicProps":false,"dynamicItems":false};
@@ -1,13 +0,0 @@
1
- // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
- "use strict";
3
- const PKG_VERSION = "3.1.29";
4
-
5
- // friendly name (the config registry key) -> sha256 of the schema bytes this target generated from
6
- const INTERFACES = Object.freeze({
7
- "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a",
8
- });
9
-
10
- // the pin for one interface; null when the interface is not in this target
11
- const sha256 = (name) => Object.prototype.hasOwnProperty.call(INTERFACES, name) ? INTERFACES[name] : null;
12
-
13
- module.exports = { PKG_VERSION, INTERFACES, sha256 };
@@ -1,6 +0,0 @@
1
- // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
- export declare const PKG_VERSION: "3.1.29";
3
- export declare const INTERFACES: {
4
- readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
- };
6
- export declare function sha256(name: string): string | null;
@@ -1,6 +0,0 @@
1
- // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
- export declare const PKG_VERSION: "3.1.29";
3
- export declare const INTERFACES: {
4
- readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
- };
6
- export declare function sha256(name: string): string | null;
@@ -1,6 +0,0 @@
1
- // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
- export declare const PKG_VERSION: "3.1.29";
3
- export declare const INTERFACES: {
4
- readonly "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a";
5
- };
6
- export declare function sha256(name: string): string | null;
@@ -1,10 +0,0 @@
1
- // GENERATED by iface-gen from ifacegenconfig.json — DO NOT EDIT
2
- export const PKG_VERSION = "3.1.29";
3
-
4
- // friendly name (the config registry key) -> sha256 of the schema bytes this target generated from
5
- export const INTERFACES = Object.freeze({
6
- "TwoPhW": "5fdbd096ad99962b7e3d77cde8bd355fe180c859f35a61cfd07ee36b96c6700a",
7
- });
8
-
9
- // the pin for one interface; null when the interface is not in this target
10
- export const sha256 = (name) => Object.prototype.hasOwnProperty.call(INTERFACES, name) ? INTERFACES[name] : null;