@xyo-network/bridge-wrapper 2.110.10 → 2.110.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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"}
@@ -54,12 +54,11 @@ var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
54
54
  schema: import_bridge_model.ModuleFilterPayloadSchema,
55
55
  ...options
56
56
  };
57
- const addresses = (await this.sendQuery({
57
+ return (await this.sendQuery({
58
58
  schema: import_bridge_model.BridgeUnexposeQuerySchema
59
59
  }, [
60
60
  filterPayload
61
61
  ])).map(({ address }) => address);
62
- return addresses ? [] : [];
63
62
  }
64
63
  };
65
64
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,gBAAN,cACGC,oCAAAA;EAnBV,OAmBUA;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;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
+ {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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"]}
@@ -30,12 +30,11 @@ var BridgeWrapper = class extends ModuleWrapper {
30
30
  schema: ModuleFilterPayloadSchema,
31
31
  ...options
32
32
  };
33
- const addresses = (await this.sendQuery({
33
+ return (await this.sendQuery({
34
34
  schema: BridgeUnexposeQuerySchema
35
35
  }, [
36
36
  filterPayload
37
37
  ])).map(({ address }) => address);
38
- return addresses ? [] : [];
39
38
  }
40
39
  };
41
40
  export {
@@ -1 +1 @@
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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;AACA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,gBAAN,cACGC,cAAAA;EAnBV,OAmBUA;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;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
+ {"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{\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;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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"}
@@ -54,12 +54,11 @@ var BridgeWrapper = class extends import_module_wrapper.ModuleWrapper {
54
54
  schema: import_bridge_model.ModuleFilterPayloadSchema,
55
55
  ...options
56
56
  };
57
- const addresses = (await this.sendQuery({
57
+ return (await this.sendQuery({
58
58
  schema: import_bridge_model.BridgeUnexposeQuerySchema
59
59
  }, [
60
60
  filterPayload
61
61
  ])).map(({ address }) => address);
62
- return addresses ? [] : [];
63
62
  }
64
63
  };
65
64
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,gBAAN,cACGC,oCAAAA;EAnBV,OAmBUA;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;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
+ {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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"]}
@@ -30,12 +30,11 @@ var BridgeWrapper = class extends ModuleWrapper {
30
30
  schema: ModuleFilterPayloadSchema,
31
31
  ...options
32
32
  };
33
- const addresses = (await this.sendQuery({
33
+ return (await this.sendQuery({
34
34
  schema: BridgeUnexposeQuerySchema
35
35
  }, [
36
36
  filterPayload
37
37
  ])).map(({ address }) => address);
38
- return addresses ? [] : [];
39
38
  }
40
39
  };
41
40
  export {
@@ -1 +1 @@
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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;AACA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,gBAAN,cACGC,cAAAA;EAnBV,OAmBUA;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;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
+ {"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{\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;;;EAGR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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,3 +1,4 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { BridgeExposeOptions, BridgeInstance, BridgeModule, BridgeUnexposeOptions } from '@xyo-network/bridge-model';
2
3
  import { ModuleIdentifier, ModuleInstance } from '@xyo-network/module-model';
3
4
  import { ModuleWrapper } from '@xyo-network/module-wrapper';
@@ -23,6 +24,6 @@ export declare class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeM
23
24
  schema: string;
24
25
  }>, import("@xyo-network/bridge-model").BridgeModuleEventData>>;
25
26
  expose(id: ModuleIdentifier, options?: BridgeExposeOptions): Promise<ModuleInstance[]>;
26
- unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]>;
27
+ unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]>;
27
28
  }
28
29
  //# sourceMappingURL=BridgeWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BridgeWrapper.d.ts","sourceRoot":"","sources":["../../src/BridgeWrapper.ts"],"names":[],"mappings":"AACA,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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAa8B,2BAAa;;sBACnD,2BACvB;;;;;;oEAfgD;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,cAAc,EAAE,CAAC;CAOjG"}
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;IAEnD,OAAgB,qBAAqB;wBAF/B,2BAAa;;sBAEkC,2BAC9C;;;;;;oEADiD;IACxD,OAAgB,mBAAmB;wBAagD,2BAAa;;sBAI7F,2BAAa;;;;;;oEAjBoC;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"}
@@ -51,12 +51,11 @@ var _BridgeWrapper = class _BridgeWrapper extends import_module_wrapper.ModuleWr
51
51
  schema: import_bridge_model.ModuleFilterPayloadSchema,
52
52
  ...options
53
53
  };
54
- const addresses = (await this.sendQuery({
54
+ return (await this.sendQuery({
55
55
  schema: import_bridge_model.BridgeUnexposeQuerySchema
56
56
  }, [
57
57
  filterPayload
58
58
  ])).map(({ address }) => address);
59
- return addresses ? [] : [];
60
59
  }
61
60
  };
62
61
  __name(_BridgeWrapper, "BridgeWrapper");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACCA,0BAaO;AAEP,4BAA0D;IAE1DA,kDAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,oCAAAA;EAMR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;AACF;AArBUP;AAGR,cAJWD,gBAIKkB,yBAAwBC;AACxC,cALWnB,gBAKKoB,uBAAsBC;AALjC,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
+ {"version":3,"sources":["../../src/index.ts","../../src/BridgeWrapper.ts"],"sourcesContent":["export * from './BridgeWrapper.js'\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{\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;EAMR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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;AApBUX;AAGR,cAJWD,gBAIKkB,yBAAwBC;AACxC,cALWnB,gBAKKoB,uBAAsBC;AALjC,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"]}
@@ -27,12 +27,11 @@ var _BridgeWrapper = class _BridgeWrapper extends ModuleWrapper {
27
27
  schema: ModuleFilterPayloadSchema,
28
28
  ...options
29
29
  };
30
- const addresses = (await this.sendQuery({
30
+ return (await this.sendQuery({
31
31
  schema: BridgeUnexposeQuerySchema
32
32
  }, [
33
33
  filterPayload
34
34
  ])).map(({ address }) => address);
35
- return addresses ? [] : [];
36
35
  }
37
36
  };
38
37
  __name(_BridgeWrapper, "BridgeWrapper");
@@ -1 +1 @@
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{\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<ModuleInstance[]> {\n const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }\n const addresses = (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n return addresses ? [] : []\n }\n}\n"],"mappings":";;;;;;AACA,SAGEA,yBAKAC,2BACAC,kBACAC,gBAEAC,iCACK;AAEP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,iBAAN,MAAMA,uBACHC,cAAAA;EAMR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;EAEA,MAAMI,SAASb,IAAsBC,SAA4D;AAC/F,UAAMC,gBAAqC;MAAEF;MAAIG,QAAQC;MAA2B,GAAGH;IAAQ;AAC/F,UAAMI,aACJ,MAAM,KAAKC,UAAoE;MAAEH,QAAQW;IAA0B,GAAG;MAACZ;KAAc,GACrIM,IAAI,CAAC,EAAEC,QAAO,MAAOA,OAAAA;AACvB,WAAOJ,YAAY,CAAA,IAAK,CAAA;EAC1B;AACF;AArBUP;AAGR,cAJWD,gBAIKkB,yBAAwBC;AACxC,cALWnB,gBAKKoB,uBAAsBC;AALjC,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"]}
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{\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;EAMR,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,IAAI,CAACC,YAAY,KAAKG,QAAQH,OAAAA,CAAAA,CAAAA;EAClF;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;AApBUX;AAGR,cAJWD,gBAIKkB,yBAAwBC;AACxC,cALWnB,gBAKKoB,uBAAsBC;AALjC,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"]}
package/package.json CHANGED
@@ -10,14 +10,14 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/hex": "^3.6.4",
14
- "@xyo-network/bridge-model": "^2.110.10",
15
- "@xyo-network/module-model": "^2.110.10",
16
- "@xyo-network/module-wrapper": "^2.110.10"
13
+ "@xylabs/hex": "^3.6.5",
14
+ "@xyo-network/bridge-model": "^2.110.11",
15
+ "@xyo-network/module-model": "^2.110.11",
16
+ "@xyo-network/module-wrapper": "^2.110.11"
17
17
  },
18
18
  "devDependencies": {
19
- "@xylabs/ts-scripts-yarn3": "^3.12.4",
20
- "@xylabs/tsconfig": "^3.12.4",
19
+ "@xylabs/ts-scripts-yarn3": "^3.13.3",
20
+ "@xylabs/tsconfig": "^3.13.3",
21
21
  "typescript": "^5.5.4"
22
22
  },
23
23
  "description": "Primary SDK for using XYO Protocol 2.0",
@@ -59,6 +59,6 @@
59
59
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
60
60
  },
61
61
  "sideEffects": false,
62
- "version": "2.110.10",
62
+ "version": "2.110.11",
63
63
  "type": "module"
64
64
  }
@@ -32,11 +32,10 @@ export class BridgeWrapper<TWrappedModule extends BridgeModule = BridgeModule>
32
32
  return await Promise.all((addresses as Address[]).map((address) => this.resolve(address)))
33
33
  }
34
34
 
35
- async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<ModuleInstance[]> {
35
+ async unexpose(id: ModuleIdentifier, options?: BridgeUnexposeOptions): Promise<Address[]> {
36
36
  const filterPayload: ModuleFilterPayload = { id, schema: ModuleFilterPayloadSchema, ...options }
37
- const addresses = (
37
+ return (
38
38
  await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])
39
39
  ).map(({ address }) => address)
40
- return addresses ? [] : []
41
40
  }
42
41
  }