/** * Fireblocks API * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) * * The version of the OpenAPI document: 1.6.2 * Contact: developers@fireblocks.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { Fireblocks } from '../client/client'; import { ApiUserApi, ApprovalsBetaApi, AuditLogsApi, BlockchainLinkBetaApi, BlockchainsAssetsApi, CantonBetaApi, ComplianceApi, ComplianceOrchestratorBetaApi, ComplianceScreeningConfigurationApi, ConnectedAccountsApi, ConsoleUserApi, ContactsApi, ContractInteractionsApi, ContractTemplatesApi, ContractsApi, CosignersApi, DeployedContractsApi, EarnApi, EmbeddedWalletsApi, ExchangeAccountsApi, ExternalWalletsApi, FiatAccountsApi, GasStationsApi, GenieBetaApi, InternalWalletsApi, KeyLinkApi, KeysApi, NFTsApi, NetworkConnectionsApi, OTABetaApi, OffExchangesApi, OnchainDataApi, PaymentsPayoutApi, PolicyEditorV2Api, PolicyEditorV2BetaApi, ReportsBetaApi, ResetDeviceApi, SecurityPostureManagementApi, SmartTransferApi, StakingApi, TRLinkApi, TagsApi, TempoBetaApi, TokenizationApi, TradingApi, TransactionsApi, TravelRuleApi, UTXOManagementApi, UserGroupsBetaApi, UsersApi, VaultsApi, Web3ConnectionsApi, WebhooksApi, WebhooksV2Api, WhitelistIpAddressesApi, WorkspaceApi, WorkspaceStatusBetaApi } from '../api'; import { AxiosRequestConfig, AxiosResponse } from "axios"; import { convertToFireblocksResponse } from "../response/fireblocksResponse"; import { Configuration } from "../configuration"; let mockApiUserApi: jest.Mock; let mockApprovalsBetaApi: jest.Mock; let mockAuditLogsApi: jest.Mock; let mockBlockchainLinkBetaApi: jest.Mock; let mockBlockchainsAssetsApi: jest.Mock; let mockCantonBetaApi: jest.Mock; let mockComplianceApi: jest.Mock; let mockComplianceOrchestratorBetaApi: jest.Mock; let mockComplianceScreeningConfigurationApi: jest.Mock; let mockConnectedAccountsApi: jest.Mock; let mockConsoleUserApi: jest.Mock; let mockContactsApi: jest.Mock; let mockContractInteractionsApi: jest.Mock; let mockContractTemplatesApi: jest.Mock; let mockContractsApi: jest.Mock; let mockCosignersApi: jest.Mock; let mockDeployedContractsApi: jest.Mock; let mockEarnApi: jest.Mock; let mockEmbeddedWalletsApi: jest.Mock; let mockExchangeAccountsApi: jest.Mock; let mockExternalWalletsApi: jest.Mock; let mockFiatAccountsApi: jest.Mock; let mockGasStationsApi: jest.Mock; let mockGenieBetaApi: jest.Mock; let mockInternalWalletsApi: jest.Mock; let mockKeyLinkApi: jest.Mock; let mockKeysApi: jest.Mock; let mockNFTsApi: jest.Mock; let mockNetworkConnectionsApi: jest.Mock; let mockOTABetaApi: jest.Mock; let mockOffExchangesApi: jest.Mock; let mockOnchainDataApi: jest.Mock; let mockPaymentsPayoutApi: jest.Mock; let mockPolicyEditorV2Api: jest.Mock; let mockPolicyEditorV2BetaApi: jest.Mock; let mockReportsBetaApi: jest.Mock; let mockResetDeviceApi: jest.Mock; let mockSecurityPostureManagementApi: jest.Mock; let mockSmartTransferApi: jest.Mock; let mockStakingApi: jest.Mock; let mockTRLinkApi: jest.Mock; let mockTagsApi: jest.Mock; let mockTempoBetaApi: jest.Mock; let mockTokenizationApi: jest.Mock; let mockTradingApi: jest.Mock; let mockTransactionsApi: jest.Mock; let mockTravelRuleApi: jest.Mock; let mockUTXOManagementApi: jest.Mock; let mockUserGroupsBetaApi: jest.Mock; let mockUsersApi: jest.Mock; let mockVaultsApi: jest.Mock; let mockWeb3ConnectionsApi: jest.Mock; let mockWebhooksApi: jest.Mock; let mockWebhooksV2Api: jest.Mock; let mockWhitelistIpAddressesApi: jest.Mock; let mockWorkspaceApi: jest.Mock; let mockWorkspaceStatusBetaApi: jest.Mock; jest.mock('../api', () => { mockApiUserApi = jest.fn(); mockApprovalsBetaApi = jest.fn(); mockAuditLogsApi = jest.fn(); mockBlockchainLinkBetaApi = jest.fn(); mockBlockchainsAssetsApi = jest.fn(); mockCantonBetaApi = jest.fn(); mockComplianceApi = jest.fn(); mockComplianceOrchestratorBetaApi = jest.fn(); mockComplianceScreeningConfigurationApi = jest.fn(); mockConnectedAccountsApi = jest.fn(); mockConsoleUserApi = jest.fn(); mockContactsApi = jest.fn(); mockContractInteractionsApi = jest.fn(); mockContractTemplatesApi = jest.fn(); mockContractsApi = jest.fn(); mockCosignersApi = jest.fn(); mockDeployedContractsApi = jest.fn(); mockEarnApi = jest.fn(); mockEmbeddedWalletsApi = jest.fn(); mockExchangeAccountsApi = jest.fn(); mockExternalWalletsApi = jest.fn(); mockFiatAccountsApi = jest.fn(); mockGasStationsApi = jest.fn(); mockGenieBetaApi = jest.fn(); mockInternalWalletsApi = jest.fn(); mockKeyLinkApi = jest.fn(); mockKeysApi = jest.fn(); mockNFTsApi = jest.fn(); mockNetworkConnectionsApi = jest.fn(); mockOTABetaApi = jest.fn(); mockOffExchangesApi = jest.fn(); mockOnchainDataApi = jest.fn(); mockPaymentsPayoutApi = jest.fn(); mockPolicyEditorV2Api = jest.fn(); mockPolicyEditorV2BetaApi = jest.fn(); mockReportsBetaApi = jest.fn(); mockResetDeviceApi = jest.fn(); mockSecurityPostureManagementApi = jest.fn(); mockSmartTransferApi = jest.fn(); mockStakingApi = jest.fn(); mockTRLinkApi = jest.fn(); mockTagsApi = jest.fn(); mockTempoBetaApi = jest.fn(); mockTokenizationApi = jest.fn(); mockTradingApi = jest.fn(); mockTransactionsApi = jest.fn(); mockTravelRuleApi = jest.fn(); mockUTXOManagementApi = jest.fn(); mockUserGroupsBetaApi = jest.fn(); mockUsersApi = jest.fn(); mockVaultsApi = jest.fn(); mockWeb3ConnectionsApi = jest.fn(); mockWebhooksApi = jest.fn(); mockWebhooksV2Api = jest.fn(); mockWhitelistIpAddressesApi = jest.fn(); mockWorkspaceApi = jest.fn(); mockWorkspaceStatusBetaApi = jest.fn(); const actual = jest.requireActual('../api'); return { ...actual, ApiUserApi: mockApiUserApi, ApprovalsBetaApi: mockApprovalsBetaApi, AuditLogsApi: mockAuditLogsApi, BlockchainLinkBetaApi: mockBlockchainLinkBetaApi, BlockchainsAssetsApi: mockBlockchainsAssetsApi, CantonBetaApi: mockCantonBetaApi, ComplianceApi: mockComplianceApi, ComplianceOrchestratorBetaApi: mockComplianceOrchestratorBetaApi, ComplianceScreeningConfigurationApi: mockComplianceScreeningConfigurationApi, ConnectedAccountsApi: mockConnectedAccountsApi, ConsoleUserApi: mockConsoleUserApi, ContactsApi: mockContactsApi, ContractInteractionsApi: mockContractInteractionsApi, ContractTemplatesApi: mockContractTemplatesApi, ContractsApi: mockContractsApi, CosignersApi: mockCosignersApi, DeployedContractsApi: mockDeployedContractsApi, EarnApi: mockEarnApi, EmbeddedWalletsApi: mockEmbeddedWalletsApi, ExchangeAccountsApi: mockExchangeAccountsApi, ExternalWalletsApi: mockExternalWalletsApi, FiatAccountsApi: mockFiatAccountsApi, GasStationsApi: mockGasStationsApi, GenieBetaApi: mockGenieBetaApi, InternalWalletsApi: mockInternalWalletsApi, KeyLinkApi: mockKeyLinkApi, KeysApi: mockKeysApi, NFTsApi: mockNFTsApi, NetworkConnectionsApi: mockNetworkConnectionsApi, OTABetaApi: mockOTABetaApi, OffExchangesApi: mockOffExchangesApi, OnchainDataApi: mockOnchainDataApi, PaymentsPayoutApi: mockPaymentsPayoutApi, PolicyEditorV2Api: mockPolicyEditorV2Api, PolicyEditorV2BetaApi: mockPolicyEditorV2BetaApi, ReportsBetaApi: mockReportsBetaApi, ResetDeviceApi: mockResetDeviceApi, SecurityPostureManagementApi: mockSecurityPostureManagementApi, SmartTransferApi: mockSmartTransferApi, StakingApi: mockStakingApi, TRLinkApi: mockTRLinkApi, TagsApi: mockTagsApi, TempoBetaApi: mockTempoBetaApi, TokenizationApi: mockTokenizationApi, TradingApi: mockTradingApi, TransactionsApi: mockTransactionsApi, TravelRuleApi: mockTravelRuleApi, UTXOManagementApi: mockUTXOManagementApi, UserGroupsBetaApi: mockUserGroupsBetaApi, UsersApi: mockUsersApi, VaultsApi: mockVaultsApi, Web3ConnectionsApi: mockWeb3ConnectionsApi, WebhooksApi: mockWebhooksApi, WebhooksV2Api: mockWebhooksV2Api, WhitelistIpAddressesApi: mockWhitelistIpAddressesApi, WorkspaceApi: mockWorkspaceApi, WorkspaceStatusBetaApi: mockWorkspaceStatusBetaApi, }; }); const mockedResponse: AxiosResponse = { data: 'Mocked data', status: 200, statusText: 'OK', headers: {}, config: {} as AxiosRequestConfig as any, }; let mockAxios: any; jest.mock("../network/axiosManager", () => { mockAxios = { request: jest.fn((config: AxiosRequestConfig) => { return Promise.resolve(mockedResponse); }), // Mocking the request method to return the mocked response defaults: jest.fn() }; return { AxiosManager: jest.fn().mockReturnValue({ axios: mockAxios }) } }); describe("Fireblocks Client Tests", () => { let fireblocks: Fireblocks; beforeEach(() => { fireblocks = new Fireblocks({ apiKey: "my-api-key", basePath: "http://mock-server", secretKey: "secretKey" }); }); afterEach(() => { jest.clearAllMocks(); }); describe('Fireblocks client construction tests', () => { it('Should construct Fireblocks client', () => { expect(fireblocks).toBeInstanceOf(Fireblocks); }); it('Should throw an error when apiKey is not provided', () => { expect(() => { new Fireblocks({ basePath: "http://mock-server", secretKey: "secretKey" }); }).toThrowError("apiKey is required either in the configuration or as environment variable FIREBLOCKS_API_KEY"); }); it('Should throw an error when secretKey is not provided', () => { expect(() => { new Fireblocks({ apiKey: "my-api-key", basePath: "http://mock-server" }); }).toThrowError("secretKey is required either in the configuration or as environment variable FIREBLOCKS_SECRET_KEY"); }); it('Should throw an error when basePath is not provided', () => { expect(() => { new Fireblocks({ apiKey: "my-api-key", secretKey: "secretKey" }); }).toThrowError("basePath is required either in the configuration or as environment variable FIREBLOCKS_BASE_PATH"); }); }); describe('Api getters tests', () => { const expectedConfig = new Configuration({ basePath: "http://mock-server" }); it('Should return ApiUserApi', async () => { expect(fireblocks.apiUser).toBeInstanceOf(ApiUserApi); expect(mockApiUserApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ApprovalsBetaApi', async () => { expect(fireblocks.approvalsBeta).toBeInstanceOf(ApprovalsBetaApi); expect(mockApprovalsBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return AuditLogsApi', async () => { expect(fireblocks.auditLogs).toBeInstanceOf(AuditLogsApi); expect(mockAuditLogsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return BlockchainLinkBetaApi', async () => { expect(fireblocks.blockchainLinkBeta).toBeInstanceOf(BlockchainLinkBetaApi); expect(mockBlockchainLinkBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return BlockchainsAssetsApi', async () => { expect(fireblocks.blockchainsAssets).toBeInstanceOf(BlockchainsAssetsApi); expect(mockBlockchainsAssetsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return CantonBetaApi', async () => { expect(fireblocks.cantonBeta).toBeInstanceOf(CantonBetaApi); expect(mockCantonBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ComplianceApi', async () => { expect(fireblocks.compliance).toBeInstanceOf(ComplianceApi); expect(mockComplianceApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ComplianceOrchestratorBetaApi', async () => { expect(fireblocks.complianceOrchestratorBeta).toBeInstanceOf(ComplianceOrchestratorBetaApi); expect(mockComplianceOrchestratorBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ComplianceScreeningConfigurationApi', async () => { expect(fireblocks.complianceScreeningConfiguration).toBeInstanceOf(ComplianceScreeningConfigurationApi); expect(mockComplianceScreeningConfigurationApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ConnectedAccountsApi', async () => { expect(fireblocks.connectedAccounts).toBeInstanceOf(ConnectedAccountsApi); expect(mockConnectedAccountsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ConsoleUserApi', async () => { expect(fireblocks.consoleUser).toBeInstanceOf(ConsoleUserApi); expect(mockConsoleUserApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ContactsApi', async () => { expect(fireblocks.contacts).toBeInstanceOf(ContactsApi); expect(mockContactsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ContractInteractionsApi', async () => { expect(fireblocks.contractInteractions).toBeInstanceOf(ContractInteractionsApi); expect(mockContractInteractionsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ContractTemplatesApi', async () => { expect(fireblocks.contractTemplates).toBeInstanceOf(ContractTemplatesApi); expect(mockContractTemplatesApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ContractsApi', async () => { expect(fireblocks.contracts).toBeInstanceOf(ContractsApi); expect(mockContractsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return CosignersApi', async () => { expect(fireblocks.cosigners).toBeInstanceOf(CosignersApi); expect(mockCosignersApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return DeployedContractsApi', async () => { expect(fireblocks.deployedContracts).toBeInstanceOf(DeployedContractsApi); expect(mockDeployedContractsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return EarnApi', async () => { expect(fireblocks.earn).toBeInstanceOf(EarnApi); expect(mockEarnApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return EmbeddedWalletsApi', async () => { expect(fireblocks.embeddedWallets).toBeInstanceOf(EmbeddedWalletsApi); expect(mockEmbeddedWalletsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ExchangeAccountsApi', async () => { expect(fireblocks.exchangeAccounts).toBeInstanceOf(ExchangeAccountsApi); expect(mockExchangeAccountsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ExternalWalletsApi', async () => { expect(fireblocks.externalWallets).toBeInstanceOf(ExternalWalletsApi); expect(mockExternalWalletsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return FiatAccountsApi', async () => { expect(fireblocks.fiatAccounts).toBeInstanceOf(FiatAccountsApi); expect(mockFiatAccountsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return GasStationsApi', async () => { expect(fireblocks.gasStations).toBeInstanceOf(GasStationsApi); expect(mockGasStationsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return GenieBetaApi', async () => { expect(fireblocks.genieBeta).toBeInstanceOf(GenieBetaApi); expect(mockGenieBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return InternalWalletsApi', async () => { expect(fireblocks.internalWallets).toBeInstanceOf(InternalWalletsApi); expect(mockInternalWalletsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return KeyLinkApi', async () => { expect(fireblocks.keyLink).toBeInstanceOf(KeyLinkApi); expect(mockKeyLinkApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return KeysApi', async () => { expect(fireblocks.keys).toBeInstanceOf(KeysApi); expect(mockKeysApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return NFTsApi', async () => { expect(fireblocks.nfts).toBeInstanceOf(NFTsApi); expect(mockNFTsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return NetworkConnectionsApi', async () => { expect(fireblocks.networkConnections).toBeInstanceOf(NetworkConnectionsApi); expect(mockNetworkConnectionsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return OTABetaApi', async () => { expect(fireblocks.otaBeta).toBeInstanceOf(OTABetaApi); expect(mockOTABetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return OffExchangesApi', async () => { expect(fireblocks.offExchanges).toBeInstanceOf(OffExchangesApi); expect(mockOffExchangesApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return OnchainDataApi', async () => { expect(fireblocks.onchainData).toBeInstanceOf(OnchainDataApi); expect(mockOnchainDataApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return PaymentsPayoutApi', async () => { expect(fireblocks.paymentsPayout).toBeInstanceOf(PaymentsPayoutApi); expect(mockPaymentsPayoutApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return PolicyEditorV2Api', async () => { expect(fireblocks.policyEditorV2).toBeInstanceOf(PolicyEditorV2Api); expect(mockPolicyEditorV2Api).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return PolicyEditorV2BetaApi', async () => { expect(fireblocks.policyEditorV2Beta).toBeInstanceOf(PolicyEditorV2BetaApi); expect(mockPolicyEditorV2BetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ReportsBetaApi', async () => { expect(fireblocks.reportsBeta).toBeInstanceOf(ReportsBetaApi); expect(mockReportsBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return ResetDeviceApi', async () => { expect(fireblocks.resetDevice).toBeInstanceOf(ResetDeviceApi); expect(mockResetDeviceApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return SecurityPostureManagementApi', async () => { expect(fireblocks.securityPostureManagement).toBeInstanceOf(SecurityPostureManagementApi); expect(mockSecurityPostureManagementApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return SmartTransferApi', async () => { expect(fireblocks.smartTransfer).toBeInstanceOf(SmartTransferApi); expect(mockSmartTransferApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return StakingApi', async () => { expect(fireblocks.staking).toBeInstanceOf(StakingApi); expect(mockStakingApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TRLinkApi', async () => { expect(fireblocks.trLink).toBeInstanceOf(TRLinkApi); expect(mockTRLinkApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TagsApi', async () => { expect(fireblocks.tags).toBeInstanceOf(TagsApi); expect(mockTagsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TempoBetaApi', async () => { expect(fireblocks.tempoBeta).toBeInstanceOf(TempoBetaApi); expect(mockTempoBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TokenizationApi', async () => { expect(fireblocks.tokenization).toBeInstanceOf(TokenizationApi); expect(mockTokenizationApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TradingApi', async () => { expect(fireblocks.trading).toBeInstanceOf(TradingApi); expect(mockTradingApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TransactionsApi', async () => { expect(fireblocks.transactions).toBeInstanceOf(TransactionsApi); expect(mockTransactionsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return TravelRuleApi', async () => { expect(fireblocks.travelRule).toBeInstanceOf(TravelRuleApi); expect(mockTravelRuleApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return UTXOManagementApi', async () => { expect(fireblocks.utxoManagement).toBeInstanceOf(UTXOManagementApi); expect(mockUTXOManagementApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return UserGroupsBetaApi', async () => { expect(fireblocks.userGroupsBeta).toBeInstanceOf(UserGroupsBetaApi); expect(mockUserGroupsBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return UsersApi', async () => { expect(fireblocks.users).toBeInstanceOf(UsersApi); expect(mockUsersApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return VaultsApi', async () => { expect(fireblocks.vaults).toBeInstanceOf(VaultsApi); expect(mockVaultsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return Web3ConnectionsApi', async () => { expect(fireblocks.web3Connections).toBeInstanceOf(Web3ConnectionsApi); expect(mockWeb3ConnectionsApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return WebhooksApi', async () => { expect(fireblocks.webhooks).toBeInstanceOf(WebhooksApi); expect(mockWebhooksApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return WebhooksV2Api', async () => { expect(fireblocks.webhooksV2).toBeInstanceOf(WebhooksV2Api); expect(mockWebhooksV2Api).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return WhitelistIpAddressesApi', async () => { expect(fireblocks.whitelistIpAddresses).toBeInstanceOf(WhitelistIpAddressesApi); expect(mockWhitelistIpAddressesApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return WorkspaceApi', async () => { expect(fireblocks.workspace).toBeInstanceOf(WorkspaceApi); expect(mockWorkspaceApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); it('Should return WorkspaceStatusBetaApi', async () => { expect(fireblocks.workspaceStatusBeta).toBeInstanceOf(WorkspaceStatusBetaApi); expect(mockWorkspaceStatusBetaApi).toHaveBeenCalledWith(expectedConfig, undefined, mockAxios); }); }); });