# Interface BridgeModule<TParams, TEventData, TModule>

#### Type Parameters

- #### TParams extends BridgeParams = BridgeParams

- #### TEventData extends ModuleEventData = ModuleEventData

- #### TModule extends Module<ModuleParams, TEventData> = Module<ModuleParams, TEventData>

#### Hierarchy

- Bridge
- Module<TParams, TEventData>
  - BridgeModule

#### Implemented by

- AbstractBridge
- BridgeWrapper
- HttpBridge

- Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:10

#####
Index

### Properties

address
config
connect
disconnect
downResolver
eventData
params
queries
query
queryable
start?
upResolver

### Methods

clearListeners
emit
emitSerial
listenerCount
off
offAny
on
onAny
once
targetConfig
targetDiscover
targetDownResolver
targetQueries
targetQuery
targetQueryable
targetResolve

## Properties

### address

address: string

Inherited from Module.address

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:40

### config

config: TParams["config"]

Inherited from Module.config

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:41

### connect

connect: (() => Promisable<boolean, never>)

#### Type declaration

- - (): Promisable<boolean, never>

  - #### Returns Promisable<boolean, never>

Inherited from Bridge.connect

- Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:6

### disconnect

disconnect: (() => Promisable<boolean, never>)

#### Type declaration

- - (): Promisable<boolean, never>

  - #### Returns Promisable<boolean, never>

Inherited from Bridge.disconnect

- Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:7

### `Readonly` downResolver

downResolver: ModuleResolver

Inherited from Module.downResolver

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:42

### eventData

eventData: TEventData

Inherited from Module.eventData

- Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:11

### params

params: TParams

Inherited from Module.params

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:43

### queries

queries: string[]

Inherited from Module.queries

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:44

### query

query: (<T, TConf>(query, payloads?, queryConfig?) => Promisable<ModuleQueryResult<SchemaFields & PayloadFields & {
schema: string;
}>, never>)

#### Type declaration

- - <T, TConf>(query, payloads?, queryConfig?): Promisable<ModuleQueryResult<SchemaFields & PayloadFields & {
    schema: string;
    }>, never>

  - #### Type Parameters

    - #### T extends SchemaFields & PayloadFields & BoundWitnessFields & {
      query: string;
      resultSet?: string;
      schema: "network.xyo.boundwitness";
      } = SchemaFields & PayloadFields & BoundWitnessFields & {
      query: string;
      resultSet?: string;
      schema: "network.xyo.boundwitness";
      }

    - #### TConf extends SchemaFields & PayloadFields & {
      archivist?: ArchivistModuleConfig;
      name?: string;
      paging?: Record<string, {
      size?: number;
      }>;
      schema: "network.xyo.module.config";
      security?: {
      allowAnonymous?: boolean;
      allowed?: Record<string, (string | CosigningAddressSet)[]>;
      disallowed?: Record<string, string[]>;
      };
      storeQueries?: boolean;
      } & Omit<undefined, "schema"> = SchemaFields & PayloadFields & {
      archivist?: ArchivistModuleConfig;
      name?: string;
      paging?: Record<string, {
      size?: number;
      }>;
      schema: "network.xyo.module.config";
      security?: {
      allowAnonymous?: boolean;
      allowed?: Record<string, (string | CosigningAddressSet)[]>;
      disallowed?: Record<string, string[]>;
      };
      storeQueries?: boolean;
      } & Omit<undefined, "schema">

    #### Parameters

    - ##### query: T

    - ##### `Optional` payloads: (SchemaFields & PayloadFields & {
      schema: string;
      })[]

    - ##### `Optional` queryConfig: TConf

    #### Returns Promisable<ModuleQueryResult<SchemaFields & PayloadFields & {
    schema: string;
    }>, never>

Inherited from Module.query

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:45

### queryable

queryable: (<T, TConf>(query, payloads?, queryConfig?) => Promisable<boolean, never>)

#### Type declaration

- - <T, TConf>(query, payloads?, queryConfig?): Promisable<boolean, never>

  - #### Type Parameters

    - #### T extends SchemaFields & PayloadFields & BoundWitnessFields & {
      query: string;
      resultSet?: string;
      schema: "network.xyo.boundwitness";
      } = SchemaFields & PayloadFields & BoundWitnessFields & {
      query: string;
      resultSet?: string;
      schema: "network.xyo.boundwitness";
      }

    - #### TConf extends SchemaFields & PayloadFields & {
      archivist?: ArchivistModuleConfig;
      name?: string;
      paging?: Record<string, {
      size?: number;
      }>;
      schema: "network.xyo.module.config";
      security?: {
      allowAnonymous?: boolean;
      allowed?: Record<string, (string | CosigningAddressSet)[]>;
      disallowed?: Record<string, string[]>;
      };
      storeQueries?: boolean;
      } & Omit<undefined, "schema"> = SchemaFields & PayloadFields & {
      archivist?: ArchivistModuleConfig;
      name?: string;
      paging?: Record<string, {
      size?: number;
      }>;
      schema: "network.xyo.module.config";
      security?: {
      allowAnonymous?: boolean;
      allowed?: Record<string, (string | CosigningAddressSet)[]>;
      disallowed?: Record<string, string[]>;
      };
      storeQueries?: boolean;
      } & Omit<undefined, "schema">

    #### Parameters

    - ##### query: T

    - ##### `Optional` payloads: (SchemaFields & PayloadFields & {
      schema: string;
      })[]

    - ##### `Optional` queryConfig: TConf

    #### Returns Promisable<boolean, never>

Inherited from Module.queryable

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:46

### `Optional` start

start?: (() => Promisable<void, never>)

#### Type declaration

- - (): Promisable<void, never>

  - #### Returns Promisable<void, never>

Inherited from Module.start

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:47

