Class LNDChannel

Hierarchy

  • ApiConnection
    • LNDChannel

Constructors

Properties

_jwt: string = ''
_onAuthFailed?: ((url: string) => void)

Type declaration

    • (url: string): void
    • Callback to run when a request returns status 401 (optional)

      Parameters

      • url: string

      Returns void

_requestFunc?: RequestFunction

Custom request function (optional)

Accessors

  • set jwt(jwt: string): void
  • Parameters

    • jwt: string

    Returns void

  • set onAuthFailed(callback: ((url: string) => void)): void
  • Parameters

    • callback: ((url: string) => void)
        • (url: string): void
        • Parameters

          • url: string

          Returns void

    Returns void

Methods

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • method: "GET" | "POST" | "PUT" | "DELETE" = 'GET'
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Parameters

    • channelPoint: string
    • force: boolean = false

    Returns Promise<void>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Open a new channel

    Returns

    The ID of the funding transaction

    Parameters

    • pubKey: string

      The pubkey of the peer to open a channel with

    • ip: string

      The IP address of the peer to open a channel with

    • port: string | number

      The port of the peer to open a channel with

    • amt: string | number

      The amount to open the channel with

    • satPerByte: undefined | number

      The amount to pay per byte of the opening transaction

    Returns Promise<string>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Parameters

    • chanPoint: string
    • baseFeeMsat: string | number
    • feeRate: number
    • timeLockDelta: number = 144
    • global: boolean = false

    Returns Promise<void>

Generated using TypeDoc