🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@lightsparkdev/lightspark-cli

Package Overview
Dependencies
Maintainers
3
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightsparkdev/lightspark-cli

CLI for the Lightspark JS sdk

Source
npmnpm
Version
0.1.15
Version published
Weekly downloads
52
-52.29%
Maintainers
3
Weekly downloads
 
Created
Source

Lightspark API CLI

npm (scoped)

The lightspark script is a wrapper around the lightspark-sdk which can simplify testing simple lightspark API commands from your command-line. You can install it from source via npm i -g or from the npm package: npm i -g @lightsparkdev/lightspark-cli.

init-env

The first command you'll need to run get set up is init-env.

You'll need to provide your API token's client ID and client secret. You can set this up from the Lightspark API config page. For more info on API authentication, see the Lightspark API Authentication docs.

If you run it without any arguments, it will prompt you for your API token's client ID and client secret:

lightspark init-env

You can also directly pass these on the command line:

lightspark init-env -c <your client ID here> -s <your client secret here>

Once you've run init-env, it will create a .lightsparkapienv file in your home directory with your API token's client ID and client secret.

There are lots of commands! Check out lightspark --help for more usage info.

Example flow

Here's full example of how you might use the lightspark script to test out the lightspark SDK:

# Get the balances for the account.
lightspark balances

# Create a bitcoin funding address for the account.
lightspark funding-address

# Fund the account by sending bitcoin to the address you just created.
# Once that transaction is confirmed, you can check the balances again.
lightspark balances

# Create an invoice.
lightspark create-invoice -a 100 -m "Pizza time"

# Pay the invoice with a test payment.
lightspark create-test-mode-payment -i <encoded invoice here>

FAQs

Package last updated on 04 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts