0.7.7 • Published 3 years ago

teslacoil v0.7.7

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

This is a client library for interacting with the Teslacoil APIs for sending and receiving bitcoin payments. See our API docs for more information. We are still in beta, and are not open for users yet.

Add it to your project:

Yarn

$ yarn add teslacoil

npm

$ npm install --save teslacoil

Usage:

Setting up api keys

To get an API key, you first need to register an account on teslacoil.io/signup. After registering, use the GUI to create an API-key. The website will guide you through the process. When you have your API-key, you can get started.

import * as teslacoil from 'teslacoil'

teslacoil.setCredentials(`YOUR-API-KEY`)

The default network is mainnet, but testnet is also supported. You can use the API on testnet by doing:

import * as teslacoil from 'teslacoil'

teslacoil.setCredentials(`YOUR-API-KEY`, 'TESTNET')

Request data from REST APIs

import * as teslacoil from 'teslacoil'

teslacoil.setCredentials(`YOUR-API-KEY`, 'TESTNET')

// decode a lightning request
const decodedInvoice = await teslacoil.DecodeLightning('insert payment request here')

// create a invoice for 5000 sats
const invoice = await teslacoil.CreateLightningInvoice({ amount: 5000, currency: 'SAT' })

To read documentation and try out the requests in an interactive mode, see our API docs. Here you will find complete code samples for making requests, as well as what responses look like, for all API endpoints and request types.

Publishing

$ yarn publish

Lints, checks formatting, makes new git tag, pushes new git tag, build, pushes build to npm

0.7.7-1

3 years ago

0.7.7

3 years ago

0.7.0-2

3 years ago

0.7.0-1

3 years ago

0.6.37-2

3 years ago

0.7.0

3 years ago

0.6.38-1

3 years ago

0.6.37-6

3 years ago

0.6.37-5

3 years ago

0.6.37-4

3 years ago

0.6.37

3 years ago

0.6.35-4

3 years ago

0.6.35-3

3 years ago

0.6.35-2

3 years ago

0.6.13

3 years ago

0.6.12

4 years ago

0.6.10-1

4 years ago

0.6.67

4 years ago

0.6.65

4 years ago

0.6.64

4 years ago

0.6.66

4 years ago

0.6.62

4 years ago

0.6.61

4 years ago

0.6.6

4 years ago

0.6.55

4 years ago

0.6.54

4 years ago

0.6.53

4 years ago

0.6.52

4 years ago

0.6.5

4 years ago

0.6.41

4 years ago

0.5.13

4 years ago

0.5.11

4 years ago

0.0.25

4 years ago

0.5.12

4 years ago

0.0.30

4 years ago

0.0.31

4 years ago

0.0.32

4 years ago

0.0.34

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.3

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago