Version: 0.14.1

LightningWallet

Hierarchy

  • LightningWallet

Index

Methods

Methods

addHoldInvoice

addHoldInvoice(satAmount: string, secretHash: string, expiry: number, cltvExpiry: number): Promise‹string›

Defined in src/wallet/lightning.ts:48

Parameters:

NameType
satAmountstring
secretHashstring
expirynumber
cltvExpirynumber

Returns: Promise‹string›


addInvoice

addInvoice(satAmount: string): Promise‹object›

Defined in src/wallet/lightning.ts:124

Parameters:

NameType
satAmountstring

Returns: Promise‹object›


assertLndDetails

assertLndDetails(selfPublicKey: string, chain: string, network: string): Promise‹void›

Defined in src/wallet/lightning.ts:146

Asserts that the available lnd instance is the same than the one connected to cnd.

throws Error if the lnd instance details mismatch

Parameters:

NameType
selfPublicKeystring
chainstring
networkstring

Returns: Promise‹void›


confirmedChannelBalance

confirmedChannelBalance(): Promise‹string›

Defined in src/wallet/lightning.ts:75

Returns: Promise‹string›


confirmedWalletBalance

confirmedWalletBalance(): Promise‹string›

Defined in src/wallet/lightning.ts:79

Returns: Promise‹string›


getInfo

getInfo(): Promise‹GetInfoResponse›

Defined in src/wallet/lightning.ts:87

Returns: Promise‹GetInfoResponse›


getPubkey

getPubkey(): Promise‹string›

Defined in src/wallet/lightning.ts:83

Returns: Promise‹string›


lookupInvoice

lookupInvoice(secretHash: string): Promise‹Invoice›

Defined in src/wallet/lightning.ts:118

Parameters:

NameType
secretHashstring

Returns: Promise‹Invoice›


newAddress

newAddress(type: AddressType): Promise‹string›

Defined in src/wallet/lightning.ts:71

Parameters:

NameType
typeAddressType

Returns: Promise‹string›


openChannel

openChannel(toPubkey: string, satAmount: number): Promise‹Outpoint

Defined in src/wallet/lightning.ts:91

Parameters:

NameType
toPubkeystring
satAmountnumber

Returns: Promise‹Outpoint


sendPayment

sendPayment(publicKey: string, satAmount: string, secretHash: string, finalCltvDelta: number): Promise‹SendResponse›

Defined in src/wallet/lightning.ts:31

Parameters:

NameType
publicKeystring
satAmountstring
secretHashstring
finalCltvDeltanumber

Returns: Promise‹SendResponse›


sendPaymentWithRequest

sendPaymentWithRequest(paymentRequest: string): Promise‹SendResponse›

Defined in src/wallet/lightning.ts:112

Parameters:

NameType
paymentRequeststring

Returns: Promise‹SendResponse›


settleInvoice

settleInvoice(secret: string): Promise‹void›

Defined in src/wallet/lightning.ts:66

Parameters:

NameType
secretstring

Returns: Promise‹void›


Static newInstance

newInstance(certPath: string | false, macaroonPath: string, lndRpcSocket: string, lndP2pSocket: string): Promise‹LightningWallet

Defined in src/wallet/lightning.ts:12

Parameters:

NameType
certPathstring | false
macaroonPathstring
lndRpcSocketstring
lndP2pSocketstring

Returns: Promise‹LightningWallet