### `Readonly` upResolver

upResolver: ModuleResolver

Inherited from Module.upResolver

- Defined in modules/packages/module/packages/model/dist/types/Module.d.ts:48

## Methods

### clearListeners

- clearListeners(eventNames): void

- #### Parameters

  - ##### eventNames: keyof TEventData | (keyof TEventData)[]

  #### Returns void

  Inherited from Module.clearListeners

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:12

### emit

- emit<TEventName>(eventName, eventArgs): Promise<void>

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventName: TEventName

  - ##### eventArgs: TEventData[TEventName]

  #### Returns Promise<void>

  Inherited from Module.emit

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:13

### emitSerial

- emitSerial<TEventName>(eventName, eventArgs): Promise<void>

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventName: TEventName

  - ##### eventArgs: TEventData[TEventName]

  #### Returns Promise<void>

  Inherited from Module.emitSerial

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:14

### listenerCount

- listenerCount(eventNames): number

- #### Parameters

  - ##### eventNames: keyof TEventData | (keyof TEventData)[]

  #### Returns number

  Inherited from Module.listenerCount

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:15

### off

- off<TEventName>(eventNames, listener): void

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventNames: TEventName | TEventName[]

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns void

  Inherited from Module.off

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:16

### offAny

- offAny(listener): void

- #### Parameters

  - ##### listener: Promise<void> | EventAnyListener<EventArgs>

  #### Returns void

  Inherited from Module.offAny

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:17

### on

- on<TEventName>(eventNames, listener): EventUnsubscribeFunction

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventNames: TEventName | TEventName[]

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns EventUnsubscribeFunction

  Inherited from Module.on

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:18

### onAny

- onAny(listener): EventUnsubscribeFunction

- #### Parameters

  - ##### listener: EventAnyListener<EventArgs>

  #### Returns EventUnsubscribeFunction

  Inherited from Module.onAny

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:19

### once

- once<TEventName>(eventName, listener): EventUnsubscribeFunction

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventName: TEventName

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns EventUnsubscribeFunction

  Inherited from Module.once

  - Defined in modules/packages/module/packages/events/dist/types/model/Event.d.ts:20

### targetConfig

- targetConfig(address): SchemaFields & PayloadFields & {
  archivist?: ArchivistModuleConfig;
  name?: string;
  paging?: Record<string, {
  size?: number;
  }>;
  schema: "network.xyo.module.config";
  security?: {
  allowAnonymous?: boolean;
  allowed?: Record<string, (string | CosigningAddressSet)[]>;
  disallowed?: Record<string, string[]>;
  };
  storeQueries?: boolean;
  } & Omit<undefined, "schema">

- #### Parameters

  - ##### address: string

  #### Returns SchemaFields & PayloadFields & {
  archivist?: ArchivistModuleConfig;
  name?: string;
  paging?: Record<string, {
  size?: number;
  }>;
  schema: "network.xyo.module.config";
  security?: {
  allowAnonymous?: boolean;
  allowed?: Record<string, (string | CosigningAddressSet)[]>;
  disallowed?: Record<string, string[]>;
  };
  storeQueries?: boolean;
  } & Omit<undefined, "schema">

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:11

### targetDiscover

- targetDiscover(address?): Promisable<undefined | (SchemaFields & PayloadFields & {
  schema: string;
  })[], never>

- #### Parameters

  - ##### `Optional` address: string

  #### Returns Promisable<undefined | (SchemaFields & PayloadFields & {
  schema: string;
  })[], never>

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:12

### targetDownResolver

- targetDownResolver(address?): TModule["downResolver"]

- #### Parameters

  - ##### `Optional` address: string

  #### Returns TModule["downResolver"]

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:13

### targetQueries

- targetQueries(address): string[]

- #### Parameters

  - ##### address: string

  #### Returns string[]

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:14

### targetQuery

- targetQuery(address, query, payloads?): Promisable<undefined | ModuleQueryResult<SchemaFields & PayloadFields & {
  schema: string;
  }>, never>

- #### Parameters

  - ##### address: string

  - ##### query: SchemaFields & PayloadFields & QueryFields & {
    schema: string;
    }

  - ##### `Optional` payloads: (SchemaFields & PayloadFields & {
    schema: string;
    })[]

  #### Returns Promisable<undefined | ModuleQueryResult<SchemaFields & PayloadFields & {
  schema: string;
  }>, never>

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:15

### targetQueryable

- targetQueryable(address, query, payloads?, queryConfig?): Promisable<boolean, never>

- #### Parameters

  - ##### address: string

  - ##### query: SchemaFields & PayloadFields & BoundWitnessFields & {
    query: string;
    resultSet?: string;
    schema: "network.xyo.boundwitness";
    }

  - ##### `Optional` payloads: (SchemaFields & PayloadFields & {
    schema: string;
    })[]

  - ##### `Optional` queryConfig: SchemaFields & PayloadFields & {
    archivist?: ArchivistModuleConfig;
    name?: string;
    paging?: Record<string, {
    size?: number;
    }>;
    schema: "network.xyo.module.config";
    security?: {
    allowAnonymous?: boolean;
    allowed?: Record<string, (string | CosigningAddressSet)[]>;
    disallowed?: Record<string, string[]>;
    };
    storeQueries?: boolean;
    } & Omit<undefined, "schema">

  #### Returns Promisable<boolean, never>

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:16

### targetResolve

- targetResolve(address, filter?): Promisable<TModule[], never>

- #### Parameters

  - ##### address: string

  - ##### `Optional` filter: ModuleFilter

  #### Returns Promisable<TModule[], never>

  - Defined in modules/packages/bridge/packages/model/dist/types/Bridge.d.ts:17

Generated using TypeDoc