Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "p2p/types"

Index

Type aliases

Address

Address: { host: string; lastConnected?: undefined | number; port: number }

Type declaration

  • host: string
  • Optional lastConnected?: undefined | number

    Epoch timestamp of last successful connection with this address

  • port: number

NodeConnectionInfo

NodeConnectionInfo: { addresses: Address[]; lastAddress?: Address; nodePubKey: string }

Information used for connecting to a remote node.

Type declaration

  • addresses: Address[]
  • Optional lastAddress?: Address
  • nodePubKey: string

NodeState

NodeState: { addresses: Address[]; connextIdentifier: string; lndPubKeys: {}; lndUris: {}; pairs: string[]; tokenIdentifiers: {} }

Type declaration

  • addresses: Address[]

    This node's listening external socket addresses to advertise to peers.

  • connextIdentifier: string
  • lndPubKeys: {}

    An object mapping currency symbols to lnd pub keys.

    • [currency: string]: string | undefined
  • lndUris: {}

    An object mapping currency symbols to lnd listening uris

    • [currency: string]: string[] | undefined
  • pairs: string[]
  • tokenIdentifiers: {}

    An object mapping currency symbols to token identifiers such as lnd chains or token contract addresses.

    • [currency: string]: string | undefined

PoolConfig

PoolConfig: { addresses: string[]; detectexternalip: boolean; discover: boolean; discoverminutes: number; listen: boolean; port: number; tor: boolean; torport: number }

Type declaration

  • addresses: string[]

    An array of IP addresses or host names which can be used to connect to this server. It will be advertised with peers for them to try to connect to the server in the future.

  • detectexternalip: boolean

    Whether or not to automatically detect and share current external ip address on startup.

  • discover: boolean

    Whether to send a GetNodes packet to discover new nodes upon connecting to peers, defaults to true.

  • discoverminutes: number

    Time interval between sending GetNodes packets to already connected peers. Measured in minutes, only applies if discover option is true.

  • listen: boolean

    Whether or not to listen for incoming connections from peers.

  • port: number

    Which port to listen on. If 0, a random unused port will be used.

  • tor: boolean

    Whether to allow connections to tor nodes.

  • torport: number

    The port that Tor's exposed SOCKS5 proxy is listening on.

Generated using TypeDoc