Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AccountManager

Wrapper around dcn_account_t*

Hierarchy

  • EventEmitter
    • AccountManager

Index

Constructors

constructor

Properties

accountDir

accountDir: string

dcn_accounts

dcn_accounts: NativeAccount

Static Readonly captureRejectionSymbol

captureRejectionSymbol: keyof symbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly errorMonitor

errorMonitor: keyof symbol

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

accountContext

  • accountContext(account_id: number): Context

addAccount

  • addAccount(): number

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

close

  • close(): void

emit

  • emit(event: string | symbol, account_id: number, data1: any, data2: any): boolean
  • Parameters

    • event: string | symbol
    • account_id: number
    • data1: any
    • data2: any

    Returns boolean

eventNames

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

getAllAccountIds

  • getAllAccountIds(): any

getMaxListeners

  • getMaxListeners(): number

handleCoreEvent

  • handleCoreEvent(eventId: number, accountId: number, data1: number, data2: number | string): void
  • Parameters

    • eventId: number
    • accountId: number
    • data1: number
    • data2: number | string

    Returns void

listenerCount

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

    • event: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

migrateAccount

  • migrateAccount(dbfile: string): number

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAccount

  • removeAccount(account_id: number): any

removeAllListeners

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

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

selectAccount

  • selectAccount(account_id: number): any

selectedAccount

  • selectedAccount(): number

setMaxListeners

  • setMaxListeners(n: number): this

startEvents

  • startEvents(): void

startIO

  • startIO(): void

stopIO

  • stopIO(): void

Static createTempUser

  • createTempUser(url: string): Promise<any>

Static getProviderFromEmail

  • getProviderFromEmail(email: string): undefined | { before_login_hint: any; overview_page: any; status: any }
  • get information about the provider

    This function creates a temporary context to be standalone, if posible use Context.getProviderFromEmail instead. (otherwise potential proxy settings are not used)

    deprecated

    Parameters

    • email: string

    Returns undefined | { before_login_hint: any; overview_page: any; status: any }

Static listenerCount

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

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static maybeValidAddr

  • maybeValidAddr(addr: string): boolean

Static newTemporary

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

Static parseGetInfo

  • parseGetInfo(info: string): {}

Generated using TypeDoc