ccashfrontend/views/node_modules/ccash-client-js
2021-06-18 09:20:09 +10:00
..
dist half new patch 2021-06-18 09:20:09 +10:00
node_modules half new patch 2021-06-18 09:20:09 +10:00
package.json half new patch 2021-06-18 09:20:09 +10:00
README.md half new patch 2021-06-18 09:20:09 +10:00

ccash-client-js

TypeScript/JavaScript client library for CCash HTTP API.

Installation

yarn add ccash-client-js
# or
npm install --save ccash-client-js

Usage

import { CCashClient } from 'ccash-client-js';

process.env.CCASH_API_BASE_URL = 'https://your.ccash.api';

const client = new CCashClient();

console.log(await client.balance('blinkblinko'));

Set environment variable DEBUG=CCashClient to log debug messages.

Examples

Run yarn start to run the examples from their corresponding directory.

Development

  • Build for production: yarn build

  • Build and watch for development: yarn dev

  • Format source code w/ prettier: yarn format

  • Test source units w/ jest: yarn test