@xyo-network/module-model 6.0.1 → 6.0.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/Config/Security.d.ts +4 -5
- package/dist/neutral/Config/Security.d.ts.map +1 -1
- package/dist/neutral/ModuleDescription.d.ts +2 -2
- package/dist/neutral/ModuleDescription.d.ts.map +1 -1
- package/dist/neutral/Payload/Address.d.ts +3 -4
- package/dist/neutral/Payload/Address.d.ts.map +1 -1
- package/dist/neutral/Payload/AddressPreviousHash.d.ts +2 -3
- package/dist/neutral/Payload/AddressPreviousHash.d.ts.map +1 -1
- package/dist/neutral/Queries/Subscribe.d.ts +2 -3
- package/dist/neutral/Queries/Subscribe.d.ts.map +1 -1
- package/dist/neutral/QueryableModule/QueryableModuleFields.d.ts +3 -3
- package/dist/neutral/QueryableModule/QueryableModuleFields.d.ts.map +1 -1
- package/dist/neutral/QueryableModule/QueryableModuleFunctions.d.ts +4 -4
- package/dist/neutral/QueryableModule/QueryableModuleFunctions.d.ts.map +1 -1
- package/dist/neutral/index.mjs +6 -2
- package/dist/neutral/index.mjs.map +2 -2
- package/dist/neutral/instance/Instance.d.ts +5 -5
- package/dist/neutral/instance/Instance.d.ts.map +1 -1
- package/dist/neutral/instance/ModuleRepository.d.ts +2 -2
- package/dist/neutral/instance/ModuleRepository.d.ts.map +1 -1
- package/dist/neutral/instance/ModuleResolver.d.ts +3 -2
- package/dist/neutral/instance/ModuleResolver.d.ts.map +1 -1
- package/dist/neutral/instance/ObjectFilter.d.ts +3 -2
- package/dist/neutral/instance/ObjectFilter.d.ts.map +1 -1
- package/package.json +20 -29
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type CosigningAddressSet = Address[];
|
|
1
|
+
import type { Schema, XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
2
|
+
export type CosigningAddressSet = XyoAddress[];
|
|
4
3
|
export interface ModuleSecurityConfig {
|
|
5
4
|
/** @field Will the module process queries that have unsigned BoundWitness in query tuples */
|
|
6
5
|
readonly allowAnonymous?: boolean;
|
|
7
6
|
/** @field If schema in record, then only these address sets can access query */
|
|
8
|
-
readonly allowed?: Record<Schema, (
|
|
7
|
+
readonly allowed?: Record<Schema, (XyoAddress | CosigningAddressSet)[]>;
|
|
9
8
|
/** @field If schema in record, then anyone except these addresses can access query */
|
|
10
|
-
readonly disallowed?: Record<Schema,
|
|
9
|
+
readonly disallowed?: Record<Schema, XyoAddress[]>;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=Security.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Security.d.ts","sourceRoot":"","sources":["../../../src/Config/Security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Security.d.ts","sourceRoot":"","sources":["../../../src/Config/Security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAEtE,MAAM,MAAM,mBAAmB,GAAG,UAAU,EAAE,CAAA;AAE9C,MAAM,WAAW,oBAAoB;IACnC,6FAA6F;IAC7F,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IAEjC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,UAAU,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;IAEvE,sFAAsF;IACtF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;CACnD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
2
2
|
import type { ModuleName } from './ModuleIdentifier.ts';
|
|
3
3
|
export interface ModuleDescription {
|
|
4
|
-
address:
|
|
4
|
+
address: XyoAddress;
|
|
5
5
|
children?: string[];
|
|
6
6
|
name?: ModuleName;
|
|
7
7
|
queries: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleDescription.d.ts","sourceRoot":"","sources":["../../src/ModuleDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ModuleDescription.d.ts","sourceRoot":"","sources":["../../src/ModuleDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,UAAU,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type Payload } from '@xyo-network/sdk-protocol-js';
|
|
1
|
+
import { type Payload, type XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
3
2
|
export declare const AddressSchema: "network.xyo.address" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
@@ -9,7 +8,7 @@ export declare const AddressChildSchema: "network.xyo.address.child" & {
|
|
|
9
8
|
};
|
|
10
9
|
export type AddressChildSchema = typeof AddressChildSchema;
|
|
11
10
|
export interface AddressFields {
|
|
12
|
-
address:
|
|
11
|
+
address: XyoAddress;
|
|
13
12
|
}
|
|
14
13
|
export type AddressPayload = Payload<AddressFields, AddressSchema>;
|
|
15
14
|
/**
|
|
@@ -26,7 +25,7 @@ export interface AddressChildFields extends AddressFields {
|
|
|
26
25
|
/**
|
|
27
26
|
* The public address of the root of the hierarchy
|
|
28
27
|
*/
|
|
29
|
-
root?:
|
|
28
|
+
root?: XyoAddress;
|
|
30
29
|
}
|
|
31
30
|
export type AddressChildPayload = Payload<AddressChildFields, AddressChildSchema>;
|
|
32
31
|
//# sourceMappingURL=Address.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../src/Payload/Address.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../src/Payload/Address.ts"],"names":[],"mappings":"AACA,OAAO,EAC4B,KAAK,OAAO,EAAE,KAAK,UAAU,EAC/D,MAAM,8BAA8B,CAAA;AAErC,eAAO,MAAM,aAAa;;CAAwC,CAAA;AAClE,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAEhD,eAAO,MAAM,kBAAkB;;CAA8C,CAAA;AAC7E,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,aAAa,CAAC,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB,sCAAuD,CAAA;AACpF,eAAO,MAAM,gBAAgB,yDAA2C,CAAA;AACxE,eAAO,MAAM,wBAAwB,+EAAmD,CAAA;AAExF,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type Payload } from '@xyo-network/sdk-protocol-js';
|
|
1
|
+
import { type Payload, type XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
3
2
|
export declare const AddressPreviousHashSchema: "network.xyo.address.hash.previous" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
6
5
|
export type AddressPreviousHashSchema = typeof AddressPreviousHashSchema;
|
|
7
6
|
export type AddressPreviousHashPayload = Payload<{
|
|
8
|
-
address:
|
|
7
|
+
address: XyoAddress;
|
|
9
8
|
previousHash?: string;
|
|
10
9
|
}, AddressPreviousHashSchema>;
|
|
11
10
|
//# sourceMappingURL=AddressPreviousHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressPreviousHash.d.ts","sourceRoot":"","sources":["../../../src/Payload/AddressPreviousHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"AddressPreviousHash.d.ts","sourceRoot":"","sources":["../../../src/Payload/AddressPreviousHash.ts"],"names":[],"mappings":"AAAA,OAAO,EACK,KAAK,OAAO,EAAE,KAAK,UAAU,EACxC,MAAM,8BAA8B,CAAA;AAErC,eAAO,MAAM,yBAAyB;;CAAsD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C;IACE,OAAO,EAAE,UAAU,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,EACD,yBAAyB,CAC1B,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type Query } from '@xyo-network/sdk-protocol-js';
|
|
1
|
+
import { type Query, type XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
3
2
|
export declare const ModuleSubscribeQuerySchema: "network.xyo.query.module.subscribe" & {
|
|
4
3
|
readonly __schema: true;
|
|
5
4
|
};
|
|
@@ -10,7 +9,7 @@ export interface ModuleSubscribeFilter {
|
|
|
10
9
|
}
|
|
11
10
|
export type ModuleSubscribeQuery = Query<{
|
|
12
11
|
/** @field The address that will receive notifications */
|
|
13
|
-
address:
|
|
12
|
+
address: XyoAddress;
|
|
14
13
|
/** @field A subscribe with a null for filter is an unsubscribe */
|
|
15
14
|
filter?: ModuleSubscribeFilter | null;
|
|
16
15
|
/** @field The maximum events queued per send [may increase frequency] */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subscribe.d.ts","sourceRoot":"","sources":["../../../src/Queries/Subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Subscribe.d.ts","sourceRoot":"","sources":["../../../src/Queries/Subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,EACK,KAAK,KAAK,EAAE,KAAK,UAAU,EACtC,MAAM,8BAA8B,CAAA;AAErC,eAAO,MAAM,0BAA0B;;CAAuD,CAAA;AAC9F,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,MAAM,WAAW,qBAAqB;IACpC,qHAAqH;IACrH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB;AAGD,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC;IACvC,yDAAyD;IACzD,OAAO,EAAE,UAAU,CAAA;IACnB,kEAAkE;IAClE,MAAM,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAA;IACrC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAC,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Payload, QueryBoundWitness } from '@xyo-network/sdk-protocol-js';
|
|
1
|
+
import type { Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { Payload, QueryBoundWitness, XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
3
3
|
import type { ModuleConfig } from '../Config/index.ts';
|
|
4
4
|
import type { ModuleName } from '../ModuleIdentifier.ts';
|
|
5
5
|
import type { ModuleQueryResult } from '../ModuleQueryResult.ts';
|
|
6
6
|
import type { QueryableModuleParams } from './QueryableModuleParams.ts';
|
|
7
7
|
export interface QueryableModuleFields<TParams extends QueryableModuleParams = QueryableModuleParams> {
|
|
8
|
-
address:
|
|
8
|
+
address: XyoAddress;
|
|
9
9
|
config: TParams['config'];
|
|
10
10
|
/** The name (if specified) or address of the module */
|
|
11
11
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryableModuleFields.d.ts","sourceRoot":"","sources":["../../../src/QueryableModule/QueryableModuleFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"QueryableModuleFields.d.ts","sourceRoot":"","sources":["../../../src/QueryableModule/QueryableModuleFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EACV,OAAO,EAAE,iBAAiB,EAAE,UAAU,EACvC,MAAM,8BAA8B,CAAA;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,MAAM,WAAW,qBAAqB,CAAC,OAAO,SAAS,qBAAqB,GAAG,qBAAqB;IAClG,OAAO,EAAE,UAAU,CAAA;IACnB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;IAEzB,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAA;IAEV,OAAO,CAAC,EAAE,UAAU,CAAA;IAEpB,MAAM,EAAE,OAAO,CAAA;IAEf,YAAY,EAAE,MAAM,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAElD,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,EAAE,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EAChG,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,OAAO,EAAE,EACpB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAClC,SAAS,EAAE,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EACpG,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,OAAO,EAAE,EACpB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,OAAO,CAAC,CAAA;CACzB;AAED,oDAAoD;AACpD,MAAM,WAAW,YAAY,CAAC,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,CAAE,SAAQ,qBAAqB,CAAC,OAAO,CAAC;CAAG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AccountInstance, ModuleManifestPayload, Payload } from '@xyo-network/sdk-protocol-js';
|
|
1
|
+
import type { Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { AccountInstance, ModuleManifestPayload, Payload, XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
3
3
|
import type { ModuleQueryResult } from '../ModuleQueryResult.ts';
|
|
4
4
|
import type { AddressPayload, AddressPreviousHashPayload } from '../Payload/index.ts';
|
|
5
5
|
export interface QueryableModuleFunctions {
|
|
6
|
-
manifest: (maxDepth?: number, ignoreAddresses?:
|
|
7
|
-
manifestQuery: (account: AccountInstance, maxDepth?: number, ignoreAddresses?:
|
|
6
|
+
manifest: (maxDepth?: number, ignoreAddresses?: XyoAddress[]) => Promisable<ModuleManifestPayload>;
|
|
7
|
+
manifestQuery: (account: AccountInstance, maxDepth?: number, ignoreAddresses?: XyoAddress[]) => Promisable<ModuleQueryResult<ModuleManifestPayload>>;
|
|
8
8
|
moduleAddress: () => Promisable<(AddressPreviousHashPayload | AddressPayload)[]>;
|
|
9
9
|
state: () => Promisable<Payload[]>;
|
|
10
10
|
stateQuery: (account: AccountInstance) => Promisable<ModuleQueryResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryableModuleFunctions.d.ts","sourceRoot":"","sources":["../../../src/QueryableModule/QueryableModuleFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"QueryableModuleFunctions.d.ts","sourceRoot":"","sources":["../../../src/QueryableModule/QueryableModuleFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EACV,eAAe,EAAE,qBAAqB,EAAE,OAAO,EAAE,UAAU,EAC5D,MAAM,8BAA8B,CAAA;AAErC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAErF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,UAAU,EAAE,KAAK,UAAU,CAAC,qBAAqB,CAAC,CAAA;IAClG,aAAa,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,UAAU,EAAE,KAAK,UAAU,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAA;IACpJ,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,0BAA0B,GAAG,cAAc,CAAC,EAAE,CAAC,CAAA;IAChF,KAAK,EAAE,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IAClC,UAAU,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,UAAU,CAAC,iBAAiB,CAAC,CAAA;CACxE;AAED,uDAAuD;AACvD,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;CAAG"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -160,7 +160,9 @@ import { asSchema as asSchema5 } from "@xyo-network/sdk-protocol-js";
|
|
|
160
160
|
var ModuleStateQuerySchema = asSchema5("network.xyo.query.module.state", true);
|
|
161
161
|
|
|
162
162
|
// src/Queries/Subscribe.ts
|
|
163
|
-
import {
|
|
163
|
+
import {
|
|
164
|
+
asSchema as asSchema6
|
|
165
|
+
} from "@xyo-network/sdk-protocol-js";
|
|
164
166
|
var ModuleSubscribeQuerySchema = asSchema6("network.xyo.query.module.subscribe", true);
|
|
165
167
|
|
|
166
168
|
// src/QueryableModule/asQueryableModuleObject.ts
|
|
@@ -382,7 +384,9 @@ var asAddressPayload = AsObjectFactory5.create(isAddressPayload);
|
|
|
382
384
|
var asOptionalAddressPayload = AsObjectFactory5.createOptional(isAddressPayload);
|
|
383
385
|
|
|
384
386
|
// src/Payload/AddressPreviousHash.ts
|
|
385
|
-
import {
|
|
387
|
+
import {
|
|
388
|
+
asSchema as asSchema8
|
|
389
|
+
} from "@xyo-network/sdk-protocol-js";
|
|
386
390
|
var AddressPreviousHashSchema = asSchema8("network.xyo.address.hash.previous", true);
|
|
387
391
|
|
|
388
392
|
// src/Payload/Description.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Config/Config.ts", "../../src/CreatableModule/CreatableModule.ts", "../../src/CreatableModule/CreatableModuleRegistry.ts", "../../src/CreatableModule/LabeledCreatableModule.ts", "../../src/CreatableModule/LabeledCreatableModuleFactory.ts", "../../src/CreatableModule/ModuleFactory.ts", "../../src/DetailsError.ts", "../../src/instance/asModuleInstance.ts", "../../src/instance/isModuleInstance.ts", "../../src/QueryableModule/asQueryableModule.ts", "../../src/Queries/Manifest.ts", "../../src/Queries/ModuleAddress/Query.ts", "../../src/Queries/State.ts", "../../src/Queries/Subscribe.ts", "../../src/QueryableModule/asQueryableModuleObject.ts", "../../src/QueryableModule/isQueryableModuleObject.ts", "../../src/QueryableModule/IsQueryableModuleFactory.ts", "../../src/QueryableModule/isQueryableModule.ts", "../../src/instance/attachable/asAttachableInstance.ts", "../../src/instance/attachable/isAttachableInstance.ts", "../../src/instance/attachable/AttachableInstance.ts", "../../src/instance/Instance.ts", "../../src/instance/ObjectFilter.ts", "../../src/instance/ModuleFilter.ts", "../../src/instance/ObjectResolver.ts", "../../src/instance/ModuleResolver.ts", "../../src/Labels/Labels.ts", "../../src/Labels/standard/View.ts", "../../src/lib/duplicateModules.ts", "../../src/lib/serializable.ts", "../../src/ModuleIdentifier.ts", "../../src/Payload/Address.ts", "../../src/Payload/AddressPreviousHash.ts", "../../src/Payload/Description.ts", "../../src/Payload/ModuleState.ts", "../../src/withModule.ts"],
|
|
4
|
-
"sourcesContent": ["import type { EmptyObject } from '@xylabs/sdk-js'\nimport {\n asSchema, type Payload, type Schema,\n} from '@xyo-network/sdk-protocol-js'\n\nimport type { ArchivingModuleConfig } from './Archiving.ts'\nimport type { ModuleConfigFields } from './Fields.ts'\nimport type { ArchivingReentrancyConfig } from './Reentrancy.ts'\n\nexport const ModuleConfigSchema = asSchema('network.xyo.module.config', true)\nexport type ModuleConfigSchema = typeof ModuleConfigSchema\n\nexport type WithAdditional<T extends EmptyObject = EmptyObject, TAdditional extends EmptyObject = EmptyObject>\n = T & TAdditional\n\nexport type ModuleConfig<TConfig extends EmptyObject | Payload = EmptyObject, TSchema extends Schema | void = void> = Payload<\n WithAdditional<ArchivingModuleConfig & ModuleConfigFields & ArchivingReentrancyConfig, TConfig>,\n TSchema extends void ? TConfig extends Payload ? TConfig['schema']\n : Schema : TSchema\n>\n\nexport type AnyConfigSchema<TConfig extends Omit<ModuleConfig, 'schema'> & { schema: Schema } = Omit<ModuleConfig, 'schema'> & { schema: Schema }>\n = ModuleConfig<TConfig, Schema>\n\nexport type OptionalConfigSchema<TConfig extends AnyConfigSchema<ModuleConfig> = AnyConfigSchema<ModuleConfig>> = Omit<TConfig, 'schema'> & {\n schema?: TConfig['schema']\n}\n\nexport type AnyModuleConfig = AnyConfigSchema<ModuleConfig>\n", "import type {\n Creatable, CreatableInstance, Logger,\n} from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleEventData } from '../EventsModels/index.ts'\nimport type { AttachableModuleInstance } from '../instance/index.ts'\nimport type { QueryableModuleParams } from '../QueryableModule/index.ts'\n\nexport interface CreatableModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends CreatableInstance<TParams, TEventData>, AttachableModuleInstance<TParams, TEventData> {}\n\nexport interface CreatableModuleFactory<T extends CreatableModuleInstance = CreatableModuleInstance>\n extends Omit<CreatableModule<T>, 'create' | 'createHandler' | 'paramsHandler'> {\n creatableModule: CreatableModule<T>\n defaultParams?: Partial<T['params']>\n\n create(\n this: CreatableModuleFactory<T>,\n params?: Partial<T['params']>): Promise<T>\n}\n\nexport interface CreatableModule<T extends CreatableModuleInstance = CreatableModuleInstance> extends Creatable<T> {\n configSchemas: Schema[]\n defaultConfigSchema: Schema\n defaultLogger?: Logger\n new(key: unknown, params: Partial<T['params']>): T\n factory(params?: Partial<T['params']>): CreatableModuleFactory<T>\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous creation pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function creatableModule<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends CreatableModule<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import { isTruthy } from '@xylabs/sdk-js'\nimport { asSchema, type Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { Labels } from '../Labels/index.ts'\nimport type { CreatableModuleFactory, CreatableModuleInstance } from './CreatableModule.ts'\nimport type { LabeledCreatableModuleFactory } from './LabeledCreatableModuleFactory.ts'\n\nexport type CreatableModuleRegistry = Record<Schema, (CreatableModuleFactory | LabeledCreatableModuleFactory)[] | undefined>\n\nconst buildModuleFactory = <TModule extends CreatableModuleInstance>(\n mod: CreatableModuleFactory<TModule>,\n labels?: Labels,\n): LabeledCreatableModuleFactory<TModule> => {\n const factory: LabeledCreatableModuleFactory<TModule> = {\n // Destructure instance properties\n ...mod,\n\n configSchemas: mod.configSchemas,\n // Copy static methods\n create: mod.create.bind(mod),\n\n defaultConfigSchema: mod.defaultConfigSchema,\n // Merge module & supplied labels\n labels: { ...(mod as LabeledCreatableModuleFactory).labels, ...labels },\n }\n return factory\n}\n\nexport const registerCreatableModuleFactory = <TModule extends CreatableModuleInstance>(\n registry: CreatableModuleRegistry,\n factory: CreatableModuleFactory<TModule> | LabeledCreatableModuleFactory<TModule>,\n labels?: Labels,\n /** register this as the primary factory for every schema it supports */\n primary: boolean | Schema | Schema[] = false,\n) => {\n const primarySchemas\n = primary !== true && isTruthy(primary)\n ? Array.isArray(primary)\n ? primary\n : [primary]\n : []\n\n for (const primarySchema of primarySchemas) {\n if (!factory.configSchemas.includes(primarySchema)) {\n console.warn(`Primary schema ${String(primary)} not found in factory configSchemas`)\n }\n }\n\n const isPrimaryForSchema = (schema: Schema) => {\n switch (typeof primary) {\n case 'boolean': {\n return primary\n }\n case 'string': {\n return schema === primary\n }\n case 'object': {\n if (Array.isArray(primary)) {\n return primary.includes(schema)\n }\n }\n }\n throw new Error(`Invalid primary value: ${String(primary)}`)\n }\n\n const factoryClone: LabeledCreatableModuleFactory<TModule> = buildModuleFactory(factory, labels)\n // add the defaultConfigSchema as the first key in the registry\n registry[factory.defaultConfigSchema] = [factoryClone, ...(registry[factoryClone.defaultConfigSchema] ?? [])]\n for (const schema of factoryClone.configSchemas) {\n registry[schema] = isPrimaryForSchema(schema) ? [factoryClone, ...(registry[schema] ?? [])] : [...(registry[schema] ?? []), factoryClone]\n }\n}\n\nexport const registerCreatableModuleFactories = (\n factories: (CreatableModuleFactory | LabeledCreatableModuleFactory)[],\n registry: CreatableModuleRegistry = {},\n primary = false,\n) => {\n for (const factory of factories) {\n registerCreatableModuleFactory(registry, factory, undefined, primary)\n }\n return registry\n}\n\n/** @deprecated use registerCreatableModuleFactory instead */\nexport const assignCreatableModuleRegistry = (\n target: CreatableModuleRegistry = {},\n ...sources: CreatableModuleRegistry[]\n): CreatableModuleRegistry => {\n for (const source of sources)\n for (const [schemaString, factories] of Object.entries(source)) {\n const schema = asSchema(schemaString, true)\n if (factories) {\n const existingFactories = target[schema]\n target[schema] = [...existingFactories ?? [], ...factories]\n }\n }\n\n return target\n}\n", "import type { WithOptionalLabels } from '../Labels/index.ts'\nimport type { CreatableModule, CreatableModuleInstance } from './CreatableModule.ts'\nimport type { LabeledCreatableModuleFactory } from './LabeledCreatableModuleFactory.ts'\n\nexport interface LabeledCreatableModule<T extends CreatableModuleInstance = CreatableModuleInstance> extends CreatableModule<T>, WithOptionalLabels {\n factory(params?: Partial<T['params']>): LabeledCreatableModuleFactory<T>\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous creation pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function labeledCreatableModule<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends LabeledCreatableModule<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import type { WithOptionalLabels } from '../Labels/index.ts'\nimport type { CreatableModuleFactory, CreatableModuleInstance } from './CreatableModule.ts'\n\nexport type LabeledCreatableModuleFactory<T extends CreatableModuleInstance = CreatableModuleInstance> = CreatableModuleFactory<T> & WithOptionalLabels\n\nexport const hasLabels = (factory: CreatableModuleFactory | LabeledCreatableModuleFactory): factory is LabeledCreatableModuleFactory => {\n return (factory as LabeledCreatableModuleFactory).labels !== undefined\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous labeled creation factory pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function labeledCreatableModuleFactory<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends LabeledCreatableModuleFactory<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import type { Logger } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { Labels, WithOptionalLabels } from '../Labels/index.ts'\nimport type {\n CreatableModule, CreatableModuleFactory, CreatableModuleInstance,\n} from './CreatableModule.ts'\n\nexport class ModuleFactory<TModule extends CreatableModuleInstance> implements CreatableModuleFactory<TModule> {\n configSchemas: CreatableModule<TModule>['configSchemas']\n\n creatableModule: CreatableModule<TModule>\n\n defaultConfigSchema: Schema\n\n defaultLogger?: Logger\n\n defaultParams?: Partial<TModule['params']>\n\n labels?: Labels\n\n constructor(\n creatableModule: CreatableModule<TModule>,\n params?: Partial<TModule['params']>,\n labels: Labels = {},\n ) {\n this.creatableModule = creatableModule\n this.defaultParams = params\n this.configSchemas = creatableModule.configSchemas\n this.defaultConfigSchema = creatableModule.defaultConfigSchema\n assertEx(this.configSchemas.includes(this.defaultConfigSchema), () => 'defaultConfigSchema must be in configSchemas')\n this.labels = Object.assign({}, (creatableModule as WithOptionalLabels).labels ?? {}, labels ?? {})\n }\n\n static withParams<T extends CreatableModuleInstance>(\n creatableModule: CreatableModule<T>,\n params?: Partial<T['params']>,\n labels: Labels = {},\n ) {\n return new ModuleFactory<T>(creatableModule, params, labels)\n }\n\n create(this: CreatableModuleFactory<TModule>, params?: Partial<TModule['params']>): Promise<TModule> {\n const mergedParams: TModule['params'] = {\n ...this.defaultParams,\n ...params,\n config: {\n schema: this.creatableModule.defaultConfigSchema,\n ...this.defaultParams?.config,\n ...params?.config,\n },\n }\n return this.creatableModule.create<TModule>(mergedParams)\n }\n\n factory<T extends CreatableModuleInstance>(this: CreatableModuleFactory<T>, params?: Partial<T['params']>, labels: Labels = {}): CreatableModuleFactory<T> {\n return new ModuleFactory<T>(this.creatableModule, params, labels)\n }\n}\n", "import type { JsonValue } from '@xylabs/sdk-js'\n\nexport class ModuleDetailsError extends Error {\n details?: JsonValue\n constructor(\n message: string,\n details?: JsonValue,\n ) {\n super(message)\n this.details = details\n this.name = 'ModuleError'\n }\n}\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isModuleInstance } from './isModuleInstance.ts'\n\nexport const asModuleInstance = AsObjectFactory.create(isModuleInstance)\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModule } from '../QueryableModule/index.ts'\nimport type { ModuleInstance } from './Instance.ts'\n\nexport const requiredModuleInstanceFunctions: ObjectTypeShape = {\n manifest: 'function',\n state: 'function',\n}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<ModuleInstance>()\n\nexport const isModuleInstance: TypeCheck<ModuleInstance> = factory.create(requiredModuleInstanceFunctions, [isQueryableModule])\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModule } from './isQueryableModule.ts'\n\nexport const asQueryableModule = AsObjectFactory.create(isQueryableModule)\n\n/** @deprecated use asQueryableModule instead */\nexport const asModule = asQueryableModule\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleManifestQuerySchema = asSchema('network.xyo.query.module.manifest', true)\nexport type ModuleManifestQuerySchema = typeof ModuleManifestQuerySchema\n\nexport type ModuleManifestQuery = Query<{\n maxDepth?: number\n schema: ModuleManifestQuerySchema\n}>\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleAddressQuerySchema = asSchema('network.xyo.query.module.address', true)\nexport type ModuleAddressQuerySchema = typeof ModuleAddressQuerySchema\n\nexport type ModuleAddressQuery = Query<{\n schema: ModuleAddressQuerySchema\n}>\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleStateQuerySchema = asSchema('network.xyo.query.module.state', true)\nexport type ModuleStateQuerySchema = typeof ModuleStateQuerySchema\n\nexport type ModuleStateQuery = Query<void, ModuleStateQuerySchema>\n", "import type { Address } from '@xylabs/sdk-js'\nimport { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleSubscribeQuerySchema = asSchema('network.xyo.query.module.subscribe', true)\nexport type ModuleSubscribeQuerySchema = typeof ModuleSubscribeQuerySchema\n\nexport interface ModuleSubscribeFilter {\n /** @field if specified, at least one of the schemas must be present in the boundwtness to generate a notification */\n schema?: string[]\n}\n\n// requests notification when a boundwitness is added to the modules chain that meets the filter criteria\nexport type ModuleSubscribeQuery = Query<{\n /** @field The address that will receive notifications */\n address: Address\n /** @field A subscribe with a null for filter is an unsubscribe */\n filter?: ModuleSubscribeFilter | null\n /** @field The maximum events queued per send [may increase frequency] */\n maxQueue?: number\n schema: ModuleSubscribeQuerySchema\n}>\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\n\nexport const asQueryableModuleObject = AsObjectFactory.create(isQueryableModuleObject)\n\n/** @deprecated use asQueryableModuleObject instead */\nexport const asModuleObject = asQueryableModuleObject\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport const requiredQueryableModuleShape: ObjectTypeShape = {\n address: 'string',\n queries: 'array',\n query: 'function',\n}\n\n/** @deprecated use requiredQueryableModuleShape instead */\nexport const requiredModuleShape: ObjectTypeShape = requiredQueryableModuleShape\n\nconst factory = new IsObjectFactory<QueryableModule>()\n\nexport const isQueryableModuleObject: TypeCheck<QueryableModule> = factory.create(requiredQueryableModuleShape)\n\n/** @deprecated use isQueryableModuleObject instead */\nexport const isModuleObject: TypeCheck<QueryableModule> = isQueryableModuleObject\n", "import type {\n AnyNonPromise,\n AnyObject, EmptyObject, TypeCheck,\n TypeCheckConfig,\n} from '@xylabs/sdk-js'\n\nimport { asQueryableModuleObject } from './asQueryableModuleObject.ts'\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport type QueryableModuleTypeCheck<T extends QueryableModule = QueryableModule> = TypeCheck<T>\n\n/** @deprecated use QueryableModuleTypeCheck instead */\nexport type ModuleTypeCheck<T extends QueryableModule = QueryableModule> = TypeCheck<T>\n\nexport class IsQueryableModuleFactory<T extends QueryableModule = QueryableModule> {\n create(expectedQueries?: string[], additionalChecks?: TypeCheck<AnyObject | EmptyObject>[]): QueryableModuleTypeCheck<T> {\n const result = (obj: AnyNonPromise, config?: TypeCheckConfig | number): obj is T => {\n const mod = asQueryableModuleObject(obj)\n return (\n isQueryableModuleObject(mod, config)\n // eslint-disable-next-line unicorn/no-array-reduce\n && (expectedQueries?.reduce((prev, query) => prev && mod.queries.includes(query), true) ?? true)\n // perform additional checks\n // eslint-disable-next-line unicorn/no-array-reduce\n && (additionalChecks?.reduce((prev, check) => prev && check(obj, config), true) ?? true)\n )\n }\n return result\n }\n}\n\n/** @deprecated use IsQueryableModuleFactory instead */\nexport class IsModuleFactory<T extends QueryableModule = QueryableModule> extends IsQueryableModuleFactory<T> {}\n", "import type { TypeCheck } from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport { ModuleStateQuerySchema } from '../Queries/index.ts'\nimport { IsQueryableModuleFactory } from './IsQueryableModuleFactory.ts'\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport const requiredQueryableModuleQueries: Schema[] = [ModuleStateQuerySchema]\n\n/** @deprecated use requiredQueryableModuleQueries instead */\nexport const requiredModuleQueries: Schema[] = requiredQueryableModuleQueries\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsQueryableModuleFactory<QueryableModule>()\n\nexport const isQueryableModule: TypeCheck<QueryableModule> = factory.create(requiredQueryableModuleQueries, [isQueryableModuleObject])\n\n/** @deprecated use isQueryableModule instead */\nexport const isModule: TypeCheck<QueryableModule> = isQueryableModule\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableModuleInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableModuleInstance = AsObjectFactory.create(isAttachableModuleInstance)\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isModuleInstance } from '../isModuleInstance.ts'\nimport type { AttachableModuleInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableModuleInstanceFunctions: ObjectTypeShape = {\n downResolver: 'object',\n upResolver: 'object',\n}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableModuleInstance>()\n\nexport const isAttachableModuleInstance: TypeCheck<AttachableModuleInstance> = factory.create(requiredAttachableModuleInstanceFunctions, [\n isModuleInstance,\n])\n", "import type { CreatableInstance, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport type { ModuleEventData } from '../../EventsModels/index.ts'\nimport type { QueryableModuleParams } from '../../QueryableModule/index.ts'\nimport type { ModuleInstance } from '../Instance.ts'\nimport type { ModuleResolverInstance } from '../ModuleResolver.ts'\n\nexport interface AttachableModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends ModuleInstance<TParams, TEventData>, CreatableInstance<TParams, TEventData> {\n config: TParams['config']\n /* The resolver is a 'down' resolver. It can resolve the module or any children (if it is a node for example), that are in the module */\n readonly downResolver: ModuleResolverInstance\n\n // The resolver that gets called by children (usually only Nodes have this)\n readonly privateResolver: ModuleResolverInstance\n\n /* The resolver is a 'up' resolver. It can resolve the parent or any children of the parent */\n /* This is set by a NodeModule when attaching to the module */\n readonly upResolver: ModuleResolverInstance\n}\n\nexport type AttachableModuleInstanceTypeCheck<T extends AttachableModuleInstance = AttachableModuleInstance> = TypeCheck<T>\n\nexport class IsAttachableModuleInstanceFactory<T extends AttachableModuleInstance = AttachableModuleInstance> extends IsObjectFactory<T> {}\n", "import type {\n Address, CreatableStatus, Promisable,\n TypeCheck,\n} from '@xylabs/sdk-js'\nimport { IsObjectFactory, toSafeJsonString } from '@xylabs/sdk-js'\nimport type { AccountInstance } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleEventData } from '../EventsModels/index.ts'\nimport type { ModuleIdentifier, ModuleName } from '../ModuleIdentifier.ts'\nimport type {\n QueryableModule, QueryableModuleFunctions,\n QueryableModuleParams,\n} from '../QueryableModule/index.ts'\nimport type { Direction } from './ObjectFilter.ts'\nimport type { ObjectResolver } from './ObjectResolver.ts'\n\nexport type ModulePipeLine = Lowercase<'one-to-one' | 'one-to-many' | 'many-to-one' | 'many-to-many'>\n\nexport type ModuleStatus = CreatableStatus | 'wrapped' | 'proxy'\n\nexport class DeadModuleError extends Error {\n error: Error | undefined\n id: ModuleIdentifier\n constructor(\n id: ModuleIdentifier,\n error: Error | undefined,\n msg = 'Dead Module Error',\n ) {\n super(`${msg} [${id}]: ${error?.message ?? toSafeJsonString(error)}`)\n this.id = id\n this.error = error\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, DeadModuleError.prototype)\n }\n}\n\nexport interface AddressToWeakInstanceCache {\n get: (address: Address) => WeakRef<ModuleInstance> | null\n set: (address: Address, instance: WeakRef<ModuleInstance> | null) => void\n}\n\nexport interface ModuleFamilyFunctions {\n account?: AccountInstance\n addParent: (mod: ModuleInstance) => void\n addressCache?: (direction: Direction, includePrivate: boolean) => AddressToWeakInstanceCache | undefined\n modName?: ModuleName\n parents: () => Promisable<ModuleInstance[]>\n privateChildren: () => Promisable<ModuleInstance[]>\n publicChildren: () => Promisable<ModuleInstance[]>\n removeParent: (address: Address) => void\n siblings: () => Promisable<ModuleInstance[]>\n}\n\nexport interface ModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends QueryableModule<TParams, TEventData>,\n ObjectResolver<ModuleInstance>,\n QueryableModuleFunctions,\n ModuleFamilyFunctions {\n readonly pipeline?: ModulePipeLine\n\n // if the module has become non-functional, such as a broken bridge connection, this will be 'dead'\n readonly status: ModuleStatus | null\n}\n\nexport type InstanceTypeCheck<T extends ModuleInstance = ModuleInstance> = TypeCheck<T>\n\nexport class IsInstanceFactory<T extends ModuleInstance = ModuleInstance> extends IsObjectFactory<T> {}\n", "import type {\n Address,\n AnyObject, EmptyObject, TypeCheck,\n} from '@xylabs/sdk-js'\n\nimport type { ModuleName } from '../ModuleIdentifier.ts'\n\nexport type Direction = 'up' | 'down' | 'all'\nexport type Visibility = 'public' | 'private' | 'all'\n\nexport interface ResolveStrategy {\n maxDepth?: number\n required?: boolean | 'warn' | 'log'\n retry?: number\n timeout?: number\n}\n\nexport interface ObjectFilterOptions<T extends EmptyObject = AnyObject> extends ResolveStrategy {\n direction?: Direction\n identity?: TypeCheck<T>\n}\n\nexport interface AddressObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n address: Address[]\n}\n\nexport const isAddressObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is AddressObjectFilter<T> =>\n (value as AddressObjectFilter<T>).address !== undefined\n\nexport interface NameObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n name: ModuleName[]\n}\n\nexport const isNameObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is NameObjectFilter<T> =>\n (value as NameObjectFilter<T>).name !== undefined\n\nexport interface QueryObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n query: string[][]\n}\n\nexport const isQueryObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is QueryObjectFilter<T> =>\n (value as QueryObjectFilter<T>).query !== undefined\n\nexport type AnyObjectFilter<T extends EmptyObject = AnyObject> = Partial<AddressObjectFilter<T>>\n & Partial<NameObjectFilter<T>>\n & Partial<QueryObjectFilter<T>>\n\nexport type ObjectFilter<T extends EmptyObject> = ObjectFilterOptions<T> | AddressObjectFilter<T> | NameObjectFilter<T> | QueryObjectFilter<T>\n", "import type { ModuleInstance } from './Instance.ts'\nimport type {\n AddressObjectFilter,\n AnyObjectFilter,\n NameObjectFilter,\n ObjectFilter,\n ObjectFilterOptions,\n QueryObjectFilter,\n} from './ObjectFilter.ts'\nimport {\n isAddressObjectFilter,\n isNameObjectFilter,\n isQueryObjectFilter,\n} from './ObjectFilter.ts'\n\nexport interface ModuleFilterOptions<T extends ModuleInstance = ModuleInstance> extends ObjectFilterOptions<T> {}\n\nexport const isAddressModuleFilter = isAddressObjectFilter<ModuleInstance>\n\nexport const isNameModuleFilter = isNameObjectFilter<ModuleInstance>\n\nexport const isQueryModuleFilter = isQueryObjectFilter<ModuleInstance>\n\nexport type AnyModuleFilter<T extends ModuleInstance = ModuleInstance> = AnyObjectFilter<T>\n\nexport type AddressModuleFilter<T extends ModuleInstance = ModuleInstance> = AddressObjectFilter<T>\n\nexport type NameModuleFilter<T extends ModuleInstance = ModuleInstance> = NameObjectFilter<T>\n\nexport type QueryModuleFilter<T extends ModuleInstance = ModuleInstance> = QueryObjectFilter<T>\n\n/** @deprecated use ModuleIdentifier instead */\nexport type ModuleFilter<T extends ModuleInstance = ModuleInstance> = ObjectFilter<T>\n", "import type {\n AnyObject, EmptyObject, Promisable,\n} from '@xylabs/sdk-js'\n\nimport type { ModuleIdentifier } from '../ModuleIdentifier.ts'\nimport type { ObjectFilterOptions } from './ObjectFilter.ts'\n\nexport const isObjectResolver = <T extends EmptyObject = AnyObject>(value?: unknown): value is ObjectResolver<T> => {\n return typeof (value as Partial<ObjectResolver<T>>).resolve === 'function'\n}\n\nexport const ObjectResolverPriority = {\n Disabled: -1,\n VeryLow: 0,\n Low: 1,\n Normal: 2,\n High: 3,\n VeryHigh: 4,\n} as const\n\nexport type ObjectResolverPriority = typeof ObjectResolverPriority[keyof typeof ObjectResolverPriority]\n\nexport interface ObjectResolver<TResult extends EmptyObject> {\n priority: ObjectResolverPriority\n resolve<T extends TResult = TResult>(all: '*', options?: ObjectFilterOptions<T>): Promisable<T[]>\n resolve<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promisable<T | undefined>\n resolve<T extends TResult = TResult>(\n id?: ModuleIdentifier,\n options?: ObjectFilterOptions<T>,\n ): Promisable<T | T[] | undefined>\n\n resolvePrivate<T extends TResult = TResult>(all: '*', options?: ObjectFilterOptions<T>): Promise<T[]>\n resolvePrivate<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promise<T | undefined>\n resolvePrivate<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promise<T | T[] | undefined>\n}\n\nexport interface ObjectResolverInstance<TResult extends EmptyObject> extends ObjectResolver<TResult> {\n addResolver: (resolver: ObjectResolverInstance<TResult>) => this\n removeResolver: (resolver: ObjectResolverInstance<TResult>) => this\n}\n", "import type { Address, Promisable } from '@xylabs/sdk-js'\n\nimport type { ModuleIdentifier } from '../ModuleIdentifier.ts'\nimport type { ModuleInstance } from './Instance.ts'\nimport type { ObjectFilterOptions } from './ObjectFilter.ts'\nimport type { ObjectResolver } from './ObjectResolver.ts'\nimport { isObjectResolver } from './ObjectResolver.ts'\n\nexport const isModuleResolver = isObjectResolver<ModuleInstance>\n\nexport interface ModuleResolver<TResult extends ModuleInstance = ModuleInstance> extends ObjectResolver<TResult> {}\n\nexport interface ModuleNameResolver {\n readonly root: ModuleInstance\n resolveIdentifier(id: ModuleIdentifier, options?: ObjectFilterOptions): Promisable<Address | undefined>\n}\n\nexport interface ModuleResolverInstance<TResult extends ModuleInstance = ModuleInstance> extends ModuleResolver<TResult>, ModuleNameResolver {\n addResolver: (resolver: ModuleResolverInstance<TResult>) => this\n removeResolver: (resolver: ModuleResolverInstance<TResult>) => this\n}\n", "/**\n * Object used to represent labels identifying a resource.\n */\nexport type Labels = Record<string, string | undefined>\n\n/**\n * Interface for objects that have labels.\n */\nexport interface WithLabels<T extends Labels = Labels> {\n labels: T\n}\n\n/**\n * Interface for objects that have labels.\n */\nexport interface WithOptionalLabels<T extends Labels = Labels> {\n labels?: T\n}\n\n/**\n * Returns true if the source object has all the labels from the required set\n * @param source Source object to check against\n * @param required Set of labels to check for in source\n * @returns True of the source object has all the labels from the required set\n */\nexport const hasAllLabels = (source?: Labels, required?: Labels): boolean => {\n if (!required) return true\n return Object.entries(required).every(([key, value]) => {\n return Object.hasOwn(source ?? {}, key) && source?.[key] === value\n })\n}\n", "export const ModuleLimitationLabelName = 'network.xyo.module.limitation'\nexport type ModuleLimitationLabelName = typeof ModuleLimitationLabelName\n\nexport const ModuleLimitationViewLabel = { ModuleLimitationLabelName: 'view' }\n", "import type { QueryableModule } from '../QueryableModule/index.ts'\n\n/**\n * Used to filter duplicates from an array of modules\n * @example: modulesArray.filter(duplicateModules)\n * @param value Current Module\n * @param index Current Module's index\n * @param array Module Array\n * @returns True if the Module's address is the first occurrence of\n * that address in the array, false otherwise\n */\nexport const duplicateModules = (value: QueryableModule, index: number, array: QueryableModule[]): value is QueryableModule => {\n return array.findIndex(v => v.address === value.address) === index\n}\n", "export const isSerializable = (value: unknown, maxDepth = 10): boolean => {\n if (maxDepth <= 0) {\n return false\n }\n if (value === null || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n return true\n }\n\n if (Array.isArray(value)) {\n return value.every(item => isSerializable(item, maxDepth - 1))\n }\n\n if (typeof value === 'object') {\n if (value instanceof Date || value instanceof RegExp) {\n return true\n }\n\n // Check for non-serializable objects like Set and Map\n if (value instanceof Set || value instanceof Map) {\n return false\n }\n\n if (value !== null && value !== undefined) {\n return Object.values(value).every(item => isSerializable(item, maxDepth - 1))\n }\n }\n\n // Exclude functions, symbols, undefined, and BigInt explicitly\n return false\n}\n", "import type { Address } from '@xylabs/sdk-js'\nimport { isAddress } from '@xylabs/sdk-js'\n\nexport const MODULE_PATH_SEPARATOR = ':' as const\n\nexport const DisallowedModuleIdentifierCharacters = {\n ' ': true,\n '!': true,\n '\"': true,\n '#': true,\n '$': true,\n '%': true,\n '&': true,\n \"'\": true,\n '(': true,\n ')': true,\n '*': true,\n ',': true,\n '.': true,\n '/': true,\n ':': true,\n ';': true,\n '<': true,\n '=': true,\n '>': true,\n '?': true,\n '@': true,\n '[': true,\n ']': true,\n '^': true,\n '_': true,\n '{': true,\n '|': true,\n '}': true,\n '~': true,\n}\nexport type ReservedModuleIdentifierCharacter = keyof typeof DisallowedModuleIdentifierCharacters\nexport const ReservedModuleIdentifierCharacters = new Set<ReservedModuleIdentifierCharacter>(\n Object.keys(DisallowedModuleIdentifierCharacters) as ReservedModuleIdentifierCharacter[],\n)\n\n// TODO: Use Brand, but avoid too complex error\n// export type ModuleName = Brand<string, { __moduleName: true }>\nexport type ModuleName = string\n\nexport type ModuleIdentifier\n = | ColonPair<ModuleIdentifierPart>\n | ColonPair<ColonPair<ModuleIdentifierPart>>\n | ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>>>\n\nexport type ColonPair<T extends string> = `${T}:${T}` | T\n\nexport type ModuleIdentifierPart = Exclude<Address | ModuleName, '*'>\n\nexport const isModuleName = (value: unknown): value is ModuleName => {\n return typeof value === 'string' && !isAddress(value) && !includesReservedModuleIdentifierCharacter(value)\n}\n\nexport const includesReservedModuleIdentifierCharacter = (value: unknown): boolean => {\n return typeof value === 'string' && [...value].some(char => ReservedModuleIdentifierCharacters.has(char as ReservedModuleIdentifierCharacter))\n}\n\nexport const isModuleIdentifierPart = (value: unknown): value is ModuleIdentifierPart => {\n return isModuleName(value) || isAddress(value)\n}\n", "import type { Address } from '@xylabs/sdk-js'\nimport { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n asSchema, isPayloadOfSchemaType, type Payload,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const AddressSchema = asSchema('network.xyo.address', true)\nexport type AddressSchema = typeof AddressSchema\n\nexport const AddressChildSchema = asSchema('network.xyo.address.child', true)\nexport type AddressChildSchema = typeof AddressChildSchema\n\nexport interface AddressFields {\n address: Address\n}\n\nexport type AddressPayload = Payload<AddressFields, AddressSchema>\n\n/**\n * Identity function for determining if an object is an Address\n */\nexport const isAddressPayload = isPayloadOfSchemaType<AddressPayload>(AddressSchema)\nexport const asAddressPayload = AsObjectFactory.create(isAddressPayload)\nexport const asOptionalAddressPayload = AsObjectFactory.createOptional(isAddressPayload)\n\nexport interface AddressChildFields extends AddressFields {\n /**\n * The derivation path of the child address\n */\n path?: string\n /**\n * The public address of the root of the hierarchy\n */\n root?: Address\n}\n\nexport type AddressChildPayload = Payload<AddressChildFields, AddressChildSchema>\n", "import type { Address } from '@xylabs/sdk-js'\nimport { asSchema, type Payload } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressPreviousHashSchema = asSchema('network.xyo.address.hash.previous', true)\nexport type AddressPreviousHashSchema = typeof AddressPreviousHashSchema\n\nexport type AddressPreviousHashPayload = Payload<\n {\n address: Address\n previousHash?: string\n },\n AddressPreviousHashSchema\n>\n", "import { asSchema, type Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleDescription } from '../ModuleDescription.ts'\n\nexport const ModuleDescriptionSchema = asSchema('network.xyo.module.description', true)\nexport type ModuleDescriptionSchema = typeof ModuleDescriptionSchema\n\nexport type ModuleDescriptionPayload = Payload<ModuleDescription, ModuleDescriptionSchema>\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Payload, WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/sdk-protocol-js'\n\nexport type StateDictionary = Record<string, string | number>\nexport interface State<T extends StateDictionary = StateDictionary> {\n state: T\n}\n\nexport const ModuleStateSchema = asSchema('network.xyo.module.state', true)\nexport type ModuleStateSchema = typeof ModuleStateSchema\n\nexport type ModuleState<T extends StateDictionary = StateDictionary> = Payload<State<T>, ModuleStateSchema>\n\nexport const isModuleState = <T extends StateDictionary = StateDictionary, TInput = unknown>(payload?: TInput): payload is ModuleState<T> & TInput => {\n return isPayloadOfSchemaType<ModuleState<T>>(ModuleStateSchema)(payload)\n}\n\nexport const isModuleStateWithSources = <T extends StateDictionary = StateDictionary,\n TInput = unknown>(payload?: TInput): payload is WithSources<ModuleState<T>> & TInput => {\n return isPayloadOfSchemaTypeWithSources<ModuleState<T>>(ModuleStateSchema)(payload)\n}\n\nexport const asModuleState = AsObjectFactory.create<ModuleState<StateDictionary>>(isModuleState)\nexport const asOptionalModuleState = AsObjectFactory.createOptional<ModuleState<StateDictionary>>(isModuleState)\n", "import type { TypeCheck } from '@xylabs/sdk-js'\n\n/** @deprecated use narrowing instead [ if(is) ] */\nexport const WithFactory = {\n create: <T extends object>(typeCheck: TypeCheck<T>) => {\n return <R>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n mod: any,\n\n closure: (mod: T) => R,\n ): R | undefined => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return typeCheck(mod) ? closure(mod) : undefined\n }\n },\n}\n"],
|
|
5
|
-
"mappings": ";AACA;AAAA,EACE;AAAA,OACK;AAMA,IAAM,qBAAqB,SAAS,6BAA6B,IAAI;;;AC2BrE,SAAS,kBAAqF;AACnG,SAAO,CAAqC,gBAAmB;AAE7D;AAAA,EACF;AACF;;;ACzCA,SAAS,gBAAgB;AACzB,SAAS,YAAAA,iBAA6B;AAQtC,IAAM,qBAAqB,CACzB,KACA,WAC2C;AAC3C,QAAMC,WAAkD;AAAA;AAAA,IAEtD,GAAG;AAAA,IAEH,eAAe,IAAI;AAAA;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AAkC;AAAA,MACtC,GAAG,KAAK;AAAA,MACR,GAAG;AAAA,MACH,QAAQ;AAAA,QACN,QAAQ,KAAK,gBAAgB;AAAA,QAC7B,GAAG,KAAK,eAAe;AAAA,QACvB,GAAG,QAAQ;AAAA,MACb;AAAA,IACF;AACA,WAAO,KAAK,gBAAgB,OAAgB,YAAY;AAAA,EAC1D;AAAA,EAEA,QAA4E,QAA+B,SAAiB,CAAC,GAA8B;AACzJ,WAAO,IAAI,eAAiB,KAAK,iBAAiB,QAAQ,MAAM;AAAA,EAClE;AACF;;;ACzDO,IAAM,qBAAN,cAAiC,MAAM;AAAA,EAC5C;AAAA,EACA,YACE,SACA,SACA;AACA,UAAM,OAAO;AACb,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACd;AACF;;;ACZA,SAAS,mBAAAC,wBAAuB;;;ACChC,SAAS,mBAAAC,wBAAuB;;;ACDhC,SAAS,mBAAAC,wBAAuB;;;ACAhC,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ACF3F,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,2BAA2BA,UAAS,oCAAoC,IAAI;;;ACFzF,SAAS,YAAAC,iBAA4B;AAE9B,IAAM,yBAAyBA,UAAS,kCAAkC,IAAI;;;
|
|
4
|
+
"sourcesContent": ["import type { EmptyObject } from '@xylabs/sdk-js'\nimport {\n asSchema, type Payload, type Schema,\n} from '@xyo-network/sdk-protocol-js'\n\nimport type { ArchivingModuleConfig } from './Archiving.ts'\nimport type { ModuleConfigFields } from './Fields.ts'\nimport type { ArchivingReentrancyConfig } from './Reentrancy.ts'\n\nexport const ModuleConfigSchema = asSchema('network.xyo.module.config', true)\nexport type ModuleConfigSchema = typeof ModuleConfigSchema\n\nexport type WithAdditional<T extends EmptyObject = EmptyObject, TAdditional extends EmptyObject = EmptyObject>\n = T & TAdditional\n\nexport type ModuleConfig<TConfig extends EmptyObject | Payload = EmptyObject, TSchema extends Schema | void = void> = Payload<\n WithAdditional<ArchivingModuleConfig & ModuleConfigFields & ArchivingReentrancyConfig, TConfig>,\n TSchema extends void ? TConfig extends Payload ? TConfig['schema']\n : Schema : TSchema\n>\n\nexport type AnyConfigSchema<TConfig extends Omit<ModuleConfig, 'schema'> & { schema: Schema } = Omit<ModuleConfig, 'schema'> & { schema: Schema }>\n = ModuleConfig<TConfig, Schema>\n\nexport type OptionalConfigSchema<TConfig extends AnyConfigSchema<ModuleConfig> = AnyConfigSchema<ModuleConfig>> = Omit<TConfig, 'schema'> & {\n schema?: TConfig['schema']\n}\n\nexport type AnyModuleConfig = AnyConfigSchema<ModuleConfig>\n", "import type {\n Creatable, CreatableInstance, Logger,\n} from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleEventData } from '../EventsModels/index.ts'\nimport type { AttachableModuleInstance } from '../instance/index.ts'\nimport type { QueryableModuleParams } from '../QueryableModule/index.ts'\n\nexport interface CreatableModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends CreatableInstance<TParams, TEventData>, AttachableModuleInstance<TParams, TEventData> {}\n\nexport interface CreatableModuleFactory<T extends CreatableModuleInstance = CreatableModuleInstance>\n extends Omit<CreatableModule<T>, 'create' | 'createHandler' | 'paramsHandler'> {\n creatableModule: CreatableModule<T>\n defaultParams?: Partial<T['params']>\n\n create(\n this: CreatableModuleFactory<T>,\n params?: Partial<T['params']>): Promise<T>\n}\n\nexport interface CreatableModule<T extends CreatableModuleInstance = CreatableModuleInstance> extends Creatable<T> {\n configSchemas: Schema[]\n defaultConfigSchema: Schema\n defaultLogger?: Logger\n new(key: unknown, params: Partial<T['params']>): T\n factory(params?: Partial<T['params']>): CreatableModuleFactory<T>\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous creation pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function creatableModule<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends CreatableModule<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import { isTruthy } from '@xylabs/sdk-js'\nimport { asSchema, type Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { Labels } from '../Labels/index.ts'\nimport type { CreatableModuleFactory, CreatableModuleInstance } from './CreatableModule.ts'\nimport type { LabeledCreatableModuleFactory } from './LabeledCreatableModuleFactory.ts'\n\nexport type CreatableModuleRegistry = Record<Schema, (CreatableModuleFactory | LabeledCreatableModuleFactory)[] | undefined>\n\nconst buildModuleFactory = <TModule extends CreatableModuleInstance>(\n mod: CreatableModuleFactory<TModule>,\n labels?: Labels,\n): LabeledCreatableModuleFactory<TModule> => {\n const factory: LabeledCreatableModuleFactory<TModule> = {\n // Destructure instance properties\n ...mod,\n\n configSchemas: mod.configSchemas,\n // Copy static methods\n create: mod.create.bind(mod),\n\n defaultConfigSchema: mod.defaultConfigSchema,\n // Merge module & supplied labels\n labels: { ...(mod as LabeledCreatableModuleFactory).labels, ...labels },\n }\n return factory\n}\n\nexport const registerCreatableModuleFactory = <TModule extends CreatableModuleInstance>(\n registry: CreatableModuleRegistry,\n factory: CreatableModuleFactory<TModule> | LabeledCreatableModuleFactory<TModule>,\n labels?: Labels,\n /** register this as the primary factory for every schema it supports */\n primary: boolean | Schema | Schema[] = false,\n) => {\n const primarySchemas\n = primary !== true && isTruthy(primary)\n ? Array.isArray(primary)\n ? primary\n : [primary]\n : []\n\n for (const primarySchema of primarySchemas) {\n if (!factory.configSchemas.includes(primarySchema)) {\n console.warn(`Primary schema ${String(primary)} not found in factory configSchemas`)\n }\n }\n\n const isPrimaryForSchema = (schema: Schema) => {\n switch (typeof primary) {\n case 'boolean': {\n return primary\n }\n case 'string': {\n return schema === primary\n }\n case 'object': {\n if (Array.isArray(primary)) {\n return primary.includes(schema)\n }\n }\n }\n throw new Error(`Invalid primary value: ${String(primary)}`)\n }\n\n const factoryClone: LabeledCreatableModuleFactory<TModule> = buildModuleFactory(factory, labels)\n // add the defaultConfigSchema as the first key in the registry\n registry[factory.defaultConfigSchema] = [factoryClone, ...(registry[factoryClone.defaultConfigSchema] ?? [])]\n for (const schema of factoryClone.configSchemas) {\n registry[schema] = isPrimaryForSchema(schema) ? [factoryClone, ...(registry[schema] ?? [])] : [...(registry[schema] ?? []), factoryClone]\n }\n}\n\nexport const registerCreatableModuleFactories = (\n factories: (CreatableModuleFactory | LabeledCreatableModuleFactory)[],\n registry: CreatableModuleRegistry = {},\n primary = false,\n) => {\n for (const factory of factories) {\n registerCreatableModuleFactory(registry, factory, undefined, primary)\n }\n return registry\n}\n\n/** @deprecated use registerCreatableModuleFactory instead */\nexport const assignCreatableModuleRegistry = (\n target: CreatableModuleRegistry = {},\n ...sources: CreatableModuleRegistry[]\n): CreatableModuleRegistry => {\n for (const source of sources)\n for (const [schemaString, factories] of Object.entries(source)) {\n const schema = asSchema(schemaString, true)\n if (factories) {\n const existingFactories = target[schema]\n target[schema] = [...existingFactories ?? [], ...factories]\n }\n }\n\n return target\n}\n", "import type { WithOptionalLabels } from '../Labels/index.ts'\nimport type { CreatableModule, CreatableModuleInstance } from './CreatableModule.ts'\nimport type { LabeledCreatableModuleFactory } from './LabeledCreatableModuleFactory.ts'\n\nexport interface LabeledCreatableModule<T extends CreatableModuleInstance = CreatableModuleInstance> extends CreatableModule<T>, WithOptionalLabels {\n factory(params?: Partial<T['params']>): LabeledCreatableModuleFactory<T>\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous creation pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function labeledCreatableModule<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends LabeledCreatableModule<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import type { WithOptionalLabels } from '../Labels/index.ts'\nimport type { CreatableModuleFactory, CreatableModuleInstance } from './CreatableModule.ts'\n\nexport type LabeledCreatableModuleFactory<T extends CreatableModuleInstance = CreatableModuleInstance> = CreatableModuleFactory<T> & WithOptionalLabels\n\nexport const hasLabels = (factory: CreatableModuleFactory | LabeledCreatableModuleFactory): factory is LabeledCreatableModuleFactory => {\n return (factory as LabeledCreatableModuleFactory).labels !== undefined\n}\n\n/**\n * Class annotation to be used to decorate Modules which support\n * an asynchronous labeled creation factory pattern\n * @returns The decorated Module requiring it implement the members\n * of the CreatableModule as statics properties/methods\n */\nexport function labeledCreatableModuleFactory<TModule extends CreatableModuleInstance = CreatableModuleInstance>() {\n return <U extends LabeledCreatableModuleFactory<TModule>>(constructor: U) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n constructor\n }\n}\n", "import type { Logger } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport type { Labels, WithOptionalLabels } from '../Labels/index.ts'\nimport type {\n CreatableModule, CreatableModuleFactory, CreatableModuleInstance,\n} from './CreatableModule.ts'\n\nexport class ModuleFactory<TModule extends CreatableModuleInstance> implements CreatableModuleFactory<TModule> {\n configSchemas: CreatableModule<TModule>['configSchemas']\n\n creatableModule: CreatableModule<TModule>\n\n defaultConfigSchema: Schema\n\n defaultLogger?: Logger\n\n defaultParams?: Partial<TModule['params']>\n\n labels?: Labels\n\n constructor(\n creatableModule: CreatableModule<TModule>,\n params?: Partial<TModule['params']>,\n labels: Labels = {},\n ) {\n this.creatableModule = creatableModule\n this.defaultParams = params\n this.configSchemas = creatableModule.configSchemas\n this.defaultConfigSchema = creatableModule.defaultConfigSchema\n assertEx(this.configSchemas.includes(this.defaultConfigSchema), () => 'defaultConfigSchema must be in configSchemas')\n this.labels = Object.assign({}, (creatableModule as WithOptionalLabels).labels ?? {}, labels ?? {})\n }\n\n static withParams<T extends CreatableModuleInstance>(\n creatableModule: CreatableModule<T>,\n params?: Partial<T['params']>,\n labels: Labels = {},\n ) {\n return new ModuleFactory<T>(creatableModule, params, labels)\n }\n\n create(this: CreatableModuleFactory<TModule>, params?: Partial<TModule['params']>): Promise<TModule> {\n const mergedParams: TModule['params'] = {\n ...this.defaultParams,\n ...params,\n config: {\n schema: this.creatableModule.defaultConfigSchema,\n ...this.defaultParams?.config,\n ...params?.config,\n },\n }\n return this.creatableModule.create<TModule>(mergedParams)\n }\n\n factory<T extends CreatableModuleInstance>(this: CreatableModuleFactory<T>, params?: Partial<T['params']>, labels: Labels = {}): CreatableModuleFactory<T> {\n return new ModuleFactory<T>(this.creatableModule, params, labels)\n }\n}\n", "import type { JsonValue } from '@xylabs/sdk-js'\n\nexport class ModuleDetailsError extends Error {\n details?: JsonValue\n constructor(\n message: string,\n details?: JsonValue,\n ) {\n super(message)\n this.details = details\n this.name = 'ModuleError'\n }\n}\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isModuleInstance } from './isModuleInstance.ts'\n\nexport const asModuleInstance = AsObjectFactory.create(isModuleInstance)\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModule } from '../QueryableModule/index.ts'\nimport type { ModuleInstance } from './Instance.ts'\n\nexport const requiredModuleInstanceFunctions: ObjectTypeShape = {\n manifest: 'function',\n state: 'function',\n}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<ModuleInstance>()\n\nexport const isModuleInstance: TypeCheck<ModuleInstance> = factory.create(requiredModuleInstanceFunctions, [isQueryableModule])\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModule } from './isQueryableModule.ts'\n\nexport const asQueryableModule = AsObjectFactory.create(isQueryableModule)\n\n/** @deprecated use asQueryableModule instead */\nexport const asModule = asQueryableModule\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleManifestQuerySchema = asSchema('network.xyo.query.module.manifest', true)\nexport type ModuleManifestQuerySchema = typeof ModuleManifestQuerySchema\n\nexport type ModuleManifestQuery = Query<{\n maxDepth?: number\n schema: ModuleManifestQuerySchema\n}>\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleAddressQuerySchema = asSchema('network.xyo.query.module.address', true)\nexport type ModuleAddressQuerySchema = typeof ModuleAddressQuerySchema\n\nexport type ModuleAddressQuery = Query<{\n schema: ModuleAddressQuerySchema\n}>\n", "import { asSchema, type Query } from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleStateQuerySchema = asSchema('network.xyo.query.module.state', true)\nexport type ModuleStateQuerySchema = typeof ModuleStateQuerySchema\n\nexport type ModuleStateQuery = Query<void, ModuleStateQuerySchema>\n", "import {\n asSchema, type Query, type XyoAddress,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const ModuleSubscribeQuerySchema = asSchema('network.xyo.query.module.subscribe', true)\nexport type ModuleSubscribeQuerySchema = typeof ModuleSubscribeQuerySchema\n\nexport interface ModuleSubscribeFilter {\n /** @field if specified, at least one of the schemas must be present in the boundwtness to generate a notification */\n schema?: string[]\n}\n\n// requests notification when a boundwitness is added to the modules chain that meets the filter criteria\nexport type ModuleSubscribeQuery = Query<{\n /** @field The address that will receive notifications */\n address: XyoAddress\n /** @field A subscribe with a null for filter is an unsubscribe */\n filter?: ModuleSubscribeFilter | null\n /** @field The maximum events queued per send [may increase frequency] */\n maxQueue?: number\n schema: ModuleSubscribeQuerySchema\n}>\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\n\nexport const asQueryableModuleObject = AsObjectFactory.create(isQueryableModuleObject)\n\n/** @deprecated use asQueryableModuleObject instead */\nexport const asModuleObject = asQueryableModuleObject\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport const requiredQueryableModuleShape: ObjectTypeShape = {\n address: 'string',\n queries: 'array',\n query: 'function',\n}\n\n/** @deprecated use requiredQueryableModuleShape instead */\nexport const requiredModuleShape: ObjectTypeShape = requiredQueryableModuleShape\n\nconst factory = new IsObjectFactory<QueryableModule>()\n\nexport const isQueryableModuleObject: TypeCheck<QueryableModule> = factory.create(requiredQueryableModuleShape)\n\n/** @deprecated use isQueryableModuleObject instead */\nexport const isModuleObject: TypeCheck<QueryableModule> = isQueryableModuleObject\n", "import type {\n AnyNonPromise,\n AnyObject, EmptyObject, TypeCheck,\n TypeCheckConfig,\n} from '@xylabs/sdk-js'\n\nimport { asQueryableModuleObject } from './asQueryableModuleObject.ts'\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport type QueryableModuleTypeCheck<T extends QueryableModule = QueryableModule> = TypeCheck<T>\n\n/** @deprecated use QueryableModuleTypeCheck instead */\nexport type ModuleTypeCheck<T extends QueryableModule = QueryableModule> = TypeCheck<T>\n\nexport class IsQueryableModuleFactory<T extends QueryableModule = QueryableModule> {\n create(expectedQueries?: string[], additionalChecks?: TypeCheck<AnyObject | EmptyObject>[]): QueryableModuleTypeCheck<T> {\n const result = (obj: AnyNonPromise, config?: TypeCheckConfig | number): obj is T => {\n const mod = asQueryableModuleObject(obj)\n return (\n isQueryableModuleObject(mod, config)\n // eslint-disable-next-line unicorn/no-array-reduce\n && (expectedQueries?.reduce((prev, query) => prev && mod.queries.includes(query), true) ?? true)\n // perform additional checks\n // eslint-disable-next-line unicorn/no-array-reduce\n && (additionalChecks?.reduce((prev, check) => prev && check(obj, config), true) ?? true)\n )\n }\n return result\n }\n}\n\n/** @deprecated use IsQueryableModuleFactory instead */\nexport class IsModuleFactory<T extends QueryableModule = QueryableModule> extends IsQueryableModuleFactory<T> {}\n", "import type { TypeCheck } from '@xylabs/sdk-js'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\n\nimport { ModuleStateQuerySchema } from '../Queries/index.ts'\nimport { IsQueryableModuleFactory } from './IsQueryableModuleFactory.ts'\nimport { isQueryableModuleObject } from './isQueryableModuleObject.ts'\nimport type { QueryableModule } from './QueryableModule.ts'\n\nexport const requiredQueryableModuleQueries: Schema[] = [ModuleStateQuerySchema]\n\n/** @deprecated use requiredQueryableModuleQueries instead */\nexport const requiredModuleQueries: Schema[] = requiredQueryableModuleQueries\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsQueryableModuleFactory<QueryableModule>()\n\nexport const isQueryableModule: TypeCheck<QueryableModule> = factory.create(requiredQueryableModuleQueries, [isQueryableModuleObject])\n\n/** @deprecated use isQueryableModule instead */\nexport const isModule: TypeCheck<QueryableModule> = isQueryableModule\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isAttachableModuleInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableModuleInstance = AsObjectFactory.create(isAttachableModuleInstance)\n", "import type { ObjectTypeShape, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport { isModuleInstance } from '../isModuleInstance.ts'\nimport type { AttachableModuleInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableModuleInstanceFunctions: ObjectTypeShape = {\n downResolver: 'object',\n upResolver: 'object',\n}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableModuleInstance>()\n\nexport const isAttachableModuleInstance: TypeCheck<AttachableModuleInstance> = factory.create(requiredAttachableModuleInstanceFunctions, [\n isModuleInstance,\n])\n", "import type { CreatableInstance, TypeCheck } from '@xylabs/sdk-js'\nimport { IsObjectFactory } from '@xylabs/sdk-js'\n\nimport type { ModuleEventData } from '../../EventsModels/index.ts'\nimport type { QueryableModuleParams } from '../../QueryableModule/index.ts'\nimport type { ModuleInstance } from '../Instance.ts'\nimport type { ModuleResolverInstance } from '../ModuleResolver.ts'\n\nexport interface AttachableModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends ModuleInstance<TParams, TEventData>, CreatableInstance<TParams, TEventData> {\n config: TParams['config']\n /* The resolver is a 'down' resolver. It can resolve the module or any children (if it is a node for example), that are in the module */\n readonly downResolver: ModuleResolverInstance\n\n // The resolver that gets called by children (usually only Nodes have this)\n readonly privateResolver: ModuleResolverInstance\n\n /* The resolver is a 'up' resolver. It can resolve the parent or any children of the parent */\n /* This is set by a NodeModule when attaching to the module */\n readonly upResolver: ModuleResolverInstance\n}\n\nexport type AttachableModuleInstanceTypeCheck<T extends AttachableModuleInstance = AttachableModuleInstance> = TypeCheck<T>\n\nexport class IsAttachableModuleInstanceFactory<T extends AttachableModuleInstance = AttachableModuleInstance> extends IsObjectFactory<T> {}\n", "import type {\n CreatableStatus, Promisable,\n TypeCheck,\n} from '@xylabs/sdk-js'\nimport { IsObjectFactory, toSafeJsonString } from '@xylabs/sdk-js'\nimport type { AccountInstance, XyoAddress } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleEventData } from '../EventsModels/index.ts'\nimport type { ModuleIdentifier, ModuleName } from '../ModuleIdentifier.ts'\nimport type {\n QueryableModule, QueryableModuleFunctions,\n QueryableModuleParams,\n} from '../QueryableModule/index.ts'\nimport type { Direction } from './ObjectFilter.ts'\nimport type { ObjectResolver } from './ObjectResolver.ts'\n\nexport type ModulePipeLine = Lowercase<'one-to-one' | 'one-to-many' | 'many-to-one' | 'many-to-many'>\n\nexport type ModuleStatus = CreatableStatus | 'wrapped' | 'proxy'\n\nexport class DeadModuleError extends Error {\n error: Error | undefined\n id: ModuleIdentifier\n constructor(\n id: ModuleIdentifier,\n error: Error | undefined,\n msg = 'Dead Module Error',\n ) {\n super(`${msg} [${id}]: ${error?.message ?? toSafeJsonString(error)}`)\n this.id = id\n this.error = error\n\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, DeadModuleError.prototype)\n }\n}\n\nexport interface AddressToWeakInstanceCache {\n get: (address: XyoAddress) => WeakRef<ModuleInstance> | null\n set: (address: XyoAddress, instance: WeakRef<ModuleInstance> | null) => void\n}\n\nexport interface ModuleFamilyFunctions {\n account?: AccountInstance\n addParent: (mod: ModuleInstance) => void\n addressCache?: (direction: Direction, includePrivate: boolean) => AddressToWeakInstanceCache | undefined\n modName?: ModuleName\n parents: () => Promisable<ModuleInstance[]>\n privateChildren: () => Promisable<ModuleInstance[]>\n publicChildren: () => Promisable<ModuleInstance[]>\n removeParent: (address: XyoAddress) => void\n siblings: () => Promisable<ModuleInstance[]>\n}\n\nexport interface ModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData>\n extends QueryableModule<TParams, TEventData>,\n ObjectResolver<ModuleInstance>,\n QueryableModuleFunctions,\n ModuleFamilyFunctions {\n readonly pipeline?: ModulePipeLine\n\n // if the module has become non-functional, such as a broken bridge connection, this will be 'dead'\n readonly status: ModuleStatus | null\n}\n\nexport type InstanceTypeCheck<T extends ModuleInstance = ModuleInstance> = TypeCheck<T>\n\nexport class IsInstanceFactory<T extends ModuleInstance = ModuleInstance> extends IsObjectFactory<T> {}\n", "import type {\n AnyObject, EmptyObject, TypeCheck,\n} from '@xylabs/sdk-js'\nimport type { XyoAddress } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleName } from '../ModuleIdentifier.ts'\n\nexport type Direction = 'up' | 'down' | 'all'\nexport type Visibility = 'public' | 'private' | 'all'\n\nexport interface ResolveStrategy {\n maxDepth?: number\n required?: boolean | 'warn' | 'log'\n retry?: number\n timeout?: number\n}\n\nexport interface ObjectFilterOptions<T extends EmptyObject = AnyObject> extends ResolveStrategy {\n direction?: Direction\n identity?: TypeCheck<T>\n}\n\nexport interface AddressObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n address: XyoAddress[]\n}\n\nexport const isAddressObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is AddressObjectFilter<T> =>\n (value as AddressObjectFilter<T>).address !== undefined\n\nexport interface NameObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n name: ModuleName[]\n}\n\nexport const isNameObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is NameObjectFilter<T> =>\n (value as NameObjectFilter<T>).name !== undefined\n\nexport interface QueryObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {\n query: string[][]\n}\n\nexport const isQueryObjectFilter = <T extends EmptyObject = AnyObject>(value: unknown): value is QueryObjectFilter<T> =>\n (value as QueryObjectFilter<T>).query !== undefined\n\nexport type AnyObjectFilter<T extends EmptyObject = AnyObject> = Partial<AddressObjectFilter<T>>\n & Partial<NameObjectFilter<T>>\n & Partial<QueryObjectFilter<T>>\n\nexport type ObjectFilter<T extends EmptyObject> = ObjectFilterOptions<T> | AddressObjectFilter<T> | NameObjectFilter<T> | QueryObjectFilter<T>\n", "import type { ModuleInstance } from './Instance.ts'\nimport type {\n AddressObjectFilter,\n AnyObjectFilter,\n NameObjectFilter,\n ObjectFilter,\n ObjectFilterOptions,\n QueryObjectFilter,\n} from './ObjectFilter.ts'\nimport {\n isAddressObjectFilter,\n isNameObjectFilter,\n isQueryObjectFilter,\n} from './ObjectFilter.ts'\n\nexport interface ModuleFilterOptions<T extends ModuleInstance = ModuleInstance> extends ObjectFilterOptions<T> {}\n\nexport const isAddressModuleFilter = isAddressObjectFilter<ModuleInstance>\n\nexport const isNameModuleFilter = isNameObjectFilter<ModuleInstance>\n\nexport const isQueryModuleFilter = isQueryObjectFilter<ModuleInstance>\n\nexport type AnyModuleFilter<T extends ModuleInstance = ModuleInstance> = AnyObjectFilter<T>\n\nexport type AddressModuleFilter<T extends ModuleInstance = ModuleInstance> = AddressObjectFilter<T>\n\nexport type NameModuleFilter<T extends ModuleInstance = ModuleInstance> = NameObjectFilter<T>\n\nexport type QueryModuleFilter<T extends ModuleInstance = ModuleInstance> = QueryObjectFilter<T>\n\n/** @deprecated use ModuleIdentifier instead */\nexport type ModuleFilter<T extends ModuleInstance = ModuleInstance> = ObjectFilter<T>\n", "import type {\n AnyObject, EmptyObject, Promisable,\n} from '@xylabs/sdk-js'\n\nimport type { ModuleIdentifier } from '../ModuleIdentifier.ts'\nimport type { ObjectFilterOptions } from './ObjectFilter.ts'\n\nexport const isObjectResolver = <T extends EmptyObject = AnyObject>(value?: unknown): value is ObjectResolver<T> => {\n return typeof (value as Partial<ObjectResolver<T>>).resolve === 'function'\n}\n\nexport const ObjectResolverPriority = {\n Disabled: -1,\n VeryLow: 0,\n Low: 1,\n Normal: 2,\n High: 3,\n VeryHigh: 4,\n} as const\n\nexport type ObjectResolverPriority = typeof ObjectResolverPriority[keyof typeof ObjectResolverPriority]\n\nexport interface ObjectResolver<TResult extends EmptyObject> {\n priority: ObjectResolverPriority\n resolve<T extends TResult = TResult>(all: '*', options?: ObjectFilterOptions<T>): Promisable<T[]>\n resolve<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promisable<T | undefined>\n resolve<T extends TResult = TResult>(\n id?: ModuleIdentifier,\n options?: ObjectFilterOptions<T>,\n ): Promisable<T | T[] | undefined>\n\n resolvePrivate<T extends TResult = TResult>(all: '*', options?: ObjectFilterOptions<T>): Promise<T[]>\n resolvePrivate<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promise<T | undefined>\n resolvePrivate<T extends TResult = TResult>(id: ModuleIdentifier, options?: ObjectFilterOptions<T>): Promise<T | T[] | undefined>\n}\n\nexport interface ObjectResolverInstance<TResult extends EmptyObject> extends ObjectResolver<TResult> {\n addResolver: (resolver: ObjectResolverInstance<TResult>) => this\n removeResolver: (resolver: ObjectResolverInstance<TResult>) => this\n}\n", "import type { Promisable } from '@xylabs/sdk-js'\nimport type { XyoAddress } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleIdentifier } from '../ModuleIdentifier.ts'\nimport type { ModuleInstance } from './Instance.ts'\nimport type { ObjectFilterOptions } from './ObjectFilter.ts'\nimport type { ObjectResolver } from './ObjectResolver.ts'\nimport { isObjectResolver } from './ObjectResolver.ts'\n\nexport const isModuleResolver = isObjectResolver<ModuleInstance>\n\nexport interface ModuleResolver<TResult extends ModuleInstance = ModuleInstance> extends ObjectResolver<TResult> {}\n\nexport interface ModuleNameResolver {\n readonly root: ModuleInstance\n resolveIdentifier(id: ModuleIdentifier, options?: ObjectFilterOptions): Promisable<XyoAddress | undefined>\n}\n\nexport interface ModuleResolverInstance<TResult extends ModuleInstance = ModuleInstance> extends ModuleResolver<TResult>, ModuleNameResolver {\n addResolver: (resolver: ModuleResolverInstance<TResult>) => this\n removeResolver: (resolver: ModuleResolverInstance<TResult>) => this\n}\n", "/**\n * Object used to represent labels identifying a resource.\n */\nexport type Labels = Record<string, string | undefined>\n\n/**\n * Interface for objects that have labels.\n */\nexport interface WithLabels<T extends Labels = Labels> {\n labels: T\n}\n\n/**\n * Interface for objects that have labels.\n */\nexport interface WithOptionalLabels<T extends Labels = Labels> {\n labels?: T\n}\n\n/**\n * Returns true if the source object has all the labels from the required set\n * @param source Source object to check against\n * @param required Set of labels to check for in source\n * @returns True of the source object has all the labels from the required set\n */\nexport const hasAllLabels = (source?: Labels, required?: Labels): boolean => {\n if (!required) return true\n return Object.entries(required).every(([key, value]) => {\n return Object.hasOwn(source ?? {}, key) && source?.[key] === value\n })\n}\n", "export const ModuleLimitationLabelName = 'network.xyo.module.limitation'\nexport type ModuleLimitationLabelName = typeof ModuleLimitationLabelName\n\nexport const ModuleLimitationViewLabel = { ModuleLimitationLabelName: 'view' }\n", "import type { QueryableModule } from '../QueryableModule/index.ts'\n\n/**\n * Used to filter duplicates from an array of modules\n * @example: modulesArray.filter(duplicateModules)\n * @param value Current Module\n * @param index Current Module's index\n * @param array Module Array\n * @returns True if the Module's address is the first occurrence of\n * that address in the array, false otherwise\n */\nexport const duplicateModules = (value: QueryableModule, index: number, array: QueryableModule[]): value is QueryableModule => {\n return array.findIndex(v => v.address === value.address) === index\n}\n", "export const isSerializable = (value: unknown, maxDepth = 10): boolean => {\n if (maxDepth <= 0) {\n return false\n }\n if (value === null || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n return true\n }\n\n if (Array.isArray(value)) {\n return value.every(item => isSerializable(item, maxDepth - 1))\n }\n\n if (typeof value === 'object') {\n if (value instanceof Date || value instanceof RegExp) {\n return true\n }\n\n // Check for non-serializable objects like Set and Map\n if (value instanceof Set || value instanceof Map) {\n return false\n }\n\n if (value !== null && value !== undefined) {\n return Object.values(value).every(item => isSerializable(item, maxDepth - 1))\n }\n }\n\n // Exclude functions, symbols, undefined, and BigInt explicitly\n return false\n}\n", "import type { Address } from '@xylabs/sdk-js'\nimport { isAddress } from '@xylabs/sdk-js'\n\nexport const MODULE_PATH_SEPARATOR = ':' as const\n\nexport const DisallowedModuleIdentifierCharacters = {\n ' ': true,\n '!': true,\n '\"': true,\n '#': true,\n '$': true,\n '%': true,\n '&': true,\n \"'\": true,\n '(': true,\n ')': true,\n '*': true,\n ',': true,\n '.': true,\n '/': true,\n ':': true,\n ';': true,\n '<': true,\n '=': true,\n '>': true,\n '?': true,\n '@': true,\n '[': true,\n ']': true,\n '^': true,\n '_': true,\n '{': true,\n '|': true,\n '}': true,\n '~': true,\n}\nexport type ReservedModuleIdentifierCharacter = keyof typeof DisallowedModuleIdentifierCharacters\nexport const ReservedModuleIdentifierCharacters = new Set<ReservedModuleIdentifierCharacter>(\n Object.keys(DisallowedModuleIdentifierCharacters) as ReservedModuleIdentifierCharacter[],\n)\n\n// TODO: Use Brand, but avoid too complex error\n// export type ModuleName = Brand<string, { __moduleName: true }>\nexport type ModuleName = string\n\nexport type ModuleIdentifier\n = | ColonPair<ModuleIdentifierPart>\n | ColonPair<ColonPair<ModuleIdentifierPart>>\n | ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>>\n | ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ColonPair<ModuleIdentifierPart>>>>>>>\n\nexport type ColonPair<T extends string> = `${T}:${T}` | T\n\nexport type ModuleIdentifierPart = Exclude<Address | ModuleName, '*'>\n\nexport const isModuleName = (value: unknown): value is ModuleName => {\n return typeof value === 'string' && !isAddress(value) && !includesReservedModuleIdentifierCharacter(value)\n}\n\nexport const includesReservedModuleIdentifierCharacter = (value: unknown): boolean => {\n return typeof value === 'string' && [...value].some(char => ReservedModuleIdentifierCharacters.has(char as ReservedModuleIdentifierCharacter))\n}\n\nexport const isModuleIdentifierPart = (value: unknown): value is ModuleIdentifierPart => {\n return isModuleName(value) || isAddress(value)\n}\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\nimport {\n asSchema, isPayloadOfSchemaType, type Payload, type XyoAddress,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const AddressSchema = asSchema('network.xyo.address', true)\nexport type AddressSchema = typeof AddressSchema\n\nexport const AddressChildSchema = asSchema('network.xyo.address.child', true)\nexport type AddressChildSchema = typeof AddressChildSchema\n\nexport interface AddressFields {\n address: XyoAddress\n}\n\nexport type AddressPayload = Payload<AddressFields, AddressSchema>\n\n/**\n * Identity function for determining if an object is an Address\n */\nexport const isAddressPayload = isPayloadOfSchemaType<AddressPayload>(AddressSchema)\nexport const asAddressPayload = AsObjectFactory.create(isAddressPayload)\nexport const asOptionalAddressPayload = AsObjectFactory.createOptional(isAddressPayload)\n\nexport interface AddressChildFields extends AddressFields {\n /**\n * The derivation path of the child address\n */\n path?: string\n /**\n * The public address of the root of the hierarchy\n */\n root?: XyoAddress\n}\n\nexport type AddressChildPayload = Payload<AddressChildFields, AddressChildSchema>\n", "import {\n asSchema, type Payload, type XyoAddress,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const AddressPreviousHashSchema = asSchema('network.xyo.address.hash.previous', true)\nexport type AddressPreviousHashSchema = typeof AddressPreviousHashSchema\n\nexport type AddressPreviousHashPayload = Payload<\n {\n address: XyoAddress\n previousHash?: string\n },\n AddressPreviousHashSchema\n>\n", "import { asSchema, type Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { ModuleDescription } from '../ModuleDescription.ts'\n\nexport const ModuleDescriptionSchema = asSchema('network.xyo.module.description', true)\nexport type ModuleDescriptionSchema = typeof ModuleDescriptionSchema\n\nexport type ModuleDescriptionPayload = Payload<ModuleDescription, ModuleDescriptionSchema>\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Payload, WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/sdk-protocol-js'\n\nexport type StateDictionary = Record<string, string | number>\nexport interface State<T extends StateDictionary = StateDictionary> {\n state: T\n}\n\nexport const ModuleStateSchema = asSchema('network.xyo.module.state', true)\nexport type ModuleStateSchema = typeof ModuleStateSchema\n\nexport type ModuleState<T extends StateDictionary = StateDictionary> = Payload<State<T>, ModuleStateSchema>\n\nexport const isModuleState = <T extends StateDictionary = StateDictionary, TInput = unknown>(payload?: TInput): payload is ModuleState<T> & TInput => {\n return isPayloadOfSchemaType<ModuleState<T>>(ModuleStateSchema)(payload)\n}\n\nexport const isModuleStateWithSources = <T extends StateDictionary = StateDictionary,\n TInput = unknown>(payload?: TInput): payload is WithSources<ModuleState<T>> & TInput => {\n return isPayloadOfSchemaTypeWithSources<ModuleState<T>>(ModuleStateSchema)(payload)\n}\n\nexport const asModuleState = AsObjectFactory.create<ModuleState<StateDictionary>>(isModuleState)\nexport const asOptionalModuleState = AsObjectFactory.createOptional<ModuleState<StateDictionary>>(isModuleState)\n", "import type { TypeCheck } from '@xylabs/sdk-js'\n\n/** @deprecated use narrowing instead [ if(is) ] */\nexport const WithFactory = {\n create: <T extends object>(typeCheck: TypeCheck<T>) => {\n return <R>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n mod: any,\n\n closure: (mod: T) => R,\n ): R | undefined => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return typeCheck(mod) ? closure(mod) : undefined\n }\n },\n}\n"],
|
|
5
|
+
"mappings": ";AACA;AAAA,EACE;AAAA,OACK;AAMA,IAAM,qBAAqB,SAAS,6BAA6B,IAAI;;;AC2BrE,SAAS,kBAAqF;AACnG,SAAO,CAAqC,gBAAmB;AAE7D;AAAA,EACF;AACF;;;ACzCA,SAAS,gBAAgB;AACzB,SAAS,YAAAA,iBAA6B;AAQtC,IAAM,qBAAqB,CACzB,KACA,WAC2C;AAC3C,QAAMC,WAAkD;AAAA;AAAA,IAEtD,GAAG;AAAA,IAEH,eAAe,IAAI;AAAA;AAAA,IAEnB,QAAQ,IAAI,OAAO,KAAK,GAAG;AAAA,IAE3B,qBAAqB,IAAI;AAAA;AAAA,IAEzB,QAAQ,EAAE,GAAI,IAAsC,QAAQ,GAAG,OAAO;AAAA,EACxE;AACA,SAAOA;AACT;AAEO,IAAM,iCAAiC,CAC5C,UACAA,UACA,QAEA,UAAuC,UACpC;AACH,QAAM,iBACF,YAAY,QAAQ,SAAS,OAAO,IAClC,MAAM,QAAQ,OAAO,IACnB,UACA,CAAC,OAAO,IACV,CAAC;AAEP,aAAW,iBAAiB,gBAAgB;AAC1C,QAAI,CAACA,SAAQ,cAAc,SAAS,aAAa,GAAG;AAClD,cAAQ,KAAK,kBAAkB,OAAO,OAAO,CAAC,qCAAqC;AAAA,IACrF;AAAA,EACF;AAEA,QAAM,qBAAqB,CAAC,WAAmB;AAC7C,YAAQ,OAAO,SAAS;AAAA,MACtB,KAAK,WAAW;AACd,eAAO;AAAA,MACT;AAAA,MACA,KAAK,UAAU;AACb,eAAO,WAAW;AAAA,MACpB;AAAA,MACA,KAAK,UAAU;AACb,YAAI,MAAM,QAAQ,OAAO,GAAG;AAC1B,iBAAO,QAAQ,SAAS,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AACA,UAAM,IAAI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;ACJtF,SAAS,mBAAAC,wBAAuB;AAEhC;AAAA,EACE,YAAAC;AAAA,EAAU,yBAAAC;AAAA,EAAuB;AAAA,OAC5B;AAOA,IAAM,oBAAoBD,WAAS,4BAA4B,IAAI;AAKnE,IAAM,gBAAgB,CAAgE,YAAyD;AACpJ,SAAOC,uBAAsC,iBAAiB,EAAE,OAAO;AACzE;AAEO,IAAM,2BAA2B,CACpB,YAAsE;AACxF,SAAO,iCAAiD,iBAAiB,EAAE,OAAO;AACpF;AAEO,IAAM,gBAAgBF,iBAAgB,OAAqC,aAAa;AACxF,IAAM,wBAAwBA,iBAAgB,eAA6C,aAAa;;;ACvBxG,IAAM,cAAc;AAAA,EACzB,QAAQ,CAAmB,cAA4B;AACrD,WAAO,CAEL,KAEA,YACkB;AAElB,aAAO,UAAU,GAAG,IAAI,QAAQ,GAAG,IAAI;AAAA,IACzC;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["asSchema", "factory", "factory", "creatableModule", "AsObjectFactory", "IsObjectFactory", "AsObjectFactory", "asSchema", "asSchema", "asSchema", "asSchema", "factory", "AsObjectFactory", "factory", "IsObjectFactory", "AsObjectFactory", "AsObjectFactory", "IsObjectFactory", "factory", "IsObjectFactory", "AsObjectFactory", "IsObjectFactory", "IsObjectFactory", "AsObjectFactory", "asSchema", "asSchema", "asSchema", "AsObjectFactory", "asSchema", "isPayloadOfSchemaType"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreatableStatus, Promisable, TypeCheck } from '@xylabs/sdk-js';
|
|
2
2
|
import { IsObjectFactory } from '@xylabs/sdk-js';
|
|
3
|
-
import type { AccountInstance } from '@xyo-network/sdk-protocol-js';
|
|
3
|
+
import type { AccountInstance, XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
4
4
|
import type { ModuleEventData } from '../EventsModels/index.ts';
|
|
5
5
|
import type { ModuleIdentifier, ModuleName } from '../ModuleIdentifier.ts';
|
|
6
6
|
import type { QueryableModule, QueryableModuleFunctions, QueryableModuleParams } from '../QueryableModule/index.ts';
|
|
@@ -14,8 +14,8 @@ export declare class DeadModuleError extends Error {
|
|
|
14
14
|
constructor(id: ModuleIdentifier, error: Error | undefined, msg?: string);
|
|
15
15
|
}
|
|
16
16
|
export interface AddressToWeakInstanceCache {
|
|
17
|
-
get: (address:
|
|
18
|
-
set: (address:
|
|
17
|
+
get: (address: XyoAddress) => WeakRef<ModuleInstance> | null;
|
|
18
|
+
set: (address: XyoAddress, instance: WeakRef<ModuleInstance> | null) => void;
|
|
19
19
|
}
|
|
20
20
|
export interface ModuleFamilyFunctions {
|
|
21
21
|
account?: AccountInstance;
|
|
@@ -25,7 +25,7 @@ export interface ModuleFamilyFunctions {
|
|
|
25
25
|
parents: () => Promisable<ModuleInstance[]>;
|
|
26
26
|
privateChildren: () => Promisable<ModuleInstance[]>;
|
|
27
27
|
publicChildren: () => Promisable<ModuleInstance[]>;
|
|
28
|
-
removeParent: (address:
|
|
28
|
+
removeParent: (address: XyoAddress) => void;
|
|
29
29
|
siblings: () => Promisable<ModuleInstance[]>;
|
|
30
30
|
}
|
|
31
31
|
export interface ModuleInstance<TParams extends QueryableModuleParams = QueryableModuleParams, TEventData extends ModuleEventData = ModuleEventData> extends QueryableModule<TParams, TEventData>, ObjectResolver<ModuleInstance>, QueryableModuleFunctions, ModuleFamilyFunctions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../../../src/instance/Instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"Instance.d.ts","sourceRoot":"","sources":["../../../src/instance/Instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,UAAU,EAC3B,SAAS,EACV,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,eAAe,EAAoB,MAAM,gBAAgB,CAAA;AAClE,OAAO,KAAK,EAAE,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CAAA;IACpB,OAAO,EAAE,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC,CAAA;IAC3C,eAAe,EAAE,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC,CAAA;IACnD,cAAc,EAAE,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC,CAAA;IAClD,YAAY,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAA;IAC3C,QAAQ,EAAE,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC,CAAA;CAC7C;AAED,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAAE,UAAU,SAAS,eAAe,GAAG,eAAe,CACjJ,SAAQ,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC,EAC5C,cAAc,CAAC,cAAc,CAAC,EAC9B,wBAAwB,EACxB,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;IAGlC,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CACrC;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAEvF,qBAAa,iBAAiB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;CAAG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
2
2
|
import type { ModuleInstance } from './Instance.ts';
|
|
3
3
|
import type { ModuleResolverInstance } from './ModuleResolver.ts';
|
|
4
4
|
export interface ModuleRepository<T extends ModuleInstance = ModuleInstance> extends ModuleResolverInstance<T> {
|
|
5
5
|
add(mod: T): this;
|
|
6
6
|
add(mod: T[]): this;
|
|
7
7
|
add(mod: T | T[]): this;
|
|
8
|
-
remove(address:
|
|
8
|
+
remove(address: XyoAddress | string[]): this;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=ModuleRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleRepository.d.ts","sourceRoot":"","sources":["../../../src/instance/ModuleRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ModuleRepository.d.ts","sourceRoot":"","sources":["../../../src/instance/ModuleRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IAC5G,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAA;IACjB,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,IAAI,CAAA;IACnB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAA;IAEvB,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;CAC7C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
2
3
|
import type { ModuleIdentifier } from '../ModuleIdentifier.ts';
|
|
3
4
|
import type { ModuleInstance } from './Instance.ts';
|
|
4
5
|
import type { ObjectFilterOptions } from './ObjectFilter.ts';
|
|
@@ -8,7 +9,7 @@ export interface ModuleResolver<TResult extends ModuleInstance = ModuleInstance>
|
|
|
8
9
|
}
|
|
9
10
|
export interface ModuleNameResolver {
|
|
10
11
|
readonly root: ModuleInstance;
|
|
11
|
-
resolveIdentifier(id: ModuleIdentifier, options?: ObjectFilterOptions): Promisable<
|
|
12
|
+
resolveIdentifier(id: ModuleIdentifier, options?: ObjectFilterOptions): Promisable<XyoAddress | undefined>;
|
|
12
13
|
}
|
|
13
14
|
export interface ModuleResolverInstance<TResult extends ModuleInstance = ModuleInstance> extends ModuleResolver<TResult>, ModuleNameResolver {
|
|
14
15
|
addResolver: (resolver: ModuleResolverInstance<TResult>) => this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleResolver.d.ts","sourceRoot":"","sources":["../../../src/instance/ModuleResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ModuleResolver.d.ts","sourceRoot":"","sources":["../../../src/instance/ModuleResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAGzD,eAAO,MAAM,gBAAgB,qOAAmC,CAAA;AAEhE,MAAM,WAAW,cAAc,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,cAAc,CAAC,OAAO,CAAC;CAAG;AAEnH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,iBAAiB,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CAC3G;AAED,MAAM,WAAW,sBAAsB,CAAC,OAAO,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,cAAc,CAAC,OAAO,CAAC,EAAE,kBAAkB;IAC1I,WAAW,EAAE,CAAC,QAAQ,EAAE,sBAAsB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;IAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,sBAAsB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAA;CACpE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyObject, EmptyObject, TypeCheck } from '@xylabs/sdk-js';
|
|
2
|
+
import type { XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
2
3
|
import type { ModuleName } from '../ModuleIdentifier.ts';
|
|
3
4
|
export type Direction = 'up' | 'down' | 'all';
|
|
4
5
|
export type Visibility = 'public' | 'private' | 'all';
|
|
@@ -13,7 +14,7 @@ export interface ObjectFilterOptions<T extends EmptyObject = AnyObject> extends
|
|
|
13
14
|
identity?: TypeCheck<T>;
|
|
14
15
|
}
|
|
15
16
|
export interface AddressObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {
|
|
16
|
-
address:
|
|
17
|
+
address: XyoAddress[];
|
|
17
18
|
}
|
|
18
19
|
export declare const isAddressObjectFilter: <T extends EmptyObject = AnyObject>(value: unknown) => value is AddressObjectFilter<T>;
|
|
19
20
|
export interface NameObjectFilter<T extends EmptyObject = AnyObject> extends ObjectFilterOptions<T> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectFilter.d.ts","sourceRoot":"","sources":["../../../src/instance/ObjectFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"ObjectFilter.d.ts","sourceRoot":"","sources":["../../../src/instance/ObjectFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,WAAW,EAAE,SAAS,EAClC,MAAM,g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,SAAS,WAAW,GAAG,SAAS,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClG,KAAK,EAAE,MAAM,EAAE,EAAE,CAAA;CAClB;AAED,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,WAAW,GAAG,SAAS,EAAE,OAAO,OAAO,KAAG,KAAK,IAAI,iBAAiB,CAAC,CAAC,CAC/D,CAAA;AAErD,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAC5F,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEjC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,WAAW,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/module-model",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,40 +34,35 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@bitauth/libauth": "~3.0",
|
|
38
|
-
"@metamask/providers": "^22.1",
|
|
37
|
+
"@bitauth/libauth": "~3.0.0",
|
|
38
|
+
"@metamask/providers": "^22.1.1",
|
|
39
39
|
"@noble/post-quantum": "~0.6.1",
|
|
40
40
|
"@opentelemetry/api": "^1.9.1",
|
|
41
41
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
42
42
|
"@scure/base": "~2.2.0",
|
|
43
|
-
"@scure/bip39": "~2.2",
|
|
44
|
-
"@
|
|
45
|
-
"@xylabs/
|
|
46
|
-
"@xylabs/
|
|
47
|
-
"@xylabs/
|
|
48
|
-
"@xylabs/
|
|
49
|
-
"@xylabs/
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
52
|
-
"ajv": "^8.20",
|
|
43
|
+
"@scure/bip39": "~2.2.0",
|
|
44
|
+
"@xylabs/geo": "^6.0.7",
|
|
45
|
+
"@xylabs/sdk-js": "^6.0.7",
|
|
46
|
+
"@xylabs/threads": "^6.0.7",
|
|
47
|
+
"@xylabs/toolchain": "~8.1.15",
|
|
48
|
+
"@xylabs/tsconfig": "~8.1.15",
|
|
49
|
+
"@xylabs/vitest-extended": "~6.0.7",
|
|
50
|
+
"@xyo-network/sdk-protocol-js": "~6.0.8",
|
|
51
|
+
"ajv": "^8.20.0",
|
|
53
52
|
"async-mutex": "^0.5.0",
|
|
54
53
|
"bn.js": "^5.2.3",
|
|
55
54
|
"buffer": "^6.0.3",
|
|
56
|
-
"debug": "~4.4",
|
|
57
|
-
"eslint": "^10.4.
|
|
55
|
+
"debug": "~4.4.3",
|
|
56
|
+
"eslint": "^10.4.1",
|
|
58
57
|
"ethers": "^6.16.0",
|
|
59
|
-
"hash-wasm": "~4.12",
|
|
60
|
-
"idb": "^8.0",
|
|
61
|
-
"
|
|
62
|
-
"mapbox-gl": "^3.23",
|
|
63
|
-
"observable-fns": "~0.6",
|
|
58
|
+
"hash-wasm": "~4.12.0",
|
|
59
|
+
"idb": "^8.0.3",
|
|
60
|
+
"observable-fns": "~0.6.1",
|
|
64
61
|
"pako": "~2.1.0",
|
|
65
|
-
"store2": "~2.14",
|
|
66
62
|
"typescript": "~6.0.3",
|
|
67
|
-
"vite": "^8.0.
|
|
68
|
-
"vitest": "~4.1.
|
|
69
|
-
"
|
|
70
|
-
"webextension-polyfill": "^0.12",
|
|
63
|
+
"vite": "^8.0.16",
|
|
64
|
+
"vitest": "~4.1.8",
|
|
65
|
+
"webextension-polyfill": "^0.12.0",
|
|
71
66
|
"zod": "^4.4.3"
|
|
72
67
|
},
|
|
73
68
|
"peerDependencies": {
|
|
@@ -90,12 +85,8 @@
|
|
|
90
85
|
"ethers": "^6.16",
|
|
91
86
|
"hash-wasm": "~4.12",
|
|
92
87
|
"idb": "^8.0",
|
|
93
|
-
"lru-cache": "^11.3",
|
|
94
|
-
"mapbox-gl": "^3.23",
|
|
95
88
|
"observable-fns": "~0.6",
|
|
96
89
|
"pako": "~2.1",
|
|
97
|
-
"store2": "~2.14",
|
|
98
|
-
"wasm-feature-detect": "~1.8",
|
|
99
90
|
"webextension-polyfill": "^0.12",
|
|
100
91
|
"zod": "^4.4"
|
|
101
92
|
},
|