Skip to content

Latest commit

 

History

History
769 lines (438 loc) · 12.7 KB

File metadata and controls

769 lines (438 loc) · 12.7 KB

@ethereumjs/devp2p / les / LES

Class: LES

les.LES

Hierarchy

  • EventEmitter

    LES

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LES(version, peer, send)

Parameters

Name Type
version number
peer Peer
send any

Overrides

EventEmitter.constructor

Defined in

packages/devp2p/src/les/index.ts:19

Properties

_peer

_peer: Peer

Defined in

packages/devp2p/src/les/index.ts:15


_peerStatus

_peerStatus: null | Status

Defined in

packages/devp2p/src/les/index.ts:18


_send

_send: any

Defined in

packages/devp2p/src/les/index.ts:16


_status

_status: null | Status

Defined in

packages/devp2p/src/les/index.ts:17


_statusTimeoutId

_statusTimeoutId: Timeout

Defined in

packages/devp2p/src/les/index.ts:19


_version

_version: any

Defined in

packages/devp2p/src/les/index.ts:14


defaultMaxListeners

Static defaultMaxListeners: number

Inherited from

EventEmitter.defaultMaxListeners

Defined in

node_modules/@types/node/events.d.ts:20


les2

Static les2: Object

Type declaration

Name Type
constructor typeof LES
length number
name string
version number

Defined in

packages/devp2p/src/les/index.ts:34


les3

Static les3: Object

Type declaration

Name Type
constructor typeof LES
length number
name string
version number

Defined in

packages/devp2p/src/les/index.ts:35


les4

Static les4: Object

Type declaration

Name Type
constructor typeof LES
length number
name string
version number

Defined in

packages/devp2p/src/les/index.ts:36

Methods

_getStatusString

_getStatusString(status): string

Parameters

Name Type
status Status

Returns

string

Defined in

packages/devp2p/src/les/index.ts:124


_handleMessage

_handleMessage(code, data): void

Parameters

Name Type
code MESSAGE_CODES
data any

Returns

void

Defined in

packages/devp2p/src/les/index.ts:38


_handleStatus

_handleStatus(): void

Returns

void

Defined in

packages/devp2p/src/les/index.ts:100


addListener

addListener(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.addListener

Defined in

node_modules/@types/node/globals.d.ts:595


emit

emit(event, ...args): boolean

Parameters

Name Type
event string | symbol
...args any[]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/@types/node/globals.d.ts:605


eventNames

eventNames(): (string | symbol)[]

Returns

(string | symbol)[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/@types/node/globals.d.ts:610


getMaxListeners

getMaxListeners(): number

Returns

number

Inherited from

EventEmitter.getMaxListeners

Defined in

node_modules/@types/node/globals.d.ts:602


getMsgPrefix

getMsgPrefix(msgCode): string

Parameters

Name Type
msgCode MESSAGE_CODES

Returns

string

Defined in

packages/devp2p/src/les/index.ts:225


getVersion

getVersion(): any

Returns

any

Defined in

packages/devp2p/src/les/index.ts:120


listenerCount

listenerCount(type): number

Parameters

Name Type
type string | symbol

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/@types/node/globals.d.ts:606


listeners

listeners(event): Function[]

Parameters

Name Type
event string | symbol

Returns

Function[]

Inherited from

EventEmitter.listeners

Defined in

node_modules/@types/node/globals.d.ts:603


off

off(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.off

Defined in

node_modules/@types/node/globals.d.ts:599


on

on(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.on

Defined in

node_modules/@types/node/globals.d.ts:596


once

once(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.once

Defined in

node_modules/@types/node/globals.d.ts:597


prependListener

prependListener(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.prependListener

Defined in

node_modules/@types/node/globals.d.ts:608


prependOnceListener

prependOnceListener(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.prependOnceListener

Defined in

node_modules/@types/node/globals.d.ts:609


rawListeners

rawListeners(event): Function[]

Parameters

Name Type
event string | symbol

Returns

Function[]

Inherited from

EventEmitter.rawListeners

Defined in

node_modules/@types/node/globals.d.ts:604


removeAllListeners

removeAllListeners(event?): LES

Parameters

Name Type
event? string | symbol

Returns

LES

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/@types/node/globals.d.ts:600


removeListener

removeListener(event, listener): LES

Parameters

Name Type
event string | symbol
listener (...args: any[]) => void

Returns

LES

Inherited from

EventEmitter.removeListener

Defined in

node_modules/@types/node/globals.d.ts:598


sendMessage

sendMessage(code, payload): void

Parameters

Name Type Description
code MESSAGE_CODES Message code
payload any Payload (including reqId, e.g. [1, [437000, 1, 0, 0]])

Returns

void

Defined in

packages/devp2p/src/les/index.ts:178


sendStatus

sendStatus(status): void

Parameters

Name Type
status Status

Returns

void

Defined in

packages/devp2p/src/les/index.ts:148


setMaxListeners

setMaxListeners(n): LES

Parameters

Name Type
n number

Returns

LES

Inherited from

EventEmitter.setMaxListeners

Defined in

node_modules/@types/node/globals.d.ts:601


listenerCount

Static listenerCount(emitter, event): number

deprecated since v4.0.0

Parameters

Name Type
emitter EventEmitter
event string | symbol

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/@types/node/events.d.ts:17


once

Static once(emitter, event): Promise<any[]>

Parameters

Name Type
emitter NodeEventTarget
event string | symbol

Returns

Promise<any[]>

Inherited from

EventEmitter.once

Defined in

node_modules/@types/node/events.d.ts:13

Static once(emitter, event): Promise<any[]>

Parameters

Name Type
emitter DOMEventTarget
event string

Returns

Promise<any[]>

Inherited from

EventEmitter.once

Defined in

node_modules/@types/node/events.d.ts:14