GitXplorerGitXplorer
A

btcpay-greenfield-node-client

public
4 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
77aec2d5792b95dd6911e97daa0ec1e42824588e

update README

AAryanJ-NYC committed 2 years ago
Unverified
57b20f441c27dd2e2ba3916a53b2511474938724

chore: sync with btcpayserver 1.7.0

AAryanJ-NYC committed 4 years ago
Unverified
3151c2d8b326e69020e93d7014837571242d35dd

ci: remove unused github workflow

AAryanJ-NYC committed 4 years ago
Unverified
6c84a19fafa710fa560c5741920d374411d066b7

test: remove stock test

AAryanJ-NYC committed 4 years ago
Unverified
cc41aba0298be9996b319213f7d137af9d2f1efe

chore: add keywords and repository fields to package.json

AAryanJ-NYC committed 4 years ago
Unverified
e2a650fb88216df974cb6fe92ba366018403d0a7

feat: initial commit

AAryanJ-NYC committed 4 years ago

README

The README file for this repository.

BTCPay Greenfield Node Client

Installation

yarn add btcpay-greenfield-node-client

or

npm install btcpay-greenfield-node-client

Configuration

btcpay-greenfield-node-client uses Btcpay Greenfield API keys. To create an API Key in BTCPay:

  1. Click on the "Account" icon on the bottom-left corner of BTCPay.
  2. Click "Manage Account"
  3. Click into the "API Keys" tab.
  4. Go through the "Generate Key" process.

Set Base URL

import { OpenAPI } from 'btcpay-greenfield-node-client';

OpenAPI.BASE = 'https://your-btcpayserver-url.com';

Authorization

API Key

import { OpenAPI } from 'btcpay-greenfield-node-client';

OpenAPI.TOKEN = process.env.BTCPAY_API_KEY;
// or as a function
OpenAPI.TOKEN = () => {
  return 'SOME_TOKEN';
};

Username & Password

import { OpenAPI } from 'btcpay-greenfield-node-client';

OpenAPI.USERNAME = process.env.BTCPAY_USERNAME;
OpenAPI.PASSWORD = process.env.BTCPAY_PASSWORD;
// or as function
OpenAPI.USERNAME = () => {
  return 'USERNAME';
};
OpenAPI.PASSWORD = () => {
  return 'PASSWORD';
};

Usage

Development

  1. Run yarn generate
  2. Commit
  3. Run yarn build
  4. Publish to npm

Acknowledgement

This library leverages the work done by @ferdikoomen in openapi-typescript-codegen.