lightning 5.8.6 → 5.9.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,10 @@
1
1
  # Versions
2
2
 
3
+ ## 5.9.0
4
+
5
+ - `createChainAddress`: Add support for creating P2TR addresses
6
+ - `getUtxos`: Add support for showing P2TR address types
7
+
3
8
  ## 5.8.6
4
9
 
5
10
  - `getWalletInfo`, `payViaPaymentDetails`: Correct typescript fields
@@ -1138,12 +1138,15 @@ message ListUnspentResponse {
1138
1138
 
1139
1139
  - `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
1140
1140
  - `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
1141
+ - `p2tr`: Pay to taproot pubkey (`TAPROOT_PUBKEY` = 4)
1141
1142
  */
1142
1143
  enum AddressType {
1143
1144
  WITNESS_PUBKEY_HASH = 0;
1144
1145
  NESTED_PUBKEY_HASH = 1;
1145
1146
  UNUSED_WITNESS_PUBKEY_HASH = 2;
1146
1147
  UNUSED_NESTED_PUBKEY_HASH = 3;
1148
+ TAPROOT_PUBKEY = 4;
1149
+ UNUSED_TAPROOT_PUBKEY = 5;
1147
1150
  }
1148
1151
 
1149
1152
  message NewAddressRequest {
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "np2wpkh": 1,
3
+ "p2tr": 4,
3
4
  "p2wpkh": 0,
4
- "unused_p2wpkh": 2,
5
- "unused_np2wpkh": 3
5
+ "unused_np2wpkh": 3,
6
+ "unused_p2tr": 5,
7
+ "unused_p2wpkh": 2
6
8
  }
@@ -5,7 +5,7 @@ import {
5
5
 
6
6
  export type CreateChainAddressArgs = AuthenticatedLightningArgs<{
7
7
  /** Receive Address Type */
8
- format?: 'np2wpkh' | 'p2wpkh';
8
+ format?: 'np2wpkh' | 'p2tr' | 'p2wpkh';
9
9
  /** Get As-Yet Unused Address */
10
10
  is_unused?: boolean;
11
11
  }>;
@@ -13,8 +13,10 @@ const type = 'default';
13
13
 
14
14
  Requires `address:write` permission
15
15
 
16
+ LND 0.14.3 below do not support p2tr addresses
17
+
16
18
  {
17
- [format]: <Receive Address Type String> // "np2wpkh" || "p2wpkh"
19
+ [format]: <Receive Address Type String> // "np2wpkh" || "p2tr" || "p2wpkh"
18
20
  [is_unused]: <Get As-Yet Unused Address Bool>
19
21
  lnd: <Authenticated LND API Object>
20
22
  }
@@ -20,7 +20,7 @@ export type PartiallySignPsbtResult = {
20
20
  *
21
21
  * Requires LND built with `walletrpc` tag
22
22
  *
23
- * This method is not supported in LND 0.14.2 and below
23
+ * This method is not supported in LND 0.14.3 and below
24
24
  */
25
25
  export const partiallySignPsbt: AuthenticatedLightningMethod<
26
26
  PartiallySignPsbtArgs,
@@ -16,7 +16,7 @@ const type = 'wallet';
16
16
 
17
17
  Requires LND built with `walletrpc` tag
18
18
 
19
- This method is not supported in LND 0.14.2 and below
19
+ This method is not supported in LND 0.14.3 and below
20
20
 
21
21
  {
22
22
  lnd: <Authenticated LND API Object>
@@ -1,4 +1,9 @@
1
1
  {
2
+ "addressFormats": {
3
+ "np2wpkh": "NESTED_PUBKEY_HASH",
4
+ "p2tr": "TAPROOT_PUBKEY",
5
+ "p2wpkh": "WITNESS_PUBKEY_HASH"
6
+ },
2
7
  "adjustedChannelTypes": {
3
8
  "LEGACY": "STATIC_REMOTE_KEY",
4
9
  "STATIC_REMOTE_KEY": "ANCHORS",
@@ -1,4 +1,6 @@
1
- const formats = {np2wpkh: 'NESTED_PUBKEY_HASH', p2wpkh: 'WITNESS_PUBKEY_HASH'};
1
+ const constants = require('./constants');
2
+
3
+ const formats = constants.addressFormats;
2
4
  const {keys} = Object;
3
5
 
4
6
  /** Derive UTXO details from RPC UTXO details
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "5.8.6"
62
+ "version": "5.9.0"
63
63
  }