@xyo-network/bridge-wrapper 2.111.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/neutral/index.d.ts +35 -2
  2. package/package.json +11 -30
  3. package/xy.config.ts +12 -0
  4. package/dist/browser/BridgeWrapper.d.cts +0 -29
  5. package/dist/browser/BridgeWrapper.d.cts.map +0 -1
  6. package/dist/browser/BridgeWrapper.d.mts +0 -29
  7. package/dist/browser/BridgeWrapper.d.mts.map +0 -1
  8. package/dist/browser/BridgeWrapper.d.ts +0 -29
  9. package/dist/browser/BridgeWrapper.d.ts.map +0 -1
  10. package/dist/browser/index.cjs +0 -64
  11. package/dist/browser/index.cjs.map +0 -1
  12. package/dist/browser/index.d.cts +0 -2
  13. package/dist/browser/index.d.cts.map +0 -1
  14. package/dist/browser/index.d.mts +0 -2
  15. package/dist/browser/index.d.mts.map +0 -1
  16. package/dist/browser/index.d.ts +0 -2
  17. package/dist/browser/index.d.ts.map +0 -1
  18. package/dist/browser/index.mjs +0 -43
  19. package/dist/browser/index.mjs.map +0 -1
  20. package/dist/neutral/BridgeWrapper.d.cts +0 -29
  21. package/dist/neutral/BridgeWrapper.d.cts.map +0 -1
  22. package/dist/neutral/BridgeWrapper.d.mts +0 -29
  23. package/dist/neutral/BridgeWrapper.d.mts.map +0 -1
  24. package/dist/neutral/BridgeWrapper.d.ts +0 -29
  25. package/dist/neutral/BridgeWrapper.d.ts.map +0 -1
  26. package/dist/neutral/index.cjs +0 -64
  27. package/dist/neutral/index.cjs.map +0 -1
  28. package/dist/neutral/index.d.cts +0 -2
  29. package/dist/neutral/index.d.cts.map +0 -1
  30. package/dist/neutral/index.d.mts +0 -2
  31. package/dist/neutral/index.d.mts.map +0 -1
  32. package/dist/neutral/index.d.ts.map +0 -1
  33. package/dist/node/BridgeWrapper.d.cts +0 -29
  34. package/dist/node/BridgeWrapper.d.cts.map +0 -1
  35. package/dist/node/BridgeWrapper.d.mts +0 -29
  36. package/dist/node/BridgeWrapper.d.mts.map +0 -1
  37. package/dist/node/BridgeWrapper.d.ts +0 -29
  38. package/dist/node/BridgeWrapper.d.ts.map +0 -1
  39. package/dist/node/index.cjs +0 -69
  40. package/dist/node/index.cjs.map +0 -1
  41. package/dist/node/index.d.cts +0 -2
  42. package/dist/node/index.d.cts.map +0 -1
  43. package/dist/node/index.d.mts +0 -2
  44. package/dist/node/index.d.mts.map +0 -1
  45. package/dist/node/index.d.ts +0 -2
  46. package/dist/node/index.d.ts.map +0 -1
  47. package/dist/node/index.mjs +0 -44
  48. package/dist/node/index.mjs.map +0 -1
