https://github.com/circlefin/circle-nodejs-sdk
Node.js SDK for Circle API
https://github.com/circlefin/circle-nodejs-sdk
nodejs sdk
Last synced: over 1 year ago
JSON representation
Node.js SDK for Circle API
- Host: GitHub
- URL: https://github.com/circlefin/circle-nodejs-sdk
- Owner: circlefin
- License: apache-2.0
- Created: 2022-08-04T16:35:02.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-09T16:16:35.000Z (over 1 year ago)
- Last Synced: 2025-03-29T23:08:46.507Z (over 1 year ago)
- Topics: nodejs, sdk
- Language: TypeScript
- Homepage:
- Size: 1.47 MB
- Stars: 29
- Watchers: 7
- Forks: 19
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Circle APIs Node.js Library
[](https://www.npmjs.com/package/@circle-fin/circle-sdk)
[](https://www.npmjs.com/package/@circle-fin/circle-sdk)
The Circle Node library provides convenient access to the Circle API for
applications written in server-side JavaScript. For the API reference, see the [Circle API docs](https://developers.circle.com/reference).
## Requirements
Node 10 or higher.
## Installation
Install the package with:
```sh
npm install @circle-fin/circle-sdk --save
# or
yarn add @circle-fin/circle-sdk
```
## Usage
In order to make API calls, you will need an API key. Once you obtain one, you can use this SDK to make API calls as follows:
```Typescript
import { Circle, CircleEnvironments, SubscriptionRequest } from "@circle-fin/circle-sdk";
// Initialize API driver
const circle = new Circle(
'',
CircleEnvironments.sandbox // API base url
);
async function createSubscription() {
const subscribeReq: SubscriptionRequest = {
endpoint: "https://example.org/handler/for/notifications"
};
const subscribeResp = await circle.subscriptions.createSubscription(subscribeReq);
console.log(subscribeResp.data);
}
createSubscription();
```
## Development
Clone this repo and install dependencies using
```sh
yarn install
```
1. Run the codegen command to generate the source code for this SDK from the `sdk.json` OpenAPI specification file:
```sh
yarn gen-sdk
```
2. Run all tests:
```bash
yarn test
```
## Contributions
Please follow the [Conventional Commits][convencomms] format for all commits when creating a contributing pull request for this repo.
[convencomms]: https://www.conventionalcommits.org/en/v1.0.0/