/* tslint:disable */ /* eslint-disable */ /** * 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 type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; import { convertToFireblocksResponse } from "../response/fireblocksResponse"; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; import { assertParamExistsAndNotEmpty } from '../utils/validation_utils'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import { ActivateBlockchainResponse } from '../models'; // @ts-ignore import { BlockchainDeclaredProperties } from '../models'; // @ts-ignore import { BlockchainEnvironment } from '../models'; // @ts-ignore import { BlockchainSortField } from '../models'; // @ts-ignore import { BlockchainStateFilter } from '../models'; // @ts-ignore import { CreateBlockchainRequest } from '../models'; // @ts-ignore import { CreateBlockchainResponse } from '../models'; // @ts-ignore import { ErrorSchema } from '../models'; // @ts-ignore import { GetBillingInfoResponse } from '../models'; // @ts-ignore import { GetBlockchainByIdResponse } from '../models'; // @ts-ignore import { GetTestWalletAddressResponse } from '../models'; // @ts-ignore import { ListBlockchainsResponse2 } from '../models'; // @ts-ignore import { TriggerValidationFlowResponse } from '../models'; // @ts-ignore import { UpdateBlockchainResponse } from '../models'; /** * BlockchainLinkBetaApi - axios parameter creator * @export */ export const BlockchainLinkBetaApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Starts the asynchronous activation workflow for the blockchain identified by its ID, transitioning it towards the ACTIVATED state. * @summary Activate a blockchain (triggers activation workflow) * @param {string} blockchainId Required blockchain ID to activate * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ activateBlockchainLinkChain: async (blockchainId: string, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('activateBlockchainLinkChain', 'blockchainId', blockchainId) const localVarPath = `/blockchain_link/blockchains/{blockchainId}/activate` .replace(`{${"blockchainId"}}`, encodeURIComponent(String(blockchainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'activateBlockchainLinkChain'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Registers a new tenant-managed blockchain from the supplied declared properties. The blockchain starts in the CREATED state and must be activated separately before it can be used. * @summary Create a new blockchain * @param {CreateBlockchainRequest} createBlockchainRequest * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlockchainLinkChain: async (createBlockchainRequest: CreateBlockchainRequest, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExists('createBlockchainLinkChain', 'createBlockchainRequest', createBlockchainRequest) const localVarPath = `/blockchain_link/blockchains`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'createBlockchainLinkChain'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createBlockchainRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Permanently removes a blockchain identified by its ID. The blockchain must not be in an active lifecycle state. * @summary Delete a blockchain * @param {string} blockchainId tenant_id is extracted from JWT token context * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBlockchainLinkChain: async (blockchainId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('deleteBlockchainLinkChain', 'blockchainId', blockchainId) const localVarPath = `/blockchain_link/blockchains/{blockchainId}` .replace(`{${"blockchainId"}}`, encodeURIComponent(String(blockchainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'deleteBlockchainLinkChain'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the tenant\'s blockchain activation limit and current usage. tenant_id is derived from the JWT token context. * @summary Get tenant billing info * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkBillingInfo: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/blockchain_link/blockchains/billing_info`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getBlockchainLinkBillingInfo'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a single blockchain owned by the tenant, identified by its ID. * @summary Get a blockchain by ID * @param {string} blockchainId ID of the blockchain to retrieve (supplied as a path parameter). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkChain: async (blockchainId: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('getBlockchainLinkChain', 'blockchainId', blockchainId) const localVarPath = `/blockchain_link/blockchains/{blockchainId}` .replace(`{${"blockchainId"}}`, encodeURIComponent(String(blockchainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getBlockchainLinkChain'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the Ethereum address derived from the configured external wallet private key, used by the UI for test transfers. tenant_id is derived from the JWT token context. * @summary Get the test wallet address * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkTestWalletAddress: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/blockchain_link/blockchains/test_wallet_address`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'getBlockchainLinkTestWalletAddress'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns the tenant\'s blockchains, paginated and filterable by state, network environment, and free-text search, with configurable sorting. * @summary List blockchains with pagination and filtering * @param {string} [pageCursor] tenant_id is extracted from JWT token context. Opaque cursor for the requested page. Currently encodes the 1-based page number as a decimal string (\"1\", \"2\", ...); treat as opaque on the client. Absent = first page. * @param {number} [pageSize] Maximum number of items per page. Default 20, clamped to [1, 1000]. * @param {string} [search] Free-text search across chain and symbol name. * @param {Array} [status] Include filter (repeated query params). * @param {BlockchainEnvironment} [blockchainEnv] Filter by network. * @param {BlockchainSortField} [sortBy] Sort field. Default: createdAt. * @param {ListBlockchainLinkChainsOrderEnum} [order] Sort order. Default: DESC. * @param {Array} [statusExclude] Exclude filter (repeated query params). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBlockchainLinkChains: async (pageCursor?: string, pageSize?: number, search?: string, status?: Array, blockchainEnv?: BlockchainEnvironment, sortBy?: BlockchainSortField, order?: ListBlockchainLinkChainsOrderEnum, statusExclude?: Array, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/blockchain_link/blockchains`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'listBlockchainLinkChains'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (pageCursor !== undefined) { localVarQueryParameter['pageCursor'] = pageCursor; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (status) { localVarQueryParameter['status'] = status; } if (blockchainEnv !== undefined) { localVarQueryParameter['blockchainEnv'] = blockchainEnv; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (order !== undefined) { localVarQueryParameter['order'] = order; } if (statusExclude) { localVarQueryParameter['statusExclude'] = statusExclude; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Starts the asynchronous validation workflow for a blockchain and its associated validation session. * @summary Trigger validation workflow * @param {string} blockchainId ID of the blockchain to validate. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerBlockchainLinkValidation: async (blockchainId: string, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExistsAndNotEmpty('triggerBlockchainLinkValidation', 'blockchainId', blockchainId) const localVarPath = `/blockchain_link/blockchains/{blockchainId}/validate` .replace(`{${"blockchainId"}}`, encodeURIComponent(String(blockchainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'triggerBlockchainLinkValidation'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the declared properties of an existing blockchain identified by its ID. Only the fields supplied in the request are modified. * @summary Update a blockchain * @param {BlockchainDeclaredProperties} blockchainDeclaredProperties * @param {string} blockchainId ID of the blockchain to update (supplied as a path parameter). * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBlockchainLinkChain: async (blockchainDeclaredProperties: BlockchainDeclaredProperties, blockchainId: string, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise => { assertParamExists('updateBlockchainLinkChain', 'blockchainDeclaredProperties', blockchainDeclaredProperties) assertParamExistsAndNotEmpty('updateBlockchainLinkChain', 'blockchainId', blockchainId) const localVarPath = `/blockchain_link/blockchains/{blockchainId}` .replace(`{${"blockchainId"}}`, encodeURIComponent(String(blockchainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; // Stamped onto the request config (not the headers, so it never goes on // the wire) so the response interceptor can name the operation in the // lifecycle warning. Key must match OPERATION_ID_CONFIG_KEY in utils/lifecycleWarning. (localVarRequestOptions as any).fireblocksOperationId = 'updateBlockchainLinkChain'; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(blockchainDeclaredProperties, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * BlockchainLinkBetaApi - functional programming interface * @export */ export const BlockchainLinkBetaApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BlockchainLinkBetaApiAxiosParamCreator(configuration) return { /** * Starts the asynchronous activation workflow for the blockchain identified by its ID, transitioning it towards the ACTIVATED state. * @summary Activate a blockchain (triggers activation workflow) * @param {string} blockchainId Required blockchain ID to activate * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async activateBlockchainLinkChain(blockchainId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.activateBlockchainLinkChain(blockchainId, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.activateBlockchainLinkChain']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Registers a new tenant-managed blockchain from the supplied declared properties. The blockchain starts in the CREATED state and must be activated separately before it can be used. * @summary Create a new blockchain * @param {CreateBlockchainRequest} createBlockchainRequest * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBlockchainLinkChain(createBlockchainRequest: CreateBlockchainRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBlockchainLinkChain(createBlockchainRequest, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.createBlockchainLinkChain']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Permanently removes a blockchain identified by its ID. The blockchain must not be in an active lifecycle state. * @summary Delete a blockchain * @param {string} blockchainId tenant_id is extracted from JWT token context * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteBlockchainLinkChain(blockchainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBlockchainLinkChain(blockchainId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.deleteBlockchainLinkChain']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns the tenant\'s blockchain activation limit and current usage. tenant_id is derived from the JWT token context. * @summary Get tenant billing info * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlockchainLinkBillingInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockchainLinkBillingInfo(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.getBlockchainLinkBillingInfo']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns a single blockchain owned by the tenant, identified by its ID. * @summary Get a blockchain by ID * @param {string} blockchainId ID of the blockchain to retrieve (supplied as a path parameter). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlockchainLinkChain(blockchainId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockchainLinkChain(blockchainId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.getBlockchainLinkChain']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns the Ethereum address derived from the configured external wallet private key, used by the UI for test transfers. tenant_id is derived from the JWT token context. * @summary Get the test wallet address * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlockchainLinkTestWalletAddress(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockchainLinkTestWalletAddress(options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.getBlockchainLinkTestWalletAddress']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Returns the tenant\'s blockchains, paginated and filterable by state, network environment, and free-text search, with configurable sorting. * @summary List blockchains with pagination and filtering * @param {string} [pageCursor] tenant_id is extracted from JWT token context. Opaque cursor for the requested page. Currently encodes the 1-based page number as a decimal string (\"1\", \"2\", ...); treat as opaque on the client. Absent = first page. * @param {number} [pageSize] Maximum number of items per page. Default 20, clamped to [1, 1000]. * @param {string} [search] Free-text search across chain and symbol name. * @param {Array} [status] Include filter (repeated query params). * @param {BlockchainEnvironment} [blockchainEnv] Filter by network. * @param {BlockchainSortField} [sortBy] Sort field. Default: createdAt. * @param {ListBlockchainLinkChainsOrderEnum} [order] Sort order. Default: DESC. * @param {Array} [statusExclude] Exclude filter (repeated query params). * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listBlockchainLinkChains(pageCursor?: string, pageSize?: number, search?: string, status?: Array, blockchainEnv?: BlockchainEnvironment, sortBy?: BlockchainSortField, order?: ListBlockchainLinkChainsOrderEnum, statusExclude?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listBlockchainLinkChains(pageCursor, pageSize, search, status, blockchainEnv, sortBy, order, statusExclude, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.listBlockchainLinkChains']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Starts the asynchronous validation workflow for a blockchain and its associated validation session. * @summary Trigger validation workflow * @param {string} blockchainId ID of the blockchain to validate. * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerBlockchainLinkValidation(blockchainId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerBlockchainLinkValidation(blockchainId, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.triggerBlockchainLinkValidation']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, /** * Updates the declared properties of an existing blockchain identified by its ID. Only the fields supplied in the request are modified. * @summary Update a blockchain * @param {BlockchainDeclaredProperties} blockchainDeclaredProperties * @param {string} blockchainId ID of the blockchain to update (supplied as a path parameter). * @param {string} [idempotencyKey] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateBlockchainLinkChain(blockchainDeclaredProperties: BlockchainDeclaredProperties, blockchainId: string, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateBlockchainLinkChain(blockchainDeclaredProperties, blockchainId, idempotencyKey, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['BlockchainLinkBetaApi.updateBlockchainLinkChain']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, } }; /** * BlockchainLinkBetaApi - factory interface * @export */ export const BlockchainLinkBetaApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BlockchainLinkBetaApiFp(configuration) return { /** * Starts the asynchronous activation workflow for the blockchain identified by its ID, transitioning it towards the ACTIVATED state. * @summary Activate a blockchain (triggers activation workflow) * @param {BlockchainLinkBetaApiActivateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ activateBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiActivateBlockchainLinkChainRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.activateBlockchainLinkChain(requestParameters.blockchainId, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** * Registers a new tenant-managed blockchain from the supplied declared properties. The blockchain starts in the CREATED state and must be activated separately before it can be used. * @summary Create a new blockchain * @param {BlockchainLinkBetaApiCreateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiCreateBlockchainLinkChainRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBlockchainLinkChain(requestParameters.createBlockchainRequest, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** * Permanently removes a blockchain identified by its ID. The blockchain must not be in an active lifecycle state. * @summary Delete a blockchain * @param {BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteBlockchainLinkChain(requestParameters.blockchainId, options).then((request) => request(axios, basePath)); }, /** * Returns the tenant\'s blockchain activation limit and current usage. tenant_id is derived from the JWT token context. * @summary Get tenant billing info * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkBillingInfo(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlockchainLinkBillingInfo(options).then((request) => request(axios, basePath)); }, /** * Returns a single blockchain owned by the tenant, identified by its ID. * @summary Get a blockchain by ID * @param {BlockchainLinkBetaApiGetBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiGetBlockchainLinkChainRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlockchainLinkChain(requestParameters.blockchainId, options).then((request) => request(axios, basePath)); }, /** * Returns the Ethereum address derived from the configured external wallet private key, used by the UI for test transfers. tenant_id is derived from the JWT token context. * @summary Get the test wallet address * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockchainLinkTestWalletAddress(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlockchainLinkTestWalletAddress(options).then((request) => request(axios, basePath)); }, /** * Returns the tenant\'s blockchains, paginated and filterable by state, network environment, and free-text search, with configurable sorting. * @summary List blockchains with pagination and filtering * @param {BlockchainLinkBetaApiListBlockchainLinkChainsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listBlockchainLinkChains(requestParameters: BlockchainLinkBetaApiListBlockchainLinkChainsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listBlockchainLinkChains(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.search, requestParameters.status, requestParameters.blockchainEnv, requestParameters.sortBy, requestParameters.order, requestParameters.statusExclude, options).then((request) => request(axios, basePath)); }, /** * Starts the asynchronous validation workflow for a blockchain and its associated validation session. * @summary Trigger validation workflow * @param {BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerBlockchainLinkValidation(requestParameters: BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.triggerBlockchainLinkValidation(requestParameters.blockchainId, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, /** * Updates the declared properties of an existing blockchain identified by its ID. Only the fields supplied in the request are modified. * @summary Update a blockchain * @param {BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateBlockchainLinkChain(requestParameters.blockchainDeclaredProperties, requestParameters.blockchainId, requestParameters.idempotencyKey, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for activateBlockchainLinkChain operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiActivateBlockchainLinkChainRequest */ export interface BlockchainLinkBetaApiActivateBlockchainLinkChainRequest { /** * Required blockchain ID to activate * @type {string} * @memberof BlockchainLinkBetaApiActivateBlockchainLinkChain */ readonly blockchainId: string /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof BlockchainLinkBetaApiActivateBlockchainLinkChain */ readonly idempotencyKey?: string } /** * Request parameters for createBlockchainLinkChain operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiCreateBlockchainLinkChainRequest */ export interface BlockchainLinkBetaApiCreateBlockchainLinkChainRequest { /** * * @type {CreateBlockchainRequest} * @memberof BlockchainLinkBetaApiCreateBlockchainLinkChain */ readonly createBlockchainRequest: CreateBlockchainRequest /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof BlockchainLinkBetaApiCreateBlockchainLinkChain */ readonly idempotencyKey?: string } /** * Request parameters for deleteBlockchainLinkChain operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest */ export interface BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest { /** * tenant_id is extracted from JWT token context * @type {string} * @memberof BlockchainLinkBetaApiDeleteBlockchainLinkChain */ readonly blockchainId: string } /** * Request parameters for getBlockchainLinkChain operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiGetBlockchainLinkChainRequest */ export interface BlockchainLinkBetaApiGetBlockchainLinkChainRequest { /** * ID of the blockchain to retrieve (supplied as a path parameter). * @type {string} * @memberof BlockchainLinkBetaApiGetBlockchainLinkChain */ readonly blockchainId: string } /** * Request parameters for listBlockchainLinkChains operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiListBlockchainLinkChainsRequest */ export interface BlockchainLinkBetaApiListBlockchainLinkChainsRequest { /** * tenant_id is extracted from JWT token context. Opaque cursor for the requested page. Currently encodes the 1-based page number as a decimal string (\"1\", \"2\", ...); treat as opaque on the client. Absent = first page. * @type {string} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly pageCursor?: string /** * Maximum number of items per page. Default 20, clamped to [1, 1000]. * @type {number} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly pageSize?: number /** * Free-text search across chain and symbol name. * @type {string} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly search?: string /** * Include filter (repeated query params). * @type {Array} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly status?: Array /** * Filter by network. * @type {BlockchainEnvironment} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly blockchainEnv?: BlockchainEnvironment /** * Sort field. Default: createdAt. * @type {BlockchainSortField} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly sortBy?: BlockchainSortField /** * Sort order. Default: DESC. * @type {'ASC' | 'DESC'} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly order?: ListBlockchainLinkChainsOrderEnum /** * Exclude filter (repeated query params). * @type {Array} * @memberof BlockchainLinkBetaApiListBlockchainLinkChains */ readonly statusExclude?: Array } /** * Request parameters for triggerBlockchainLinkValidation operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest */ export interface BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest { /** * ID of the blockchain to validate. * @type {string} * @memberof BlockchainLinkBetaApiTriggerBlockchainLinkValidation */ readonly blockchainId: string /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof BlockchainLinkBetaApiTriggerBlockchainLinkValidation */ readonly idempotencyKey?: string } /** * Request parameters for updateBlockchainLinkChain operation in BlockchainLinkBetaApi. * @export * @interface BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest */ export interface BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest { /** * * @type {BlockchainDeclaredProperties} * @memberof BlockchainLinkBetaApiUpdateBlockchainLinkChain */ readonly blockchainDeclaredProperties: BlockchainDeclaredProperties /** * ID of the blockchain to update (supplied as a path parameter). * @type {string} * @memberof BlockchainLinkBetaApiUpdateBlockchainLinkChain */ readonly blockchainId: string /** * A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. * @type {string} * @memberof BlockchainLinkBetaApiUpdateBlockchainLinkChain */ readonly idempotencyKey?: string } /** * BlockchainLinkBetaApi - object-oriented interface * @export * @class BlockchainLinkBetaApi * @extends {BaseAPI} */ export class BlockchainLinkBetaApi extends BaseAPI { /** * Starts the asynchronous activation workflow for the blockchain identified by its ID, transitioning it towards the ACTIVATED state. * @summary Activate a blockchain (triggers activation workflow) * @param {BlockchainLinkBetaApiActivateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public activateBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiActivateBlockchainLinkChainRequest) { return BlockchainLinkBetaApiFp(this.configuration).activateBlockchainLinkChain(requestParameters.blockchainId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Registers a new tenant-managed blockchain from the supplied declared properties. The blockchain starts in the CREATED state and must be activated separately before it can be used. * @summary Create a new blockchain * @param {BlockchainLinkBetaApiCreateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public createBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiCreateBlockchainLinkChainRequest) { return BlockchainLinkBetaApiFp(this.configuration).createBlockchainLinkChain(requestParameters.createBlockchainRequest, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Permanently removes a blockchain identified by its ID. The blockchain must not be in an active lifecycle state. * @summary Delete a blockchain * @param {BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public deleteBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiDeleteBlockchainLinkChainRequest) { return BlockchainLinkBetaApiFp(this.configuration).deleteBlockchainLinkChain(requestParameters.blockchainId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns the tenant\'s blockchain activation limit and current usage. tenant_id is derived from the JWT token context. * @summary Get tenant billing info * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public getBlockchainLinkBillingInfo() { return BlockchainLinkBetaApiFp(this.configuration).getBlockchainLinkBillingInfo().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns a single blockchain owned by the tenant, identified by its ID. * @summary Get a blockchain by ID * @param {BlockchainLinkBetaApiGetBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public getBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiGetBlockchainLinkChainRequest) { return BlockchainLinkBetaApiFp(this.configuration).getBlockchainLinkChain(requestParameters.blockchainId).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns the Ethereum address derived from the configured external wallet private key, used by the UI for test transfers. tenant_id is derived from the JWT token context. * @summary Get the test wallet address * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public getBlockchainLinkTestWalletAddress() { return BlockchainLinkBetaApiFp(this.configuration).getBlockchainLinkTestWalletAddress().then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Returns the tenant\'s blockchains, paginated and filterable by state, network environment, and free-text search, with configurable sorting. * @summary List blockchains with pagination and filtering * @param {BlockchainLinkBetaApiListBlockchainLinkChainsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public listBlockchainLinkChains(requestParameters: BlockchainLinkBetaApiListBlockchainLinkChainsRequest = {}) { return BlockchainLinkBetaApiFp(this.configuration).listBlockchainLinkChains(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.search, requestParameters.status, requestParameters.blockchainEnv, requestParameters.sortBy, requestParameters.order, requestParameters.statusExclude).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Starts the asynchronous validation workflow for a blockchain and its associated validation session. * @summary Trigger validation workflow * @param {BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public triggerBlockchainLinkValidation(requestParameters: BlockchainLinkBetaApiTriggerBlockchainLinkValidationRequest) { return BlockchainLinkBetaApiFp(this.configuration).triggerBlockchainLinkValidation(requestParameters.blockchainId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } /** * Updates the declared properties of an existing blockchain identified by its ID. Only the fields supplied in the request are modified. * @summary Update a blockchain * @param {BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BlockchainLinkBetaApi */ public updateBlockchainLinkChain(requestParameters: BlockchainLinkBetaApiUpdateBlockchainLinkChainRequest) { return BlockchainLinkBetaApiFp(this.configuration).updateBlockchainLinkChain(requestParameters.blockchainDeclaredProperties, requestParameters.blockchainId, requestParameters.idempotencyKey).then((request) => request(this.axios, this.basePath)).then(convertToFireblocksResponse); } } /** * @export */ export const ListBlockchainLinkChainsOrderEnum = { Asc: 'ASC', Desc: 'DESC' } as const; export type ListBlockchainLinkChainsOrderEnum = typeof ListBlockchainLinkChainsOrderEnum[keyof typeof ListBlockchainLinkChainsOrderEnum];