@atomiqlabs/lp-lib 16.1.1 → 16.1.2
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.
|
@@ -30,6 +30,7 @@ export type LightningNetworkChannel = {
|
|
|
30
30
|
id: string;
|
|
31
31
|
capacity: bigint;
|
|
32
32
|
isActive: boolean;
|
|
33
|
+
peerPublicKey: string;
|
|
33
34
|
localBalance: bigint;
|
|
34
35
|
localReserve: bigint;
|
|
35
36
|
remoteBalance: bigint;
|
|
@@ -38,6 +39,21 @@ export type LightningNetworkChannel = {
|
|
|
38
39
|
transactionId: string;
|
|
39
40
|
transactionVout: number;
|
|
40
41
|
};
|
|
42
|
+
export type OpenChannelRequest = {
|
|
43
|
+
amountSats: bigint;
|
|
44
|
+
peerPublicKey: string;
|
|
45
|
+
peerAddress?: string;
|
|
46
|
+
feeRate?: number;
|
|
47
|
+
channelFees?: {
|
|
48
|
+
feeRatePPM?: bigint;
|
|
49
|
+
baseFeeMsat?: bigint;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type CloseChannelRequest = {
|
|
53
|
+
channelId: string;
|
|
54
|
+
feeRate?: number;
|
|
55
|
+
forceClose?: boolean;
|
|
56
|
+
};
|
|
41
57
|
export type InvoiceInit = {
|
|
42
58
|
mtokens: bigint;
|
|
43
59
|
descriptionHash?: string;
|
|
@@ -112,6 +128,9 @@ export interface ILightningWallet {
|
|
|
112
128
|
parsePaymentRequest(request: string): Promise<ParsedPaymentRequest>;
|
|
113
129
|
getBlockheight(): Promise<number>;
|
|
114
130
|
getChannels(activeOnly?: boolean): Promise<LightningNetworkChannel[]>;
|
|
131
|
+
getPendingChannels(): Promise<LightningNetworkChannel[]>;
|
|
132
|
+
openChannel(req: OpenChannelRequest): Promise<LightningNetworkChannel>;
|
|
133
|
+
closeChannel(req: CloseChannelRequest): Promise<string>;
|
|
115
134
|
getLightningBalance(): Promise<LightningBalanceResponse>;
|
|
116
135
|
getIdentityPublicKey(): Promise<string>;
|
|
117
136
|
}
|