Releases: bitpay/nodejs-bitpay-client
6.2.2
Overview
This is a patch release that updates dependency versions.
What's Changed
- Updated elliptic to 6.6.0
- Updated @types/node to 22.7.6
- Updated @typescript-eslint/eslint-plugin to 8.10.0
- Updated @typescript-eslint/parser to 8.10.0
- Updated eslint to 9.12.0
- Bumped version to 6.2.2
Full Changelog: 6.2.1...6.2.2
6.2.1
Overview
This is a patch release that bumps dependency versions.
What's Changed
- Updated bs58 to 6.0.0
- Updated @types/jest to 29.5.13
- Updated @types/node to 22.5.5
- Updated @typescript-eslint/eslint-plugin to 8.5.0
- Updated @typescript-eslint/parser to 8.5.0
- Updated eslint to 9.10.0
- Updated husky to 9.1.6
- Updated msw to 2.4.7
- Updated npm to 10.8.3
- Updated ts-jest to 29.2.5
- Updated typescript to 5.5.4
Full Changelog: 6.2.0...6.2.1
6.2.0
Overview
This is a minor update that adds support for a new optional header called X-BitPay-Platform-Info
that will be used in BitPay plugins to show both the SDK version and plugin version.
What's Changed
- Add X-BitPay-Platform-Info header
- Bump version to 6.2.0
Full Changelog: 6.1.1...6.2.0
6.1.1
Overview
This is a patch update to update the elliptic
library.
What's Changed
- Update elliptic to 6.5.7
Full Changelog: 6.1.0...6.1.1
6.1.0
Overview
This is a minor version update that adds official support for Node.js 22. We've updated the package.json to reflect this as well as our test matrix. There are also additional minor updates noted below as part of the release.
What's Changed
- Add linter / formatter for examples
- Add Node.js 22 support
- Update GitHub Actions
Full Changelog: 6.0.2...6.1.0
6.0.2
Overview
This is a patch release that updates dependencies.
What's Changed
- @types/bs58 to 4.0.4
- @types/elliptic to 6.4.18
- @types/jest to 29.5.12
- @types/lodash to 4.17.6
- @types/node to 20.14.10
- @typescript-eslint/eslint-plugin to 7.16.0
- @typescript-eslint/parser to 7.16.0
- eslint to 8.56.0
- eslint-config-prettier to 9.1.0
- eslint-plugin-prettier to 5.1.3
- msw to 2.3.1
- rimraf to 5.0.9
- ts-jest to 29.2.1
Full Changelog: 6.0.1...6.0.2
6.0.1
Overview
This is a patch release that updates dependencies.
What's Changed
- Update elliptic to 6.5.5
- Update lodash to 4.17.21
- Update zod to 3.23.8
- Update husky to 9.0.11
- Update npm to 10.8.1
- Update prettier to 3.3.2
- Update rimraf to 5.0.7
- Update ts-jest to 29.1.5
Full Changelog: 6.0.0...6.0.1
6.0.0
Overview
We are releasing the next major version of the Node.js SDK - version 6.0.0. There are some minor incompatibilities due to the updating and correction of some field types, but the overall implementation is similar to 5.0.0. Please see our documentation for reference.
Highlights
Better Exceptions in the SDK
We are now passing through error messaging from the API rather than having custom messaging in the SDK itself. This will make it easier to diagnose issues for anyone implementing the SDK. This also simplifies the exception handling implementation while making it more extensible.
Node.js 20 and 21 support
The SDK now officially supports Node.js 20 and 21. While it worked in the past, tests are now run against 18.x, 19.x, 20.x, and 21.x versions of Node.js in GitHub Actions. We will also be adding Node.js 22 support in the coming weeks.
Update Fields
There were a handful of types that were not matching the API, which could throw errors since we use Zod for runtime validation. These have been addressed in version 6.0.0.
We've also identified a handful of missing fields from the API and added them to the SDK.
- Sometimes, the API responds with an array of errors, so we've added support for that
- Fields that are optional have been updated in their type definitions
- Invoice refundAddresses have been added
- Invoice Transaction exRates and outputIndex have been added
- Payout Transactionn confirmations have been added
- Invoice Buyer Fields have been typed
- Invoice Webhooks and associated fields have been typed
- Payout Webhooks and associated fields have been typed
- Refund Webhooks and associated fields have been typed
- Subscriptions have been removed
- Wallet has been typed
Code Examples
While we feel the development documentation is helpful at a high-level, we've added code examples to the repo so that they're quickly available to anyone who implements or works on the SDK.
Full Changelog: 5.0.2...6.0.0
5.0.2
What's Changed
- SP-933: Update satoshisPerByte to number and bump version
New Contributors
- @p-maguire made their first contribution in #106
Full Changelog: 5.0.1...5.0.2
5.0.1
Overview
We are releasing the next major version of the Node.js SDK - version 5.0.0.
Note: Version 5.x of the SDK has aspects that are not backward compatible with 4.x. We are detailing the differences in our documentation.
Highlights
Client Class Breakdown
The Client class was very large and difficult to test. To make this easier to work on and more testable, we have:
- Implemented a facade for the client
- Created a class to handle generic REST GET, PUT, POST, and DELETE
- Created separate classes for each resource, providing a better representation of the API
- Added unit and integration tests for new client classes
Implement POS Facade
Prior to version 5.0.0, we had two separate SDKs, the "Light" SDK, which could only use the POS facade, and the "Full" SDK, which used the merchant and payout facades. This created the need for additional effort both in maintaining and implementing the SDK.
As of version 5.0.0, the SDK supports both methods. You can use just the POS facade, which is limited in feature set but does not require signed requests (no private key to manage) or with the merchant/payout facade, which has more functionality but is more complex to implement.
This provides an easier upgrade path and reduces the duplicate work of maintaining two separate SDKs regarding dependency upgrades, bug fixes, etc.
Unit Test Suite
A new unit test suite has been added to the codebase that runs against all currently supported versions of Node.js. The tests run in GitHub Actions for non-master commits as well as pull requests.
Functional Test Suite
A functional test suite has been added to the codebase that will run against the test API. Due to there being so many outside variables from external resources, this does not run in the GitHub Actions pipeline.
Linter
We are using Prettier in GitHub Actions for non-master commits as well as pull requests.
Other Notes
- Implemented Husky to run Prettier locally via Git commit hook
- Moved documentation to Readme.com
- Replaced TSLint with ESLint
- Added an
npm run setup
script to run the setup script easily - Added JSDoc
- Added Payout Group functionality
Bug Fixes
- Fixed an issue when calling GetLedger client method
Full Changelog: 4.0.0...5.0.0