@xyo-network/witness-model 3.6.9 → 3.6.10
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,6 +1,6 @@
|
|
|
1
1
|
import type { Query } from '@xyo-network/payload-model';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export declare const WitnessObserveQuerySchema: "network.xyo.query.witness.observe";
|
|
3
|
+
export type WitnessObserveQuerySchema = typeof WitnessObserveQuerySchema;
|
|
4
4
|
export type WitnessObserveQuery = Query<{
|
|
5
5
|
payloads?: string[];
|
|
6
6
|
schema: WitnessObserveQuerySchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Observe.d.ts","sourceRoot":"","sources":["../../../src/Queries/Observe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,
|
|
1
|
+
{"version":3,"file":"Observe.d.ts","sourceRoot":"","sources":["../../../src/Queries/Observe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAG,mCAA4C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/attachable/asAttachableInstance.ts
|
|
5
2
|
import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/object";
|
|
6
3
|
|
|
@@ -10,20 +7,19 @@ import { isAttachableModuleInstance } from "@xyo-network/module-model";
|
|
|
10
7
|
|
|
11
8
|
// src/typeChecks.ts
|
|
12
9
|
import { AsObjectFactory } from "@xylabs/object";
|
|
13
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
IsInstanceFactory,
|
|
12
|
+
IsModuleFactory,
|
|
13
|
+
isModuleInstance,
|
|
14
|
+
WithFactory
|
|
15
|
+
} from "@xyo-network/module-model";
|
|
14
16
|
|
|
15
17
|
// src/Queries/Observe.ts
|
|
16
18
|
var WitnessObserveQuerySchema = "network.xyo.query.witness.observe";
|
|
17
19
|
|
|
18
20
|
// src/typeChecks.ts
|
|
19
|
-
var isWitnessInstance = new IsInstanceFactory().create({
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
isModuleInstance
|
|
23
|
-
]);
|
|
24
|
-
var isWitnessModule = new IsModuleFactory().create([
|
|
25
|
-
WitnessObserveQuerySchema
|
|
26
|
-
]);
|
|
21
|
+
var isWitnessInstance = new IsInstanceFactory().create({ observe: "function" }, [isModuleInstance]);
|
|
22
|
+
var isWitnessModule = new IsModuleFactory().create([WitnessObserveQuerySchema]);
|
|
27
23
|
var asWitnessModule = AsObjectFactory.create(isWitnessModule);
|
|
28
24
|
var asWitnessInstance = AsObjectFactory.create(isWitnessInstance);
|
|
29
25
|
var withWitnessModule = WithFactory.create(isWitnessModule);
|
|
@@ -43,9 +39,6 @@ var asAttachableWitnessInstance = AsObjectFactory2.create(isAttachableWitnessIns
|
|
|
43
39
|
// src/attachable/AttachableInstance.ts
|
|
44
40
|
import { IsObjectFactory as IsObjectFactory2 } from "@xylabs/object";
|
|
45
41
|
var IsAttachableWitnessInstanceFactory = class extends IsObjectFactory2 {
|
|
46
|
-
static {
|
|
47
|
-
__name(this, "IsAttachableWitnessInstanceFactory");
|
|
48
|
-
}
|
|
49
42
|
};
|
|
50
43
|
|
|
51
44
|
// src/Config.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Observe.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableWitnessInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableWitnessInstance = AsObjectFactory.create(isAttachableWitnessInstance)\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 { isWitnessInstance } from '../typeChecks.ts'\nimport type { AttachableWitnessInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableWitnessInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableWitnessInstance>()\n\nexport const isAttachableWitnessInstance: TypeCheck<AttachableWitnessInstance> = factory.create(requiredAttachableWitnessInstanceFunctions, [\n isWitnessInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/object'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { WitnessInstance } from './Instance.ts'\nimport type { WitnessModule } from './Module.ts'\nimport { WitnessObserveQuerySchema } from './Queries/index.ts'\n\nexport const isWitnessInstance = new IsInstanceFactory<WitnessInstance>().create({ observe: 'function' }, [isModuleInstance])\nexport const isWitnessModule = new IsModuleFactory<WitnessModule>().create([WitnessObserveQuerySchema])\n\nexport const asWitnessModule = AsObjectFactory.create(isWitnessModule)\nexport const asWitnessInstance = AsObjectFactory.create(isWitnessInstance)\nexport const withWitnessModule = WithFactory.create(isWitnessModule)\nexport const withWitnessInstance = WithFactory.create(isWitnessInstance)\n","import type { Query } from '@xyo-network/payload-model'\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/Observe.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableWitnessInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableWitnessInstance = AsObjectFactory.create(isAttachableWitnessInstance)\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 { isWitnessInstance } from '../typeChecks.ts'\nimport type { AttachableWitnessInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableWitnessInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableWitnessInstance>()\n\nexport const isAttachableWitnessInstance: TypeCheck<AttachableWitnessInstance> = factory.create(requiredAttachableWitnessInstanceFunctions, [\n isWitnessInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/object'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { WitnessInstance } from './Instance.ts'\nimport type { WitnessModule } from './Module.ts'\nimport { WitnessObserveQuerySchema } from './Queries/index.ts'\n\nexport const isWitnessInstance = new IsInstanceFactory<WitnessInstance>().create({ observe: 'function' }, [isModuleInstance])\nexport const isWitnessModule = new IsModuleFactory<WitnessModule>().create([WitnessObserveQuerySchema])\n\nexport const asWitnessModule = AsObjectFactory.create(isWitnessModule)\nexport const asWitnessInstance = AsObjectFactory.create(isWitnessInstance)\nexport const withWitnessModule = WithFactory.create(isWitnessModule)\nexport const withWitnessInstance = WithFactory.create(isWitnessInstance)\n","import type { Query } from '@xyo-network/payload-model'\n\nexport const WitnessObserveQuerySchema = 'network.xyo.query.witness.observe' as const\nexport type WitnessObserveQuerySchema = typeof WitnessObserveQuerySchema\n\nexport type WitnessObserveQuery = Query<{\n payloads?: string[]\n schema: WitnessObserveQuerySchema\n}>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { WitnessModuleEventData } from '../EventData.ts'\nimport type { WitnessInstance } from '../Instance.ts'\nimport type { WitnessParams } from '../Params.ts'\n\nexport interface AttachableWitnessInstance<\n TParams extends WitnessParams = WitnessParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends WitnessModuleEventData = WitnessModuleEventData,\n> extends WitnessInstance<TParams, TIn, TOut, TEventData>,\n AttachableModuleInstance<TParams, TEventData> {}\n\nexport type AttachableWitnessInstanceTypeCheck<T extends AttachableWitnessInstance = AttachableWitnessInstance> = TypeCheck<T>\n\nexport class IsAttachableWitnessInstanceFactory<T extends AttachableWitnessInstance = AttachableWitnessInstance> extends IsObjectFactory<T> {}\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 WitnessConfigSchema = 'network.xyo.witness.config' as const\nexport type WitnessConfigSchema = typeof WitnessConfigSchema\n\nexport type WitnessConfig<TConfig extends EmptyObject | Payload | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n schema: TConfig extends Payload ? TConfig['schema'] : WitnessConfigSchema\n },\n TConfig\n >,\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;;;ACDA,IAAM,4BAA4B;;;ADOlC,IAAM,oBAAoB,IAAI,kBAAmC,EAAE,OAAO,EAAE,SAAS,WAAW,GAAG,CAAC,gBAAgB,CAAC;AACrH,IAAM,kBAAkB,IAAI,gBAA+B,EAAE,OAAO,CAAC,yBAAyB,CAAC;AAE/F,IAAM,kBAAkB,gBAAgB,OAAO,eAAe;AAC9D,IAAM,oBAAoB,gBAAgB,OAAO,iBAAiB;AAClE,IAAM,oBAAoB,YAAY,OAAO,eAAe;AAC5D,IAAM,sBAAsB,YAAY,OAAO,iBAAiB;;;ADPhE,IAAM,6CAA8D,CAAC;AAG5E,IAAM,UAAU,IAAI,gBAA2C;AAExD,IAAM,8BAAoE,QAAQ,OAAO,4CAA4C;AAAA,EAC1I;AAAA,EACA;AACF,CAAC;;;ADZM,IAAM,8BAA8BC,iBAAgB,OAAO,2BAA2B;;;AIH7F,SAAS,mBAAAC,wBAAuB;AAkBzB,IAAM,qCAAN,cAAkHA,iBAAmB;AAAC;;;ACftI,IAAM,sBAAsB;","names":["AsObjectFactory","AsObjectFactory","IsObjectFactory"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/witness-model",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.10",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/object": "^4.
|
|
33
|
-
"@xylabs/promise": "^4.
|
|
34
|
-
"@xylabs/typeof": "^4.
|
|
35
|
-
"@xyo-network/account-model": "^3.6.
|
|
36
|
-
"@xyo-network/module-events": "^3.6.
|
|
37
|
-
"@xyo-network/module-model": "^3.6.
|
|
38
|
-
"@xyo-network/payload-model": "^3.6.
|
|
32
|
+
"@xylabs/object": "^4.5.1",
|
|
33
|
+
"@xylabs/promise": "^4.5.1",
|
|
34
|
+
"@xylabs/typeof": "^4.5.1",
|
|
35
|
+
"@xyo-network/account-model": "^3.6.10",
|
|
36
|
+
"@xyo-network/module-events": "^3.6.10",
|
|
37
|
+
"@xyo-network/module-model": "^3.6.10",
|
|
38
|
+
"@xyo-network/payload-model": "^3.6.10"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@xylabs/ts-scripts-yarn3": "^4.2.6",
|
|
42
42
|
"@xylabs/tsconfig": "^4.2.6",
|
|
43
|
-
"typescript": "^5.7.
|
|
43
|
+
"typescript": "^5.7.3"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
package/src/Queries/Observe.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Query } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export const WitnessObserveQuerySchema = 'network.xyo.query.witness.observe' as const
|
|
4
|
+
export type WitnessObserveQuerySchema = typeof WitnessObserveQuerySchema
|
|
5
5
|
|
|
6
6
|
export type WitnessObserveQuery = Query<{
|
|
7
7
|
payloads?: string[]
|