mirror of
https://github.com/Expand-sys/ccash-client-js
synced 2026-03-22 12:27:09 +11:00
47 lines
880 B
Markdown
47 lines
880 B
Markdown
# ccash-client-js
|
|
|
|
TypeScript/JavaScript client library for [CCash](https://github.com/EntireTwix/CCash) HTTP API.
|
|
|
|
## Installation
|
|
|
|
```
|
|
yarn add ccash-client-js
|
|
# or
|
|
npm install ccash-client-js
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
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'));
|
|
```
|
|
|
|
## Examples
|
|
|
|
- Web (react) example can be found in [`examples/web`](./examples/web)
|
|
|
|
- Server (node) example can be found in [`examples/node`](./examples/node)
|
|
|
|
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`
|
|
|
|
## TODO
|
|
|
|
- Add CI/CD
|
|
|
|
- Publish to npm
|