btcpay-greenfield-node-client
v1.7.0
Published
## Installation
Downloads
340
Maintainers
Readme
BTCPay Greenfield Node Client
Installation
yarn add btcpay-greenfield-node-client
or
npm install btcpay-greenfield-node-client
Configuration
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
- Run
yarn generate
- Commit
- Run
yarn build
- Publish to
npm
Acknowledgement
This library leverages the work done by @ferdikoomen in openapi-typescript-codegen.