lightning 5.20.1 → 5.20.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,6 +1,10 @@
1
1
  # Versions
2
2
 
3
- ## 5.21.1
3
+ ## 5.20.2
4
+
5
+ - `getWalletInfo`: Add support for detecting lnd versions 0.15.0 and 0.15.1
6
+
7
+ ## 5.20.1
4
8
 
5
9
  - Update typescript definitions
6
10
 
@@ -25,6 +25,7 @@
25
25
  "4f567577db9d85b6f392f960b3aabddcad3cd02c": "0.13.3-beta",
26
26
  "52bb3f33707b81972c67937c7a89addcdf00991c": "0.10.1-beta",
27
27
  "596fd90ef310cd7abbf2251edaae9ba4d5f8a689": "0.13.1-beta",
28
+ "5c36d96c9cbe8b27c29f9682dcbdab7928ae870f": "0.15.0-beta",
28
29
  "6042004edaaa5b3cad0a0808ff23dba4716f7178": "0.14.1-beta",
29
30
  "61c34683058f2cc8dc10f49392a0057440d831c4": "0.13.4-beta",
30
31
  "725ff104808f49f0a5247bfdb4b6b5da7f488d38": "0.13.0-beta",
@@ -35,7 +36,8 @@
35
36
  "d176d2d65fc06e6631c4dc9478592be8545a21de": "0.12.0-beta",
36
37
  "d233f61383f2f950aa06f5b09da5b0e78e784fae": "0.12.1-beta",
37
38
  "d62c575f8499a314eb27f12462d20500b6bda2c7": "0.10.3-beta",
38
- "df0b82f0165f19bde8832bacd1e35544b0a2990d": "0.14.0-beta"
39
+ "df0b82f0165f19bde8832bacd1e35544b0a2990d": "0.14.0-beta",
40
+ "fd1a95bf322cdd1c743a1554f8e470fbf9a5e564": "0.15.1-beta"
39
41
  },
40
42
  "weightedType": "weightedcomb",
41
43
  "wrongLnd": "12 UNIMPLEMENTED: unknown service autopilotrpc.Autopilot"
@@ -5,6 +5,7 @@ const {isLnd} = require('./../../lnd_requests');
5
5
 
6
6
  const initialConfirmationCount = 0;
7
7
  const {isArray} = Array;
8
+ const {isInteger} = Number;
8
9
  const lowBalanceErr = 'insufficient funds available to construct transaction';
9
10
  const method = 'sendCoins';
10
11
  const OPEN = 1;
@@ -53,6 +54,10 @@ module.exports = (args, cbk) => {
53
54
  return cbk([400, 'ExpectedLndForChainSendRequest']);
54
55
  }
55
56
 
57
+ if (!!args.tokens && !isInteger(args.tokens)) {
58
+ return cbk([400, 'ExpectedWholeNumberAmountToSendFundsOnChain']);
59
+ }
60
+
56
61
  if (!args.tokens && !args.is_send_all) {
57
62
  return cbk([400, 'MissingTokensToSendOnChain']);
58
63
  }
package/package.json CHANGED
@@ -7,10 +7,10 @@
7
7
  "url": "https://github.com/alexbosworth/lightning/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@grpc/grpc-js": "1.6.10",
10
+ "@grpc/grpc-js": "1.6.11",
11
11
  "@grpc/proto-loader": "0.7.2",
12
12
  "@types/express": "4.17.13",
13
- "@types/node": "18.7.13",
13
+ "@types/node": "18.7.14",
14
14
  "@types/request": "2.48.8",
15
15
  "@types/ws": "8.5.3",
16
16
  "async": "3.2.4",
@@ -23,7 +23,7 @@
23
23
  "cbor": "8.1.0",
24
24
  "ecpair": "2.0.1",
25
25
  "express": "4.18.1",
26
- "invoices": "2.1.0",
26
+ "invoices": "2.2.0",
27
27
  "psbt": "2.7.1",
28
28
  "tiny-secp256k1": "2.2.1",
29
29
  "type-fest": "2.19.0"
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@alexbosworth/node-fetch": "2.6.2",
34
34
  "@alexbosworth/tap": "15.0.11",
35
- "tsd": "0.22.0",
35
+ "tsd": "0.23.0",
36
36
  "typescript": "4.8.2",
37
37
  "ws": "8.8.1"
38
38
  },
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "5.20.1"
62
+ "version": "5.20.2"
63
63
  }
@@ -36,6 +36,11 @@ const tests = [
36
36
  description: 'Expected tokens to send to chain address',
37
37
  error: [400, 'MissingTokensToSendOnChain'],
38
38
  },
39
+ {
40
+ args: makeArgs({tokens: 0.1}),
41
+ description: 'Expected non-fractional tokens to send to chain address',
42
+ error: [400, 'ExpectedWholeNumberAmountToSendFundsOnChain'],
43
+ },
39
44
  {
40
45
  args: makeArgs({is_send_all: true, tokens: 1}),
41
46
  description: 'Expected either send all or tokens to send to chain address',