### Type parameters

- #### EventTypes: string | symbol

### Hierarchy

- EventEmitter
  - Subscription

## Index

### Modules

- EventEmitter

### Constructors

- constructor

### Properties

- arguments
- callback
- id
- options
- reconnectIntervalId
- subscriptionMethod
- prefixed

### Methods

- addListener
- emit
- eventNames
- extractCallback
- formatInput
- formatOutput
- listenerCount
- listeners
- off
- on
- once
- removeAllListeners
- removeListener
- subscribe
- toPayload
- unsubscribe
- validateArgs

## Constructors

### constructor

- new Subscription(options: SubscriptionOptions): Subscription

- - Defined in core/subscriptions/subscription.ts:12

  #### Parameters

  - ##### options: SubscriptionOptions

  #### Returns Subscription

## Properties

### arguments

arguments: any

- Defined in core/subscriptions/subscription.ts:9

### callback

callback: any

- Defined in core/subscriptions/subscription.ts:8

### id

id: any

- Defined in core/subscriptions/subscription.ts:7

### options

options: SubscriptionOptions

- Defined in core/subscriptions/subscription.ts:10

### Private reconnectIntervalId

reconnectIntervalId: any

- Defined in core/subscriptions/subscription.ts:12

### subscriptionMethod

subscriptionMethod: any

- Defined in core/subscriptions/subscription.ts:11

### Static prefixed

prefixed: string | boolean

Inherited from EventEmitter.prefixed

- Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:6

## Methods

### addListener

- addListener(event: EventTypes, fn: ListenerFn, context?: any): this

- Inherited from EventEmitter.addListener

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:33

  #### Parameters

  - ##### event: EventTypes

  - ##### fn: ListenerFn

  - ##### Optional context: any

  #### Returns this

### emit

- emit(event: EventTypes, ...args: Array<any>): boolean

- Inherited from EventEmitter.emit

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:27

  Calls each of the listeners registered for a given event.

  #### Parameters

  - ##### event: EventTypes

  - ##### Rest ...args: Array<any>

  #### Returns boolean

### eventNames

- eventNames(): Array<EventTypes>

- Inherited from EventEmitter.eventNames

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:12

  Return an array listing the events for which the emitter has registered listeners.

  #### Returns Array<EventTypes>

### Private extractCallback

- extractCallback(args: any[]): any

- - Defined in core/subscriptions/subscription.ts:141

  #### Parameters

  - ##### args: any[]

  #### Returns any

### Private formatInput

- formatInput(args: any[]): any[]

- - Defined in core/subscriptions/subscription.ts:163

  #### Parameters

  - ##### args: any[]

  #### Returns any[]

### Private formatOutput

- formatOutput(result: any): any

- - Defined in core/subscriptions/subscription.ts:183

  #### Parameters

  - ##### result: any

  #### Returns any

### listenerCount

- listenerCount(event: EventTypes): number

- Inherited from EventEmitter.listenerCount

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:22

  Return the number of listeners listening to a given event.

  #### Parameters

  - ##### event: EventTypes

  #### Returns number

### listeners

- listeners(event: EventTypes): Array<ListenerFn>

- Inherited from EventEmitter.listeners

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:17

  Return the listeners registered for a given event.

  #### Parameters

  - ##### event: EventTypes

  #### Returns Array<ListenerFn>

### off

- off(event: EventTypes, fn?: ListenerFn, context?: any, once?: boolean): this

- Inherited from EventEmitter.off

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:44

  #### Parameters

  - ##### event: EventTypes

  - ##### Optional fn: ListenerFn

  - ##### Optional context: any

  - ##### Optional once: boolean

  #### Returns this

### on

- on(event: EventTypes, fn: ListenerFn, context?: any): this

- Inherited from EventEmitter.on

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:32

  Add a listener for a given event.

  #### Parameters

  - ##### event: EventTypes

  - ##### fn: ListenerFn

  - ##### Optional context: any

  #### Returns this

### once

- once(event: EventTypes, fn: ListenerFn, context?: any): this

- Inherited from EventEmitter.once

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:38

  Add a one-time listener for a given event.

  #### Parameters

  - ##### event: EventTypes

  - ##### fn: ListenerFn

  - ##### Optional context: any

  #### Returns this

### removeAllListeners

- removeAllListeners(event?: EventTypes): this

- Inherited from EventEmitter.removeAllListeners

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:49

  Remove all listeners, or those of the specified event.

  #### Parameters

  - ##### Optional event: EventTypes

  #### Returns this

### removeListener

- removeListener(event: EventTypes, fn?: ListenerFn, context?: any, once?: boolean): this

- Inherited from EventEmitter.removeListener

  - Defined in /home/qydev/workspace/chainstack.js/node_modules/eventemitter3/index.d.ts:43

  Remove the listeners of a given event.

  #### Parameters

  - ##### event: EventTypes

  - ##### Optional fn: ListenerFn

  - ##### Optional context: any

  - ##### Optional once: boolean

  #### Returns this

### subscribe

- subscribe(...args: any[]): Subscription

- - Defined in core/subscriptions/subscription.ts:31

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns Subscription

### Private toPayload

- toPayload(args: any[]): PayloadObject

- - Defined in core/subscriptions/subscription.ts:191

  #### Parameters

  - ##### args: any[]

  #### Returns PayloadObject

### unsubscribe

- unsubscribe(callback?: any): void

- - Defined in core/subscriptions/subscription.ts:24

  #### Parameters

  - ##### Optional callback: any

  #### Returns void

### Private validateArgs

- validateArgs(args: any[]): void

- - Defined in core/subscriptions/subscription.ts:145

  #### Parameters

  - ##### args: any[]

  #### Returns void

Generated using TypeDoc