@@ -1,2 +1,35 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import * as _xylabs_object from '@xylabs/object';
2
+ import * as _xyo_network_bridge_model from '@xyo-network/bridge-model';
3
+ import { BridgeModule, BridgeInstance, BridgeExposeOptions, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
4
+ import * as _xyo_network_module_model from '@xyo-network/module-model';
5
+ import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
6
+ import * as _xyo_network_payload_model from '@xyo-network/payload-model';
7
+ import { Address } from '@xylabs/hex';
8
+ import { ModuleWrapper } from '@xyo-network/module-wrapper';
9
+
10
+ declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
11
+ static instanceIdentityCheck: _xylabs_object.TypeCheck<BridgeInstance<_xyo_network_bridge_model.BridgeParams<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
12
+ client?: _xyo_network_bridge_model.BridgeClientConfig | undefined;
13
+ discoverRoots?: "start" | "lazy";
14
+ host?: _xyo_network_bridge_model.BridgeHostConfig | undefined;
15
+ schema: "network.xyo.bridge.config";
16
+ }, "schema"> & {
17
+ schema: "network.xyo.bridge.config";
18
+ }, "schema"> & {
19
+ schema: string;
20
+ }>, _xyo_network_bridge_model.BridgeModuleEventData>>;
21
+ static moduleIdentityCheck: _xyo_network_module_model.ModuleTypeCheck<BridgeModule<_xyo_network_bridge_model.BridgeParams<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
22
+ client?: _xyo_network_bridge_model.BridgeClientConfig | undefined;
23
+ discoverRoots?: "start" | "lazy";
24
+ host?: _xyo_network_bridge_model.BridgeHostConfig | undefined;
25
+ schema: "network.xyo.bridge.config";
26
+ }, "schema"> & {
27
+ schema: "network.xyo.bridge.config";
28
+ }, "schema"> & {
29
+ schema: string;
30
+ }>, _xyo_network_bridge_model.BridgeModuleEventData>>;
31
+ expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
32
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
33
+ }
34
+
35
+ export { BridgeWrapper };
package/package.json CHANGED
@@ -10,45 +10,26 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/hex": "^3.6.8",
14
- "@xyo-network/bridge-model": "^2.111.2",
15
- "@xyo-network/module-model": "^2.111.2",
16
- "@xyo-network/module-wrapper": "^2.111.2"
13
+ "@xylabs/hex": "^3.6.12",
14
+ "@xyo-network/bridge-model": "^3.0.0",
15
+ "@xyo-network/module-model": "^3.0.0",
16
+ "@xyo-network/module-wrapper": "^3.0.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@xylabs/ts-scripts-yarn3": "^3.15.13",
20
- "@xylabs/tsconfig": "^3.15.13",
19
+ "@xylabs/ts-scripts-yarn3": "next",
20
+ "@xylabs/tsconfig": "next",
21
21
  "typescript": "^5.5.4"
22
22
  },
23
23
  "description": "Primary SDK for using XYO Protocol 2.0",
24
- "types": "dist/node/index.d.ts",
24
+ "types": "dist/neutral/index.d.ts",
25
25
  "exports": {
26
26
  ".": {
27
- "browser": {
28
- "require": {
29
- "types": "./dist/browser/index.d.cts",
30
- "default": "./dist/browser/index.cjs"
31
- },
32
- "import": {
33
- "types": "./dist/browser/index.d.mts",
34
- "default": "./dist/browser/index.mjs"
35
- }
36
- },
37
- "node": {
38
- "require": {
39
- "types": "./dist/node/index.d.cts",
40
- "default": "./dist/node/index.cjs"
41
- },
42
- "import": {
43
- "types": "./dist/node/index.d.mts",
44
- "default": "./dist/node/index.mjs"
45
- }
46
- }
27
+ "types": "./dist/neutral/index.d.ts",
28
+ "default": "./dist/neutral/index.mjs"
47
29
  },
48
30
  "./package.json": "./package.json"
49
31
  },
50
- "main": "dist/node/index.cjs",
51
- "module": "dist/node/index.mjs",
32
+ "module": "dist/neutral/index.mjs",
52
33
  "homepage": "https://xyo.network",
53
34
  "license": "LGPL-3.0-only",
54
35
  "publishConfig": {
@@ -59,6 +40,6 @@
59
40
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
60
41
  },
61
42
  "sideEffects": false,
62
- "version": "2.111.2",
43
+ "version": "3.0.0",
63
44
  "type": "module"
