@xyo-network/location-plugin 2.42.3 → 2.42.5
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/Config.d.ts +11 -0
- package/dist/cjs/Config.d.ts.map +1 -0
- package/dist/cjs/Config.js +5 -0
- package/dist/cjs/Config.js.map +1 -0
- package/dist/cjs/CurrentLocationWitness.d.ts +5 -12
- package/dist/cjs/CurrentLocationWitness.d.ts.map +1 -1
- package/dist/cjs/CurrentLocationWitness.js +4 -4
- package/dist/cjs/CurrentLocationWitness.js.map +1 -1
- package/dist/cjs/Plugin.d.ts +2 -2
- package/dist/cjs/Plugin.d.ts.map +1 -1
- package/dist/cjs/Plugin.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/docs.json +416 -420
- package/dist/esm/Config.d.ts +11 -0
- package/dist/esm/Config.d.ts.map +1 -0
- package/dist/esm/Config.js +2 -0
- package/dist/esm/Config.js.map +1 -0
- package/dist/esm/CurrentLocationWitness.d.ts +5 -12
- package/dist/esm/CurrentLocationWitness.d.ts.map +1 -1
- package/dist/esm/CurrentLocationWitness.js +2 -2
- package/dist/esm/CurrentLocationWitness.js.map +1 -1
- package/dist/esm/Plugin.d.ts +2 -2
- package/dist/esm/Plugin.d.ts.map +1 -1
- package/dist/esm/Plugin.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +7 -7
- package/src/Config.ts +11 -0
- package/src/CurrentLocationWitness.ts +5 -12
- package/src/Plugin.spec.ts +1 -1
- package/src/Plugin.ts +4 -3
- package/src/index.ts +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleParams } from '@xyo-network/module';
|
|
2
|
+
import { XyoWitnessConfig } from '@xyo-network/witness';
|
|
3
|
+
export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config';
|
|
4
|
+
export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
|
|
5
|
+
export type CurrentLocationWitnessConfig = XyoWitnessConfig<{
|
|
6
|
+
schema: CurrentLocationWitnessConfigSchema;
|
|
7
|
+
}>;
|
|
8
|
+
export type CurrentLocationWitnessParams = ModuleParams<CurrentLocationWitnessConfig> & {
|
|
9
|
+
geolocation: Geolocation;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,MAAM,kCAAkC,GAAG,qCAAqC,CAAA;AACtF,eAAO,MAAM,kCAAkC,EAAE,kCAA0E,CAAA;AAE3H,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;IAC1D,MAAM,EAAE,kCAAkC,CAAA;CAC3C,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,4BAA4B,CAAC,GAAG;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,kCAAkC,GAAuC,qCAAqC,CAAA"}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleParams } from '@xyo-network/module';
|
|
2
2
|
import { XyoPayload } from '@xyo-network/payload';
|
|
3
|
-
import { AbstractWitness
|
|
4
|
-
|
|
5
|
-
export declare const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema;
|
|
6
|
-
export type CurrentLocationWitnessConfig = XyoWitnessConfig<{
|
|
7
|
-
schema: CurrentLocationWitnessConfigSchema;
|
|
8
|
-
}>;
|
|
9
|
-
export type CurrentLocationWitnessParams = XyoModuleParams<CurrentLocationWitnessConfig> & {
|
|
10
|
-
geolocation: Geolocation;
|
|
11
|
-
};
|
|
3
|
+
import { AbstractWitness } from '@xyo-network/witness';
|
|
4
|
+
import { CurrentLocationWitnessConfig, CurrentLocationWitnessParams } from './Config';
|
|
12
5
|
export declare class CurrentLocationWitness extends AbstractWitness<CurrentLocationWitnessConfig> {
|
|
13
6
|
static configSchema: "network.xyo.location.current.config";
|
|
14
7
|
private _geolocation;
|
|
15
8
|
constructor(params: CurrentLocationWitnessParams);
|
|
16
9
|
get geolocation(): Geolocation;
|
|
17
|
-
static create(params?:
|
|
10
|
+
static create(params?: ModuleParams<CurrentLocationWitnessConfig>): Promise<CurrentLocationWitness>;
|
|
18
11
|
getCurrentPosition(): Promise<GeolocationPosition>;
|
|
19
|
-
observe(
|
|
12
|
+
observe(): Promise<XyoPayload[]>;
|
|
20
13
|
}
|
|
21
14
|
//# sourceMappingURL=CurrentLocationWitness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,4BAA4B,EAAsC,4BAA4B,EAAE,MAAM,UAAU,CAAA;AAEzH,qBAAa,sBAAuB,SAAQ,eAAe,CAAC,4BAA4B,CAAC;IACvF,OAAgB,YAAY,wCAAqC;IAEjE,OAAO,CAAC,YAAY,CAAa;gBAErB,MAAM,EAAE,4BAA4B;IAKhD,IAAW,WAAW,IAAI,WAAW,CAEpC;WAEqB,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,4BAA4B,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI3G,kBAAkB;IAaV,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;CAoBhD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert';
|
|
2
2
|
import { LocationHeadingSchema, LocationSchema } from '@xyo-network/location-payload-plugin';
|
|
3
3
|
import { AbstractWitness } from '@xyo-network/witness';
|
|
4
|
-
|
|
4
|
+
import { CurrentLocationWitnessConfigSchema } from './Config';
|
|
5
5
|
export class CurrentLocationWitness extends AbstractWitness {
|
|
6
6
|
static configSchema = CurrentLocationWitnessConfigSchema;
|
|
7
7
|
_geolocation;
|
|
@@ -24,7 +24,7 @@ export class CurrentLocationWitness extends AbstractWitness {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
async observe(
|
|
27
|
+
async observe() {
|
|
28
28
|
const location = await this.getCurrentPosition();
|
|
29
29
|
const locationPayload = {
|
|
30
30
|
altitude: location.coords.altitude ?? undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrentLocationWitness.js","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAA0B,qBAAqB,EAAmB,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAGrI,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"CurrentLocationWitness.js","sourceRoot":"","sources":["../../src/CurrentLocationWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAA0B,qBAAqB,EAAmB,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAGrI,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAgC,kCAAkC,EAAgC,MAAM,UAAU,CAAA;AAEzH,MAAM,OAAO,sBAAuB,SAAQ,eAA6C;IACvF,MAAM,CAAU,YAAY,GAAG,kCAAkC,CAAA;IAEzD,YAAY,CAAa;IAEjC,YAAY,MAAoC;QAC9C,KAAK,CAAC,MAAM,CAAC,CAAA;QACb,IAAI,CAAC,YAAY,GAAG,MAAM,EAAE,WAAW,CAAA;IACzC,CAAC;IAED,IAAW,WAAW;QACpB,OAAO,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;IAC/D,CAAC;IAED,MAAM,CAAU,KAAK,CAAC,MAAM,CAAC,MAAmD;QAC9E,OAAO,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAA2B,CAAA;IAC/D,CAAC;IAEM,kBAAkB;QACvB,OAAO,IAAI,OAAO,CAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1D,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAClC,CAAC,QAA6B,EAAE,EAAE;gBAChC,OAAO,CAAC,QAAQ,CAAC,CAAA;YACnB,CAAC,EACD,CAAC,KAA+B,EAAE,EAAE;gBAClC,MAAM,CAAC,KAAK,CAAC,CAAA;YACf,CAAC,CACF,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAEQ,KAAK,CAAC,OAAO;QACpB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAA;QAChD,MAAM,eAAe,GAAoB;YACvC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,IAAI,SAAS;YAC/C,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,IAAI,SAAS;YAC/D,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ;YAClC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;YACpC,MAAM,EAAE,cAAc;SACvB,CAAA;QACD,MAAM,OAAO,GAA6B,QAAQ,CAAC,MAAM,CAAC,OAAO;YAC/D,CAAC,CAAC;gBACE;oBACE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,IAAI,SAAS;oBAC7C,MAAM,EAAE,qBAAqB;oBAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS;iBAC1C;aACF;YACH,CAAC,CAAC,EAAE,CAAA;QACN,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,GAAG,OAAO,CAAC,CAAC,CAAA;IACrD,CAAC"}
|
package/dist/esm/Plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleParams } from '@xyo-network/module';
|
|
2
2
|
import { PayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin';
|
|
3
|
-
export declare const LocationPlugin: () => PayloadSetWitnessPlugin<
|
|
3
|
+
export declare const LocationPlugin: () => PayloadSetWitnessPlugin<ModuleParams<import("@xyo-network/payload").SchemaFields & import("@xyo-network/payload").PayloadFields & {
|
|
4
4
|
security?: {
|
|
5
5
|
allowed?: Record<string, string[][]> | undefined;
|
|
6
6
|
disallowed?: Record<string, string[]> | undefined;
|
package/dist/esm/Plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAA0B,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAKhG,eAAO,MAAM,cAAc;;;;;;;;;;;GASxB,CAAA"}
|
package/dist/esm/Plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAA2B,MAAM,gCAAgC,CAAA;AAGhG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CACjC,sBAAsB,CACpB,EAAE,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAC/D;IACE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC1D,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CACF,CAAA"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,cAAc,EAAE,CAAA;AAGzB,eAAe,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,cAAc,UAAU,CAAA;AACxB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,cAAc,EAAE,CAAA;AAGzB,eAAe,cAAc,CAAA"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,cAAc,EAAE,CAAA;AAEzB,oDAAoD;AACpD,eAAe,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,cAAc,UAAU,CAAA;AACxB,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AAExC,OAAO,EAAE,cAAc,EAAE,CAAA;AAEzB,oDAAoD;AACpD,eAAe,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^2.6.
|
|
14
|
-
"@xyo-network/location-payload-plugin": "^2.42.
|
|
15
|
-
"@xyo-network/module": "^2.42.
|
|
16
|
-
"@xyo-network/payload": "^2.42.
|
|
17
|
-
"@xyo-network/payloadset-plugin": "^2.42.
|
|
18
|
-
"@xyo-network/witness": "^2.42.
|
|
13
|
+
"@xylabs/assert": "^2.6.10",
|
|
14
|
+
"@xyo-network/location-payload-plugin": "^2.42.5",
|
|
15
|
+
"@xyo-network/module": "^2.42.5",
|
|
16
|
+
"@xyo-network/payload": "^2.42.5",
|
|
17
|
+
"@xyo-network/payloadset-plugin": "^2.42.5",
|
|
18
|
+
"@xyo-network/witness": "^2.42.5",
|
|
19
19
|
"tslib": "^2.4.1"
|
|
20
20
|
},
|
|
21
21
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"types": "dist/esm/index.d.ts",
|
|
54
|
-
"version": "2.42.
|
|
54
|
+
"version": "2.42.5"
|
|
55
55
|
}
|
package/src/Config.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleParams } from '@xyo-network/module'
|
|
2
|
+
import { XyoWitnessConfig } from '@xyo-network/witness'
|
|
3
|
+
|
|
4
|
+
export type CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'
|
|
5
|
+
export const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'
|
|
6
|
+
|
|
7
|
+
export type CurrentLocationWitnessConfig = XyoWitnessConfig<{
|
|
8
|
+
schema: CurrentLocationWitnessConfigSchema
|
|
9
|
+
}>
|
|
10
|
+
|
|
11
|
+
export type CurrentLocationWitnessParams = ModuleParams<CurrentLocationWitnessConfig> & { geolocation: Geolocation }
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import { LocationHeadingPayload, LocationHeadingSchema, LocationPayload, LocationSchema } from '@xyo-network/location-payload-plugin'
|
|
3
|
-
import {
|
|
3
|
+
import { ModuleParams } from '@xyo-network/module'
|
|
4
4
|
import { XyoPayload } from '@xyo-network/payload'
|
|
5
|
-
import { AbstractWitness
|
|
5
|
+
import { AbstractWitness } from '@xyo-network/witness'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
export const CurrentLocationWitnessConfigSchema: CurrentLocationWitnessConfigSchema = 'network.xyo.location.current.config'
|
|
9
|
-
|
|
10
|
-
export type CurrentLocationWitnessConfig = XyoWitnessConfig<{
|
|
11
|
-
schema: CurrentLocationWitnessConfigSchema
|
|
12
|
-
}>
|
|
13
|
-
|
|
14
|
-
export type CurrentLocationWitnessParams = XyoModuleParams<CurrentLocationWitnessConfig> & { geolocation: Geolocation }
|
|
7
|
+
import { CurrentLocationWitnessConfig, CurrentLocationWitnessConfigSchema, CurrentLocationWitnessParams } from './Config'
|
|
15
8
|
|
|
16
9
|
export class CurrentLocationWitness extends AbstractWitness<CurrentLocationWitnessConfig> {
|
|
17
10
|
static override configSchema = CurrentLocationWitnessConfigSchema
|
|
@@ -27,7 +20,7 @@ export class CurrentLocationWitness extends AbstractWitness<CurrentLocationWitne
|
|
|
27
20
|
return assertEx(this._geolocation, 'No geolocation provided')
|
|
28
21
|
}
|
|
29
22
|
|
|
30
|
-
static override async create(params?:
|
|
23
|
+
static override async create(params?: ModuleParams<CurrentLocationWitnessConfig>): Promise<CurrentLocationWitness> {
|
|
31
24
|
return (await super.create(params)) as CurrentLocationWitness
|
|
32
25
|
}
|
|
33
26
|
|
|
@@ -44,7 +37,7 @@ export class CurrentLocationWitness extends AbstractWitness<CurrentLocationWitne
|
|
|
44
37
|
})
|
|
45
38
|
}
|
|
46
39
|
|
|
47
|
-
override async observe(
|
|
40
|
+
override async observe(): Promise<XyoPayload[]> {
|
|
48
41
|
const location = await this.getCurrentPosition()
|
|
49
42
|
const locationPayload: LocationPayload = {
|
|
50
43
|
altitude: location.coords.altitude ?? undefined,
|
package/src/Plugin.spec.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { CurrentLocationSchema } from '@xyo-network/location-payload-plugin'
|
|
6
6
|
import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
|
|
7
7
|
|
|
8
|
-
import { CurrentLocationWitnessConfigSchema } from './
|
|
8
|
+
import { CurrentLocationWitnessConfigSchema } from './Config'
|
|
9
9
|
import { LocationPlugin } from './Plugin'
|
|
10
10
|
|
|
11
11
|
describe('LocationPlugin', () => {
|
package/src/Plugin.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LocationSchema } from '@xyo-network/location-payload-plugin'
|
|
2
|
-
import {
|
|
2
|
+
import { ModuleParams } from '@xyo-network/module'
|
|
3
3
|
import { PayloadSetSchema } from '@xyo-network/payload'
|
|
4
4
|
import { createPayloadSetPlugin, PayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { CurrentLocationWitnessConfig } from './Config'
|
|
7
|
+
import { CurrentLocationWitness } from './CurrentLocationWitness'
|
|
7
8
|
|
|
8
9
|
export const LocationPlugin = () =>
|
|
9
|
-
createPayloadSetPlugin<PayloadSetWitnessPlugin<
|
|
10
|
+
createPayloadSetPlugin<PayloadSetWitnessPlugin<ModuleParams<CurrentLocationWitnessConfig>>>(
|
|
10
11
|
{ required: { [LocationSchema]: 1 }, schema: PayloadSetSchema },
|
|
11
12
|
{
|
|
12
13
|
witness: async (params) => {
|