Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@circle-fin/circle-sdk

circlefin7.8kApache-2.02.9.0TypeScript support: included

Node.js SDK for Circle API

circle, circle.com, usdc, euroc, stablecoins

readme

Circle APIs Node.js Library

npm version npm downloads

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.

Requirements

Node 10 or higher.

Installation

Install the package with:

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:

import { Circle, CircleEnvironments, SubscriptionRequest } from "@circle-fin/circle-sdk";

// Initialize API driver
const circle = new Circle(
    '<your-api-key>',
    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

yarn install
  1. Run the codegen command to generate the source code for this SDK from the sdk.json OpenAPI specification file:

     yarn gen-sdk
  2. Run all tests:

     yarn test

Contributions

Please follow the Conventional Commits format for all commits when creating a contributing pull request for this repo.

changelog

Changelog

2.9.0 (2024-03-28)

New Features

2.8.0 (2024-03-11)

New Features

2.7.1 (2024-02-27)

Fixes

2.7.0 (2024-02-16)

New Features

2.6.2 (2023-11-20)

Fixes

2.6.1 (2023-10-16)

Fixes

2.6.0 (2023-10-10)

New Features

2.5.0 (2023-09-19)

New Features

2.4.0 (2023-09-14)

New Features

2.3.0 (2023-09-12)

New Features

2.2.0 (2023-09-05)

New Features

2.1.0 (2023-07-17)

New Features

2.0.0 (2023-04-25)

⚠ BREAKING CHANGES

  • sync SDK to OpenAPI doc v2.0.0 (#73)

New Features

1.7.0 (2023-04-05)

New Features

1.6.2 (2023-03-21)

Fixes

1.6.1 (2023-03-08)

Fixes

1.6.0 (2023-03-02)

New Features

1.5.0 (2023-02-14)

New Features

1.4.0 (2023-01-23)

New Features

1.3.0 (2022-12-05)

Fixes

New Features

1.2.0 (2022-11-28)

New Features

1.1.1 (2022-11-22)

Bug Fixes

1.1.0 (2022-11-21)

Features

  • regen code from OpenAPI doc v1.1.0 (#39) (9109d23)

1.0.2 (2022-10-21)

Bug Fixes

[1.0.1] (2022-09-27)

Bug Fixes

  • regen code openapi doc v1.0.3 (8c44418)