lightning 7.0.2 → 7.0.4
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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthenticatedLightningArgs,
|
|
3
|
+
AuthenticatedLightningMethod,
|
|
4
|
+
} from '../../typescript';
|
|
5
|
+
|
|
6
|
+
export type GetChainAddressesArgs = AuthenticatedLightningArgs;
|
|
7
|
+
|
|
8
|
+
export type GetChainAddressesResult = {
|
|
9
|
+
addresses: {
|
|
10
|
+
/** Chain Address String */
|
|
11
|
+
address: string;
|
|
12
|
+
/** Is Internal Change Address Bool */
|
|
13
|
+
is_change: boolean;
|
|
14
|
+
/** Balance of Funds Controlled by Output Script Tokens Number */
|
|
15
|
+
tokens: number;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Get the wallet chain addresses
|
|
21
|
+
*
|
|
22
|
+
* Requires `onchain:read` permission
|
|
23
|
+
*
|
|
24
|
+
* This method is not supported on LND 0.15.5 and below
|
|
25
|
+
*/
|
|
26
|
+
export const getChainAddresses: AuthenticatedLightningMethod<
|
|
27
|
+
GetChainAddressesArgs,
|
|
28
|
+
GetChainAddressesResult
|
|
29
|
+
>;
|
|
@@ -4,6 +4,7 @@ export * from './close_channel';
|
|
|
4
4
|
export * from './fund_pending_channels';
|
|
5
5
|
export * from './fund_psbt';
|
|
6
6
|
export * from './get_block';
|
|
7
|
+
export * from './get_chain_addresses';
|
|
7
8
|
export * from './get_chain_balance';
|
|
8
9
|
export * from './get_chain_fee_estimate';
|
|
9
10
|
export * from './get_chain_fee_rate';
|
package/package.json
CHANGED
|
@@ -7,24 +7,24 @@
|
|
|
7
7
|
"url": "https://github.com/alexbosworth/lightning/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@grpc/grpc-js": "1.8.
|
|
10
|
+
"@grpc/grpc-js": "1.8.2",
|
|
11
11
|
"@grpc/proto-loader": "0.7.4",
|
|
12
12
|
"@types/express": "4.17.15",
|
|
13
13
|
"@types/node": "18.11.18",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.4",
|
|
16
16
|
"async": "3.2.4",
|
|
17
|
-
"asyncjs-util": "1.2.
|
|
17
|
+
"asyncjs-util": "1.2.11",
|
|
18
18
|
"bitcoinjs-lib": "6.1.0",
|
|
19
19
|
"bn.js": "5.2.1",
|
|
20
20
|
"body-parser": "1.20.1",
|
|
21
|
-
"bolt07": "1.8.
|
|
22
|
-
"bolt09": "0.2.
|
|
21
|
+
"bolt07": "1.8.3",
|
|
22
|
+
"bolt09": "0.2.5",
|
|
23
23
|
"cbor": "8.1.0",
|
|
24
24
|
"ecpair": "2.1.0",
|
|
25
25
|
"express": "4.18.2",
|
|
26
|
-
"invoices": "2.2.
|
|
27
|
-
"psbt": "2.7.
|
|
26
|
+
"invoices": "2.2.3",
|
|
27
|
+
"psbt": "2.7.2",
|
|
28
28
|
"tiny-secp256k1": "2.2.1",
|
|
29
29
|
"type-fest": "3.5.1"
|
|
30
30
|
},
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@alexbosworth/tap": "15.0.12",
|
|
35
35
|
"tsd": "0.25.0",
|
|
36
36
|
"typescript": "4.9.4",
|
|
37
|
-
"ws": "8.
|
|
37
|
+
"ws": "8.12.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=14"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "7.0.
|
|
62
|
+
"version": "7.0.4"
|
|
63
63
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {expectError, expectType} from 'tsd';
|
|
2
|
+
import {AuthenticatedLnd} from '../../lnd_grpc';
|
|
3
|
+
import {getChainAddresses, GetChainAddressesResult} from '../../lnd_methods';
|
|
4
|
+
|
|
5
|
+
const lnd = {} as AuthenticatedLnd;
|
|
6
|
+
|
|
7
|
+
expectError(getChainAddresses());
|
|
8
|
+
expectError(getChainAddresses({}));
|
|
9
|
+
|
|
10
|
+
expectType<GetChainAddressesResult>(await getChainAddresses({lnd}));
|
|
11
|
+
|
|
12
|
+
expectType<void>(
|
|
13
|
+
getChainAddresses({lnd}, (error, result) => {
|
|
14
|
+
expectType<GetChainAddressesResult>(result);
|
|
15
|
+
}),
|
|
16
|
+
);
|