Skip to content

Commit c33154f

Browse files
committed
allow passing custom fireblocksApiBaseUrl, fireblocksAuthProvider and fireblocksSdkOptions
1 parent b415ca1 commit c33154f

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/fireblocks.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
import { type AssetTypeResponse, FireblocksSDK, type PublicKeyResponse, SigningAlgorithm } from 'fireblocks-sdk';
1+
import {
2+
type AssetTypeResponse,
3+
FireblocksSDK,
4+
type PublicKeyResponse,
5+
type SDKOptions,
6+
SigningAlgorithm,
7+
} from 'fireblocks-sdk';
28
import type { Client } from 'openapi-fetch';
39
import { FireblocksSigner } from './fireblocks_signer.js';
410
import type { components, paths } from './openapi/schema.js';
11+
import type { IAuthProvider } from 'fireblocks-sdk/dist/src/iauth-provider.js';
512

613
export type FireblocksIntegration = {
714
provider: 'fireblocks';
@@ -10,6 +17,9 @@ export type FireblocksIntegration = {
1017
vaultId: number;
1118
name?: string;
1219
fireblocksDestinationId?: string;
20+
fireblocksApiBaseUrl?: string;
21+
fireblocksAuthProvider?: IAuthProvider;
22+
fireblocksSdkOptions?: SDKOptions;
1323
};
1424

1525
export class FireblocksService {
@@ -24,7 +34,13 @@ export class FireblocksService {
2434
* @param integration
2535
*/
2636
getSdk(integration: FireblocksIntegration): FireblocksSDK {
27-
return new FireblocksSDK(integration.fireblocksSecretKey, integration.fireblocksApiKey);
37+
return new FireblocksSDK(
38+
integration.fireblocksSecretKey,
39+
integration.fireblocksApiKey,
40+
integration.fireblocksApiBaseUrl,
41+
integration.fireblocksAuthProvider,
42+
integration.fireblocksSdkOptions,
43+
);
2844
}
2945

3046
/**

0 commit comments

Comments
 (0)