LightningWallet
Hierarchy
- LightningWallet
Index
Methods
- addHoldInvoice
- addInvoice
- assertLndDetails
- confirmedChannelBalance
- confirmedWalletBalance
- getInfo
- getPubkey
- lookupInvoice
- newAddress
- openChannel
- sendPayment
- sendPaymentWithRequest
- settleInvoice
- newInstance
Methods
addHoldInvoice
▸ addHoldInvoice(satAmount
: string, secretHash
: string, expiry
: number, cltvExpiry
: number): Promise‹string›
Defined in src/wallet/lightning.ts:48
Parameters:
Name | Type |
---|---|
satAmount | string |
secretHash | string |
expiry | number |
cltvExpiry | number |
Returns: Promise‹string›
addInvoice
▸ addInvoice(satAmount
: string): Promise‹object›
Defined in src/wallet/lightning.ts:124
Parameters:
Name | Type |
---|---|
satAmount | string |
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:
Name | Type |
---|---|
selfPublicKey | string |
chain | string |
network | string |
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:
Name | Type |
---|---|
secretHash | string |
Returns: Promise‹Invoice›
newAddress
▸ newAddress(type
: AddressType): Promise‹string›
Defined in src/wallet/lightning.ts:71
Parameters:
Name | Type |
---|---|
type | AddressType |
Returns: Promise‹string›
openChannel
▸ openChannel(toPubkey
: string, satAmount
: number): Promise‹Outpoint›
Defined in src/wallet/lightning.ts:91
Parameters:
Name | Type |
---|---|
toPubkey | string |
satAmount | number |
Returns: Promise‹Outpoint›
sendPayment
▸ sendPayment(publicKey
: string, satAmount
: string, secretHash
: string, finalCltvDelta
: number): Promise‹SendResponse›
Defined in src/wallet/lightning.ts:31
Parameters:
Name | Type |
---|---|
publicKey | string |
satAmount | string |
secretHash | string |
finalCltvDelta | number |
Returns: Promise‹SendResponse›
sendPaymentWithRequest
▸ sendPaymentWithRequest(paymentRequest
: string): Promise‹SendResponse›
Defined in src/wallet/lightning.ts:112
Parameters:
Name | Type |
---|---|
paymentRequest | string |
Returns: Promise‹SendResponse›
settleInvoice
▸ settleInvoice(secret
: string): Promise‹void›
Defined in src/wallet/lightning.ts:66
Parameters:
Name | Type |
---|---|
secret | string |
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:
Name | Type |
---|---|
certPath | string | false |
macaroonPath | string |
lndRpcSocket | string |
lndP2pSocket | string |
Returns: Promise‹LightningWallet›