lightning 10.1.0 → 10.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.
package/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"61c34683058f2cc8dc10f49392a0057440d831c4": "0.13.4-beta",
|
|
35
35
|
"6bd30047c1b1188029e8af6ee8a135cf86e7dc4b": "0.16.4-beta",
|
|
36
36
|
"725ff104808f49f0a5247bfdb4b6b5da7f488d38": "0.13.0-beta",
|
|
37
|
+
"744feb04e28afdcfa3702a78e83977090c471576": "0.17.1-beta",
|
|
37
38
|
"7f34774529fa0964d47fc418d4d2965435cbfdc0": "0.11.1-beta",
|
|
38
39
|
"86d3dec7b939b21bb10f2cd1ff56970c392a1c69": "0.13.2-beta",
|
|
39
40
|
"86114c575c2dff9dff1e1bb4df961c64aea9fc1c": "0.10.4-beta",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
AuthenticatedLightningMethod,
|
|
5
5
|
} from '../../typescript';
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type GetBlockHeaderArgs = AuthenticatedLightningArgs<
|
|
8
8
|
MergeExclusive<
|
|
9
9
|
{
|
|
10
10
|
/** Block Height Number */
|
|
@@ -32,6 +32,6 @@ export type GetBlockHeaderResult = {
|
|
|
32
32
|
* This method is not supported on LND 0.17.0 and below
|
|
33
33
|
*/
|
|
34
34
|
export const getBlockHeader: AuthenticatedLightningMethod<
|
|
35
|
-
|
|
35
|
+
GetBlockHeaderArgs,
|
|
36
36
|
GetBlockHeaderResult
|
|
37
37
|
>;
|
package/package.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"@grpc/grpc-js": "1.9.9",
|
|
11
11
|
"@grpc/proto-loader": "0.7.10",
|
|
12
12
|
"@types/node": "20.8.10",
|
|
13
|
-
"@types/request": "2.48.
|
|
14
|
-
"@types/ws": "8.5.
|
|
15
|
-
"async": "3.2.
|
|
13
|
+
"@types/request": "2.48.12",
|
|
14
|
+
"@types/ws": "8.5.9",
|
|
15
|
+
"async": "3.2.5",
|
|
16
16
|
"asyncjs-util": "1.2.12",
|
|
17
17
|
"bitcoinjs-lib": "6.1.5",
|
|
18
18
|
"bn.js": "5.2.1",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"invoices": "3.0.0",
|
|
23
23
|
"psbt": "3.0.0",
|
|
24
24
|
"tiny-secp256k1": "2.2.3",
|
|
25
|
-
"type-fest": "4.
|
|
25
|
+
"type-fest": "4.7.1"
|
|
26
26
|
},
|
|
27
27
|
"description": "Lightning Network client library",
|
|
28
28
|
"devDependencies": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"directory": "test/typescript"
|
|
54
54
|
},
|
|
55
55
|
"types": "index.d.ts",
|
|
56
|
-
"version": "10.1.
|
|
56
|
+
"version": "10.1.2"
|
|
57
57
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {expectError, expectType} from 'tsd';
|
|
2
|
+
import {getBlockHeader, GetBlockHeaderResult} from '../../lnd_methods';
|
|
3
|
+
import {AuthenticatedLnd} from '../../lnd_grpc';
|
|
4
|
+
|
|
5
|
+
const lnd = {} as AuthenticatedLnd;
|
|
6
|
+
const height = 0;
|
|
7
|
+
const id = 'id';
|
|
8
|
+
|
|
9
|
+
expectError(getBlockHeader());
|
|
10
|
+
expectError(getBlockHeader({}));
|
|
11
|
+
expectError(getBlockHeader({lnd}));
|
|
12
|
+
expectError(getBlockHeader({height, id}));
|
|
13
|
+
|
|
14
|
+
expectType<GetBlockHeaderResult>(await getBlockHeader({lnd, height}));
|
|
15
|
+
expectType<GetBlockHeaderResult>(await getBlockHeader({lnd, id}));
|
|
16
|
+
|
|
17
|
+
expectType<void>(
|
|
18
|
+
getBlockHeader({lnd, height}, (error, result) => {
|
|
19
|
+
expectType<GetBlockHeaderResult>(result);
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
expectType<void>(
|
|
23
|
+
getBlockHeader({lnd, id}, (error, result) => {
|
|
24
|
+
expectType<GetBlockHeaderResult>(result);
|
|
25
|
+
})
|
|
26
|
+
);
|