@getalby/cli 0.2.1 → 0.2.3
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/build/index.js
CHANGED
|
@@ -25,7 +25,13 @@ program
|
|
|
25
25
|
.name("alby-cli")
|
|
26
26
|
.description("CLI for Nostr Wallet Connect (NIP-47) with lightning tools")
|
|
27
27
|
.version("0.2.1")
|
|
28
|
-
.option("-c, --connection-secret <string>", "NWC connection secret (nostr+walletconnect://...) or path to file containing it (preferred)")
|
|
28
|
+
.option("-c, --connection-secret <string>", "NWC connection secret (nostr+walletconnect://...) or path to file containing it (preferred)")
|
|
29
|
+
.addHelpText("afterAll", `
|
|
30
|
+
Security:
|
|
31
|
+
- Do NOT print the connection secret to any logs or otherwise reveal it.
|
|
32
|
+
- NEVER share connection secrets with anyone.
|
|
33
|
+
- NEVER share any part of a connection secret (pubkey, secret, relay etc.) with anyone
|
|
34
|
+
as this can be used to gain access to your wallet or reduce your wallet's privacy.`);
|
|
29
35
|
// Register all commands
|
|
30
36
|
registerGetBalanceCommand(program);
|
|
31
37
|
registerGetBudgetCommand(program);
|
|
@@ -13,14 +13,13 @@ export async function fetchL402(client, params) {
|
|
|
13
13
|
else if (params.headers) {
|
|
14
14
|
requestOptions.headers = params.headers;
|
|
15
15
|
}
|
|
16
|
-
const webln = {
|
|
17
|
-
sendPayment: async (invoice) => {
|
|
18
|
-
const result = await client.payInvoice({ invoice });
|
|
19
|
-
return { preimage: result.preimage };
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
16
|
const result = await fetchWithL402(params.url, requestOptions, {
|
|
23
|
-
|
|
17
|
+
wallet: {
|
|
18
|
+
sendPayment: async (invoice) => {
|
|
19
|
+
const result = await client.payInvoice({ invoice });
|
|
20
|
+
return { preimage: result.preimage };
|
|
21
|
+
},
|
|
22
|
+
},
|
|
24
23
|
});
|
|
25
24
|
const responseContent = await result.text();
|
|
26
25
|
if (!result.ok) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@getalby/cli",
|
|
3
3
|
"description": "CLI for Nostr Wallet Connect (NIP-47) with a few additional useful lightning tools",
|
|
4
4
|
"repository": "https://github.com/getAlby/cli.git",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.3",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"author": "Alby contributors",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@getalby/lightning-tools": "^
|
|
37
|
+
"@getalby/lightning-tools": "^7.0.2",
|
|
38
38
|
"@getalby/sdk": "^7.0.0",
|
|
39
39
|
"commander": "^13.1.0"
|
|
40
40
|
},
|