0.0.48 • Published 2 months ago

@lightsparkdev/lightspark-cli v0.0.48

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

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>
0.0.47

2 months ago

0.0.48

2 months ago

0.0.46

2 months ago

0.0.45

3 months ago

0.0.43

3 months ago

0.0.42

3 months ago

0.0.40

4 months ago

0.0.41

4 months ago

0.0.39

5 months ago

0.0.38

5 months ago

0.0.37

5 months ago

0.0.36

5 months ago

0.0.35

5 months ago

0.0.34

5 months ago

0.0.33

5 months ago

0.0.32

6 months ago

0.0.31

6 months ago

0.0.30

6 months ago

0.0.29

6 months ago

0.0.28

6 months ago

0.0.27

6 months ago

0.0.26

6 months ago

0.0.25

7 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.17

7 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago