@atomiqlabs/lp-lib 10.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/fees/IBtcFeeEstimator.d.ts +3 -0
- package/dist/fees/IBtcFeeEstimator.js +2 -0
- package/dist/fees/OneDollarFeeEstimator.d.ts +16 -0
- package/dist/fees/OneDollarFeeEstimator.js +71 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +52 -0
- package/dist/info/InfoHandler.d.ts +17 -0
- package/dist/info/InfoHandler.js +70 -0
- package/dist/plugins/IPlugin.d.ts +118 -0
- package/dist/plugins/IPlugin.js +33 -0
- package/dist/plugins/PluginManager.d.ts +89 -0
- package/dist/plugins/PluginManager.js +263 -0
- package/dist/prices/BinanceSwapPrice.d.ts +27 -0
- package/dist/prices/BinanceSwapPrice.js +106 -0
- package/dist/prices/CoinGeckoSwapPrice.d.ts +31 -0
- package/dist/prices/CoinGeckoSwapPrice.js +76 -0
- package/dist/storage/IIntermediaryStorage.d.ts +15 -0
- package/dist/storage/IIntermediaryStorage.js +2 -0
- package/dist/storagemanager/IntermediaryStorageManager.d.ts +15 -0
- package/dist/storagemanager/IntermediaryStorageManager.js +113 -0
- package/dist/storagemanager/StorageManager.d.ts +12 -0
- package/dist/storagemanager/StorageManager.js +74 -0
- package/dist/swaps/FromBtcBaseSwap.d.ts +12 -0
- package/dist/swaps/FromBtcBaseSwap.js +16 -0
- package/dist/swaps/FromBtcBaseSwapHandler.d.ts +118 -0
- package/dist/swaps/FromBtcBaseSwapHandler.js +294 -0
- package/dist/swaps/FromBtcLnBaseSwapHandler.d.ts +25 -0
- package/dist/swaps/FromBtcLnBaseSwapHandler.js +55 -0
- package/dist/swaps/ISwapPrice.d.ts +44 -0
- package/dist/swaps/ISwapPrice.js +73 -0
- package/dist/swaps/SwapHandler.d.ts +186 -0
- package/dist/swaps/SwapHandler.js +292 -0
- package/dist/swaps/SwapHandlerSwap.d.ts +75 -0
- package/dist/swaps/SwapHandlerSwap.js +72 -0
- package/dist/swaps/ToBtcBaseSwap.d.ts +35 -0
- package/dist/swaps/ToBtcBaseSwap.js +61 -0
- package/dist/swaps/ToBtcBaseSwapHandler.d.ts +94 -0
- package/dist/swaps/ToBtcBaseSwapHandler.js +233 -0
- package/dist/swaps/frombtc_abstract/FromBtcAbs.d.ts +92 -0
- package/dist/swaps/frombtc_abstract/FromBtcAbs.js +386 -0
- package/dist/swaps/frombtc_abstract/FromBtcSwapAbs.d.ts +26 -0
- package/dist/swaps/frombtc_abstract/FromBtcSwapAbs.js +63 -0
- package/dist/swaps/frombtc_trusted/FromBtcTrusted.d.ts +55 -0
- package/dist/swaps/frombtc_trusted/FromBtcTrusted.js +586 -0
- package/dist/swaps/frombtc_trusted/FromBtcTrustedSwap.d.ts +43 -0
- package/dist/swaps/frombtc_trusted/FromBtcTrustedSwap.js +99 -0
- package/dist/swaps/frombtcln_abstract/FromBtcLnAbs.d.ts +105 -0
- package/dist/swaps/frombtcln_abstract/FromBtcLnAbs.js +731 -0
- package/dist/swaps/frombtcln_abstract/FromBtcLnSwapAbs.d.ts +29 -0
- package/dist/swaps/frombtcln_abstract/FromBtcLnSwapAbs.js +64 -0
- package/dist/swaps/frombtcln_trusted/FromBtcLnTrusted.d.ts +79 -0
- package/dist/swaps/frombtcln_trusted/FromBtcLnTrusted.js +514 -0
- package/dist/swaps/frombtcln_trusted/FromBtcLnTrustedSwap.d.ts +28 -0
- package/dist/swaps/frombtcln_trusted/FromBtcLnTrustedSwap.js +66 -0
- package/dist/swaps/tobtc_abstract/ToBtcAbs.d.ts +290 -0
- package/dist/swaps/tobtc_abstract/ToBtcAbs.js +1056 -0
- package/dist/swaps/tobtc_abstract/ToBtcSwapAbs.d.ts +29 -0
- package/dist/swaps/tobtc_abstract/ToBtcSwapAbs.js +70 -0
- package/dist/swaps/tobtcln_abstract/ToBtcLnAbs.d.ts +246 -0
- package/dist/swaps/tobtcln_abstract/ToBtcLnAbs.js +1169 -0
- package/dist/swaps/tobtcln_abstract/ToBtcLnSwapAbs.d.ts +27 -0
- package/dist/swaps/tobtcln_abstract/ToBtcLnSwapAbs.js +65 -0
- package/dist/utils/Utils.d.ts +32 -0
- package/dist/utils/Utils.js +109 -0
- package/dist/utils/coinselect2/accumulative.d.ts +6 -0
- package/dist/utils/coinselect2/accumulative.js +44 -0
- package/dist/utils/coinselect2/blackjack.d.ts +6 -0
- package/dist/utils/coinselect2/blackjack.js +41 -0
- package/dist/utils/coinselect2/index.d.ts +16 -0
- package/dist/utils/coinselect2/index.js +40 -0
- package/dist/utils/coinselect2/utils.d.ts +64 -0
- package/dist/utils/coinselect2/utils.js +121 -0
- package/dist/utils/paramcoders/IParamReader.d.ts +5 -0
- package/dist/utils/paramcoders/IParamReader.js +2 -0
- package/dist/utils/paramcoders/IParamWriter.d.ts +4 -0
- package/dist/utils/paramcoders/IParamWriter.js +2 -0
- package/dist/utils/paramcoders/LegacyParamEncoder.d.ts +10 -0
- package/dist/utils/paramcoders/LegacyParamEncoder.js +33 -0
- package/dist/utils/paramcoders/ParamDecoder.d.ts +25 -0
- package/dist/utils/paramcoders/ParamDecoder.js +234 -0
- package/dist/utils/paramcoders/ParamEncoder.d.ts +9 -0
- package/dist/utils/paramcoders/ParamEncoder.js +22 -0
- package/dist/utils/paramcoders/SchemaVerifier.d.ts +22 -0
- package/dist/utils/paramcoders/SchemaVerifier.js +85 -0
- package/dist/utils/paramcoders/server/ServerParamDecoder.d.ts +8 -0
- package/dist/utils/paramcoders/server/ServerParamDecoder.js +105 -0
- package/dist/utils/paramcoders/server/ServerParamEncoder.d.ts +11 -0
- package/dist/utils/paramcoders/server/ServerParamEncoder.js +76 -0
- package/package.json +43 -0
- package/src/fees/IBtcFeeEstimator.ts +7 -0
- package/src/fees/OneDollarFeeEstimator.ts +95 -0
- package/src/index.ts +46 -0
- package/src/info/InfoHandler.ts +106 -0
- package/src/plugins/IPlugin.ts +155 -0
- package/src/plugins/PluginManager.ts +310 -0
- package/src/prices/BinanceSwapPrice.ts +114 -0
- package/src/prices/CoinGeckoSwapPrice.ts +88 -0
- package/src/storage/IIntermediaryStorage.ts +21 -0
- package/src/storagemanager/IntermediaryStorageManager.ts +101 -0
- package/src/storagemanager/StorageManager.ts +68 -0
- package/src/swaps/FromBtcBaseSwap.ts +21 -0
- package/src/swaps/FromBtcBaseSwapHandler.ts +375 -0
- package/src/swaps/FromBtcLnBaseSwapHandler.ts +48 -0
- package/src/swaps/ISwapPrice.ts +94 -0
- package/src/swaps/SwapHandler.ts +404 -0
- package/src/swaps/SwapHandlerSwap.ts +133 -0
- package/src/swaps/ToBtcBaseSwap.ts +76 -0
- package/src/swaps/ToBtcBaseSwapHandler.ts +309 -0
- package/src/swaps/frombtc_abstract/FromBtcAbs.ts +484 -0
- package/src/swaps/frombtc_abstract/FromBtcSwapAbs.ts +77 -0
- package/src/swaps/frombtc_trusted/FromBtcTrusted.ts +661 -0
- package/src/swaps/frombtc_trusted/FromBtcTrustedSwap.ts +158 -0
- package/src/swaps/frombtcln_abstract/FromBtcLnAbs.ts +864 -0
- package/src/swaps/frombtcln_abstract/FromBtcLnSwapAbs.ts +82 -0
- package/src/swaps/frombtcln_trusted/FromBtcLnTrusted.ts +592 -0
- package/src/swaps/frombtcln_trusted/FromBtcLnTrustedSwap.ts +90 -0
- package/src/swaps/tobtc_abstract/ToBtcAbs.ts +1249 -0
- package/src/swaps/tobtc_abstract/ToBtcSwapAbs.ts +112 -0
- package/src/swaps/tobtcln_abstract/ToBtcLnAbs.ts +1422 -0
- package/src/swaps/tobtcln_abstract/ToBtcLnSwapAbs.ts +87 -0
- package/src/utils/Utils.ts +108 -0
- package/src/utils/coinselect2/accumulative.js +32 -0
- package/src/utils/coinselect2/accumulative.ts +58 -0
- package/src/utils/coinselect2/blackjack.js +29 -0
- package/src/utils/coinselect2/blackjack.ts +54 -0
- package/src/utils/coinselect2/index.js +16 -0
- package/src/utils/coinselect2/index.ts +50 -0
- package/src/utils/coinselect2/utils.js +110 -0
- package/src/utils/coinselect2/utils.ts +183 -0
- package/src/utils/paramcoders/IParamReader.ts +8 -0
- package/src/utils/paramcoders/IParamWriter.ts +8 -0
- package/src/utils/paramcoders/LegacyParamEncoder.ts +28 -0
- package/src/utils/paramcoders/ParamDecoder.ts +219 -0
- package/src/utils/paramcoders/ParamEncoder.ts +30 -0
- package/src/utils/paramcoders/SchemaVerifier.ts +97 -0
- package/src/utils/paramcoders/server/ServerParamDecoder.ts +115 -0
- package/src/utils/paramcoders/server/ServerParamEncoder.ts +76 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FromBtcTrustedSwap = exports.FromBtcTrustedSwapState = void 0;
|
|
4
|
+
const FromBtcBaseSwap_1 = require("../FromBtcBaseSwap");
|
|
5
|
+
const BN = require("bn.js");
|
|
6
|
+
const Utils_1 = require("../../utils/Utils");
|
|
7
|
+
const crypto_1 = require("crypto");
|
|
8
|
+
var FromBtcTrustedSwapState;
|
|
9
|
+
(function (FromBtcTrustedSwapState) {
|
|
10
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["DOUBLE_SPENT"] = -3] = "DOUBLE_SPENT";
|
|
11
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["REFUNDED"] = -2] = "REFUNDED";
|
|
12
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["EXPIRED"] = -1] = "EXPIRED";
|
|
13
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["CREATED"] = 0] = "CREATED";
|
|
14
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["RECEIVED"] = 1] = "RECEIVED";
|
|
15
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["BTC_CONFIRMED"] = 2] = "BTC_CONFIRMED";
|
|
16
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["SENT"] = 3] = "SENT";
|
|
17
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["CONFIRMED"] = 4] = "CONFIRMED";
|
|
18
|
+
FromBtcTrustedSwapState[FromBtcTrustedSwapState["FINISHED"] = 5] = "FINISHED";
|
|
19
|
+
})(FromBtcTrustedSwapState = exports.FromBtcTrustedSwapState || (exports.FromBtcTrustedSwapState = {}));
|
|
20
|
+
class FromBtcTrustedSwap extends FromBtcBaseSwap_1.FromBtcBaseSwap {
|
|
21
|
+
constructor(objOrChainIdentifier, swapFee, swapFeeInToken, btcAddress, inputSats, dstAddress, outputTokens, createdHeight, expiresAt, recommendedFee, refundAddress) {
|
|
22
|
+
if (typeof (objOrChainIdentifier) === "string") {
|
|
23
|
+
super(objOrChainIdentifier, swapFee, swapFeeInToken);
|
|
24
|
+
this.state = FromBtcTrustedSwapState.CREATED;
|
|
25
|
+
this.doubleSpent = false;
|
|
26
|
+
this.btcAddress = btcAddress;
|
|
27
|
+
this.inputSats = inputSats;
|
|
28
|
+
this.dstAddress = dstAddress;
|
|
29
|
+
this.outputTokens = outputTokens;
|
|
30
|
+
this.createdHeight = createdHeight;
|
|
31
|
+
this.expiresAt = expiresAt;
|
|
32
|
+
this.recommendedFee = recommendedFee;
|
|
33
|
+
this.refundAddress = refundAddress;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
super(objOrChainIdentifier);
|
|
37
|
+
this.btcAddress = objOrChainIdentifier.btcAddress;
|
|
38
|
+
this.inputSats = (0, Utils_1.deserializeBN)(objOrChainIdentifier.inputSats);
|
|
39
|
+
this.dstAddress = objOrChainIdentifier.dstAddress;
|
|
40
|
+
this.outputTokens = (0, Utils_1.deserializeBN)(objOrChainIdentifier.outputTokens);
|
|
41
|
+
this.adjustedInput = (0, Utils_1.deserializeBN)(objOrChainIdentifier.adjustedInput);
|
|
42
|
+
this.adjustedOutput = (0, Utils_1.deserializeBN)(objOrChainIdentifier.adjustedOutput);
|
|
43
|
+
this.createdHeight = objOrChainIdentifier.createdHeight;
|
|
44
|
+
this.expiresAt = objOrChainIdentifier.expiresAt;
|
|
45
|
+
this.recommendedFee = objOrChainIdentifier.recommendedFee;
|
|
46
|
+
this.refundAddress = objOrChainIdentifier.refundAddress;
|
|
47
|
+
this.doubleSpent = objOrChainIdentifier.doubleSpent;
|
|
48
|
+
this.scRawTx = objOrChainIdentifier.scRawTx;
|
|
49
|
+
this.rawTx = objOrChainIdentifier.rawTx;
|
|
50
|
+
this.txId = objOrChainIdentifier.txId;
|
|
51
|
+
this.vout = objOrChainIdentifier.vout;
|
|
52
|
+
this.burnTxId = objOrChainIdentifier.burnTxId;
|
|
53
|
+
this.refundTxId = objOrChainIdentifier.refundTxId;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
serialize() {
|
|
57
|
+
const partialSerialized = super.serialize();
|
|
58
|
+
partialSerialized.btcAddress = this.btcAddress;
|
|
59
|
+
partialSerialized.inputSats = (0, Utils_1.serializeBN)(this.inputSats);
|
|
60
|
+
partialSerialized.dstAddress = this.dstAddress;
|
|
61
|
+
partialSerialized.outputTokens = (0, Utils_1.serializeBN)(this.outputTokens);
|
|
62
|
+
partialSerialized.adjustedInput = (0, Utils_1.serializeBN)(this.adjustedInput);
|
|
63
|
+
partialSerialized.adjustedOutput = (0, Utils_1.serializeBN)(this.adjustedOutput);
|
|
64
|
+
partialSerialized.createdHeight = this.createdHeight;
|
|
65
|
+
partialSerialized.expiresAt = this.expiresAt;
|
|
66
|
+
partialSerialized.recommendedFee = this.recommendedFee;
|
|
67
|
+
partialSerialized.refundAddress = this.refundAddress;
|
|
68
|
+
partialSerialized.doubleSpent = this.doubleSpent;
|
|
69
|
+
partialSerialized.scRawTx = this.scRawTx;
|
|
70
|
+
partialSerialized.rawTx = this.rawTx;
|
|
71
|
+
partialSerialized.txId = this.txId;
|
|
72
|
+
partialSerialized.vout = this.vout;
|
|
73
|
+
partialSerialized.burnTxId = this.burnTxId;
|
|
74
|
+
partialSerialized.refundTxId = this.refundTxId;
|
|
75
|
+
return partialSerialized;
|
|
76
|
+
}
|
|
77
|
+
getHash() {
|
|
78
|
+
return (0, crypto_1.createHash)("sha256").update(this.btcAddress).digest().toString("hex");
|
|
79
|
+
}
|
|
80
|
+
getSequence() {
|
|
81
|
+
return new BN(0);
|
|
82
|
+
}
|
|
83
|
+
getOutputAmount() {
|
|
84
|
+
return this.adjustedOutput || this.outputTokens;
|
|
85
|
+
}
|
|
86
|
+
getTotalInputAmount() {
|
|
87
|
+
return this.adjustedInput || this.inputSats;
|
|
88
|
+
}
|
|
89
|
+
isFailed() {
|
|
90
|
+
return this.state === FromBtcTrustedSwapState.EXPIRED || this.state === FromBtcTrustedSwapState.REFUNDED || this.state === FromBtcTrustedSwapState.DOUBLE_SPENT;
|
|
91
|
+
}
|
|
92
|
+
isInitiated() {
|
|
93
|
+
return this.state !== FromBtcTrustedSwapState.CREATED;
|
|
94
|
+
}
|
|
95
|
+
isSuccess() {
|
|
96
|
+
return this.state === FromBtcTrustedSwapState.CONFIRMED;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.FromBtcTrustedSwap = FromBtcTrustedSwap;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as BN from "bn.js";
|
|
2
|
+
import { Express } from "express";
|
|
3
|
+
import { FromBtcLnSwapAbs, FromBtcLnSwapState } from "./FromBtcLnSwapAbs";
|
|
4
|
+
import { MultichainData, SwapHandlerType } from "../SwapHandler";
|
|
5
|
+
import { ISwapPrice } from "../ISwapPrice";
|
|
6
|
+
import { ClaimEvent, InitializeEvent, RefundEvent, SwapData } from "@atomiqlabs/base";
|
|
7
|
+
import { AuthenticatedLnd } from "lightning";
|
|
8
|
+
import { IIntermediaryStorage } from "../../storage/IIntermediaryStorage";
|
|
9
|
+
import { FromBtcBaseConfig } from "../FromBtcBaseSwapHandler";
|
|
10
|
+
import { FromBtcLnBaseSwapHandler } from "../FromBtcLnBaseSwapHandler";
|
|
11
|
+
export type FromBtcLnConfig = FromBtcBaseConfig & {
|
|
12
|
+
invoiceTimeoutSeconds?: number;
|
|
13
|
+
minCltv: BN;
|
|
14
|
+
gracePeriod: BN;
|
|
15
|
+
};
|
|
16
|
+
export type FromBtcLnRequestType = {
|
|
17
|
+
address: string;
|
|
18
|
+
paymentHash: string;
|
|
19
|
+
amount: BN;
|
|
20
|
+
token: string;
|
|
21
|
+
descriptionHash?: string;
|
|
22
|
+
exactOut?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Swap handler handling from BTCLN swaps using submarine swaps
|
|
26
|
+
*/
|
|
27
|
+
export declare class FromBtcLnAbs extends FromBtcLnBaseSwapHandler<FromBtcLnSwapAbs, FromBtcLnSwapState> {
|
|
28
|
+
readonly type = SwapHandlerType.FROM_BTCLN;
|
|
29
|
+
readonly config: FromBtcLnConfig;
|
|
30
|
+
constructor(storageDirectory: IIntermediaryStorage<FromBtcLnSwapAbs>, path: string, chains: MultichainData, lnd: AuthenticatedLnd, swapPricing: ISwapPrice, config: FromBtcLnConfig);
|
|
31
|
+
protected processPastSwap(swap: FromBtcLnSwapAbs): Promise<"REFUND" | "SETTLE" | "CANCEL" | null>;
|
|
32
|
+
protected refundSwaps(refundSwaps: FromBtcLnSwapAbs[]): Promise<void>;
|
|
33
|
+
protected cancelInvoices(swaps: FromBtcLnSwapAbs[]): Promise<void>;
|
|
34
|
+
protected settleInvoices(swaps: FromBtcLnSwapAbs[]): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Checks past swaps, refunds and deletes ones that are already expired.
|
|
37
|
+
*/
|
|
38
|
+
protected processPastSwaps(): Promise<void>;
|
|
39
|
+
protected processInitializeEvent(chainIdentifier: string, event: InitializeEvent<SwapData>): Promise<void>;
|
|
40
|
+
protected processClaimEvent(chainIdentifier: string, event: ClaimEvent<SwapData>): Promise<void>;
|
|
41
|
+
protected processRefundEvent(chainIdentifier: string, event: RefundEvent<SwapData>): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Called when lightning HTLC is received, also signs an init transaction on the smart chain side, expiry of the
|
|
44
|
+
* smart chain authorization starts ticking as soon as this HTLC is received
|
|
45
|
+
*
|
|
46
|
+
* @param invoiceData
|
|
47
|
+
* @param invoice
|
|
48
|
+
*/
|
|
49
|
+
private htlcReceived;
|
|
50
|
+
/**
|
|
51
|
+
* Checks invoice description hash
|
|
52
|
+
*
|
|
53
|
+
* @param descriptionHash
|
|
54
|
+
* @throws {DefinedRuntimeError} will throw an error if the description hash is invalid
|
|
55
|
+
*/
|
|
56
|
+
private checkDescriptionHash;
|
|
57
|
+
/**
|
|
58
|
+
* Starts LN channels pre-fetch
|
|
59
|
+
*
|
|
60
|
+
* @param abortController
|
|
61
|
+
*/
|
|
62
|
+
private getBlockheightPrefetch;
|
|
63
|
+
/**
|
|
64
|
+
* Asynchronously sends the LN node's public key to the client, so he can pre-fetch the node's channels from 1ml api
|
|
65
|
+
*
|
|
66
|
+
* @param responseStream
|
|
67
|
+
*/
|
|
68
|
+
private sendPublicKeyAsync;
|
|
69
|
+
/**
|
|
70
|
+
* Returns the CLTV timeout (blockheight) of the received HTLC corresponding to the invoice. If multiple HTLCs are
|
|
71
|
+
* received (MPP) it returns the lowest of the timeouts
|
|
72
|
+
*
|
|
73
|
+
* @param invoice
|
|
74
|
+
*/
|
|
75
|
+
private getInvoicePaymentsTimeout;
|
|
76
|
+
/**
|
|
77
|
+
* Checks if the received HTLC's CLTV timeout is large enough to still process the swap
|
|
78
|
+
*
|
|
79
|
+
* @param invoice
|
|
80
|
+
* @param blockheightPrefetch
|
|
81
|
+
* @param signal
|
|
82
|
+
* @throws {DefinedRuntimeError} Will throw if HTLC expires too soon and therefore cannot be processed
|
|
83
|
+
* @returns expiry timeout in seconds
|
|
84
|
+
*/
|
|
85
|
+
private checkHtlcExpiry;
|
|
86
|
+
/**
|
|
87
|
+
* Cancels the swap (CANCELED state) & also cancels the LN invoice (including all pending HTLCs)
|
|
88
|
+
*
|
|
89
|
+
* @param invoiceData
|
|
90
|
+
*/
|
|
91
|
+
private cancelSwapAndInvoice;
|
|
92
|
+
private getDummySwapData;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* Checks if the lightning invoice is in HELD state (htlcs received but yet unclaimed)
|
|
96
|
+
*
|
|
97
|
+
* @param paymentHash
|
|
98
|
+
* @throws {DefinedRuntimeError} Will throw if the lightning invoice is not found, or if it isn't in the HELD state
|
|
99
|
+
* @returns the fetched lightning invoice
|
|
100
|
+
*/
|
|
101
|
+
private checkInvoiceStatus;
|
|
102
|
+
startRestServer(restServer: Express): void;
|
|
103
|
+
init(): Promise<void>;
|
|
104
|
+
getInfoData(): any;
|
|
105
|
+
}
|