@xyo-network/boundwitness-model 3.0.7 → 3.0.9
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/BoundWitness/BoundWitness.d.ts +19 -0
- package/dist/browser/BoundWitness/BoundWitness.d.ts.map +1 -0
- package/dist/browser/BoundWitness/BoundWitnessJsonSchema.d.ts +37 -0
- package/dist/browser/BoundWitness/BoundWitnessJsonSchema.d.ts.map +1 -0
- package/dist/browser/BoundWitness/BoundWitnessSchema.d.ts +3 -0
- package/dist/browser/BoundWitness/BoundWitnessSchema.d.ts.map +1 -0
- package/dist/browser/BoundWitness/index.d.ts +4 -0
- package/dist/browser/BoundWitness/index.d.ts.map +1 -0
- package/dist/browser/QueryBoundWitness.d.ts +15 -0
- package/dist/browser/QueryBoundWitness.d.ts.map +1 -0
- package/dist/browser/index.d.ts +4 -84
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs +5 -1
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/isBoundWitness.d.ts +14 -0
- package/dist/browser/isBoundWitness.d.ts.map +1 -0
- package/dist/neutral/BoundWitness/BoundWitness.d.ts +19 -0
- package/dist/neutral/BoundWitness/BoundWitness.d.ts.map +1 -0
- package/dist/neutral/BoundWitness/BoundWitnessJsonSchema.d.ts +37 -0
- package/dist/neutral/BoundWitness/BoundWitnessJsonSchema.d.ts.map +1 -0
- package/dist/neutral/BoundWitness/BoundWitnessSchema.d.ts +3 -0
- package/dist/neutral/BoundWitness/BoundWitnessSchema.d.ts.map +1 -0
- package/dist/neutral/BoundWitness/index.d.ts +4 -0
- package/dist/neutral/BoundWitness/index.d.ts.map +1 -0
- package/dist/neutral/QueryBoundWitness.d.ts +15 -0
- package/dist/neutral/QueryBoundWitness.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +4 -84
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +5 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/isBoundWitness.d.ts +14 -0
- package/dist/neutral/isBoundWitness.d.ts.map +1 -0
- package/dist/node/BoundWitness/BoundWitness.d.ts +19 -0
- package/dist/node/BoundWitness/BoundWitness.d.ts.map +1 -0
- package/dist/node/BoundWitness/BoundWitnessJsonSchema.d.ts +37 -0
- package/dist/node/BoundWitness/BoundWitnessJsonSchema.d.ts.map +1 -0
- package/dist/node/BoundWitness/BoundWitnessSchema.d.ts +3 -0
- package/dist/node/BoundWitness/BoundWitnessSchema.d.ts.map +1 -0
- package/dist/node/BoundWitness/index.d.ts +4 -0
- package/dist/node/BoundWitness/index.d.ts.map +1 -0
- package/dist/node/QueryBoundWitness.d.ts +15 -0
- package/dist/node/QueryBoundWitness.d.ts.map +1 -0
- package/dist/node/index.d.ts +4 -84
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.mjs +5 -1
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/isBoundWitness.d.ts +14 -0
- package/dist/node/isBoundWitness.d.ts.map +1 -0
- package/package.json +6 -6
- package/src/BoundWitness/BoundWitness.ts +3 -1
- package/src/isBoundWitness.ts +3 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Address, Hash, Hex } from '@xylabs/hex';
|
|
2
|
+
import type { EmptyObject } from '@xylabs/object';
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import type { BoundWitnessSchema } from './BoundWitnessSchema.ts';
|
|
5
|
+
export type BoundWitnessFields = {
|
|
6
|
+
$meta: {
|
|
7
|
+
signatures: Hex[];
|
|
8
|
+
};
|
|
9
|
+
addresses: Address[];
|
|
10
|
+
blockNumber?: number;
|
|
11
|
+
error_hashes?: Hash[];
|
|
12
|
+
payload_hashes: Hash[];
|
|
13
|
+
payload_schemas: Schema[];
|
|
14
|
+
previous_hashes: (Hash | null)[];
|
|
15
|
+
sourceQuery?: Hash;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
};
|
|
18
|
+
export type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
19
|
+
//# sourceMappingURL=BoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE;QAEL,UAAU,EAAE,GAAG,EAAE,CAAA;KAClB,CAAA;IAED,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,cAAc,EAAE,IAAI,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAA;IAEhC,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAC/E,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,CAAC,EAC5D,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAC/B,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,GAC7B,kBAAkB,CACzB,CAAA"}
|
|
@@ -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/BoundWitness/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAC3D,eAAO,MAAM,kBAAkB,EAAE,kBAA+C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hash } from '@xylabs/hex';
|
|
2
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
3
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
4
|
+
import { BoundWitnessSchema } from './BoundWitness/index.ts';
|
|
5
|
+
export type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
6
|
+
export declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
7
|
+
export type QueryBoundWitness = BoundWitness<{
|
|
8
|
+
additional?: Hash[];
|
|
9
|
+
query: Hash;
|
|
10
|
+
resultSet?: string;
|
|
11
|
+
schema: QueryBoundWitnessSchema;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
14
|
+
export declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
15
|
+
//# sourceMappingURL=QueryBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBoundWitness.d.ts","sourceRoot":"","sources":["../../src/QueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AACxD,eAAO,MAAM,uBAAuB,EAAE,uBAA4C,CAAA;AAElF,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;IAC3C,UAAU,CAAC,EAAE,IAAI,EAAE,CAAA;IACnB,KAAK,EAAE,IAAI,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA;AAEF,eAAO,MAAM,mBAAmB,OAAQ,OAAO,KAAG,CAAC,IAAI,iBAAuF,CAAA;AAC9I,eAAO,MAAM,2BAA2B,OAAQ,OAAO,KAAG,CAAC,IAAI,QAAQ,CAAC,iBAAiB,CACkB,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,84 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type BoundWitnessSchema = 'network.xyo.boundwitness';
|
|
7
|
-
declare const BoundWitnessSchema: BoundWitnessSchema;
|
|
8
|
-
|
|
9
|
-
type BoundWitnessFields = {
|
|
10
|
-
$meta: {
|
|
11
|
-
signatures: Hex[];
|
|
12
|
-
};
|
|
13
|
-
addresses: Address[];
|
|
14
|
-
blockNumber?: number;
|
|
15
|
-
error_hashes?: Hash[];
|
|
16
|
-
payload_hashes: Hash[];
|
|
17
|
-
payload_schemas: Schema[];
|
|
18
|
-
previous_hashes: (Hash | null)[];
|
|
19
|
-
sourceQuery?: Hash;
|
|
20
|
-
timestamp: number;
|
|
21
|
-
};
|
|
22
|
-
type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
23
|
-
|
|
24
|
-
declare const BoundWitnessJsonSchema: () => {
|
|
25
|
-
$id: string;
|
|
26
|
-
additionalProperties: boolean;
|
|
27
|
-
properties: {
|
|
28
|
-
addresses: {
|
|
29
|
-
items: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
type: string;
|
|
33
|
-
};
|
|
34
|
-
payload_hashes: {
|
|
35
|
-
items: {
|
|
36
|
-
type: string;
|
|
37
|
-
};
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
payload_schemas: {
|
|
41
|
-
items: {
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
previous_hashes: {
|
|
47
|
-
items: {
|
|
48
|
-
nullable: boolean;
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
|
-
schema: {
|
|
54
|
-
type: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
required: string[];
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
62
|
-
declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
63
|
-
declare const notBoundWitness: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
64
|
-
schema: "network.xyo.boundwitness";
|
|
65
|
-
};
|
|
66
|
-
declare const asBoundWitness: <T extends BoundWitness<{
|
|
67
|
-
schema: string;
|
|
68
|
-
}> = _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
69
|
-
schema: "network.xyo.boundwitness";
|
|
70
|
-
}>(payload?: unknown) => T | undefined;
|
|
71
|
-
declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
72
|
-
|
|
73
|
-
type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
74
|
-
declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
75
|
-
type QueryBoundWitness = BoundWitness<{
|
|
76
|
-
additional?: Hash[];
|
|
77
|
-
query: Hash;
|
|
78
|
-
resultSet?: string;
|
|
79
|
-
schema: QueryBoundWitnessSchema;
|
|
80
|
-
}>;
|
|
81
|
-
declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
82
|
-
declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
83
|
-
|
|
84
|
-
export { type BoundWitness, type BoundWitnessFields, BoundWitnessJsonSchema, BoundWitnessSchema, type QueryBoundWitness, QueryBoundWitnessSchema, asBoundWitness, isBoundWitness, isBoundWitnessPayload, isBoundWitnessWithMeta, isQueryBoundWitness, isQueryBoundWitnessWithMeta, notBoundWitness };
|
|
1
|
+
export * from './BoundWitness/index.ts';
|
|
2
|
+
export * from './isBoundWitness.ts';
|
|
3
|
+
export * from './QueryBoundWitness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -19,7 +19,11 @@ var BoundWitnessJsonSchema = () => {
|
|
|
19
19
|
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
20
20
|
|
|
21
21
|
// src/isBoundWitness.ts
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
isPayloadOfSchemaType,
|
|
24
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
25
|
+
notPayloadOfSchemaType
|
|
26
|
+
} from "@xyo-network/payload-model";
|
|
23
27
|
var isBoundWitness = (value) => isPayloadOfSchemaType(BoundWitnessSchema)(value);
|
|
24
28
|
var isBoundWitnessWithMeta = (value) => isPayloadOfSchemaTypeWithMeta(BoundWitnessSchema)(value);
|
|
25
29
|
var notBoundWitness = notPayloadOfSchemaType(BoundWitnessSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, notPayloadOfSchemaType,\n} from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\n\nexport const isBoundWitness = (value: unknown): value is BoundWitness => isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)(value)\nexport const isBoundWitnessWithMeta = (value: unknown): value is WithMeta<BoundWitness> =>\n isPayloadOfSchemaTypeWithMeta<BoundWitness>(BoundWitnessSchema)(value)\nexport const notBoundWitness = notPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n\nexport const asBoundWitness = <T extends BoundWitness<{ schema: string }> = BoundWitness>(payload?: unknown) =>\n isBoundWitness(payload) ? (payload as T) : undefined\n\n/** @deprecated use isBoundWitness instead */\nexport const isBoundWitnessPayload = isBoundWitness\n","import type { Hash } from '@xylabs/hex'\nimport type { WithMeta } from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\nimport { isBoundWitness, isBoundWitnessWithMeta } from './isBoundWitness.ts'\n\nexport type QueryBoundWitnessSchema = BoundWitnessSchema\nexport const QueryBoundWitnessSchema: QueryBoundWitnessSchema = BoundWitnessSchema\n\nexport type QueryBoundWitness = BoundWitness<{\n additional?: Hash[]\n query: Hash\n resultSet?: string\n schema: QueryBoundWitnessSchema\n}>\n\nexport const isQueryBoundWitness = (x?: unknown): x is QueryBoundWitness => isBoundWitness(x) && (x as QueryBoundWitness)?.query !== undefined\nexport const isQueryBoundWitnessWithMeta = (x?: unknown): x is WithMeta<QueryBoundWitness> =>\n isBoundWitness(x) && isBoundWitnessWithMeta(x) && (x as WithMeta<QueryBoundWitness>)?.query !== undefined\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;;;AChBO,IAAM,qBAAyC;;;ACAtD;AAAA,EACE;AAAA,EAAuB;AAAA,EAA+B;AAAA,OACjD;AAKA,IAAM,iBAAiB,CAAC,UAA0C,sBAAoC,kBAAkB,EAAE,KAAK;AAC/H,IAAM,yBAAyB,CAAC,UACrC,8BAA4C,kBAAkB,EAAE,KAAK;AAChE,IAAM,kBAAkB,uBAAqC,kBAAkB;AAE/E,IAAM,iBAAiB,CAA4D,YACxF,eAAe,OAAO,IAAK,UAAgB;AAGtC,IAAM,wBAAwB;;;ACT9B,IAAM,0BAAmD;AASzD,IAAM,sBAAsB,CAAC,MAAwC,eAAe,CAAC,KAAM,GAAyB,UAAU;AAC9H,IAAM,8BAA8B,CAAC,MAC1C,eAAe,CAAC,KAAK,uBAAuB,CAAC,KAAM,GAAmC,UAAU;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
2
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
3
|
+
export declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
4
|
+
export declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
5
|
+
export declare const notBoundWitness: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
6
|
+
schema: "network.xyo.boundwitness";
|
|
7
|
+
};
|
|
8
|
+
export declare const asBoundWitness: <T extends BoundWitness<{
|
|
9
|
+
schema: string;
|
|
10
|
+
}> = import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
11
|
+
schema: "network.xyo.boundwitness";
|
|
12
|
+
}>(payload?: unknown) => T | undefined;
|
|
13
|
+
export declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
14
|
+
//# sourceMappingURL=isBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBoundWitness.d.ts","sourceRoot":"","sources":["../../src/isBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAK1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,KAAK,IAAI,YAA8E,CAAA;AACvI,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,KAAK,IAAI,QAAQ,CAAC,YAAY,CACd,CAAA;AACxE,eAAO,MAAM,eAAe;;CAA2D,CAAA;AAEvF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;;aAA2B,OAAO,kBACrD,CAAA;AAGtD,eAAO,MAAM,qBAAqB,UATI,OAAO,KAAG,KAAK,IAAI,YASN,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Address, Hash, Hex } from '@xylabs/hex';
|
|
2
|
+
import type { EmptyObject } from '@xylabs/object';
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import type { BoundWitnessSchema } from './BoundWitnessSchema.ts';
|
|
5
|
+
export type BoundWitnessFields = {
|
|
6
|
+
$meta: {
|
|
7
|
+
signatures: Hex[];
|
|
8
|
+
};
|
|
9
|
+
addresses: Address[];
|
|
10
|
+
blockNumber?: number;
|
|
11
|
+
error_hashes?: Hash[];
|
|
12
|
+
payload_hashes: Hash[];
|
|
13
|
+
payload_schemas: Schema[];
|
|
14
|
+
previous_hashes: (Hash | null)[];
|
|
15
|
+
sourceQuery?: Hash;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
};
|
|
18
|
+
export type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
19
|
+
//# sourceMappingURL=BoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE;QAEL,UAAU,EAAE,GAAG,EAAE,CAAA;KAClB,CAAA;IAED,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,cAAc,EAAE,IAAI,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAA;IAEhC,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAC/E,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,CAAC,EAC5D,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAC/B,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,GAC7B,kBAAkB,CACzB,CAAA"}
|
|
@@ -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/BoundWitness/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAC3D,eAAO,MAAM,kBAAkB,EAAE,kBAA+C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hash } from '@xylabs/hex';
|
|
2
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
3
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
4
|
+
import { BoundWitnessSchema } from './BoundWitness/index.ts';
|
|
5
|
+
export type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
6
|
+
export declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
7
|
+
export type QueryBoundWitness = BoundWitness<{
|
|
8
|
+
additional?: Hash[];
|
|
9
|
+
query: Hash;
|
|
10
|
+
resultSet?: string;
|
|
11
|
+
schema: QueryBoundWitnessSchema;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
14
|
+
export declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
15
|
+
//# sourceMappingURL=QueryBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBoundWitness.d.ts","sourceRoot":"","sources":["../../src/QueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AACxD,eAAO,MAAM,uBAAuB,EAAE,uBAA4C,CAAA;AAElF,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;IAC3C,UAAU,CAAC,EAAE,IAAI,EAAE,CAAA;IACnB,KAAK,EAAE,IAAI,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA;AAEF,eAAO,MAAM,mBAAmB,OAAQ,OAAO,KAAG,CAAC,IAAI,iBAAuF,CAAA;AAC9I,eAAO,MAAM,2BAA2B,OAAQ,OAAO,KAAG,CAAC,IAAI,QAAQ,CAAC,iBAAiB,CACkB,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,84 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type BoundWitnessSchema = 'network.xyo.boundwitness';
|
|
7
|
-
declare const BoundWitnessSchema: BoundWitnessSchema;
|
|
8
|
-
|
|
9
|
-
type BoundWitnessFields = {
|
|
10
|
-
$meta: {
|
|
11
|
-
signatures: Hex[];
|
|
12
|
-
};
|
|
13
|
-
addresses: Address[];
|
|
14
|
-
blockNumber?: number;
|
|
15
|
-
error_hashes?: Hash[];
|
|
16
|
-
payload_hashes: Hash[];
|
|
17
|
-
payload_schemas: Schema[];
|
|
18
|
-
previous_hashes: (Hash | null)[];
|
|
19
|
-
sourceQuery?: Hash;
|
|
20
|
-
timestamp: number;
|
|
21
|
-
};
|
|
22
|
-
type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
23
|
-
|
|
24
|
-
declare const BoundWitnessJsonSchema: () => {
|
|
25
|
-
$id: string;
|
|
26
|
-
additionalProperties: boolean;
|
|
27
|
-
properties: {
|
|
28
|
-
addresses: {
|
|
29
|
-
items: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
type: string;
|
|
33
|
-
};
|
|
34
|
-
payload_hashes: {
|
|
35
|
-
items: {
|
|
36
|
-
type: string;
|
|
37
|
-
};
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
payload_schemas: {
|
|
41
|
-
items: {
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
previous_hashes: {
|
|
47
|
-
items: {
|
|
48
|
-
nullable: boolean;
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
|
-
schema: {
|
|
54
|
-
type: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
required: string[];
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
62
|
-
declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
63
|
-
declare const notBoundWitness: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
64
|
-
schema: "network.xyo.boundwitness";
|
|
65
|
-
};
|
|
66
|
-
declare const asBoundWitness: <T extends BoundWitness<{
|
|
67
|
-
schema: string;
|
|
68
|
-
}> = _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
69
|
-
schema: "network.xyo.boundwitness";
|
|
70
|
-
}>(payload?: unknown) => T | undefined;
|
|
71
|
-
declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
72
|
-
|
|
73
|
-
type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
74
|
-
declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
75
|
-
type QueryBoundWitness = BoundWitness<{
|
|
76
|
-
additional?: Hash[];
|
|
77
|
-
query: Hash;
|
|
78
|
-
resultSet?: string;
|
|
79
|
-
schema: QueryBoundWitnessSchema;
|
|
80
|
-
}>;
|
|
81
|
-
declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
82
|
-
declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
83
|
-
|
|
84
|
-
export { type BoundWitness, type BoundWitnessFields, BoundWitnessJsonSchema, BoundWitnessSchema, type QueryBoundWitness, QueryBoundWitnessSchema, asBoundWitness, isBoundWitness, isBoundWitnessPayload, isBoundWitnessWithMeta, isQueryBoundWitness, isQueryBoundWitnessWithMeta, notBoundWitness };
|
|
1
|
+
export * from './BoundWitness/index.ts';
|
|
2
|
+
export * from './isBoundWitness.ts';
|
|
3
|
+
export * from './QueryBoundWitness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -19,7 +19,11 @@ var BoundWitnessJsonSchema = () => {
|
|
|
19
19
|
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
20
20
|
|
|
21
21
|
// src/isBoundWitness.ts
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
isPayloadOfSchemaType,
|
|
24
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
25
|
+
notPayloadOfSchemaType
|
|
26
|
+
} from "@xyo-network/payload-model";
|
|
23
27
|
var isBoundWitness = (value) => isPayloadOfSchemaType(BoundWitnessSchema)(value);
|
|
24
28
|
var isBoundWitnessWithMeta = (value) => isPayloadOfSchemaTypeWithMeta(BoundWitnessSchema)(value);
|
|
25
29
|
var notBoundWitness = notPayloadOfSchemaType(BoundWitnessSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, notPayloadOfSchemaType,\n} from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\n\nexport const isBoundWitness = (value: unknown): value is BoundWitness => isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)(value)\nexport const isBoundWitnessWithMeta = (value: unknown): value is WithMeta<BoundWitness> =>\n isPayloadOfSchemaTypeWithMeta<BoundWitness>(BoundWitnessSchema)(value)\nexport const notBoundWitness = notPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n\nexport const asBoundWitness = <T extends BoundWitness<{ schema: string }> = BoundWitness>(payload?: unknown) =>\n isBoundWitness(payload) ? (payload as T) : undefined\n\n/** @deprecated use isBoundWitness instead */\nexport const isBoundWitnessPayload = isBoundWitness\n","import type { Hash } from '@xylabs/hex'\nimport type { WithMeta } from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\nimport { isBoundWitness, isBoundWitnessWithMeta } from './isBoundWitness.ts'\n\nexport type QueryBoundWitnessSchema = BoundWitnessSchema\nexport const QueryBoundWitnessSchema: QueryBoundWitnessSchema = BoundWitnessSchema\n\nexport type QueryBoundWitness = BoundWitness<{\n additional?: Hash[]\n query: Hash\n resultSet?: string\n schema: QueryBoundWitnessSchema\n}>\n\nexport const isQueryBoundWitness = (x?: unknown): x is QueryBoundWitness => isBoundWitness(x) && (x as QueryBoundWitness)?.query !== undefined\nexport const isQueryBoundWitnessWithMeta = (x?: unknown): x is WithMeta<QueryBoundWitness> =>\n isBoundWitness(x) && isBoundWitnessWithMeta(x) && (x as WithMeta<QueryBoundWitness>)?.query !== undefined\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;;;AChBO,IAAM,qBAAyC;;;ACAtD;AAAA,EACE;AAAA,EAAuB;AAAA,EAA+B;AAAA,OACjD;AAKA,IAAM,iBAAiB,CAAC,UAA0C,sBAAoC,kBAAkB,EAAE,KAAK;AAC/H,IAAM,yBAAyB,CAAC,UACrC,8BAA4C,kBAAkB,EAAE,KAAK;AAChE,IAAM,kBAAkB,uBAAqC,kBAAkB;AAE/E,IAAM,iBAAiB,CAA4D,YACxF,eAAe,OAAO,IAAK,UAAgB;AAGtC,IAAM,wBAAwB;;;ACT9B,IAAM,0BAAmD;AASzD,IAAM,sBAAsB,CAAC,MAAwC,eAAe,CAAC,KAAM,GAAyB,UAAU;AAC9H,IAAM,8BAA8B,CAAC,MAC1C,eAAe,CAAC,KAAK,uBAAuB,CAAC,KAAM,GAAmC,UAAU;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
2
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
3
|
+
export declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
4
|
+
export declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
5
|
+
export declare const notBoundWitness: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
6
|
+
schema: "network.xyo.boundwitness";
|
|
7
|
+
};
|
|
8
|
+
export declare const asBoundWitness: <T extends BoundWitness<{
|
|
9
|
+
schema: string;
|
|
10
|
+
}> = import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
11
|
+
schema: "network.xyo.boundwitness";
|
|
12
|
+
}>(payload?: unknown) => T | undefined;
|
|
13
|
+
export declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
14
|
+
//# sourceMappingURL=isBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBoundWitness.d.ts","sourceRoot":"","sources":["../../src/isBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAK1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,KAAK,IAAI,YAA8E,CAAA;AACvI,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,KAAK,IAAI,QAAQ,CAAC,YAAY,CACd,CAAA;AACxE,eAAO,MAAM,eAAe;;CAA2D,CAAA;AAEvF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;;aAA2B,OAAO,kBACrD,CAAA;AAGtD,eAAO,MAAM,qBAAqB,UATI,OAAO,KAAG,KAAK,IAAI,YASN,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Address, Hash, Hex } from '@xylabs/hex';
|
|
2
|
+
import type { EmptyObject } from '@xylabs/object';
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
import type { BoundWitnessSchema } from './BoundWitnessSchema.ts';
|
|
5
|
+
export type BoundWitnessFields = {
|
|
6
|
+
$meta: {
|
|
7
|
+
signatures: Hex[];
|
|
8
|
+
};
|
|
9
|
+
addresses: Address[];
|
|
10
|
+
blockNumber?: number;
|
|
11
|
+
error_hashes?: Hash[];
|
|
12
|
+
payload_hashes: Hash[];
|
|
13
|
+
payload_schemas: Schema[];
|
|
14
|
+
previous_hashes: (Hash | null)[];
|
|
15
|
+
sourceQuery?: Hash;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
};
|
|
18
|
+
export type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
19
|
+
//# sourceMappingURL=BoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE;QAEL,UAAU,EAAE,GAAG,EAAE,CAAA;KAClB,CAAA;IAED,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,cAAc,EAAE,IAAI,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAA;IAEhC,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAC/E,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,CAAC,EAC5D,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAC/B,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,GAC7B,kBAAkB,CACzB,CAAA"}
|
|
@@ -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/BoundWitness/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAC3D,eAAO,MAAM,kBAAkB,EAAE,kBAA+C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hash } from '@xylabs/hex';
|
|
2
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
3
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
4
|
+
import { BoundWitnessSchema } from './BoundWitness/index.ts';
|
|
5
|
+
export type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
6
|
+
export declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
7
|
+
export type QueryBoundWitness = BoundWitness<{
|
|
8
|
+
additional?: Hash[];
|
|
9
|
+
query: Hash;
|
|
10
|
+
resultSet?: string;
|
|
11
|
+
schema: QueryBoundWitnessSchema;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
14
|
+
export declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
15
|
+
//# sourceMappingURL=QueryBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBoundWitness.d.ts","sourceRoot":"","sources":["../../src/QueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AACxD,eAAO,MAAM,uBAAuB,EAAE,uBAA4C,CAAA;AAElF,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;IAC3C,UAAU,CAAC,EAAE,IAAI,EAAE,CAAA;IACnB,KAAK,EAAE,IAAI,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA;AAEF,eAAO,MAAM,mBAAmB,OAAQ,OAAO,KAAG,CAAC,IAAI,iBAAuF,CAAA;AAC9I,eAAO,MAAM,2BAA2B,OAAQ,OAAO,KAAG,CAAC,IAAI,QAAQ,CAAC,iBAAiB,CACkB,CAAA"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,84 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type BoundWitnessSchema = 'network.xyo.boundwitness';
|
|
7
|
-
declare const BoundWitnessSchema: BoundWitnessSchema;
|
|
8
|
-
|
|
9
|
-
type BoundWitnessFields = {
|
|
10
|
-
$meta: {
|
|
11
|
-
signatures: Hex[];
|
|
12
|
-
};
|
|
13
|
-
addresses: Address[];
|
|
14
|
-
blockNumber?: number;
|
|
15
|
-
error_hashes?: Hash[];
|
|
16
|
-
payload_hashes: Hash[];
|
|
17
|
-
payload_schemas: Schema[];
|
|
18
|
-
previous_hashes: (Hash | null)[];
|
|
19
|
-
sourceQuery?: Hash;
|
|
20
|
-
timestamp: number;
|
|
21
|
-
};
|
|
22
|
-
type BoundWitness<T extends Payload | EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, T extends void ? BoundWitnessSchema : T extends Payload ? T['schema'] : BoundWitnessSchema>;
|
|
23
|
-
|
|
24
|
-
declare const BoundWitnessJsonSchema: () => {
|
|
25
|
-
$id: string;
|
|
26
|
-
additionalProperties: boolean;
|
|
27
|
-
properties: {
|
|
28
|
-
addresses: {
|
|
29
|
-
items: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
type: string;
|
|
33
|
-
};
|
|
34
|
-
payload_hashes: {
|
|
35
|
-
items: {
|
|
36
|
-
type: string;
|
|
37
|
-
};
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
payload_schemas: {
|
|
41
|
-
items: {
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
type: string;
|
|
45
|
-
};
|
|
46
|
-
previous_hashes: {
|
|
47
|
-
items: {
|
|
48
|
-
nullable: boolean;
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
|
-
schema: {
|
|
54
|
-
type: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
required: string[];
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
62
|
-
declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
63
|
-
declare const notBoundWitness: (x?: unknown | null) => x is _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
64
|
-
schema: "network.xyo.boundwitness";
|
|
65
|
-
};
|
|
66
|
-
declare const asBoundWitness: <T extends BoundWitness<{
|
|
67
|
-
schema: string;
|
|
68
|
-
}> = _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & BoundWitnessFields & {
|
|
69
|
-
schema: "network.xyo.boundwitness";
|
|
70
|
-
}>(payload?: unknown) => T | undefined;
|
|
71
|
-
declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
72
|
-
|
|
73
|
-
type QueryBoundWitnessSchema = BoundWitnessSchema;
|
|
74
|
-
declare const QueryBoundWitnessSchema: QueryBoundWitnessSchema;
|
|
75
|
-
type QueryBoundWitness = BoundWitness<{
|
|
76
|
-
additional?: Hash[];
|
|
77
|
-
query: Hash;
|
|
78
|
-
resultSet?: string;
|
|
79
|
-
schema: QueryBoundWitnessSchema;
|
|
80
|
-
}>;
|
|
81
|
-
declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
|
|
82
|
-
declare const isQueryBoundWitnessWithMeta: (x?: unknown) => x is WithMeta<QueryBoundWitness>;
|
|
83
|
-
|
|
84
|
-
export { type BoundWitness, type BoundWitnessFields, BoundWitnessJsonSchema, BoundWitnessSchema, type QueryBoundWitness, QueryBoundWitnessSchema, asBoundWitness, isBoundWitness, isBoundWitnessPayload, isBoundWitnessWithMeta, isQueryBoundWitness, isQueryBoundWitnessWithMeta, notBoundWitness };
|
|
1
|
+
export * from './BoundWitness/index.ts';
|
|
2
|
+
export * from './isBoundWitness.ts';
|
|
3
|
+
export * from './QueryBoundWitness.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
|
package/dist/node/index.mjs
CHANGED
|
@@ -19,7 +19,11 @@ var BoundWitnessJsonSchema = () => {
|
|
|
19
19
|
var BoundWitnessSchema = "network.xyo.boundwitness";
|
|
20
20
|
|
|
21
21
|
// src/isBoundWitness.ts
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
isPayloadOfSchemaType,
|
|
24
|
+
isPayloadOfSchemaTypeWithMeta,
|
|
25
|
+
notPayloadOfSchemaType
|
|
26
|
+
} from "@xyo-network/payload-model";
|
|
23
27
|
var isBoundWitness = (value) => isPayloadOfSchemaType(BoundWitnessSchema)(value);
|
|
24
28
|
var isBoundWitnessWithMeta = (value) => isPayloadOfSchemaTypeWithMeta(BoundWitnessSchema)(value);
|
|
25
29
|
var notBoundWitness = notPayloadOfSchemaType(BoundWitnessSchema);
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/BoundWitness/BoundWitnessJsonSchema.ts","../../src/BoundWitness/BoundWitnessSchema.ts","../../src/isBoundWitness.ts","../../src/QueryBoundWitness.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","export type BoundWitnessSchema = 'network.xyo.boundwitness'\nexport const BoundWitnessSchema: BoundWitnessSchema = 'network.xyo.boundwitness'\n","import type { WithMeta } from '@xyo-network/payload-model'\nimport {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, notPayloadOfSchemaType,\n} from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\n\nexport const isBoundWitness = (value: unknown): value is BoundWitness => isPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)(value)\nexport const isBoundWitnessWithMeta = (value: unknown): value is WithMeta<BoundWitness> =>\n isPayloadOfSchemaTypeWithMeta<BoundWitness>(BoundWitnessSchema)(value)\nexport const notBoundWitness = notPayloadOfSchemaType<BoundWitness>(BoundWitnessSchema)\n\nexport const asBoundWitness = <T extends BoundWitness<{ schema: string }> = BoundWitness>(payload?: unknown) =>\n isBoundWitness(payload) ? (payload as T) : undefined\n\n/** @deprecated use isBoundWitness instead */\nexport const isBoundWitnessPayload = isBoundWitness\n","import type { Hash } from '@xylabs/hex'\nimport type { WithMeta } from '@xyo-network/payload-model'\n\nimport type { BoundWitness } from './BoundWitness/index.ts'\nimport { BoundWitnessSchema } from './BoundWitness/index.ts'\nimport { isBoundWitness, isBoundWitnessWithMeta } from './isBoundWitness.ts'\n\nexport type QueryBoundWitnessSchema = BoundWitnessSchema\nexport const QueryBoundWitnessSchema: QueryBoundWitnessSchema = BoundWitnessSchema\n\nexport type QueryBoundWitness = BoundWitness<{\n additional?: Hash[]\n query: Hash\n resultSet?: string\n schema: QueryBoundWitnessSchema\n}>\n\nexport const isQueryBoundWitness = (x?: unknown): x is QueryBoundWitness => isBoundWitness(x) && (x as QueryBoundWitness)?.query !== undefined\nexport const isQueryBoundWitnessWithMeta = (x?: unknown): x is WithMeta<QueryBoundWitness> =>\n isBoundWitness(x) && isBoundWitnessWithMeta(x) && (x as WithMeta<QueryBoundWitness>)?.query !== undefined\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;;;AChBO,IAAM,qBAAyC;;;ACAtD;AAAA,EACE;AAAA,EAAuB;AAAA,EAA+B;AAAA,OACjD;AAKA,IAAM,iBAAiB,CAAC,UAA0C,sBAAoC,kBAAkB,EAAE,KAAK;AAC/H,IAAM,yBAAyB,CAAC,UACrC,8BAA4C,kBAAkB,EAAE,KAAK;AAChE,IAAM,kBAAkB,uBAAqC,kBAAkB;AAE/E,IAAM,iBAAiB,CAA4D,YACxF,eAAe,OAAO,IAAK,UAAgB;AAGtC,IAAM,wBAAwB;;;ACT9B,IAAM,0BAAmD;AASzD,IAAM,sBAAsB,CAAC,MAAwC,eAAe,CAAC,KAAM,GAAyB,UAAU;AAC9H,IAAM,8BAA8B,CAAC,MAC1C,eAAe,CAAC,KAAK,uBAAuB,CAAC,KAAM,GAAmC,UAAU;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WithMeta } from '@xyo-network/payload-model';
|
|
2
|
+
import type { BoundWitness } from './BoundWitness/index.ts';
|
|
3
|
+
export declare const isBoundWitness: (value: unknown) => value is BoundWitness;
|
|
4
|
+
export declare const isBoundWitnessWithMeta: (value: unknown) => value is WithMeta<BoundWitness>;
|
|
5
|
+
export declare const notBoundWitness: (x?: unknown | null) => x is import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
6
|
+
schema: "network.xyo.boundwitness";
|
|
7
|
+
};
|
|
8
|
+
export declare const asBoundWitness: <T extends BoundWitness<{
|
|
9
|
+
schema: string;
|
|
10
|
+
}> = import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("./BoundWitness/BoundWitness.ts").BoundWitnessFields & {
|
|
11
|
+
schema: "network.xyo.boundwitness";
|
|
12
|
+
}>(payload?: unknown) => T | undefined;
|
|
13
|
+
export declare const isBoundWitnessPayload: (value: unknown) => value is BoundWitness;
|
|
14
|
+
//# sourceMappingURL=isBoundWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBoundWitness.d.ts","sourceRoot":"","sources":["../../src/isBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAK1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,KAAK,IAAI,YAA8E,CAAA;AACvI,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,KAAK,IAAI,QAAQ,CAAC,YAAY,CACd,CAAA;AACxE,eAAO,MAAM,eAAe;;CAA2D,CAAA;AAEvF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;;aAA2B,OAAO,kBACrD,CAAA;AAGtD,eAAO,MAAM,qBAAqB,UATI,OAAO,KAAG,KAAK,IAAI,YASN,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/boundwitness-model",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/hex": "^4.0.
|
|
33
|
-
"@xylabs/object": "^4.0.
|
|
34
|
-
"@xyo-network/payload-model": "^3.0.
|
|
32
|
+
"@xylabs/hex": "^4.0.3",
|
|
33
|
+
"@xylabs/object": "^4.0.3",
|
|
34
|
+
"@xyo-network/payload-model": "^3.0.9"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22.5.0",
|
|
38
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.
|
|
39
|
-
"@xylabs/tsconfig": "^4.0.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.7",
|
|
39
|
+
"@xylabs/tsconfig": "^4.0.7",
|
|
40
40
|
"typescript": "^5.5.4"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
package/src/isBoundWitness.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { WithMeta } from '@xyo-network/payload-model'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, notPayloadOfSchemaType,
|
|
4
|
+
} from '@xyo-network/payload-model'
|
|
3
5
|
|
|
4
6
|
import type { BoundWitness } from './BoundWitness/index.ts'
|
|
5
7
|
import { BoundWitnessSchema } from './BoundWitness/index.ts'
|