64
45
  }
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: {},
5
+ neutral: {
6
+ src: true,
7
+ },
8
+ node: {},
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- BridgeWrapper: () => BridgeWrapper
25
- });
26
- module.exports = __toCommonJS(src_exports);
27
-
28
- // src/BridgeWrapper.ts
29
- var import_bridge_model = require("@xyo-network/bridge-model");
30
- var import_module_wrapper = require("@xyo-network/module-wrapper");
31
- (0, import_module_wrapper.constructableModuleWrapper)();
32
- var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
33
- static {
34
- __name(this, "BridgeWrapper");
35
- }
36
- static instanceIdentityCheck = import_bridge_model.isBridgeInstance;
37
- static moduleIdentityCheck = import_bridge_model.isBridgeModule;
38
- async expose(id, options) {
39
- const filterPayload = {
40
- id,
41
- schema: import_bridge_model.ModuleFilterPayloadSchema,
42
- ...options
43
- };
44
- const addresses = (await this.sendQuery({
45
- schema: import_bridge_model.BridgeExposeQuerySchema
46
- }, [
47
- filterPayload
48
- ])).map(({ address }) => address);
49
- return await Promise.all(addresses.map((address) => this.resolve(address)));
50
- }
51
- async unexpose(id, options) {
52
- const filterPayload = {
53
- id,
54
- schema: import_bridge_model.ModuleFilterPayloadSchema,
55
- ...options
56
- };
57
- return (await this.sendQuery({
58
- schema: import_bridge_model.BridgeUnexposeQuerySchema
59
- }, [
60
- filterPayload
61
- ])).map(({ address }) => address);
62
- }
63
- };
64
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.ts'\n","import { Address } from '@xylabs/hex'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { AddressPayload, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']> {\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return await Promise.all((addresses as Address[]).map(address => this.resolve(address)))\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,gBAAN,cACGC,oCAAAA;EAnBV,OAmBUA;;;EAER,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAkE;MAAEH,QAAQI;IAAwB,GAAG;MAACL;KAAc,GACjIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAO,MAAMC,QAAQC,IAAKN,UAAwBG,IAAIC,CAAAA,YAAW,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAChF;EAEA,MAAMI,SAASb,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKK,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;","names":["constructableModuleWrapper","BridgeWrapper","ModuleWrapper","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","addresses","sendQuery","BridgeExposeQuerySchema","map","address","Promise","all","resolve","unexpose","BridgeUnexposeQuerySchema"]}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/BridgeWrapper.ts
5
- import { BridgeExposeQuerySchema, BridgeUnexposeQuerySchema, isBridgeInstance, isBridgeModule, ModuleFilterPayloadSchema } from "@xyo-network/bridge-model";
6
- import { constructableModuleWrapper, ModuleWrapper } from "@xyo-network/module-wrapper";
7
- constructableModuleWrapper();
8
- var BridgeWrapper = class extends ModuleWrapper {
9
- static {
10
- __name(this, "BridgeWrapper");
11
- }
12
- static instanceIdentityCheck = isBridgeInstance;
13
- static moduleIdentityCheck = isBridgeModule;
14
- async expose(id, options) {
15
- const filterPayload = {
16
- id,
17
- schema: ModuleFilterPayloadSchema,
18
- ...options
19
- };
20
- const addresses = (await this.sendQuery({
21
- schema: BridgeExposeQuerySchema
22
- }, [
23
- filterPayload
24
- ])).map(({ address }) => address);
25
- return await Promise.all(addresses.map((address) => this.resolve(address)));
26
- }
27
- async unexpose(id, options) {
28
- const filterPayload = {
29
- id,
30
- schema: ModuleFilterPayloadSchema,
31
- ...options
32
- };
33
- return (await this.sendQuery({
34
- schema: BridgeUnexposeQuerySchema
35
- }, [
36
- filterPayload
37
- ])).map(({ address }) => address);
38
- }
39
- };
40
- export {
41
- BridgeWrapper
42
- };
43
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { AddressPayload, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']> {\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return await Promise.all((addresses as Address[]).map(address => this.resolve(address)))\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;AACA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,gBAAN,cACGC,cAAAA;EAnBV,OAmBUA;;;EAER,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAkE;MAAEH,QAAQI;IAAwB,GAAG;MAACL;KAAc,GACjIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAO,MAAMC,QAAQC,IAAKN,UAAwBG,IAAIC,CAAAA,YAAW,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAChF;EAEA,MAAMI,SAASb,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKK,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;","names":["BridgeExposeQuerySchema","BridgeUnexposeQuerySchema","isBridgeInstance","isBridgeModule","ModuleFilterPayloadSchema","constructableModuleWrapper","ModuleWrapper","constructableModuleWrapper","BridgeWrapper","ModuleWrapper","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","addresses","sendQuery","BridgeExposeQuerySchema","map","address","Promise","all","resolve","unexpose","BridgeUnexposeQuerySchema"]}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- BridgeWrapper: () => BridgeWrapper
25
- });
26
- module.exports = __toCommonJS(src_exports);
27
-
28
- // src/BridgeWrapper.ts
29
- var import_bridge_model = require("@xyo-network/bridge-model");
30
- var import_module_wrapper = require("@xyo-network/module-wrapper");
31
- (0, import_module_wrapper.constructableModuleWrapper)();
32
- var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
33
- static {
34
- __name(this, "BridgeWrapper");
35
- }
36
- static instanceIdentityCheck = import_bridge_model.isBridgeInstance;
37
- static moduleIdentityCheck = import_bridge_model.isBridgeModule;
38
- async expose(id, options) {
39
- const filterPayload = {
40
- id,
41
- schema: import_bridge_model.ModuleFilterPayloadSchema,
42
- ...options
43
- };
44
- const addresses = (await this.sendQuery({
45
- schema: import_bridge_model.BridgeExposeQuerySchema
46
- }, [
47
- filterPayload
48
- ])).map(({ address }) => address);
49
- return await Promise.all(addresses.map((address) => this.resolve(address)));
50
- }
51
- async unexpose(id, options) {
52
- const filterPayload = {
53
- id,
54
- schema: import_bridge_model.ModuleFilterPayloadSchema,
55
- ...options
56
- };
57
- return (await this.sendQuery({
58
- schema: import_bridge_model.BridgeUnexposeQuerySchema
59
- }, [
60
- filterPayload
61
- ])).map(({ address }) => address);
62
- }
63
- };
64
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.ts'\n","import { Address } from '@xylabs/hex'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { AddressPayload, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']> {\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return await Promise.all((addresses as Address[]).map(address => this.resolve(address)))\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,gBAAN,cACGC,oCAAAA;EAnBV,OAmBUA;;;EAER,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAkE;MAAEH,QAAQI;IAAwB,GAAG;MAACL;KAAc,GACjIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAO,MAAMC,QAAQC,IAAKN,UAAwBG,IAAIC,CAAAA,YAAW,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAChF;EAEA,MAAMI,SAASb,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKK,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;","names":["constructableModuleWrapper","BridgeWrapper","ModuleWrapper","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","addresses","sendQuery","BridgeExposeQuerySchema","map","address","Promise","all","resolve","unexpose","BridgeUnexposeQuerySchema"]}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,29 +0,0 @@
1
- import { Address } from '@xylabs/hex';
2
- import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
3
- import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
4
- import { ModuleWrapper } from '@xyo-network/module-wrapper';
5
- export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule> extends ModuleWrapper<TWrappedModule> implements BridgeInstance<TWrappedModule['params']> {
6
- static instanceIdentityCheck: import("@xylabs/object").TypeCheck<BridgeInstance<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
7
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
8
- discoverRoots?: "start" | "lazy";
9
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
10
- schema: "network.xyo.bridge.config";
11
- }, "schema"> & {
12
- schema: "network.xyo.bridge.config";
13
- }, "schema"> & {
14
- schema: string;
15
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
16
- static moduleIdentityCheck: import("@xyo-network/module-model").ModuleTypeCheck<BridgeModule<import("@xyo-network/bridge-model").BridgeParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
17
- client?: import("@xyo-network/bridge-model").BridgeClientConfig | undefined;
18
- discoverRoots?: "start" | "lazy";
19
- host?: import("@xyo-network/bridge-model").BridgeHostConfig | undefined;
20
- schema: "network.xyo.bridge.config";
21
- }, "schema"> & {
22
- schema: "network.xyo.bridge.config";
23
- }, "schema"> & {
24
- schema: string;
25
- }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
26
- expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
27
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
28
- }
29
- //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EACL,mBAAmB,EAGnB,cAAc,EACd,YAAY,EACZ,qBAAqB,EAOtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,EAA8B,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAGvF,qBAAa,aAAa,CAAC,cAAc,SAAS,YAAY,GAAG,YAAY,CAC3E,SAAQ,aAAa,CAAC,cAAc,CACpC,YAAW,cAAc,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAgB,qBAAqB;wBAD/B,2BAAa;;sBACkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAakD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBkC;IAE9C,MAAM,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAQtF,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAM1F"}
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
-
23
- // src/index.ts
24
- var src_exports = {};
25
- __export(src_exports, {
26
- BridgeWrapper: () => BridgeWrapper
27
- });
28
- module.exports = __toCommonJS(src_exports);
29
-
30
- // src/BridgeWrapper.ts
31
- var import_bridge_model = require("@xyo-network/bridge-model");
32
- var import_module_wrapper = require("@xyo-network/module-wrapper");
33
- (0, import_module_wrapper.constructableModuleWrapper)();
34
- var _BridgeWrapper = class _BridgeWrapper extends import_module_wrapper.ModuleWrapper {
35
- async expose(id, options) {
36
- const filterPayload = {
37
- id,
38
- schema: import_bridge_model.ModuleFilterPayloadSchema,
39
- ...options
40
- };
41
- const addresses = (await this.sendQuery({
42
- schema: import_bridge_model.BridgeExposeQuerySchema
43
- }, [
44
- filterPayload
45
- ])).map(({ address }) => address);
46
- return await Promise.all(addresses.map((address) => this.resolve(address)));
47
- }
48
- async unexpose(id, options) {
49
- const filterPayload = {
50
- id,
51
- schema: import_bridge_model.ModuleFilterPayloadSchema,
52
- ...options
53
- };
54
- return (await this.sendQuery({
55
- schema: import_bridge_model.BridgeUnexposeQuerySchema
56
- }, [
57
- filterPayload
58
- ])).map(({ address }) => address);
59
- }
60
- };
61
- __name(_BridgeWrapper, "BridgeWrapper");
62
- __publicField(_BridgeWrapper, "instanceIdentityCheck", import_bridge_model.isBridgeInstance);
63
- __publicField(_BridgeWrapper, "moduleIdentityCheck", import_bridge_model.isBridgeModule);
64
- var BridgeWrapper = _BridgeWrapper;
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {
67
- BridgeWrapper
68
- });
69
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.ts'\n","import { Address } from '@xylabs/hex'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { AddressPayload, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']> {\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return await Promise.all((addresses as Address[]).map(address => this.resolve(address)))\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,oCAAAA;EAKR,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAkE;MAAEH,QAAQI;IAAwB,GAAG;MAACL;KAAc,GACjIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAO,MAAMC,QAAQC,IAAKN,UAAwBG,IAAIC,CAAAA,YAAW,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAChF;EAEA,MAAMI,SAASb,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKK,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;AAnBUX;AAER,cAHWD,gBAGKkB,yBAAwBC;AACxC,cAJWnB,gBAIKoB,uBAAsBC;AAJjC,IAAMrB,gBAAN;","names":["constructableModuleWrapper","BridgeWrapper","ModuleWrapper","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","addresses","sendQuery","BridgeExposeQuerySchema","map","address","Promise","all","resolve","unexpose","BridgeUnexposeQuerySchema","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule"]}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './BridgeWrapper.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,44 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
-
6
- // src/BridgeWrapper.ts
7
- import { BridgeExposeQuerySchema, BridgeUnexposeQuerySchema, isBridgeInstance, isBridgeModule, ModuleFilterPayloadSchema } from "@xyo-network/bridge-model";
8
- import { constructableModuleWrapper, ModuleWrapper } from "@xyo-network/module-wrapper";
9
- constructableModuleWrapper();
10
- var _BridgeWrapper = class _BridgeWrapper extends ModuleWrapper {
11
- async expose(id, options) {
12
- const filterPayload = {
13
- id,
14
- schema: ModuleFilterPayloadSchema,
15
- ...options
16
- };
17
- const addresses = (await this.sendQuery({
18
- schema: BridgeExposeQuerySchema
19
- }, [
20
- filterPayload
21
- ])).map(({ address }) => address);
22
- return await Promise.all(addresses.map((address) => this.resolve(address)));
23
- }
24
- async unexpose(id, options) {
25
- const filterPayload = {
26
- id,
27
- schema: ModuleFilterPayloadSchema,
28
- ...options
29
- };
30
- return (await this.sendQuery({
31
- schema: BridgeUnexposeQuerySchema
32
- }, [
33
- filterPayload
34
- ])).map(({ address }) => address);
35
- }
36
- };
37
- __name(_BridgeWrapper, "BridgeWrapper");
38
- __publicField(_BridgeWrapper, "instanceIdentityCheck", isBridgeInstance);
39
- __publicField(_BridgeWrapper, "moduleIdentityCheck", isBridgeModule);
40
- var BridgeWrapper = _BridgeWrapper;
41
- export {
42
- BridgeWrapper
43
- };
44
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import { Address } from '@xylabs/hex'\nimport {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeExposeQuerySchema,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayload,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport { AddressPayload, ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model'\nimport { constructableModuleWrapper, ModuleWrapper } from '@xyo-network/module-wrapper'\n\nconstructableModuleWrapper()\nexport class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>\n extends ModuleWrapper<TWrappedModule>\n implements BridgeInstance<TWrappedModule['params']> {\n static override instanceIdentityCheck = isBridgeInstance\n static override moduleIdentityCheck = isBridgeModule\n\n async expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeExposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeExposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return await Promise.all((addresses as Address[]).map(address => this.resolve(address)))\n }\n\n async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;;;AACA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,cAAAA;EAKR,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAkE;MAAEH,QAAQI;IAAwB,GAAG;MAACL;KAAc,GACjIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAO,MAAMC,QAAQC,IAAKN,UAAwBG,IAAIC,CAAAA,YAAW,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAChF;EAEA,MAAMI,SAASb,IAAsBC,SAAqD;AACxF,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,YACE,MAAM,KAAKK,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;EACzB;AACF;AAnBUX;AAER,cAHWD,gBAGKkB,yBAAwBC;AACxC,cAJWnB,gBAIKoB,uBAAsBC;AAJjC,IAAMrB,gBAAN;","names":["BridgeExposeQuerySchema","BridgeUnexposeQuerySchema","isBridgeInstance","isBridgeModule","ModuleFilterPayloadSchema","constructableModuleWrapper","ModuleWrapper","constructableModuleWrapper","BridgeWrapper","ModuleWrapper","expose","id","options","filterPayload","schema","ModuleFilterPayloadSchema","addresses","sendQuery","BridgeExposeQuerySchema","map","address","Promise","all","resolve","unexpose","BridgeUnexposeQuerySchema","instanceIdentityCheck","isBridgeInstance","moduleIdentityCheck","isBridgeModule"]}