lightning 6.2.1 → 6.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Versions
2
2
 
3
+ ## 6.2.2
4
+
5
+ - `getWalletInfo`: Add support for LND 0.15.2
6
+
3
7
  ## 6.2.1
4
8
 
5
9
  - `openChannel`, `openChannels`: Add `base_fee_mtokens`, `fee_rate` to set
@@ -32,6 +32,7 @@
32
32
  "7f34774529fa0964d47fc418d4d2965435cbfdc0": "0.11.1-beta",
33
33
  "86d3dec7b939b21bb10f2cd1ff56970c392a1c69": "0.13.2-beta",
34
34
  "86114c575c2dff9dff1e1bb4df961c64aea9fc1c": "0.10.4-beta",
35
+ "aff2ed3a6a118d664049835c325a5b69e977172f": "0.15.2-beta",
35
36
  "bd0c46b4fcb027af1915bd67a3da70e8ca5c6efe": "0.14.3-beta",
36
37
  "d176d2d65fc06e6631c4dc9478592be8545a21de": "0.12.0-beta",
37
38
  "d233f61383f2f950aa06f5b09da5b0e78e784fae": "0.12.1-beta",
@@ -46,6 +46,7 @@ export * from './subscribe_to_past_payments';
46
46
  export * from './subscribe_to_pay_via_details';
47
47
  export * from './subscribe_to_pay_via_request';
48
48
  export * from './subscribe_to_pay_via_routes';
49
+ export * from './subscribe_to_payments';
49
50
  export * from './subscribe_to_peer_messages';
50
51
  export * from './subscribe_to_probe_for_route';
51
52
  export * from './update_connected_watchtower';
