@xyo-network/boundwitness-model 2.75.0 → 2.75.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/browser/index.d.cts +3 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +2 -36
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/isBoundWitnessPayload.d.cts +6 -0
- package/dist/browser/isBoundWitnessPayload.d.cts.map +1 -0
- package/dist/browser/isBoundWitnessPayload.js +2 -7
- package/dist/browser/isBoundWitnessPayload.js.map +1 -1
- package/dist/browser/models/BoundWitness.d.cts +20 -0
- package/dist/browser/models/BoundWitness.d.cts.map +1 -0
- package/dist/browser/models/BoundWitness.js +3 -6
- package/dist/browser/models/BoundWitness.js.map +1 -1
- package/dist/browser/models/BoundWitnessJsonSchema.d.cts +37 -0
- package/dist/browser/models/BoundWitnessJsonSchema.d.cts.map +1 -0
- package/dist/browser/models/BoundWitnessJsonSchema.js +1 -2
- package/dist/browser/models/BoundWitnessJsonSchema.js.map +1 -1
- package/dist/browser/models/BoundWitnessSchema.d.cts +3 -0
- package/dist/browser/models/BoundWitnessSchema.d.cts.map +1 -0
- package/dist/browser/models/BoundWitnessSchema.js +1 -2
- package/dist/browser/models/BoundWitnessSchema.js.map +1 -1
- package/dist/browser/models/index.d.cts +4 -0
- package/dist/browser/models/index.d.cts.map +1 -0
- package/dist/browser/models/index.js +3 -29
- package/dist/browser/models/index.js.map +1 -1
- package/dist/docs.json +2094 -0
- package/dist/node/index.d.cts +3 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +48 -5
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +36 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/isBoundWitnessPayload.d.cts +6 -0
- package/dist/node/isBoundWitnessPayload.d.cts.map +1 -0
- package/dist/node/isBoundWitnessPayload.js +8 -2
- package/dist/node/isBoundWitnessPayload.js.map +1 -1
- package/dist/node/isBoundWitnessPayload.mjs +7 -2
- package/dist/node/isBoundWitnessPayload.mjs.map +1 -1
- package/dist/node/models/BoundWitness.d.cts +20 -0
- package/dist/node/models/BoundWitness.d.cts.map +1 -0
- package/dist/node/models/BoundWitness.js +9 -3
- package/dist/node/models/BoundWitness.js.map +1 -1
- package/dist/node/models/BoundWitness.mjs +6 -3
- package/dist/node/models/BoundWitness.mjs.map +1 -1
- package/dist/node/models/BoundWitnessJsonSchema.d.cts +37 -0
- package/dist/node/models/BoundWitnessJsonSchema.d.cts.map +1 -0
- package/dist/node/models/BoundWitnessJsonSchema.js +3 -1
- package/dist/node/models/BoundWitnessJsonSchema.js.map +1 -1
- package/dist/node/models/BoundWitnessJsonSchema.mjs +2 -1
- package/dist/node/models/BoundWitnessJsonSchema.mjs.map +1 -1
- package/dist/node/models/BoundWitnessSchema.d.cts +3 -0
- package/dist/node/models/BoundWitnessSchema.d.cts.map +1 -0
- package/dist/node/models/BoundWitnessSchema.js +3 -1
- package/dist/node/models/BoundWitnessSchema.js.map +1 -1
- package/dist/node/models/BoundWitnessSchema.mjs +2 -1
- package/dist/node/models/BoundWitnessSchema.mjs.map +1 -1
- package/dist/node/models/index.d.cts +4 -0
- package/dist/node/models/index.d.cts.map +1 -0
- package/dist/node/models/index.js +40 -7
- package/dist/node/models/index.js.map +1 -1
- package/dist/node/models/index.mjs +29 -3
- package/dist/node/models/index.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,UAAU,CAAA"}
|
package/dist/node/index.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,15 +15,54 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
15
|
}
|
|
12
16
|
return to;
|
|
13
17
|
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
16
21
|
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
BoundWitnessJsonSchema: () => BoundWitnessJsonSchema,
|
|
24
|
+
BoundWitnessSchema: () => BoundWitnessSchema,
|
|
25
|
+
isBoundWitness: () => isBoundWitness,
|
|
26
|
+
isBoundWitnessPayload: () => isBoundWitnessPayload,
|
|
27
|
+
notBoundWitness: () => notBoundWitness
|
|
28
|
+
});
|
|
17
29
|
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
|
|
31
|
+
// src/isBoundWitnessPayload.ts
|
|
32
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
33
|
+
|
|
34
|
+
// src/models/BoundWitnessSchema.ts
|
|
35
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
36
|
+
|
|
37
|
+
// src/models/BoundWitness.ts
|
|
38
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
39
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
40
|
+
|
|
41
|
+
// src/models/BoundWitnessJsonSchema.ts
|
|
42
|
+
var BoundWitnessJsonSchema = () => {
|
|
43
|
+
return {
|
|
44
|
+
$id: "https://schemas.xyo.network/2.0/boundwitness",
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
properties: {
|
|
47
|
+
addresses: { items: { type: "string" }, type: "array" },
|
|
48
|
+
payload_hashes: { items: { type: "string" }, type: "array" },
|
|
49
|
+
payload_schemas: { items: { type: "string" }, type: "array" },
|
|
50
|
+
previous_hashes: { items: { nullable: true, type: "string" }, type: "array" },
|
|
51
|
+
schema: { type: "string" }
|
|
52
|
+
},
|
|
53
|
+
required: ["addresses", "payload_hashes", "payload_schemas", "previous_hashes", "schema"],
|
|
54
|
+
type: "object"
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/isBoundWitnessPayload.ts
|
|
59
|
+
var isBoundWitnessPayload = (0, import_payload_model.isPayloadOfSchemaType)(BoundWitnessSchema);
|
|
20
60
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
61
|
0 && (module.exports = {
|
|
22
|
-
|
|
23
|
-
|
|
62
|
+
BoundWitnessJsonSchema,
|
|
63
|
+
BoundWitnessSchema,
|
|
64
|
+
isBoundWitness,
|
|
65
|
+
isBoundWitnessPayload,
|
|
66
|
+
notBoundWitness
|
|
24
67
|
});
|
|
25
68
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './isBoundWitnessPayload'\nexport * from './models'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/isBoundWitnessPayload.ts","../../src/models/BoundWitnessSchema.ts","../../src/models/BoundWitness.ts","../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["export * from './isBoundWitnessPayload'\nexport * from './models'\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n","//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAsC;;;ACC/B,IAAM,qBAAyC;;;ACmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;;;AClB5E,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;;;AHbO,IAAM,4BAAwB,4CAAoC,kBAAkB;","names":[]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// src/isBoundWitnessPayload.ts
|
|
2
|
+
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
3
|
+
|
|
4
|
+
// src/models/BoundWitnessSchema.ts
|
|
5
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
6
|
+
|
|
7
|
+
// src/models/BoundWitness.ts
|
|
8
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
9
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
10
|
+
|
|
11
|
+
// src/models/BoundWitnessJsonSchema.ts
|
|
12
|
+
var BoundWitnessJsonSchema = () => {
|
|
13
|
+
return {
|
|
14
|
+
$id: "https://schemas.xyo.network/2.0/boundwitness",
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
properties: {
|
|
17
|
+
addresses: { items: { type: "string" }, type: "array" },
|
|
18
|
+
payload_hashes: { items: { type: "string" }, type: "array" },
|
|
19
|
+
payload_schemas: { items: { type: "string" }, type: "array" },
|
|
20
|
+
previous_hashes: { items: { nullable: true, type: "string" }, type: "array" },
|
|
21
|
+
schema: { type: "string" }
|
|
22
|
+
},
|
|
23
|
+
required: ["addresses", "payload_hashes", "payload_schemas", "previous_hashes", "schema"],
|
|
24
|
+
type: "object"
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/isBoundWitnessPayload.ts
|
|
29
|
+
var isBoundWitnessPayload = isPayloadOfSchemaType(BoundWitnessSchema);
|
|
30
|
+
export {
|
|
31
|
+
BoundWitnessJsonSchema,
|
|
32
|
+
BoundWitnessSchema,
|
|
33
|
+
isBoundWitness,
|
|
34
|
+
isBoundWitnessPayload,
|
|
35
|
+
notBoundWitness
|
|
36
|
+
};
|
|
3
37
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/isBoundWitnessPayload.ts","../../src/models/BoundWitnessSchema.ts","../../src/models/BoundWitness.ts","../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n","//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";AAAA,SAAS,6BAA6B;;;ACC/B,IAAM,qBAAyC;;;ACmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;;;AClB5E,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;;;AHbO,IAAM,wBAAwB,sBAAoC,kBAAkB;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const isBoundWitnessPayload: (x: {
|
|
2
|
+
schema: string;
|
|
3
|
+
} & import("@xyo-network/payload-model").PayloadFields) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./models").BoundWitnessFields & {
|
|
4
|
+
schema: "network.xyo.boundwitness";
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=isBoundWitnessPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBoundWitnessPayload.d.ts","sourceRoot":"","sources":["../../src/isBoundWitnessPayload.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;CAA0D,CAAA"}
|
|
@@ -16,14 +16,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/isBoundWitnessPayload.ts
|
|
19
21
|
var isBoundWitnessPayload_exports = {};
|
|
20
22
|
__export(isBoundWitnessPayload_exports, {
|
|
21
23
|
isBoundWitnessPayload: () => isBoundWitnessPayload
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(isBoundWitnessPayload_exports);
|
|
24
26
|
var import_payload_model = require("@xyo-network/payload-model");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
// src/models/BoundWitnessSchema.ts
|
|
29
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
30
|
+
|
|
31
|
+
// src/isBoundWitnessPayload.ts
|
|
32
|
+
var isBoundWitnessPayload = (0, import_payload_model.isPayloadOfSchemaType)(BoundWitnessSchema);
|
|
27
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
34
|
0 && (module.exports = {
|
|
29
35
|
isBoundWitnessPayload
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isBoundWitnessPayload.ts"],"sourcesContent":["import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/isBoundWitnessPayload.ts","../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAsC;;;ACC/B,IAAM,qBAAyC;;;ADG/C,IAAM,4BAAwB,4CAAoC,kBAAkB;","names":[]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
// src/isBoundWitnessPayload.ts
|
|
1
2
|
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// src/models/BoundWitnessSchema.ts
|
|
5
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
6
|
+
|
|
7
|
+
// src/isBoundWitnessPayload.ts
|
|
8
|
+
var isBoundWitnessPayload = isPayloadOfSchemaType(BoundWitnessSchema);
|
|
4
9
|
export {
|
|
5
10
|
isBoundWitnessPayload
|
|
6
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/isBoundWitnessPayload.ts"],"sourcesContent":["import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n"],"mappings":"AAAA,SAAS,6BAA6B
|
|
1
|
+
{"version":3,"sources":["../../src/isBoundWitnessPayload.ts","../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { BoundWitness, BoundWitnessSchema } from './models'\n\nexport const isBoundWitnessPayload = isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":";AAAA,SAAS,6BAA6B;;;ACC/B,IAAM,qBAAyC;;;ADG/C,IAAM,wBAAwB,sBAAoC,kBAAkB;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
2
|
+
import { BoundWitnessSchema } from './BoundWitnessSchema';
|
|
3
|
+
export type BoundWitnessFields = {
|
|
4
|
+
_signatures: string[];
|
|
5
|
+
addresses: string[];
|
|
6
|
+
blockNumber?: number;
|
|
7
|
+
error_hashes?: string[];
|
|
8
|
+
payload_hashes: string[];
|
|
9
|
+
payload_schemas: string[];
|
|
10
|
+
previous_hashes: (string | null)[];
|
|
11
|
+
timestamp?: number;
|
|
12
|
+
};
|
|
13
|
+
export type BoundWitness<T extends Payload | void = void> = Payload<T extends Payload ? BoundWitnessFields & T : BoundWitnessFields, T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
14
|
+
export declare const isBoundWitness: (x?: Payload | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & BoundWitnessFields & {
|
|
15
|
+
schema: "network.xyo.boundwitness";
|
|
16
|
+
};
|
|
17
|
+
export declare const notBoundWitness: (x?: Payload | null) => x is {
|
|
18
|
+
schema: string;
|
|
19
|
+
} & import("@xyo-network/payload-model").PayloadFields;
|
|
20
|
+
//# sourceMappingURL=BoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/models/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CACjE,CAAC,SAAS,OAAO,GAAG,kBAAkB,GAAG,CAAC,GAAG,kBAAkB,EAC/D,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,kBAAkB,CACrD,CAAA;AAED,eAAO,MAAM,cAAc,OAAQ,OAAO,GAAG,IAAI;;CAAwD,CAAA;AACzG,eAAO,MAAM,eAAe,OAAQ,OAAO,GAAG,IAAI;;sDAAmD,CAAA"}
|
|
@@ -16,15 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/models/BoundWitness.ts
|
|
19
21
|
var BoundWitness_exports = {};
|
|
20
22
|
__export(BoundWitness_exports, {
|
|
21
23
|
isBoundWitness: () => isBoundWitness,
|
|
22
24
|
notBoundWitness: () => notBoundWitness
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(BoundWitness_exports);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
// src/models/BoundWitnessSchema.ts
|
|
29
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
30
|
+
|
|
31
|
+
// src/models/BoundWitness.ts
|
|
32
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
33
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
28
34
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29
35
|
0 && (module.exports = {
|
|
30
36
|
isBoundWitness,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitness.ts"],"sourcesContent":["import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitness.ts","../../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,qBAAyC;;;ADmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;","names":[]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/models/BoundWitnessSchema.ts
|
|
2
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
3
|
+
|
|
4
|
+
// src/models/BoundWitness.ts
|
|
5
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
6
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
4
7
|
export {
|
|
5
8
|
isBoundWitness,
|
|
6
9
|
notBoundWitness
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitness.ts"],"sourcesContent":["import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts","../../../src/models/BoundWitness.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n"],"mappings":";AACO,IAAM,qBAAyC;;;ACmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const BoundWitnessJsonSchema: () => {
|
|
2
|
+
$id: string;
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
properties: {
|
|
5
|
+
addresses: {
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
payload_hashes: {
|
|
12
|
+
items: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
payload_schemas: {
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
previous_hashes: {
|
|
24
|
+
items: {
|
|
25
|
+
nullable: boolean;
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
schema: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=BoundWitnessJsonSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitnessJsonSchema.d.ts","sourceRoot":"","sources":["../../../src/models/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
|
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/models/BoundWitnessJsonSchema.ts
|
|
19
21
|
var BoundWitnessJsonSchema_exports = {};
|
|
20
22
|
__export(BoundWitnessJsonSchema_exports, {
|
|
21
23
|
BoundWitnessJsonSchema: () => BoundWitnessJsonSchema
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(BoundWitnessJsonSchema_exports);
|
|
24
|
-
|
|
26
|
+
var BoundWitnessJsonSchema = () => {
|
|
25
27
|
return {
|
|
26
28
|
$id: "https://schemas.xyo.network/2.0/boundwitness",
|
|
27
29
|
additionalProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":"AAGO,
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";AAGO,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/models/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAC3D,eAAO,MAAM,kBAAkB,EAAE,kBAA+C,CAAA"}
|
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/models/BoundWitnessSchema.ts
|
|
19
21
|
var BoundWitnessSchema_exports = {};
|
|
20
22
|
__export(BoundWitnessSchema_exports, {
|
|
21
23
|
BoundWitnessSchema: () => BoundWitnessSchema
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(BoundWitnessSchema_exports);
|
|
24
|
-
|
|
26
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
29
|
BoundWitnessSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,qBAAyC;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":"AACO,
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n"],"mappings":";AACO,IAAM,qBAAyC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA"}
|
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,17 +15,46 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
15
|
}
|
|
12
16
|
return to;
|
|
13
17
|
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/models/index.ts
|
|
16
21
|
var models_exports = {};
|
|
22
|
+
__export(models_exports, {
|
|
23
|
+
BoundWitnessJsonSchema: () => BoundWitnessJsonSchema,
|
|
24
|
+
BoundWitnessSchema: () => BoundWitnessSchema,
|
|
25
|
+
isBoundWitness: () => isBoundWitness,
|
|
26
|
+
notBoundWitness: () => notBoundWitness
|
|
27
|
+
});
|
|
17
28
|
module.exports = __toCommonJS(models_exports);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
|
|
30
|
+
// src/models/BoundWitnessSchema.ts
|
|
31
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
32
|
+
|
|
33
|
+
// src/models/BoundWitness.ts
|
|
34
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
35
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
36
|
+
|
|
37
|
+
// src/models/BoundWitnessJsonSchema.ts
|
|
38
|
+
var BoundWitnessJsonSchema = () => {
|
|
39
|
+
return {
|
|
40
|
+
$id: "https://schemas.xyo.network/2.0/boundwitness",
|
|
41
|
+
additionalProperties: false,
|
|
42
|
+
properties: {
|
|
43
|
+
addresses: { items: { type: "string" }, type: "array" },
|
|
44
|
+
payload_hashes: { items: { type: "string" }, type: "array" },
|
|
45
|
+
payload_schemas: { items: { type: "string" }, type: "array" },
|
|
46
|
+
previous_hashes: { items: { nullable: true, type: "string" }, type: "array" },
|
|
47
|
+
schema: { type: "string" }
|
|
48
|
+
},
|
|
49
|
+
required: ["addresses", "payload_hashes", "payload_schemas", "previous_hashes", "schema"],
|
|
50
|
+
type: "object"
|
|
51
|
+
};
|
|
52
|
+
};
|
|
21
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22
54
|
0 && (module.exports = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
BoundWitnessJsonSchema,
|
|
56
|
+
BoundWitnessSchema,
|
|
57
|
+
isBoundWitness,
|
|
58
|
+
notBoundWitness
|
|
26
59
|
});
|
|
27
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/index.ts"],"sourcesContent":["export * from './BoundWitness'\nexport * from './BoundWitnessJsonSchema'\nexport * from './BoundWitnessSchema'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/models/index.ts","../../../src/models/BoundWitnessSchema.ts","../../../src/models/BoundWitness.ts","../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["export * from './BoundWitness'\nexport * from './BoundWitnessJsonSchema'\nexport * from './BoundWitnessSchema'\n","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n","//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,qBAAyC;;;ACmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;;;AClB5E,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// src/models/BoundWitnessSchema.ts
|
|
2
|
+
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
3
|
+
|
|
4
|
+
// src/models/BoundWitness.ts
|
|
5
|
+
var isBoundWitness = (x) => (x == null ? void 0 : x.schema) === BoundWitnessSchema;
|
|
6
|
+
var notBoundWitness = (x) => (x == null ? void 0 : x.schema) !== BoundWitnessSchema;
|
|
7
|
+
|
|
8
|
+
// src/models/BoundWitnessJsonSchema.ts
|
|
9
|
+
var BoundWitnessJsonSchema = () => {
|
|
10
|
+
return {
|
|
11
|
+
$id: "https://schemas.xyo.network/2.0/boundwitness",
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
properties: {
|
|
14
|
+
addresses: { items: { type: "string" }, type: "array" },
|
|
15
|
+
payload_hashes: { items: { type: "string" }, type: "array" },
|
|
16
|
+
payload_schemas: { items: { type: "string" }, type: "array" },
|
|
17
|
+
previous_hashes: { items: { nullable: true, type: "string" }, type: "array" },
|
|
18
|
+
schema: { type: "string" }
|
|
19
|
+
},
|
|
20
|
+
required: ["addresses", "payload_hashes", "payload_schemas", "previous_hashes", "schema"],
|
|
21
|
+
type: "object"
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
BoundWitnessJsonSchema,
|
|
26
|
+
BoundWitnessSchema,
|
|
27
|
+
isBoundWitness,
|
|
28
|
+
notBoundWitness
|
|
29
|
+
};
|
|
4
30
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/models/
|
|
1
|
+
{"version":3,"sources":["../../../src/models/BoundWitnessSchema.ts","../../../src/models/BoundWitness.ts","../../../src/models/BoundWitnessJsonSchema.ts"],"sourcesContent":["export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import { Payload } from '@xyo-network/payload-model'\n\nimport { BoundWitnessSchema } from './BoundWitnessSchema'\n\nexport type BoundWitnessFields = {\n _signatures: string[]\n addresses: string[]\n blockNumber?: number\n error_hashes?: string[]\n payload_hashes: string[]\n payload_schemas: string[]\n previous_hashes: (string | null)[]\n timestamp?: number\n}\n\nexport type BoundWitness<T extends Payload | void = void> = Payload<\n T extends Payload ? BoundWitnessFields & T : BoundWitnessFields,\n T extends Payload ? T['schema'] : BoundWitnessSchema\n>\n\nexport const isBoundWitness = (x?: Payload | null): x is BoundWitness => x?.schema === BoundWitnessSchema\nexport const notBoundWitness = (x?: Payload | null): x is Payload => x?.schema !== BoundWitnessSchema\n","//Should type as JSONSchemaType<BoundWitness> once ajv/eslint issue is fixed\n//https://github.com/microsoft/TypeScript/issues/44851\n\nexport const BoundWitnessJsonSchema = () => {\n return {\n $id: 'https://schemas.xyo.network/2.0/boundwitness',\n additionalProperties: false,\n properties: {\n addresses: { items: { type: 'string' }, type: 'array' },\n payload_hashes: { items: { type: 'string' }, type: 'array' },\n payload_schemas: { items: { type: 'string' }, type: 'array' },\n previous_hashes: { items: { nullable: true, type: 'string' }, type: 'array' },\n schema: { type: 'string' },\n },\n required: ['addresses', 'payload_hashes', 'payload_schemas', 'previous_hashes', 'schema'],\n type: 'object',\n }\n}\n"],"mappings":";AACO,IAAM,qBAAyC;;;ACmB/C,IAAM,iBAAiB,CAAC,OAA0C,uBAAG,YAAW;AAChF,IAAM,kBAAkB,CAAC,OAAqC,uBAAG,YAAW;;;AClB5E,IAAM,yBAAyB,MAAM;AAC1C,SAAO;AAAA,IACL,KAAK;AAAA,IACL,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACV,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MACtD,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC3D,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5D,iBAAiB,EAAE,OAAO,EAAE,UAAU,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ;AAAA,MAC5E,QAAQ,EAAE,MAAM,SAAS;AAAA,IAC3B;AAAA,IACA,UAAU,CAAC,aAAa,kBAAkB,mBAAmB,mBAAmB,QAAQ;AAAA,IACxF,MAAM;AAAA,EACR;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
15
|
-
"@xylabs/tsconfig": "^3.0.
|
|
14
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.77",
|
|
15
|
+
"@xylabs/tsconfig": "^3.0.77",
|
|
16
16
|
"typescript": "^5.2.2"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@xyo-network/payload-model": "~2.75.
|
|
19
|
+
"@xyo-network/payload-model": "~2.75.1"
|
|
20
20
|
},
|
|
21
21
|
"docs": "dist/docs.json",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"browser": {
|
|
25
25
|
"require": {
|
|
26
|
-
"types": "./dist/browser/index.d.
|
|
26
|
+
"types": "./dist/browser/index.d.cts",
|
|
27
27
|
"default": "./dist/browser/index.cjs"
|
|
28
28
|
},
|
|
29
29
|
"import": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
},
|
|
61
61
|
"sideEffects": false,
|
|
62
62
|
"types": "dist/node/index.d.ts",
|
|
63
|
-
"version": "2.75.
|
|
63
|
+
"version": "2.75.1"
|
|
64
64
|
}
|