@xyo-network/module-model 2.47.10 → 2.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Query/XyoQueryBoundWitness.js +1 -1
- package/dist/cjs/Query/XyoQueryBoundWitness.js.map +1 -1
- package/dist/docs.json +979 -1080
- package/dist/esm/Query/XyoQueryBoundWitness.js +1 -1
- package/dist/esm/Query/XyoQueryBoundWitness.js.map +1 -1
- package/dist/types/Config.d.ts +1 -0
- package/dist/types/Config.d.ts.map +1 -1
- package/dist/types/Query/XyoQueryBoundWitness.d.ts +1 -1
- package/dist/types/Query/XyoQueryBoundWitness.d.ts.map +1 -1
- package/dist/types/model/Module.d.ts +4 -5
- package/dist/types/model/Module.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/Config.ts +5 -0
- package/src/Query/XyoQueryBoundWitness.ts +2 -2
- package/src/model/Module.ts +7 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness
|
|
1
|
+
export const XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness';
|
|
2
2
|
//# sourceMappingURL=XyoQueryBoundWitness.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyoQueryBoundWitness.js","sourceRoot":"","sources":["../../../src/Query/XyoQueryBoundWitness.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,0BAA0B,GAA+B,
|
|
1
|
+
{"version":3,"file":"XyoQueryBoundWitness.js","sourceRoot":"","sources":["../../../src/Query/XyoQueryBoundWitness.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,0BAA0B,GAA+B,0BAA0B,CAAA"}
|
package/dist/types/Config.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type ModuleConfigBase<T extends AnyObject = AnyObject> = XyoPayload<{
|
|
|
12
12
|
allowed?: Record<SchemaString, (AddressString | CosigningAddressSet)[]>;
|
|
13
13
|
disallowed?: Record<SchemaString, AddressString[]>;
|
|
14
14
|
};
|
|
15
|
+
storeQueries?: boolean;
|
|
15
16
|
} & T>;
|
|
16
17
|
export type ModuleConfig<TConfig extends XyoPayload = XyoPayload> = ModuleConfigBase<TConfig>;
|
|
17
18
|
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAClC,MAAM,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAA;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,UAAU,CACxE;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAClC,MAAM,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAA;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,UAAU,CACxE;IAEE,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,QAAQ,CAAC,EAAE;QAET,cAAc,CAAC,EAAE,OAAO,CAAA;QAGxB,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,aAAa,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAGvE,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,CAAC,CAAA;KACnD,CAAA;IAGD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,GAAG,CAAC,CACN,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,OAAO,SAAS,UAAU,GAAG,UAAU,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { XyoBoundWitness } from '@xyo-network/boundwitness-model';
|
|
2
|
-
export type XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness
|
|
2
|
+
export type XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness';
|
|
3
3
|
export declare const XyoQueryBoundWitnessSchema: XyoQueryBoundWitnessSchema;
|
|
4
4
|
export type XyoQueryBoundWitness = XyoBoundWitness<{
|
|
5
5
|
query: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyoQueryBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Query/XyoQueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE,MAAM,MAAM,0BAA0B,GAAG,
|
|
1
|
+
{"version":3,"file":"XyoQueryBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Query/XyoQueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEjE,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,CAAA;AACnE,eAAO,MAAM,0BAA0B,EAAE,0BAAuD,CAAA;AAEhG,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAC,CAAA"}
|
|
@@ -5,19 +5,18 @@ import { ModuleFilter } from '../ModuleFilter';
|
|
|
5
5
|
import { ModuleQueryResult } from '../ModuleQueryResult';
|
|
6
6
|
import { XyoQueryBoundWitness } from '../Query';
|
|
7
7
|
export interface ModuleResolver<TModule extends Module = Module> {
|
|
8
|
-
addResolver
|
|
8
|
+
addResolver: (resolver: ModuleResolver<TModule>) => this;
|
|
9
9
|
isModuleResolver: boolean;
|
|
10
|
-
removeResolver
|
|
10
|
+
removeResolver: (resolver: ModuleResolver<TModule>) => this;
|
|
11
11
|
resolve(filter?: ModuleFilter): Promisable<TModule[]>;
|
|
12
12
|
}
|
|
13
13
|
export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
14
14
|
address: string;
|
|
15
15
|
config: TConfig;
|
|
16
|
-
|
|
16
|
+
readonly downResolver: ModuleResolver;
|
|
17
17
|
queries: string[];
|
|
18
18
|
query: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(query: T, payloads?: XyoPayload[], queryConfig?: TConf) => Promisable<ModuleQueryResult>;
|
|
19
19
|
queryable: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(query: T, payloads?: XyoPayload[], queryConfig?: TConf) => Promisable<boolean>;
|
|
20
|
-
|
|
21
|
-
resolver: ModuleResolver;
|
|
20
|
+
readonly upResolver: ModuleResolver;
|
|
22
21
|
}
|
|
23
22
|
//# sourceMappingURL=Module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../../../src/model/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,M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,KAAK,EAAE,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EACtG,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,UAAU,EAAE,EACvB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAClC,SAAS,EAAE,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAAE,KAAK,SAAS,YAAY,GAAG,YAAY,EAC1G,KAAK,EAAE,CAAC,EACR,QAAQ,CAAC,EAAE,UAAU,EAAE,EACvB,WAAW,CAAC,EAAE,KAAK,KAChB,UAAU,CAAC,OAAO,CAAC,CAAA;IAIxB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAA;CACpC"}
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/boundwitness-model": "^2.
|
|
14
|
-
"@xyo-network/core": "^2.
|
|
15
|
-
"@xyo-network/payload-model": "^2.
|
|
16
|
-
"@xyo-network/promise": "^2.
|
|
13
|
+
"@xyo-network/boundwitness-model": "^2.49.0",
|
|
14
|
+
"@xyo-network/core": "^2.49.0",
|
|
15
|
+
"@xyo-network/payload-model": "^2.49.0",
|
|
16
|
+
"@xyo-network/promise": "^2.49.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@xylabs/ts-scripts-yarn3": "^2.15.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"types": "dist/types/index.d.ts",
|
|
56
|
-
"version": "2.
|
|
56
|
+
"version": "2.49.0"
|
|
57
57
|
}
|
package/src/Config.ts
CHANGED
|
@@ -10,7 +10,9 @@ export type SchemaString = string
|
|
|
10
10
|
|
|
11
11
|
export type ModuleConfigBase<T extends AnyObject = AnyObject> = XyoPayload<
|
|
12
12
|
{
|
|
13
|
+
//friendly name of module (not collision resistent)
|
|
13
14
|
name?: string
|
|
15
|
+
|
|
14
16
|
//if both allowed and disallowed is specified, then disallowed takes priority
|
|
15
17
|
security?: {
|
|
16
18
|
//will process queries that have unsigned boundwitness in tuples
|
|
@@ -22,6 +24,9 @@ export type ModuleConfigBase<T extends AnyObject = AnyObject> = XyoPayload<
|
|
|
22
24
|
//if schema in record, then anyone except these addresses can access query
|
|
23
25
|
disallowed?: Record<SchemaString, AddressString[]>
|
|
24
26
|
}
|
|
27
|
+
|
|
28
|
+
//store the queries made to the module in an archivist if possible
|
|
29
|
+
storeQueries?: boolean
|
|
25
30
|
} & T
|
|
26
31
|
>
|
|
27
32
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { XyoBoundWitness } from '@xyo-network/boundwitness-model'
|
|
2
2
|
|
|
3
|
-
export type XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness
|
|
4
|
-
export const XyoQueryBoundWitnessSchema: XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness
|
|
3
|
+
export type XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness'
|
|
4
|
+
export const XyoQueryBoundWitnessSchema: XyoQueryBoundWitnessSchema = 'network.xyo.boundwitness'
|
|
5
5
|
|
|
6
6
|
export type XyoQueryBoundWitness = XyoBoundWitness<{
|
|
7
7
|
query: string
|
package/src/model/Module.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { ModuleQueryResult } from '../ModuleQueryResult'
|
|
|
7
7
|
import { XyoQueryBoundWitness } from '../Query'
|
|
8
8
|
|
|
9
9
|
export interface ModuleResolver<TModule extends Module = Module> {
|
|
10
|
-
addResolver
|
|
10
|
+
addResolver: (resolver: ModuleResolver<TModule>) => this
|
|
11
11
|
isModuleResolver: boolean
|
|
12
|
-
removeResolver
|
|
12
|
+
removeResolver: (resolver: ModuleResolver<TModule>) => this
|
|
13
13
|
resolve(filter?: ModuleFilter): Promisable<TModule[]>
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -17,8 +17,8 @@ export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
|
17
17
|
address: string
|
|
18
18
|
config: TConfig
|
|
19
19
|
|
|
20
|
-
/* The resolver is a '
|
|
21
|
-
|
|
20
|
+
/* 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*/
|
|
21
|
+
readonly downResolver: ModuleResolver
|
|
22
22
|
|
|
23
23
|
queries: string[]
|
|
24
24
|
query: <T extends XyoQueryBoundWitness = XyoQueryBoundWitness, TConf extends ModuleConfig = ModuleConfig>(
|
|
@@ -32,9 +32,7 @@ export interface Module<TConfig extends ModuleConfig = ModuleConfig> {
|
|
|
32
32
|
queryConfig?: TConf,
|
|
33
33
|
) => Promisable<boolean>
|
|
34
34
|
|
|
35
|
-
/*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/* 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*/
|
|
39
|
-
resolver: ModuleResolver
|
|
35
|
+
/* The resolver is a 'up' resolver. It can resolve the parent or any children of the parent*/
|
|
36
|
+
/* This is set by a NodeModule when attaching to the module */
|
|
37
|
+
readonly upResolver: ModuleResolver
|
|
40
38
|
}
|