@xyo-network/node-model 5.2.25 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/ChildCertification.d.ts +4 -2
- package/dist/neutral/ChildCertification.d.ts.map +1 -1
- package/dist/neutral/Config.d.ts +5 -3
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/Queries/Attach.d.ts +4 -2
- package/dist/neutral/Queries/Attach.d.ts.map +1 -1
- package/dist/neutral/Queries/Attached.d.ts +4 -2
- package/dist/neutral/Queries/Attached.d.ts.map +1 -1
- package/dist/neutral/Queries/Certify.d.ts +4 -2
- package/dist/neutral/Queries/Certify.d.ts.map +1 -1
- package/dist/neutral/Queries/Detach.d.ts +4 -2
- package/dist/neutral/Queries/Detach.d.ts.map +1 -1
- package/dist/neutral/Queries/Registered.d.ts +4 -2
- package/dist/neutral/Queries/Registered.d.ts.map +1 -1
- package/dist/neutral/index.mjs +14 -7
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/ChildCertification.ts +2 -2
- package/src/Config.ts +7 -3
- package/src/Queries/Attach.ts +2 -2
- package/src/Queries/Attached.ts +2 -2
- package/src/Queries/Certify.ts +2 -2
- package/src/Queries/Detach.ts +2 -2
- package/src/Queries/Registered.ts +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js';
|
|
2
|
-
import type
|
|
3
|
-
export declare const ChildCertificationSchema: "network.xyo.child.certification"
|
|
2
|
+
import { type Payload } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const ChildCertificationSchema: "network.xyo.child.certification" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type ChildCertificationSchema = typeof ChildCertificationSchema;
|
|
5
7
|
export interface ChildCertificationFields {
|
|
6
8
|
address: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildCertification.d.ts","sourceRoot":"","sources":["../../src/ChildCertification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ChildCertification.d.ts","sourceRoot":"","sources":["../../src/ChildCertification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEnE,eAAO,MAAM,wBAAwB;;CAAoD,CAAA;AACzF,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAA"}
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js';
|
|
2
2
|
import type { ModuleConfig } from '@xyo-network/module-model';
|
|
3
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
-
export declare const NodeConfigSchema: "network.xyo.node.config"
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
|
+
export declare const NodeConfigSchema: "network.xyo.node.config" & {
|
|
5
|
+
readonly __schema: true;
|
|
6
|
+
};
|
|
5
7
|
export type NodeConfigSchema = typeof NodeConfigSchema;
|
|
6
|
-
export type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends
|
|
8
|
+
export type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<WithAdditional<{
|
|
7
9
|
archivist?: string;
|
|
8
10
|
}, TConfig>, TSchema extends void ? TConfig extends Payload ? TConfig['schema'] : NodeConfigSchema : TSchema>;
|
|
9
11
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACP,MAAM,4BAA4B,CAAA;AAGnC,eAAO,MAAM,gBAAgB;;CAA4C,CAAA;AACzE,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAA;AAEtD,MAAM,MAAM,UAAU,CAAC,OAAO,SAAS,WAAW,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,YAAY,CAC9H,cAAc,CACZ;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,EACD,OAAO,CACR,EACD,OAAO,SAAS,IAAI,GAChB,OAAO,SAAS,OAAO,GACrB,OAAO,CAAC,QAAQ,CAAC,GACjB,gBAAgB,GAClB,OAAO,CACZ,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export declare const NodeAttachQuerySchema: "network.xyo.query.node.attach"
|
|
2
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const NodeAttachQuerySchema: "network.xyo.query.node.attach" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type NodeAttachQuerySchema = typeof NodeAttachQuerySchema;
|
|
5
7
|
export type NodeAttachQuery = Query<{
|
|
6
8
|
external?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Attach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,qBAAqB;;CAAkD,CAAA;AACpF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const NodeAttachedQuerySchema: "network.xyo.query.node.attached"
|
|
1
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
2
|
+
export declare const NodeAttachedQuerySchema: "network.xyo.query.node.attached" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
3
5
|
export type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema;
|
|
4
6
|
export type NodeAttachedQuery = Query<{
|
|
5
7
|
schema: NodeAttachedQuerySchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attached.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attached.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Attached.d.ts","sourceRoot":"","sources":["../../../src/Queries/Attached.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,uBAAuB;;CAAoD,CAAA;AACxF,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export declare const NodeCertifyQuerySchema: "network.xyo.query.node.certify"
|
|
2
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const NodeCertifyQuerySchema: "network.xyo.query.node.certify" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema;
|
|
5
7
|
export type NodeCertifyQuery = Query<{
|
|
6
8
|
id: ModuleIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Certify.d.ts","sourceRoot":"","sources":["../../../src/Queries/Certify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Certify.d.ts","sourceRoot":"","sources":["../../../src/Queries/Certify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,sBAAsB;;CAAmD,CAAA;AACtF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC;IACnC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAC,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
2
|
-
import type
|
|
3
|
-
export declare const NodeDetachQuerySchema: "network.xyo.query.node.detach"
|
|
2
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
3
|
+
export declare const NodeDetachQuerySchema: "network.xyo.query.node.detach" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
4
6
|
export type NodeDetachQuerySchema = typeof NodeDetachQuerySchema;
|
|
5
7
|
export type NodeDetachQuery = Query<{
|
|
6
8
|
id: ModuleIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Detach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Detach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Detach.d.ts","sourceRoot":"","sources":["../../../src/Queries/Detach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,qBAAqB;;CAAkD,CAAA;AACpF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC;IAClC,EAAE,EAAE,gBAAgB,CAAA;IACpB,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const NodeRegisteredQuerySchema: "network.xyo.query.node.registered"
|
|
1
|
+
import { type Query } from '@xyo-network/payload-model';
|
|
2
|
+
export declare const NodeRegisteredQuerySchema: "network.xyo.query.node.registered" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
3
5
|
export type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema;
|
|
4
6
|
export type NodeRegisteredQuery = Query<{
|
|
5
7
|
schema: NodeRegisteredQuerySchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Registered.d.ts","sourceRoot":"","sources":["../../../src/Queries/Registered.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Registered.d.ts","sourceRoot":"","sources":["../../../src/Queries/Registered.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,yBAAyB;;CAAsD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -15,19 +15,24 @@ import {
|
|
|
15
15
|
} from "@xyo-network/module-model";
|
|
16
16
|
|
|
17
17
|
// src/Queries/Attach.ts
|
|
18
|
-
|
|
18
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
19
|
+
var NodeAttachQuerySchema = asSchema("network.xyo.query.node.attach", true);
|
|
19
20
|
|
|
20
21
|
// src/Queries/Attached.ts
|
|
21
|
-
|
|
22
|
+
import { asSchema as asSchema2 } from "@xyo-network/payload-model";
|
|
23
|
+
var NodeAttachedQuerySchema = asSchema2("network.xyo.query.node.attached", true);
|
|
22
24
|
|
|
23
25
|
// src/Queries/Certify.ts
|
|
24
|
-
|
|
26
|
+
import { asSchema as asSchema3 } from "@xyo-network/payload-model";
|
|
27
|
+
var NodeCertifyQuerySchema = asSchema3("network.xyo.query.node.certify", true);
|
|
25
28
|
|
|
26
29
|
// src/Queries/Detach.ts
|
|
27
|
-
|
|
30
|
+
import { asSchema as asSchema4 } from "@xyo-network/payload-model";
|
|
31
|
+
var NodeDetachQuerySchema = asSchema4("network.xyo.query.node.detach", true);
|
|
28
32
|
|
|
29
33
|
// src/Queries/Registered.ts
|
|
30
|
-
|
|
34
|
+
import { asSchema as asSchema5 } from "@xyo-network/payload-model";
|
|
35
|
+
var NodeRegisteredQuerySchema = asSchema5("network.xyo.query.node.registered", true);
|
|
31
36
|
|
|
32
37
|
// src/typeChecks.ts
|
|
33
38
|
var instanceFactory = new IsInstanceFactory();
|
|
@@ -64,10 +69,12 @@ var IsAttachableNodeInstanceFactory = class extends IsObjectFactory2 {
|
|
|
64
69
|
};
|
|
65
70
|
|
|
66
71
|
// src/ChildCertification.ts
|
|
67
|
-
|
|
72
|
+
import { asSchema as asSchema6 } from "@xyo-network/payload-model";
|
|
73
|
+
var ChildCertificationSchema = asSchema6("network.xyo.child.certification", true);
|
|
68
74
|
|
|
69
75
|
// src/Config.ts
|
|
70
|
-
|
|
76
|
+
import { asSchema as asSchema7 } from "@xyo-network/payload-model";
|
|
77
|
+
var NodeConfigSchema = asSchema7("network.xyo.node.config", true);
|
|
71
78
|
export {
|
|
72
79
|
ChildCertificationSchema,
|
|
73
80
|
IsAttachableNodeInstanceFactory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Certify.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/attachable/AttachableInstance.ts","../../src/ChildCertification.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isNodeInstance } from '../typeChecks.ts'\nimport type { AttachableNodeInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableNodeInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableNodeInstance>()\n\nexport const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance> = factory.create(requiredAttachableNodeInstanceFunctions, [\n isNodeInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { NodeInstance } from './instance.ts'\nimport type { NodeModule } from './Node.ts'\nimport { NodeAttachedQuerySchema } from './Queries/index.ts'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance: TypeCheck<NodeInstance> = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nexport const isNodeModule: TypeCheck<NodeModule> = new IsModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])\n\nexport const asNodeModule = AsObjectFactory.create(isNodeModule)\nexport const asNodeInstance = AsObjectFactory.create(isNodeInstance)\nexport const withNodeModule = WithFactory.create(isNodeModule)\nexport const withNodeInstance = WithFactory.create(isNodeInstance)\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type
|
|
1
|
+
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Attach.ts","../../src/Queries/Attached.ts","../../src/Queries/Certify.ts","../../src/Queries/Detach.ts","../../src/Queries/Registered.ts","../../src/attachable/AttachableInstance.ts","../../src/ChildCertification.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isNodeInstance } from '../typeChecks.ts'\nimport type { AttachableNodeInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableNodeInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableNodeInstance>()\n\nexport const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance> = factory.create(requiredAttachableNodeInstanceFunctions, [\n isNodeInstance,\n isAttachableModuleInstance,\n])\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { NodeInstance } from './instance.ts'\nimport type { NodeModule } from './Node.ts'\nimport { NodeAttachedQuerySchema } from './Queries/index.ts'\n\nconst instanceFactory = new IsInstanceFactory<NodeInstance>()\n\nexport const isNodeInstance: TypeCheck<NodeInstance> = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nexport const isNodeModule: TypeCheck<NodeModule> = new IsModuleFactory<NodeModule>().create([NodeAttachedQuerySchema])\n\nexport const asNodeModule = AsObjectFactory.create(isNodeModule)\nexport const asNodeInstance = AsObjectFactory.create(isNodeInstance)\nexport const withNodeModule = WithFactory.create(isNodeModule)\nexport const withNodeInstance = WithFactory.create(isNodeInstance)\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = asSchema('network.xyo.query.node.attach', true)\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = asSchema('network.xyo.query.node.attached', true)\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = asSchema('network.xyo.query.node.certify', true)\nexport type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema\n\nexport type NodeCertifyQuery = Query<{\n id: ModuleIdentifier\n schema: NodeCertifyQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = asSchema('network.xyo.query.node.detach', true)\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import { asSchema, type Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = asSchema('network.xyo.query.node.registered', true)\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\n\nimport type { NodeInstance } from '../instance.ts'\nimport type { NodeModule, NodeModuleEventData } from '../Node.ts'\nimport type { NodeParams } from '../Params.ts'\n\nexport interface AttachableNodeInstance<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData>\n extends NodeModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n NodeInstance<TParams, TEventData> {}\n\nexport type AttachableNodeInstanceTypeCheck<T extends AttachableNodeInstance = AttachableNodeInstance> = TypeCheck<T>\n\nexport class IsAttachableNodeInstanceFactory<T extends AttachableNodeInstance = AttachableNodeInstance> extends IsObjectFactory<T> {}\n","import type { Address } from '@xylabs/sdk-js'\nimport { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = asSchema('network.xyo.child.certification', true)\nexport type ChildCertificationSchema = typeof ChildCertificationSchema\n\nexport interface ChildCertificationFields {\n address: Address\n expiration: number\n}\n\nexport type ChildCertification = Payload<ChildCertificationFields, ChildCertificationSchema>\n","import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type {\n Payload,\n Schema,\n} from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = asSchema('network.xyo.node.config', true)\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<\n WithAdditional<\n {\n archivist?: string\n },\n TConfig\n >,\n TSchema extends void\n ? TConfig extends Payload\n ? TConfig['schema']\n : NodeConfigSchema\n : TSchema\n>\n"],"mappings":";AAAA,SAAS,mBAAAA,wBAAuB;;;ACChC,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;;;ACD3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACHP,SAAS,gBAA4B;AAE9B,IAAM,wBAAwB,SAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,0BAA0BA,UAAS,mCAAmC,IAAI;;;ACDvF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,yBAAyBA,UAAS,kCAAkC,IAAI;;;ACFrF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,wBAAwBA,UAAS,iCAAiC,IAAI;;;ACHnF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ALQ3F,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAA0C,gBAAgB;AAAA,EACrE;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEO,IAAM,eAAsC,IAAI,gBAA4B,EAAE,OAAO,CAAC,uBAAuB,CAAC;AAE9G,IAAM,eAAe,gBAAgB,OAAO,YAAY;AACxD,IAAM,iBAAiB,gBAAgB,OAAO,cAAc;AAC5D,IAAM,iBAAiB,YAAY,OAAO,YAAY;AACtD,IAAM,mBAAmB,YAAY,OAAO,cAAc;;;ADrB1D,IAAM,0CAA2D,CAAC;AAGzE,IAAM,UAAU,IAAI,gBAAwC;AAErD,IAAM,2BAA8D,QAAQ,OAAO,yCAAyC;AAAA,EACjI;AAAA,EACA;AACF,CAAC;;;ADXM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACdpI,SAAS,YAAAC,iBAA8B;AAEhC,IAAM,2BAA2BA,UAAS,mCAAmC,IAAI;;;ACGxF,SAAS,YAAAC,iBAAgB;AAElB,IAAM,mBAAmBA,UAAS,2BAA2B,IAAI;","names":["AsObjectFactory","asSchema","asSchema","asSchema","asSchema","AsObjectFactory","IsObjectFactory","asSchema","asSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/node-model",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/sdk-js": "~5.0.
|
|
40
|
-
"@xyo-network/account-model": "~5.
|
|
41
|
-
"@xyo-network/module-model": "~5.
|
|
42
|
-
"@xyo-network/payload-model": "~5.
|
|
39
|
+
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
+
"@xyo-network/account-model": "~5.3.0",
|
|
41
|
+
"@xyo-network/module-model": "~5.3.0",
|
|
42
|
+
"@xyo-network/payload-model": "~5.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "~7.2
|
|
46
|
-
"@xylabs/tsconfig": "~7.2
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
|
46
|
+
"@xylabs/tsconfig": "~7.3.2",
|
|
47
47
|
"typescript": "~5.9.3"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/sdk-js'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Payload } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export const ChildCertificationSchema = 'network.xyo.child.certification'
|
|
4
|
+
export const ChildCertificationSchema = asSchema('network.xyo.child.certification', true)
|
|
5
5
|
export type ChildCertificationSchema = typeof ChildCertificationSchema
|
|
6
6
|
|
|
7
7
|
export interface ChildCertificationFields {
|
package/src/Config.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'
|
|
2
2
|
import type { ModuleConfig } from '@xyo-network/module-model'
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
Payload,
|
|
5
|
+
Schema,
|
|
6
|
+
} from '@xyo-network/payload-model'
|
|
7
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
4
8
|
|
|
5
|
-
export const NodeConfigSchema = 'network.xyo.node.config'
|
|
9
|
+
export const NodeConfigSchema = asSchema('network.xyo.node.config', true)
|
|
6
10
|
export type NodeConfigSchema = typeof NodeConfigSchema
|
|
7
11
|
|
|
8
|
-
export type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends
|
|
12
|
+
export type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends Schema | void = void> = ModuleConfig<
|
|
9
13
|
WithAdditional<
|
|
10
14
|
{
|
|
11
15
|
archivist?: string
|
package/src/Queries/Attach.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export const NodeAttachQuerySchema = 'network.xyo.query.node.attach'
|
|
4
|
+
export const NodeAttachQuerySchema = asSchema('network.xyo.query.node.attach', true)
|
|
5
5
|
export type NodeAttachQuerySchema = typeof NodeAttachQuerySchema
|
|
6
6
|
|
|
7
7
|
export type NodeAttachQuery = Query<{
|
package/src/Queries/Attached.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
export const NodeAttachedQuerySchema = 'network.xyo.query.node.attached'
|
|
3
|
+
export const NodeAttachedQuerySchema = asSchema('network.xyo.query.node.attached', true)
|
|
4
4
|
export type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema
|
|
5
5
|
|
|
6
6
|
export type NodeAttachedQuery = Query<{
|
package/src/Queries/Certify.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export const NodeCertifyQuerySchema = 'network.xyo.query.node.certify'
|
|
4
|
+
export const NodeCertifyQuerySchema = asSchema('network.xyo.query.node.certify', true)
|
|
5
5
|
export type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema
|
|
6
6
|
|
|
7
7
|
export type NodeCertifyQuery = Query<{
|
package/src/Queries/Detach.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
-
import type
|
|
2
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
export const NodeDetachQuerySchema = 'network.xyo.query.node.detach'
|
|
4
|
+
export const NodeDetachQuerySchema = asSchema('network.xyo.query.node.detach', true)
|
|
5
5
|
export type NodeDetachQuerySchema = typeof NodeDetachQuerySchema
|
|
6
6
|
|
|
7
7
|
export type NodeDetachQuery = Query<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { asSchema, type Query } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
export const NodeRegisteredQuerySchema = 'network.xyo.query.node.registered'
|
|
3
|
+
export const NodeRegisteredQuerySchema = asSchema('network.xyo.query.node.registered', true)
|
|
4
4
|
export type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema
|
|
5
5
|
|
|
6
6
|
export type NodeRegisteredQuery = Query<{
|