lightning 5.7.1 → 5.8.0

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
+ ## 5.8.0
4
+
5
+ - `getMasterPublicKeys`: Add method to lookup wallet extended public keys
6
+
3
7
  ## 5.7.1
4
8
 
5
9
  - `fundPsbt`: Correct ECPair import dependency in control flow
package/README.md CHANGED
@@ -157,6 +157,8 @@ To access unauthenticated methods like the wallet unlocker, use
157
157
  open invoices and received payments.
158
158
  - [getLockedUtxos](https://github.com/alexbosworth/ln-service#getlockedutxos): List the UTXOs
159
159
  that are currently reserved and unavailable to coin selection.
160
+ - [getMasterPublicKeys](https://github.com/alexbosworth/ln-service#getmasterpublickeys):
161
+ List out master seed derived extended public keys and derivation paths.
160
162
  - [getMethods](https://github.com/alexbosworth/ln-service#getmethods): List RPC methods and
161
163
  permissions required to use them.
162
164
  - [getNetworkCentrality](https://github.com/alexbosworth/ln-service#getnetworkcentrality):
@@ -0,0 +1,28 @@
1
+ import {
2
+ AuthenticatedLightningArgs,
3
+ AuthenticatedLightningMethod,
4
+ } from '../../typescript';
5
+
6
+ export type GetMasterPublicKeysArgs = AuthenticatedLightningArgs;
7
+
8
+ export type GetMasterPublicKeysResult = {
9
+ keys: {
10
+ /** Key Derivation Path String> */
11
+ derivation_path: string;
12
+ /** Base58 Encoded Master Public Key String> */
13
+ extended_public_key: string;
14
+ /** Used External Keys Count Number> */
15
+ external_key_count: number;
16
+ /** Used Internal Keys Count Number> */
17
+ internal_key_count: number;
18
+ /** Node has Master Private Key Bool> */
19
+ is_watch_only: boolean;
20
+ /** Account Name String> */
21
+ named: string;
22
+ }[];
23
+ };
24
+
25
+ export const getMasterPublicKeys: AuthenticatedLightningMethod<
26
+ GetMasterPublicKeysArgs,
27
+ GetMasterPublicKeysResult
28
+ >;
@@ -8,6 +8,7 @@ export * from './get_chain_fee_estimate';
8
8
  export * from './get_chain_fee_rate';
9
9
  export * from './get_chain_transactions';
10
10
  export * from './get_locked_utxos';
11
+ export * from './get_master_public_keys';
11
12
  export * from './get_pending_chain_balance';
12
13
  export * from './get_sweep_transactions';
13
14
  export * from './get_utxos';
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "5.7.1"
62
+ "version": "5.8.0"
63
63
  }
@@ -0,0 +1,19 @@
1
+ import {expectError, expectType} from 'tsd';
2
+ import {AuthenticatedLnd} from '../../lnd_grpc';
3
+ import {
4
+ getMasterPublicKeys,
5
+ GetMasterPublicKeysResult,
6
+ } from '../../lnd_methods';
7
+
8
+ const lnd = {} as AuthenticatedLnd;
9
+
10
+ expectError(getMasterPublicKeys());
11
+ expectError(getMasterPublicKeys({}));
12
+
13
+ expectType<GetMasterPublicKeysResult>(await getMasterPublicKeys({lnd}));
14
+
15
+ expectType<void>(
16
+ getMasterPublicKeys({lnd}, (error, result) => {
17
+ expectType<GetMasterPublicKeysResult>(result);
18
+ })
19
+ );