🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@getalby/cli

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getalby/cli - npm Package Compare versions

Comparing version
0.2.3
to
0.2.4
+1
-1
build/index.js

@@ -27,3 +27,3 @@ #!/usr/bin/env node

.description("CLI for Nostr Wallet Connect (NIP-47) with lightning tools")
.version("0.2.1")
.version("0.2.4")
.option("-c, --connection-secret <string>", "NWC connection secret (nostr+walletconnect://...) or path to file containing it (preferred)")

@@ -30,0 +30,0 @@ .addHelpText("afterAll", `

import { NWCClient } from "@getalby/sdk";
import { readFileSync } from "node:fs";
import { homedir } from "node:os";
import { join } from "node:path";
export function getClient(program) {

@@ -11,3 +13,16 @@ const opts = program.opts();

if (!connectionSecret) {
console.error("Error: --connection-secret is required for this command");
const defaultPath = join(homedir(), ".alby-cli", "connection-secret.key");
try {
connectionSecret = readFileSync(defaultPath, "utf-8").trim();
}
catch (error) {
const err = error;
if (err.code !== "ENOENT") {
// only throw an error if it's not a file not found error
throw err;
}
}
}
if (!connectionSecret) {
console.error("Error: No connection secret found. Pass -c <secret>, set NWC_URL, or create ~/.alby-cli/connection-secret.key");
process.exit(1);

@@ -14,0 +29,0 @@ }

@@ -5,3 +5,3 @@ {

"repository": "https://github.com/getAlby/cli.git",
"version": "0.2.3",
"version": "0.2.4",
"type": "module",

@@ -8,0 +8,0 @@ "main": "build/index.js",