@xyo-network/bridge-wrapper 3.6.8 → 3.6.10

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,14 +1,14 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/BridgeWrapper.ts
5
- import { BridgeExposeQuerySchema, BridgeUnexposeQuerySchema, isBridgeInstance, isBridgeModule, ModuleFilterPayloadSchema } from "@xyo-network/bridge-model";
2
+ import {
3
+ BridgeExposeQuerySchema,
4
+ BridgeUnexposeQuerySchema,
5
+ isBridgeInstance,
6
+ isBridgeModule,
7
+ ModuleFilterPayloadSchema
8
+ } from "@xyo-network/bridge-model";
6
9
  import { constructableModuleWrapper, ModuleWrapper } from "@xyo-network/module-wrapper";
7
10
  constructableModuleWrapper();
8
11
  var BridgeWrapper = class extends ModuleWrapper {
9
- static {
10
- __name(this, "BridgeWrapper");
11
- }
12
12
  static instanceIdentityCheck = isBridgeInstance;
13
13
  static moduleIdentityCheck = isBridgeModule;
14
14
  async expose(id, options) {
@@ -17,11 +17,7 @@ var BridgeWrapper = class extends ModuleWrapper {
17
17
  schema: ModuleFilterPayloadSchema,
18
18
  ...options
19
19
  };
20
- const addresses = (await this.sendQuery({
21
- schema: BridgeExposeQuerySchema
22
- }, [
23
- filterPayload
24
- ])).map(({ address }) => address);
20
+ const addresses = (await this.sendQuery({ schema: BridgeExposeQuerySchema }, [filterPayload])).map(({ address }) => address);
25
21
  return await Promise.all(addresses.map((address) => this.resolve(address)));
26
22
  }
27
23
  async unexpose(id, options) {
@@ -30,11 +26,7 @@ var BridgeWrapper = class extends ModuleWrapper {
30
26
  schema: ModuleFilterPayloadSchema,
31
27
  ...options
32
28
  };
33
- return (await this.sendQuery({
34
- schema: BridgeUnexposeQuerySchema
35
- }, [
36
- filterPayload
37
- ])).map(({ address }) => address);
29
+ return (await this.sendQuery({ schema: BridgeUnexposeQuerySchema }, [filterPayload])).map(({ address }) => address);
38
30
  }
39
31
  };
40
32
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import type { Address } from '@xylabs/hex'\nimport type {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n ModuleFilterPayload,\n} from '@xyo-network/bridge-model'\nimport {\n BridgeExposeQuerySchema,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport type {\n AddressPayload, ModuleIdentifier, ModuleInstance,\n} 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 = {\n id, schema: ModuleFilterPayloadSchema, ...options,\n }\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 = {\n id, schema: ModuleFilterPayloadSchema, ...options,\n }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";;;;AAUA,SACEA,yBACAC,2BACAC,kBACAC,gBACAC,iCACK;AAIP,SAASC,4BAA4BC,qBAAqB;AAE1DC,2BAAAA;AACO,IAAMC,gBAAN,cACGC,cAAAA;EAdV,OAcUA;;;EAER,OAAgBC,wBAAwBC;EACxC,OAAgBC,sBAAsBC;EAEtC,MAAMC,OAAOC,IAAsBC,SAA0D;AAC3F,UAAMC,gBAAqC;MACzCF;MAAIG,QAAQC;MAA2B,GAAGH;IAC5C;AACA,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;MACzCF;MAAIG,QAAQC;MAA2B,GAAGH;IAC5C;AACA,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
+ {"version":3,"sources":["../../src/BridgeWrapper.ts"],"sourcesContent":["import type { Address } from '@xylabs/hex'\nimport type {\n BridgeExposeOptions,\n BridgeExposeQuery,\n BridgeInstance,\n BridgeModule,\n BridgeUnexposeOptions,\n BridgeUnexposeQuery,\n ModuleFilterPayload,\n} from '@xyo-network/bridge-model'\nimport {\n BridgeExposeQuerySchema,\n BridgeUnexposeQuerySchema,\n isBridgeInstance,\n isBridgeModule,\n ModuleFilterPayloadSchema,\n} from '@xyo-network/bridge-model'\nimport type {\n AddressPayload, ModuleIdentifier, ModuleInstance,\n} 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 = {\n id, schema: ModuleFilterPayloadSchema, ...options,\n }\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 = {\n id, schema: ModuleFilterPayloadSchema, ...options,\n }\n return (\n await this.sendQuery<BridgeUnexposeQuery, ModuleFilterPayload, AddressPayload>({ schema: BridgeUnexposeQuerySchema }, [filterPayload])\n ).map(({ address }) => address)\n }\n}\n"],"mappings":";AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,4BAA4B,qBAAqB;AAE1D,2BAA2B;AACpB,IAAM,gBAAN,cACG,cAC4C;AAAA,EACpD,OAAgB,wBAAwB;AAAA,EACxC,OAAgB,sBAAsB;AAAA,EAEtC,MAAM,OAAO,IAAsB,SAA0D;AAC3F,UAAM,gBAAqC;AAAA,MACzC;AAAA,MAAI,QAAQ;AAAA,MAA2B,GAAG;AAAA,IAC5C;AACA,UAAM,aACJ,MAAM,KAAK,UAAkE,EAAE,QAAQ,wBAAwB,GAAG,CAAC,aAAa,CAAC,GACjI,IAAI,CAAC,EAAE,QAAQ,MAAM,OAAO;AAC9B,WAAO,MAAM,QAAQ,IAAK,UAAwB,IAAI,aAAW,KAAK,QAAQ,OAAO,CAAC,CAAC;AAAA,EACzF;AAAA,EAEA,MAAM,SAAS,IAAsB,SAAqD;AACxF,UAAM,gBAAqC;AAAA,MACzC;AAAA,MAAI,QAAQ;AAAA,MAA2B,GAAG;AAAA,IAC5C;AACA,YACE,MAAM,KAAK,UAAoE,EAAE,QAAQ,0BAA0B,GAAG,CAAC,aAAa,CAAC,GACrI,IAAI,CAAC,EAAE,QAAQ,MAAM,OAAO;AAAA,EAChC;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/bridge-wrapper",
3
- "version": "3.6.8",
3
+ "version": "3.6.10",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,15 +29,15 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.4.34",
33
- "@xyo-network/bridge-model": "^3.6.8",
34
- "@xyo-network/module-model": "^3.6.8",
35
- "@xyo-network/module-wrapper": "^3.6.8"
32
+ "@xylabs/hex": "^4.5.1",
33
+ "@xyo-network/bridge-model": "^3.6.10",
34
+ "@xyo-network/module-model": "^3.6.10",
35
+ "@xyo-network/module-wrapper": "^3.6.10"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@xylabs/ts-scripts-yarn3": "^4.2.6",
39
39
  "@xylabs/tsconfig": "^4.2.6",
40
- "typescript": "^5.7.2"
40
+ "typescript": "^5.7.3"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"