@xyo-network/node-model 3.18.9 → 4.0.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.
@@ -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/object'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { ObjectTypeShape } from '@xylabs/typeof'\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 { AsObjectFactory } from '@xylabs/object'\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 = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.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 { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = 'network.xyo.query.node.attach' as const\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = 'network.xyo.query.node.attached' as const\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = 'network.xyo.query.node.certify' as const\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 type { Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = 'network.xyo.query.node.detach' as const\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = 'network.xyo.query.node.registered' as const\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\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/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = 'network.xyo.child.certification' as const\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/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = 'network.xyo.node.config' as const\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | 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;AAEhC,SAAS,kCAAkC;;;ACH3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACAA,IAAM,wBAAwB;;;ACD9B,IAAM,0BAA0B;;;ACChC,IAAM,yBAAyB;;;ACA/B,IAAM,wBAAwB;;;ACD9B,IAAM,4BAA4B;;;ALOzC,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAAiB,gBAAgB;AAAA,EAC5C;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEA,IAAM,gBAAgB,IAAI,gBAA4B;AAE/C,IAAM,eAAe,cAAc,OAAO,CAAC,uBAAuB,CAAC;AAEnE,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;;;ADZM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACZ7H,IAAM,2BAA2B;;;ACCjC,IAAM,mBAAmB;","names":["AsObjectFactory","AsObjectFactory","IsObjectFactory"]}
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/object'\n\nimport { isAttachableNodeInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableNodeInstance = AsObjectFactory.create(isAttachableNodeInstance)\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { ObjectTypeShape } from '@xylabs/typeof'\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 { AsObjectFactory } from '@xylabs/object'\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 = instanceFactory.create(\n {\n attach: 'function',\n attached: 'function',\n certify: 'function',\n detach: 'function',\n registered: 'function',\n },\n [isModuleInstance],\n)\n\nconst moduleFactory = new IsModuleFactory<NodeModule>()\n\nexport const isNodeModule = moduleFactory.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 { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachQuerySchema = 'network.xyo.query.node.attach' as const\nexport type NodeAttachQuerySchema = typeof NodeAttachQuerySchema\n\nexport type NodeAttachQuery = Query<{\n external?: boolean\n id: ModuleIdentifier\n schema: NodeAttachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeAttachedQuerySchema = 'network.xyo.query.node.attached' as const\nexport type NodeAttachedQuerySchema = typeof NodeAttachedQuerySchema\n\nexport type NodeAttachedQuery = Query<{\n schema: NodeAttachedQuerySchema\n}>\n","import type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport const NodeCertifyQuerySchema = 'network.xyo.query.node.certify' as const\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 type { Query } from '@xyo-network/payload-model'\n\nexport const NodeDetachQuerySchema = 'network.xyo.query.node.detach' as const\nexport type NodeDetachQuerySchema = typeof NodeDetachQuerySchema\n\nexport type NodeDetachQuery = Query<{\n id: ModuleIdentifier\n schema: NodeDetachQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const NodeRegisteredQuerySchema = 'network.xyo.query.node.registered' as const\nexport type NodeRegisteredQuerySchema = typeof NodeRegisteredQuerySchema\n\nexport type NodeRegisteredQuery = Query<{\n schema: NodeRegisteredQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\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/hex'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const ChildCertificationSchema = 'network.xyo.child.certification' as const\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/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nexport const NodeConfigSchema = 'network.xyo.node.config' as const\nexport type NodeConfigSchema = typeof NodeConfigSchema\n\nexport type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | 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;AAEhC,SAAS,kCAAkC;;;ACH3C,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAmB;AAAA,EAAiB;AAAA,EAAkB;AAAA,OACjD;;;ACAA,IAAM,wBAAwB;;;ACD9B,IAAM,0BAA0B;;;ACChC,IAAM,yBAAyB;;;ACA/B,IAAM,wBAAwB;;;ACD9B,IAAM,4BAA4B;;;ALOzC,IAAM,kBAAkB,IAAI,kBAAgC;AAErD,IAAM,iBAAiB,gBAAgB;AAAA,EAC5C;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,EACd;AAAA,EACA,CAAC,gBAAgB;AACnB;AAEA,IAAM,gBAAgB,IAAI,gBAA4B;AAE/C,IAAM,eAAe,cAAc,OAAO,CAAC,uBAAuB,CAAC;AAEnE,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;;;ADZM,IAAM,2BAA2BC,iBAAgB,OAAO,wBAAwB;;;AQHvF,SAAS,mBAAAC,wBAAuB;AAczB,IAAM,kCAAN,cAAyGA,iBAAmB;AAAC;;;ACZ7H,IAAM,2BAA2B;;;ACCjC,IAAM,mBAAmB;","names":["AsObjectFactory","AsObjectFactory","IsObjectFactory"]}
@@ -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,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,gBAAgB,EAAG,yBAAkC,CAAA;AAClE,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,GAClB,OAAO,SAAS,OAAO,GACrB,OAAO,CAAC,QAAQ,CAAC,GACf,gBAAgB,GAClB,OAAO,CACZ,CAAA"}
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,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,eAAO,MAAM,gBAAgB,EAAG,yBAAkC,CAAA;AAClE,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,5 +1,5 @@
1
- import type { EmptyObject } from '@xylabs/object';
2
1
  import type { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model';
3
2
  import type { NodeConfig } from './Config.ts';
4
- export type NodeParams<TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>, TAdditionalParams extends EmptyObject | void = void> = ModuleParams<TConfig, TAdditionalParams>;
3
+ export interface NodeParams<TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>> extends ModuleParams<TConfig> {
4
+ }
5
5
  //# sourceMappingURL=Params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,MAAM,UAAU,CACpB,OAAO,SAAS,eAAe,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,EACzE,iBAAiB,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,IACjD,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA"}
1
+ {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,UAAU,CACzB,OAAO,SAAS,eAAe,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CACzE,SAAQ,YAAY,CAAC,OAAO,CAAC;CAAG"}
@@ -1,11 +1,2 @@
1
- export declare const asAttachableNodeInstance: import("@xylabs/object").AsTypeFunction<import("./AttachableInstance.ts").AttachableNodeInstance<import("@xylabs/base").BaseParamsFields & {
2
- account?: import("@xyo-network/account-model").AccountInstance | "random";
3
- addToResolvers?: boolean;
4
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
5
- allowNameResolution?: boolean;
6
- config: import("@xyo-network/module-model").AnyConfigSchema<import("../Config.ts").NodeConfig>;
7
- ephemeralQueryAccountEnabled?: boolean;
8
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
9
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
10
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("../Node.ts").NodeModuleEventData>>;
1
+ export declare const asAttachableNodeInstance: import("@xylabs/object").AsTypeFunction<import("./AttachableInstance.ts").AttachableNodeInstance<import("../Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("../Config.ts").NodeConfig>>, import("../Node.ts").NodeModuleEventData>>;
11
2
  //# sourceMappingURL=asAttachableInstance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/asAttachableInstance.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB;;;;;;;;;wGAAmD,CAAA"}
1
+ {"version":3,"file":"asAttachableInstance.d.ts","sourceRoot":"","sources":["../../../src/attachable/asAttachableInstance.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,wQAAmD,CAAA"}
@@ -1,63 +1,9 @@
1
1
  import type { NodeInstance } from './instance.ts';
2
2
  import type { NodeModule } from './Node.ts';
3
- export declare const isNodeInstance: import("@xylabs/object").TypeCheck<NodeInstance<import("@xylabs/base").BaseParamsFields & {
4
- account?: import("@xyo-network/account-model").AccountInstance | "random";
5
- addToResolvers?: boolean;
6
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
7
- allowNameResolution?: boolean;
8
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
9
- ephemeralQueryAccountEnabled?: boolean;
10
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
11
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
12
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>>;
13
- export declare const isNodeModule: import("@xyo-network/module-model").ModuleTypeCheck<NodeModule<import("@xylabs/base").BaseParamsFields & {
14
- account?: import("@xyo-network/account-model").AccountInstance | "random";
15
- addToResolvers?: boolean;
16
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
17
- allowNameResolution?: boolean;
18
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
19
- ephemeralQueryAccountEnabled?: boolean;
20
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
21
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
22
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>>;
23
- export declare const asNodeModule: import("@xylabs/object").AsTypeFunction<NodeModule<import("@xylabs/base").BaseParamsFields & {
24
- account?: import("@xyo-network/account-model").AccountInstance | "random";
25
- addToResolvers?: boolean;
26
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
27
- allowNameResolution?: boolean;
28
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
29
- ephemeralQueryAccountEnabled?: boolean;
30
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
31
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
32
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>>;
33
- export declare const asNodeInstance: import("@xylabs/object").AsTypeFunction<NodeInstance<import("@xylabs/base").BaseParamsFields & {
34
- account?: import("@xyo-network/account-model").AccountInstance | "random";
35
- addToResolvers?: boolean;
36
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
37
- allowNameResolution?: boolean;
38
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
39
- ephemeralQueryAccountEnabled?: boolean;
40
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
41
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
42
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>>;
43
- export declare const withNodeModule: <R>(mod: any, closure: (mod: NodeModule<import("@xylabs/base").BaseParamsFields & {
44
- account?: import("@xyo-network/account-model").AccountInstance | "random";
45
- addToResolvers?: boolean;
46
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
47
- allowNameResolution?: boolean;
48
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
49
- ephemeralQueryAccountEnabled?: boolean;
50
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
51
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
52
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
53
- export declare const withNodeInstance: <R>(mod: any, closure: (mod: NodeInstance<import("@xylabs/base").BaseParamsFields & {
54
- account?: import("@xyo-network/account-model").AccountInstance | "random";
55
- addToResolvers?: boolean;
56
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
57
- allowNameResolution?: boolean;
58
- config: import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>;
59
- ephemeralQueryAccountEnabled?: boolean;
60
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
61
- statusReporter?: import("@xyo-network/module-model").ModuleStatusReporter;
62
- } & import("@xyo-network/module-model").ModuleChildrenParams, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
3
+ export declare const isNodeInstance: import("@xylabs/object").TypeCheck<NodeInstance<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
4
+ export declare const isNodeModule: import("@xyo-network/module-model").ModuleTypeCheck<NodeModule<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
5
+ export declare const asNodeModule: import("@xylabs/object").AsTypeFunction<NodeModule<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
6
+ export declare const asNodeInstance: import("@xylabs/object").AsTypeFunction<NodeInstance<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>>;
7
+ export declare const withNodeModule: <R>(mod: any, closure: (mod: NodeModule<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
8
+ export declare const withNodeInstance: <R>(mod: any, closure: (mod: NodeInstance<import("./Params.ts").NodeParams<import("@xyo-network/module-model").AnyConfigSchema<import("./Config.ts").NodeConfig>>, import("./Node.ts").NodeModuleEventData>) => R) => R | undefined;
63
9
  //# sourceMappingURL=typeChecks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAK3C,eAAO,MAAM,cAAc;;;;;;;;;uGAS1B,CAAA;AAID,eAAO,MAAM,YAAY;;;;;;;;;uGAAkD,CAAA;AAE3E,eAAO,MAAM,YAAY;;;;;;;;;uGAAuC,CAAA;AAChE,eAAO,MAAM,cAAc;;;;;;;;;uGAAyC,CAAA;AACpE,eAAO,MAAM,cAAc;;;;;;;;;8HAAmC,CAAA;AAC9D,eAAO,MAAM,gBAAgB;;;;;;;;;8HAAqC,CAAA"}
1
+ {"version":3,"file":"typeChecks.d.ts","sourceRoot":"","sources":["../../src/typeChecks.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAK3C,eAAO,MAAM,cAAc,oNAS1B,CAAA;AAID,eAAO,MAAM,YAAY,mOAAkD,CAAA;AAE3E,eAAO,MAAM,YAAY,uNAAuC,CAAA;AAChE,eAAO,MAAM,cAAc,yNAAyC,CAAA;AACpE,eAAO,MAAM,cAAc,mOAAmC,CAAA;AAC9D,eAAO,MAAM,gBAAgB,qOAAqC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/node-model",
3
- "version": "3.18.9",
3
+ "version": "4.0.0",
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/types/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/events": "^4.11.21",
33
- "@xylabs/hex": "^4.11.21",
34
- "@xylabs/object": "^4.11.21",
35
- "@xylabs/typeof": "^4.11.21",
36
- "@xyo-network/account-model": "^3.18.9",
37
- "@xyo-network/module-model": "^3.18.9",
38
- "@xyo-network/payload-model": "^3.18.9"
32
+ "@xylabs/events": "^4.12.30",
33
+ "@xylabs/hex": "^4.12.30",
34
+ "@xylabs/object": "^4.12.30",
35
+ "@xylabs/typeof": "^4.12.30",
36
+ "@xyo-network/account-model": "^4.0.0",
37
+ "@xyo-network/module-model": "^4.0.0",
38
+ "@xyo-network/payload-model": "^4.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@xylabs/ts-scripts-yarn3": "^6.5.8",
42
- "@xylabs/tsconfig": "^6.5.8",
41
+ "@xylabs/ts-scripts-yarn3": "^6.5.12",
42
+ "@xylabs/tsconfig": "^6.5.12",
43
43
  "typescript": "^5.8.3"
44
44
  },
45
45
  "publishConfig": {
package/src/Config.ts CHANGED
@@ -12,9 +12,9 @@ export type NodeConfig<TConfig extends EmptyObject | Payload | void = void, TSch
12
12
  },
13
13
  TConfig
14
14
  >,
15
- TSchema extends void ?
16
- TConfig extends Payload ?
17
- TConfig['schema']
15
+ TSchema extends void
16
+ ? TConfig extends Payload
17
+ ? TConfig['schema']
18
18
  : NodeConfigSchema
19
19
  : TSchema
20
20
  >
package/src/Params.ts CHANGED
@@ -1,9 +1,7 @@
1
- import type { EmptyObject } from '@xylabs/object'
2
1
  import type { AnyConfigSchema, ModuleParams } from '@xyo-network/module-model'
3
2
 
4
3
  import type { NodeConfig } from './Config.ts'
5
4
 
6
- export type NodeParams<
5
+ export interface NodeParams<
7
6
  TConfig extends AnyConfigSchema<NodeConfig> = AnyConfigSchema<NodeConfig>,
8
- TAdditionalParams extends EmptyObject | void = void,
9
- > = ModuleParams<TConfig, TAdditionalParams>
7
+ > extends ModuleParams<TConfig> {}