@@ -1,7 +1,6 @@
1
- import {
1
+ import type {
2
2
  AuthenticatedLightningArgs,
3
3
  AuthenticatedLightningSubscription,
4
- EmptyObject,
5
4
  LightningError,
6
5
  } from '../../typescript';
7
6
 
@@ -0,0 +1,22 @@
1
+ import type {
2
+ AuthenticatedLightningArgs,
3
+ AuthenticatedLightningSubscription,
4
+ LightningError,
5
+ } from '../../typescript';
6
+ import type {SubscribeToPastPaymentsPaymentEvent} from './subscribe_to_past_payments';
7
+
8
+ export type SubscribeToPaymentsArgs = AuthenticatedLightningArgs;
9
+
10
+ export type SubscribeToPaymentsErrorEvent = LightningError;
11
+
12
+ export type SubscribeToPaymentsPaymentEvent =
13
+ SubscribeToPastPaymentsPaymentEvent;
14
+
15
+ /**
16
+ * Subscribe to outgoing payments
17
+ *
18
+ * Requires `offchain:read` permission
19
+ *
20
+ * Note: Method not supported on LND 0.15.3 and below
21
+ */
22
+ export const subscribeToPayments: AuthenticatedLightningSubscription<SubscribeToPaymentsArgs>;
@@ -13,7 +13,7 @@ const type = 'router';
13
13
 
14
14
  Requires `offchain:read` permission
15
15
 
16
- Note: Method not supported on LND 0.15.2 and below
16
+ Note: Method not supported on LND 0.15.3 and below
17
17
 
18
18
  {
19
19
  lnd: <Authenticated LND API Object>
@@ -3,11 +3,15 @@ import {
3
3
  AuthenticatedLightningMethod,
4
4
  } from '../../typescript';
5
5
 
6
- export type OpenChannelArgs = AuthenticatedLightningArgs<{
6
+ export type ChannelOpenOptions = {
7
+ /** Routing Base Fee Millitokens Charged String */
8
+ base_fee_mtokens?: string;
7
9
  /** Chain Fee Tokens Per VByte */
8
10
  chain_fee_tokens_per_vbyte?: number;
9
11
  /** Restrict Cooperative Close To Address */
10
12
  cooperative_close_address?: string;
13
+ /** Routing Fee Rate In Millitokens Per Million Number */
14
+ fee_rate?: number;
11
15
  /** Tokens to Gift To Partner */
12
16
  give_tokens?: number;
13
17
  /** Channel is Private */
@@ -24,7 +28,9 @@ export type OpenChannelArgs = AuthenticatedLightningArgs<{
24
28
  partner_csv_delay?: number;
25
29
  /** Peer Connection Host:Port */
26
30
  partner_socket?: string;
27
- }>;
31
+ };
32
+
33
+ export type OpenChannelArgs = AuthenticatedLightningArgs<ChannelOpenOptions>;
28
34
 
29
35
  export type OpenChannelResult = {
30
36
  /** Funding Transaction Id */
@@ -43,6 +49,9 @@ export type OpenChannelResult = {
43
49
  * Requires `offchain:write`, `onchain:write`, `peers:write` permissions
44
50
  *
45
51
  * External funding requires LND compiled with `walletrpc` build tag
52
+ *
53
+ * `base_fee_mtokens` is not supported on LND 0.15.3 and below
54
+ * `fee_rate` is not supported on LND 0.15.3 and below
46
55
  */
47
56
  export const openChannel: AuthenticatedLightningMethod<
48
57
  OpenChannelArgs,
@@ -20,8 +20,8 @@ const type = 'default';
20
20
 
21
21
  External funding requires LND compiled with `walletrpc` build tag
22
22
 
23
- `base_fee_mtokens` is not supported on LND 0.15.2 and below
24
- `fee_rate` is not supported on LND 0.15.2 and below
23
+ `base_fee_mtokens` is not supported on LND 0.15.3 and below
24
+ `fee_rate` is not supported on LND 0.15.3 and below
25
25
 
26
26
  {
27
27
  [base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
@@ -1,27 +1,28 @@
1
- import {
1
+ import type {
2
2
  AuthenticatedLightningArgs,
3
3
  AuthenticatedLightningMethod,
4
4
  } from '../../typescript';
5
+ import type {ChannelOpenOptions} from './open_channel';
6
+
7
+ export type MultipleChannelOpenOptions = Pick<
8
+ ChannelOpenOptions,
9
+ | 'base_fee_mtokens'
10
+ | 'cooperative_close_address'
11
+ | 'fee_rate'
12
+ | 'give_tokens'
13
+ | 'is_private'
14
+ | 'min_htlc_mtokens'
15
+ | 'partner_public_key'
16
+ | 'partner_csv_delay'
17
+ > & {
18
+ /** Channel Capacity Tokens */
19
+ capacity: number;
20
+ /** Peer Should Avoid Waiting For Confirmation */
21
+ is_trusted_funding?: boolean;
22
+ };
5
23
 
6
24
  export type OpenChannelsArgs = AuthenticatedLightningArgs<{
7
- channels: {
8
- /** Channel Capacity Tokens */
9
- capacity: number;
10
- /** Restrict Coop Close To Address */
11
- cooperative_close_address?: string;
12
- /** Tokens to Gift To Partner */
13
- give_tokens?: number;
14
- /** Channel is Private */
15
- is_private?: boolean;
16
- /** Peer Should Avoid Waiting For Confirmation */
17
- is_trusted_funding?: boolean;
18
- /** Minimum HTLC Millitokens */
19
- min_htlc_mtokens?: string;
20
- /** Public Key Hex */
21
- partner_public_key: string;
22
- /** Peer Output CSV Delay */
23
- partner_csv_delay?: number;
24
- }[];
25
+ channels: MultipleChannelOpenOptions[];
25
26
  /** Do not broadcast any channel funding transactions */
26
27
  is_avoiding_broadcast?: boolean;
27
28
  }>;
@@ -54,6 +55,9 @@ channel that was not funded.
54
55
  `is_trusted_funding` is not supported on LND 0.15.0 and below and requires
55
56
  `--protocol.option-scid-alias` and `--protocol.zero-conf` set on both sides
56
57
  as well as a channel open request listener to accept the trusted funding.
58
+
59
+ * `base_fee_mtokens` is not supported on LND 0.15.3 and below
60
+ * `fee_rate` is not supported on LND 0.15.3 and below
57
61
  */
58
62
  export const openChannels: AuthenticatedLightningMethod<
59
63
  OpenChannelsArgs,
@@ -37,8 +37,8 @@ const type = 'default';
37
37
  `--protocol.option-scid-alias` and `--protocol.zero-conf` set on both sides
38
38
  as well as a channel open request listener to accept the trusted funding.
39
39
 
40
- `base_fee_mtokens` is not supported on LND 0.15.2 and below
41
- `fee_rate` is not supported on LND 0.15.2 and below
40
+ `base_fee_mtokens` is not supported on LND 0.15.3 and below
41
+ `fee_rate` is not supported on LND 0.15.3 and below
42
42
 
43
43
  {
44
44
  channels: [{
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "invoices": "2.2.0",
27
27
  "psbt": "2.7.1",
28
28
  "tiny-secp256k1": "2.2.1",
29
- "type-fest": "3.0.0"
29
+ "type-fest": "3.1.0"
30
30
  },
31
31
  "description": "Lightning Network client library",
32
32
  "devDependencies": {
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "6.2.1"
62
+ "version": "6.2.2"
63
63
  }