@xyo-network/node-model 4.1.1 → 4.1.3
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/index.d.ts +10 -129
- package/package.json +10 -10
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,129 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const ChildCertificationSchema: "network.xyo.child.certification";
|
|
12
|
-
type ChildCertificationSchema = typeof ChildCertificationSchema;
|
|
13
|
-
interface ChildCertificationFields {
|
|
14
|
-
address: Address;
|
|
15
|
-
expiration: number;
|
|
16
|
-
}
|
|
17
|
-
type ChildCertification = Payload<ChildCertificationFields, ChildCertificationSchema>;
|
|
18
|
-
|
|
19
|
-
type ModuleAttachedEventArgs<TModule extends Module = Module> = ModuleEventArgs<TModule>;
|
|
20
|
-
interface ModuleAttachedEventData extends EventData {
|
|
21
|
-
moduleAttached: ModuleAttachedEventArgs;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type ModuleDetachedEventArgs<TModule extends Module = Module> = ModuleEventArgs<TModule>;
|
|
25
|
-
interface ModuleDetachedEventData extends EventData {
|
|
26
|
-
moduleDetached: ModuleDetachedEventArgs;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type ModuleRegisteredEventArgs<TModule extends Module = Module> = ModuleEventArgs<TModule>;
|
|
30
|
-
interface ModuleRegisteredEventData extends EventData {
|
|
31
|
-
moduleRegistered: ModuleRegisteredEventArgs;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type ModuleUnregisteredEventArgs<TModule extends Module = Module> = ModuleEventArgs<TModule>;
|
|
35
|
-
interface ModuleUnregisteredEventData extends EventData {
|
|
36
|
-
moduleUnregistered: ModuleUnregisteredEventArgs;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare const NodeConfigSchema: "network.xyo.node.config";
|
|
40
|
-
type NodeConfigSchema = typeof NodeConfigSchema;
|
|
41
|
-
type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
42
|
-
archivist?: string;
|
|
43
|
-
}, TConfig>, TSchema extends void ? TConfig extends Payload ? TConfig['schema'] : NodeConfigSchema : TSchema>;
|
|
44
|
-
|
|
45
|
-
interface NodeParams<TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>> extends ModuleParams<TConfig> {
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface NodeModuleEventData extends ModuleAttachedEventData, ModuleDetachedEventData, ModuleRegisteredEventData, ModuleUnregisteredEventData, ModuleEventData {
|
|
49
|
-
}
|
|
50
|
-
interface NodeModule<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData> extends Module<TParams, TEventData> {
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface NodeQueryFunctions {
|
|
54
|
-
attach: (id: ModuleIdentifier, external?: boolean) => Promise<Address | undefined>;
|
|
55
|
-
attachQuery: (id: ModuleIdentifier, external?: boolean, account?: AccountInstance) => Promise<ModuleQueryResult<AddressPayload>>;
|
|
56
|
-
attached: () => Promise<Address[]>;
|
|
57
|
-
attachedQuery: (account?: AccountInstance) => Promise<ModuleQueryResult<AddressPayload>>;
|
|
58
|
-
certify: (id: ModuleIdentifier) => Promise<ChildCertificationFields | undefined>;
|
|
59
|
-
certifyQuery: (id: ModuleIdentifier, account?: AccountInstance) => Promise<ModuleQueryResult<ChildCertification>>;
|
|
60
|
-
detach: (id: ModuleIdentifier) => Promise<Address | undefined>;
|
|
61
|
-
detachQuery: (id: ModuleIdentifier, account?: AccountInstance) => Promise<ModuleQueryResult<AddressPayload>>;
|
|
62
|
-
registered: () => Promise<Address[]>;
|
|
63
|
-
registeredQuery: (account?: AccountInstance) => Promise<ModuleQueryResult<AddressPayload>>;
|
|
64
|
-
}
|
|
65
|
-
interface NodeRegistrationFunctions {
|
|
66
|
-
register?: (mod: AttachableModuleInstance) => Promise<void>;
|
|
67
|
-
registeredModules?: () => AttachableModuleInstance[];
|
|
68
|
-
unregister?: (mod: ModuleInstance) => Promise<ModuleInstance>;
|
|
69
|
-
}
|
|
70
|
-
interface NodeInstance<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData> extends NodeModule<TParams, TEventData>, NodeQueryFunctions, NodeRegistrationFunctions, ModuleInstance<TParams, TEventData> {
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface AttachableNodeInstance<TParams extends NodeParams = NodeParams, TEventData extends NodeModuleEventData = NodeModuleEventData> extends NodeModule<TParams, TEventData>, AttachableModuleInstance<TParams, TEventData>, NodeInstance<TParams, TEventData> {
|
|
74
|
-
}
|
|
75
|
-
type AttachableNodeInstanceTypeCheck<T extends AttachableNodeInstance = AttachableNodeInstance> = TypeCheck<T>;
|
|
76
|
-
declare class IsAttachableNodeInstanceFactory<T extends AttachableNodeInstance = AttachableNodeInstance> extends IsObjectFactory<T> {
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare const asAttachableNodeInstance: _xylabs_object.AsTypeFunction<AttachableNodeInstance<NodeParams<_xyo_network_module_model.AnyConfigSchema<NodeConfig>>, NodeModuleEventData>>;
|
|
80
|
-
|
|
81
|
-
declare const requiredAttachableNodeInstanceFunctions: ObjectTypeShape;
|
|
82
|
-
declare const isAttachableNodeInstance: TypeCheck<AttachableNodeInstance>;
|
|
83
|
-
|
|
84
|
-
declare const NodeAttachQuerySchema: "network.xyo.query.node.attach";
|
|
85
|
-
type NodeAttachQuerySchema = typeof NodeAttachQuerySchema;
|
|
86
|
-
type NodeAttachQuery = Query<{
|
|
87
|
-
external?: boolean;
|
|
88
|
-
id: ModuleIdentifier;
|
|
89
|
-
schema: NodeAttachQuerySchema;
|
|
90
|
-
}>;
|
|
91
|
-
|
|
92
|
-
declare const NodeAttachedQuerySchema: "network.xyo.query.node.attached";
|
|
93
|
-
type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema;
|
|
94
|
-
type NodeAttachedQuery = Query<{
|
|
95
|
-
schema: NodeAttachedQuerySchema;
|
|
96
|
-
}>;
|
|
97
|
-
|
|
98
|
-
declare const NodeCertifyQuerySchema: "network.xyo.query.node.certify";
|
|
99
|
-
type NodeCertifyQuerySchema = typeof NodeCertifyQuerySchema;
|
|
100
|
-
type NodeCertifyQuery = Query<{
|
|
101
|
-
id: ModuleIdentifier;
|
|
102
|
-
schema: NodeCertifyQuerySchema;
|
|
103
|
-
}>;
|
|
104
|
-
|
|
105
|
-
declare const NodeDetachQuerySchema: "network.xyo.query.node.detach";
|
|
106
|
-
type NodeDetachQuerySchema = typeof NodeDetachQuerySchema;
|
|
107
|
-
type NodeDetachQuery = Query<{
|
|
108
|
-
id: ModuleIdentifier;
|
|
109
|
-
schema: NodeDetachQuerySchema;
|
|
110
|
-
}>;
|
|
111
|
-
|
|
112
|
-
declare const NodeRegisteredQuerySchema: "network.xyo.query.node.registered";
|
|
113
|
-
type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema;
|
|
114
|
-
type NodeRegisteredQuery = Query<{
|
|
115
|
-
schema: NodeRegisteredQuerySchema;
|
|
116
|
-
}>;
|
|
117
|
-
|
|
118
|
-
type NodeQueries = NodeAttachQuery | NodeCertifyQuery | NodeDetachQuery | NodeAttachedQuery | NodeRegisteredQuery;
|
|
119
|
-
type NodeModuleQueries = ModuleQueries | NodeQueries;
|
|
120
|
-
|
|
121
|
-
declare const isNodeInstance: TypeCheck<NodeInstance>;
|
|
122
|
-
declare const isNodeModule: TypeCheck<NodeModule>;
|
|
123
|
-
declare const asNodeModule: _xylabs_object.AsTypeFunction<NodeModule<NodeParams<_xyo_network_module_model.AnyConfigSchema<NodeConfig>>, NodeModuleEventData>>;
|
|
124
|
-
declare const asNodeInstance: _xylabs_object.AsTypeFunction<NodeInstance<NodeParams<_xyo_network_module_model.AnyConfigSchema<NodeConfig>>, NodeModuleEventData>>;
|
|
125
|
-
declare const withNodeModule: <R>(mod: any, closure: (mod: NodeModule<NodeParams<_xyo_network_module_model.AnyConfigSchema<NodeConfig>>, NodeModuleEventData>) => R) => R | undefined;
|
|
126
|
-
declare const withNodeInstance: <R>(mod: any, closure: (mod: NodeInstance<NodeParams<_xyo_network_module_model.AnyConfigSchema<NodeConfig>>, NodeModuleEventData>) => R) => R | undefined;
|
|
127
|
-
|
|
128
|
-
export { ChildCertificationSchema, IsAttachableNodeInstanceFactory, NodeAttachQuerySchema, NodeAttachedQuerySchema, NodeCertifyQuerySchema, NodeConfigSchema, NodeDetachQuerySchema, NodeRegisteredQuerySchema, asAttachableNodeInstance, asNodeInstance, asNodeModule, isAttachableNodeInstance, isNodeInstance, isNodeModule, requiredAttachableNodeInstanceFunctions, withNodeInstance, withNodeModule };
|
|
129
|
-
export type { AttachableNodeInstance, AttachableNodeInstanceTypeCheck, ChildCertification, ChildCertificationFields, ModuleAttachedEventArgs, ModuleAttachedEventData, ModuleDetachedEventArgs, ModuleDetachedEventData, ModuleRegisteredEventArgs, ModuleRegisteredEventData, ModuleUnregisteredEventArgs, ModuleUnregisteredEventData, NodeAttachQuery, NodeAttachedQuery, NodeCertifyQuery, NodeConfig, NodeDetachQuery, NodeInstance, NodeModule, NodeModuleEventData, NodeModuleQueries, NodeParams, NodeQueries, NodeQueryFunctions, NodeRegisteredQuery, NodeRegistrationFunctions };
|
|
1
|
+
export * from './attachable/index.ts';
|
|
2
|
+
export * from './ChildCertification.ts';
|
|
3
|
+
export * from './Config.ts';
|
|
4
|
+
export * from './EventsModels/index.ts';
|
|
5
|
+
export * from './instance.ts';
|
|
6
|
+
export * from './Node.ts';
|
|
7
|
+
export * from './Params.ts';
|
|
8
|
+
export * from './Queries/index.ts';
|
|
9
|
+
export * from './typeChecks.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/node-model",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/events": "^4.13.
|
|
33
|
-
"@xylabs/hex": "^4.13.
|
|
34
|
-
"@xylabs/object": "^4.13.
|
|
35
|
-
"@xylabs/typeof": "^4.13.
|
|
36
|
-
"@xyo-network/account-model": "^4.1.
|
|
37
|
-
"@xyo-network/module-model": "^4.1.
|
|
38
|
-
"@xyo-network/payload-model": "^4.1.
|
|
32
|
+
"@xylabs/events": "^4.13.16",
|
|
33
|
+
"@xylabs/hex": "^4.13.16",
|
|
34
|
+
"@xylabs/object": "^4.13.16",
|
|
35
|
+
"@xylabs/typeof": "^4.13.16",
|
|
36
|
+
"@xyo-network/account-model": "^4.1.3",
|
|
37
|
+
"@xyo-network/module-model": "^4.1.3",
|
|
38
|
+
"@xyo-network/payload-model": "^4.1.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
42
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
41
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
42
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
43
43
|
"typescript": "^5.8.3"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|