Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
## The Official Javascript & Typescript SDK for Fireblocks API
[![npm version](https://badge.fury.io/js/fireblocks-sdk.svg)](https://badge.fury.io/js/fireblocks-sdk)

> **⚠️ This package is deprecated.**
>
> `fireblocks-sdk` is deprecated and reaches **end-of-life on November 1, 2026** — no further updates or fixes will be released after that date.
>
> Existing installs continue to work, and this package will never be unpublished.
>
> Migrate to [`@fireblocks/ts-sdk`](https://www.npmjs.com/package/@fireblocks/ts-sdk) — see the [SDK Migration Guide](https://developers.fireblocks.com/reference/sdk-migration-guide).
>
> To silence the startup warning, set `FIREBLOCKS_SDK_SUPPRESS_DEPRECATION_WARNING=1`.

> The current version of the SDK has changed the minimum supported Node.js version from v12 to v16.
>
> Versions older than v16 are no longer maintained by the Node.js community and are considered EOL.
Expand Down
10 changes: 10 additions & 0 deletions src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ export interface SDKOptions {

const DEFAULT_MAX_PAGE_SIZE = 100;

const DEPRECATION_WARNING = "fireblocks-sdk is deprecated and reaches end-of-life on November 1, 2026: no further updates or fixes after that date. " +
"Existing installs continue to work. Migrate to @fireblocks/ts-sdk: https://developers.fireblocks.com/reference/sdk-migration-guide " +
"(set FIREBLOCKS_SDK_SUPPRESS_DEPRECATION_WARNING=1 to silence this warning)";
let deprecationWarningShown = false;

export class FireblocksSDK {
private readonly authProvider: IAuthProvider;
private readonly apiBaseUrl: string;
Expand All @@ -243,6 +248,11 @@ export class FireblocksSDK {
* @param sdkOptions
*/
constructor(privateKey: string, apiKey: string, apiBaseUrl: string = "https://api.fireblocks.io", authProvider: IAuthProvider = undefined, sdkOptions?: SDKOptions) {
if (!deprecationWarningShown && !process.env.FIREBLOCKS_SDK_SUPPRESS_DEPRECATION_WARNING) {
deprecationWarningShown = true;
console.warn(DEPRECATION_WARNING);
}

this.authProvider = !!authProvider ? authProvider : new ApiTokenProvider(privateKey, apiKey);

if (!!apiBaseUrl) {
Expand Down
Loading