Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Xud

Class representing a complete Exchange Union daemon.

Hierarchy

  • EventEmitter
    • Xud

Index

Constructors

constructor

  • new Xud(): Xud
  • Create an Exchange Union daemon.

    Returns Xud

Properties

Private config

config: Config

Private db

db: DB

Private Optional grpcAPIProxy

grpcAPIProxy: GrpcWebProxyServer

Private Optional httpServer

httpServer: HttpServer

Private logger

logger: Logger

Private orderBook

orderBook: OrderBook

Private pool

pool: Pool

Private Optional rpcServer

rpcServer: GrpcServer

service

service: Service

Private shuttingDown

shuttingDown: boolean = false

Private Optional swapClientManager

swapClientManager: SwapClientManager

Private swaps

swaps: Swaps

Private Optional unitConverter

unitConverter: UnitConverter

Static defaultMaxListeners

defaultMaxListeners: number

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

beginShutdown

  • beginShutdown(): void
  • Initiate graceful shutdown of xud. Emits the shutdown event when shutdown is complete.

    Returns void

emit

  • emit(event: "shutdown"): boolean
  • Parameters

    • event: "shutdown"

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: "shutdown", listener: function): this
  • Parameters

    • event: "shutdown"
    • listener: function
        • (): void
        • Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Private shutdown

  • shutdown(): Promise<void>

start

  • start(args?: undefined | object): Promise<void>
  • Start all processes necessary for the operation of an Exchange Union node.

    Parameters

    • Optional args: undefined | object

      optional arguments to override configuration parameters.

    Returns Promise<void>

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc