"use strict";
/* 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.
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetOnchainTransactionsOrderEnum = exports.GetOnchainTransactionsSortByEnum = exports.GetLatestBalancesForContractOrderEnum = exports.GetLatestBalancesForContractSortByEnum = exports.GetContractTotalSupplyOrderEnum = exports.GetContractTotalSupplySortByEnum = exports.GetContractTotalSupplyIntervalEnum = exports.GetContractBalanceHistoryOrderEnum = exports.GetContractBalanceHistorySortByEnum = exports.GetContractBalanceHistoryIntervalEnum = exports.GetAccessRegistryCurrentStateOrderEnum = exports.GetAccessRegistryCurrentStateSortByEnum = exports.OnchainDataApi = exports.OnchainDataApiFactory = exports.OnchainDataApiFp = exports.OnchainDataApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
var fireblocksResponse_1 = require("../response/fireblocksResponse");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
var validation_utils_1 = require("../utils/validation_utils");
// @ts-ignore
var base_1 = require("../base");
/**
 * OnchainDataApi - axios parameter creator
 * @export
 */
var OnchainDataApiAxiosParamCreator = function (configuration) {
    var _this = this;
    return {
        /**
         * Returns the current state of addresses in the specified access registry. Only addresses that are currently active (added but not removed) are included.
         * @summary Get the current state of addresses in an access registry
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} accessRegistryAddress The access registry address
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetAccessRegistryCurrentStateSortByEnum} [sortBy] Sorting field (enum).
         * @param {GetAccessRegistryCurrentStateOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistryCurrentState: function (baseAssetId, accessRegistryAddress, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getAccessRegistryCurrentState', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getAccessRegistryCurrentState', 'accessRegistryAddress', accessRegistryAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/access_registry_address/{accessRegistryAddress}/list"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("accessRegistryAddress", "}"), encodeURIComponent(String(accessRegistryAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns a summary of the current state of the access registry for the specified baseAssetId and accessRegistryAddress.
         * @summary Summary of access registry state
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} accessRegistryAddress The access registry address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistrySummary: function (baseAssetId, accessRegistryAddress, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getAccessRegistrySummary', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getAccessRegistrySummary', 'accessRegistryAddress', accessRegistryAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/access_registry_address/{accessRegistryAddress}/summary"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("accessRegistryAddress", "}"), encodeURIComponent(String(accessRegistryAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns a list of currently active roles for the specified baseAssetId and contractAddress.
         * @summary List of active roles for a given contract address and base asset ID
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getActiveRolesForContract: function (baseAssetId, contractAddress, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getActiveRolesForContract', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getActiveRolesForContract', 'contractAddress', contractAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/roles"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns the paginated balance history of the specified account in a contract with optional date range and interval filtering.
         * @summary Get historical balance data for a specific account in a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} accountAddress The account address to get balance history for
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {GetContractBalanceHistoryIntervalEnum} [interval] Time interval for grouping data
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetContractBalanceHistorySortByEnum} [sortBy] Sorting field (enum). Sorting only supported by \&#39;blockTimestamp\&#39;
         * @param {GetContractBalanceHistoryOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalanceHistory: function (baseAssetId, contractAddress, accountAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractBalanceHistory', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractBalanceHistory', 'contractAddress', contractAddress);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractBalanceHistory', 'accountAddress', accountAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/account_address/{accountAddress}/balance_history"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)))
                        .replace("{".concat("accountAddress", "}"), encodeURIComponent(String(accountAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (startDate !== undefined) {
                        localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
                            startDate.toISOString() :
                            startDate;
                    }
                    if (endDate !== undefined) {
                        localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
                            endDate.toISOString() :
                            endDate;
                    }
                    if (interval !== undefined) {
                        localVarQueryParameter['interval'] = interval;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns the total number of unique addresses holding balances and the total supply for the specified contract.
         * @summary Get summary for the token contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalancesSummary: function (baseAssetId, contractAddress, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractBalancesSummary', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractBalancesSummary', 'contractAddress', contractAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/summary"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns the paginated total supply history of the specified contract with optional date range and interval filtering.
         * @summary Get historical total supply data for a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {GetContractTotalSupplyIntervalEnum} [interval] Time interval for grouping data
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetContractTotalSupplySortByEnum} [sortBy] Sorting field (enum). Sorting only supported by \&#39;blockTimestamp\&#39;
         * @param {GetContractTotalSupplyOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractTotalSupply: function (baseAssetId, contractAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractTotalSupply', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getContractTotalSupply', 'contractAddress', contractAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/total_supply"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (startDate !== undefined) {
                        localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
                            startDate.toISOString() :
                            startDate;
                    }
                    if (endDate !== undefined) {
                        localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
                            endDate.toISOString() :
                            endDate;
                    }
                    if (interval !== undefined) {
                        localVarQueryParameter['interval'] = interval;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns the latest balance for each unique address with support for numeric balance sorting. The `prev` cursor is reserved for future support.
         * @summary Get latest balances for all addresses holding tokens from a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [accountAddress] Optional filter to get balance for a specific account address
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetLatestBalancesForContractSortByEnum} [sortBy] Sorting field for balances
         * @param {GetLatestBalancesForContractOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getLatestBalancesForContract: function (baseAssetId, contractAddress, accountAddress, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getLatestBalancesForContract', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getLatestBalancesForContract', 'contractAddress', contractAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/balances"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (accountAddress !== undefined) {
                        localVarQueryParameter['accountAddress'] = accountAddress;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
        /**
         * Returns a paginated list of onchain transactions for the specified contract address and base asset ID, optionally filtered by date range.
         * @summary Fetch onchain transactions for a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetOnchainTransactionsSortByEnum} [sortBy] Sorting field (enum).
         * @param {GetOnchainTransactionsOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOnchainTransactions: function (baseAssetId, contractAddress, startDate, endDate, pageCursor, pageSize, sortBy, order, options) {
            if (options === void 0) { options = {}; }
            return __awaiter(_this, void 0, void 0, function () {
                var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
                return __generator(this, function (_a) {
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getOnchainTransactions', 'baseAssetId', baseAssetId);
                    (0, validation_utils_1.assertParamExistsAndNotEmpty)('getOnchainTransactions', 'contractAddress', contractAddress);
                    localVarPath = "/onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/transactions"
                        .replace("{".concat("baseAssetId", "}"), encodeURIComponent(String(baseAssetId)))
                        .replace("{".concat("contractAddress", "}"), encodeURIComponent(String(contractAddress)));
                    localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
                    if (configuration) {
                        baseOptions = configuration.baseOptions;
                    }
                    localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
                    localVarHeaderParameter = {};
                    localVarQueryParameter = {};
                    if (startDate !== undefined) {
                        localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
                            startDate.toISOString() :
                            startDate;
                    }
                    if (endDate !== undefined) {
                        localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
                            endDate.toISOString() :
                            endDate;
                    }
                    if (pageCursor !== undefined) {
                        localVarQueryParameter['pageCursor'] = pageCursor;
                    }
                    if (pageSize !== undefined) {
                        localVarQueryParameter['pageSize'] = pageSize;
                    }
                    if (sortBy !== undefined) {
                        localVarQueryParameter['sortBy'] = sortBy;
                    }
                    if (order !== undefined) {
                        localVarQueryParameter['order'] = order;
                    }
                    (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
                    headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
                    localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
                    return [2 /*return*/, {
                            url: (0, common_1.toPathString)(localVarUrlObj),
                            options: localVarRequestOptions,
                        }];
                });
            });
        },
    };
};
exports.OnchainDataApiAxiosParamCreator = OnchainDataApiAxiosParamCreator;
/**
 * OnchainDataApi - functional programming interface
 * @export
 */
var OnchainDataApiFp = function (configuration) {
    var localVarAxiosParamCreator = (0, exports.OnchainDataApiAxiosParamCreator)(configuration);
    return {
        /**
         * Returns the current state of addresses in the specified access registry. Only addresses that are currently active (added but not removed) are included.
         * @summary Get the current state of addresses in an access registry
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} accessRegistryAddress The access registry address
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetAccessRegistryCurrentStateSortByEnum} [sortBy] Sorting field (enum).
         * @param {GetAccessRegistryCurrentStateOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistryCurrentState: function (baseAssetId, accessRegistryAddress, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccessRegistryCurrentState(baseAssetId, accessRegistryAddress, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getAccessRegistryCurrentState']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns a summary of the current state of the access registry for the specified baseAssetId and accessRegistryAddress.
         * @summary Summary of access registry state
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} accessRegistryAddress The access registry address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistrySummary: function (baseAssetId, accessRegistryAddress, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccessRegistrySummary(baseAssetId, accessRegistryAddress, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getAccessRegistrySummary']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns a list of currently active roles for the specified baseAssetId and contractAddress.
         * @summary List of active roles for a given contract address and base asset ID
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getActiveRolesForContract: function (baseAssetId, contractAddress, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActiveRolesForContract(baseAssetId, contractAddress, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getActiveRolesForContract']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns the paginated balance history of the specified account in a contract with optional date range and interval filtering.
         * @summary Get historical balance data for a specific account in a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} accountAddress The account address to get balance history for
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {GetContractBalanceHistoryIntervalEnum} [interval] Time interval for grouping data
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetContractBalanceHistorySortByEnum} [sortBy] Sorting field (enum). Sorting only supported by \&#39;blockTimestamp\&#39;
         * @param {GetContractBalanceHistoryOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalanceHistory: function (baseAssetId, contractAddress, accountAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getContractBalanceHistory(baseAssetId, contractAddress, accountAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getContractBalanceHistory']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns the total number of unique addresses holding balances and the total supply for the specified contract.
         * @summary Get summary for the token contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalancesSummary: function (baseAssetId, contractAddress, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getContractBalancesSummary(baseAssetId, contractAddress, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getContractBalancesSummary']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns the paginated total supply history of the specified contract with optional date range and interval filtering.
         * @summary Get historical total supply data for a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {GetContractTotalSupplyIntervalEnum} [interval] Time interval for grouping data
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetContractTotalSupplySortByEnum} [sortBy] Sorting field (enum). Sorting only supported by \&#39;blockTimestamp\&#39;
         * @param {GetContractTotalSupplyOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractTotalSupply: function (baseAssetId, contractAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getContractTotalSupply(baseAssetId, contractAddress, startDate, endDate, interval, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getContractTotalSupply']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns the latest balance for each unique address with support for numeric balance sorting. The `prev` cursor is reserved for future support.
         * @summary Get latest balances for all addresses holding tokens from a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [accountAddress] Optional filter to get balance for a specific account address
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetLatestBalancesForContractSortByEnum} [sortBy] Sorting field for balances
         * @param {GetLatestBalancesForContractOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getLatestBalancesForContract: function (baseAssetId, contractAddress, accountAddress, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLatestBalancesForContract(baseAssetId, contractAddress, accountAddress, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getLatestBalancesForContract']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
        /**
         * Returns a paginated list of onchain transactions for the specified contract address and base asset ID, optionally filtered by date range.
         * @summary Fetch onchain transactions for a contract
         * @param {string} baseAssetId The blockchain base assetId
         * @param {string} contractAddress The contract address
         * @param {string} [startDate] Start date of the time range in ISO 8601 format
         * @param {string} [endDate] End date of the time range in ISO 8601 format
         * @param {string} [pageCursor] Page cursor to get the next page\&quot;
         * @param {number} [pageSize] Number of items per page (max 100), requesting more then 100 will return 100 items
         * @param {GetOnchainTransactionsSortByEnum} [sortBy] Sorting field (enum).
         * @param {GetOnchainTransactionsOrderEnum} [order] ASC / DESC ordering (default DESC)
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOnchainTransactions: function (baseAssetId, contractAddress, startDate, endDate, pageCursor, pageSize, sortBy, order, options) {
            var _a, _b, _c;
            return __awaiter(this, void 0, void 0, function () {
                var localVarAxiosArgs, index, operationBasePath;
                return __generator(this, function (_d) {
                    switch (_d.label) {
                        case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOnchainTransactions(baseAssetId, contractAddress, startDate, endDate, pageCursor, pageSize, sortBy, order, options)];
                        case 1:
                            localVarAxiosArgs = _d.sent();
                            index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
                            operationBasePath = (_c = (_b = base_1.operationServerMap['OnchainDataApi.getOnchainTransactions']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
                            return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }];
                    }
                });
            });
        },
    };
};
exports.OnchainDataApiFp = OnchainDataApiFp;
/**
 * OnchainDataApi - factory interface
 * @export
 */
var OnchainDataApiFactory = function (configuration, basePath, axios) {
    var localVarFp = (0, exports.OnchainDataApiFp)(configuration);
    return {
        /**
         * Returns the current state of addresses in the specified access registry. Only addresses that are currently active (added but not removed) are included.
         * @summary Get the current state of addresses in an access registry
         * @param {OnchainDataApiGetAccessRegistryCurrentStateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistryCurrentState: function (requestParameters, options) {
            return localVarFp.getAccessRegistryCurrentState(requestParameters.baseAssetId, requestParameters.accessRegistryAddress, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns a summary of the current state of the access registry for the specified baseAssetId and accessRegistryAddress.
         * @summary Summary of access registry state
         * @param {OnchainDataApiGetAccessRegistrySummaryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getAccessRegistrySummary: function (requestParameters, options) {
            return localVarFp.getAccessRegistrySummary(requestParameters.baseAssetId, requestParameters.accessRegistryAddress, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns a list of currently active roles for the specified baseAssetId and contractAddress.
         * @summary List of active roles for a given contract address and base asset ID
         * @param {OnchainDataApiGetActiveRolesForContractRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getActiveRolesForContract: function (requestParameters, options) {
            return localVarFp.getActiveRolesForContract(requestParameters.baseAssetId, requestParameters.contractAddress, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the paginated balance history of the specified account in a contract with optional date range and interval filtering.
         * @summary Get historical balance data for a specific account in a contract
         * @param {OnchainDataApiGetContractBalanceHistoryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalanceHistory: function (requestParameters, options) {
            return localVarFp.getContractBalanceHistory(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.accountAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.interval, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the total number of unique addresses holding balances and the total supply for the specified contract.
         * @summary Get summary for the token contract
         * @param {OnchainDataApiGetContractBalancesSummaryRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractBalancesSummary: function (requestParameters, options) {
            return localVarFp.getContractBalancesSummary(requestParameters.baseAssetId, requestParameters.contractAddress, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the paginated total supply history of the specified contract with optional date range and interval filtering.
         * @summary Get historical total supply data for a contract
         * @param {OnchainDataApiGetContractTotalSupplyRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getContractTotalSupply: function (requestParameters, options) {
            return localVarFp.getContractTotalSupply(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.interval, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns the latest balance for each unique address with support for numeric balance sorting. The `prev` cursor is reserved for future support.
         * @summary Get latest balances for all addresses holding tokens from a contract
         * @param {OnchainDataApiGetLatestBalancesForContractRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getLatestBalancesForContract: function (requestParameters, options) {
            return localVarFp.getLatestBalancesForContract(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.accountAddress, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
        /**
         * Returns a paginated list of onchain transactions for the specified contract address and base asset ID, optionally filtered by date range.
         * @summary Fetch onchain transactions for a contract
         * @param {OnchainDataApiGetOnchainTransactionsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOnchainTransactions: function (requestParameters, options) {
            return localVarFp.getOnchainTransactions(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order, options).then(function (request) { return request(axios, basePath); });
        },
    };
};
exports.OnchainDataApiFactory = OnchainDataApiFactory;
/**
 * OnchainDataApi - object-oriented interface
 * @export
 * @class OnchainDataApi
 * @extends {BaseAPI}
 */
var OnchainDataApi = /** @class */ (function (_super) {
    __extends(OnchainDataApi, _super);
    function OnchainDataApi() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * Returns the current state of addresses in the specified access registry. Only addresses that are currently active (added but not removed) are included.
     * @summary Get the current state of addresses in an access registry
     * @param {OnchainDataApiGetAccessRegistryCurrentStateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getAccessRegistryCurrentState = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getAccessRegistryCurrentState(requestParameters.baseAssetId, requestParameters.accessRegistryAddress, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns a summary of the current state of the access registry for the specified baseAssetId and accessRegistryAddress.
     * @summary Summary of access registry state
     * @param {OnchainDataApiGetAccessRegistrySummaryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getAccessRegistrySummary = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getAccessRegistrySummary(requestParameters.baseAssetId, requestParameters.accessRegistryAddress).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns a list of currently active roles for the specified baseAssetId and contractAddress.
     * @summary List of active roles for a given contract address and base asset ID
     * @param {OnchainDataApiGetActiveRolesForContractRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getActiveRolesForContract = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getActiveRolesForContract(requestParameters.baseAssetId, requestParameters.contractAddress).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the paginated balance history of the specified account in a contract with optional date range and interval filtering.
     * @summary Get historical balance data for a specific account in a contract
     * @param {OnchainDataApiGetContractBalanceHistoryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getContractBalanceHistory = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getContractBalanceHistory(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.accountAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.interval, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the total number of unique addresses holding balances and the total supply for the specified contract.
     * @summary Get summary for the token contract
     * @param {OnchainDataApiGetContractBalancesSummaryRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getContractBalancesSummary = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getContractBalancesSummary(requestParameters.baseAssetId, requestParameters.contractAddress).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the paginated total supply history of the specified contract with optional date range and interval filtering.
     * @summary Get historical total supply data for a contract
     * @param {OnchainDataApiGetContractTotalSupplyRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getContractTotalSupply = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getContractTotalSupply(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.interval, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns the latest balance for each unique address with support for numeric balance sorting. The `prev` cursor is reserved for future support.
     * @summary Get latest balances for all addresses holding tokens from a contract
     * @param {OnchainDataApiGetLatestBalancesForContractRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getLatestBalancesForContract = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getLatestBalancesForContract(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.accountAddress, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    /**
     * Returns a paginated list of onchain transactions for the specified contract address and base asset ID, optionally filtered by date range.
     * @summary Fetch onchain transactions for a contract
     * @param {OnchainDataApiGetOnchainTransactionsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof OnchainDataApi
     */
    OnchainDataApi.prototype.getOnchainTransactions = function (requestParameters) {
        var _this = this;
        return (0, exports.OnchainDataApiFp)(this.configuration).getOnchainTransactions(requestParameters.baseAssetId, requestParameters.contractAddress, requestParameters.startDate, requestParameters.endDate, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.sortBy, requestParameters.order).then(function (request) { return request(_this.axios, _this.basePath); }).then(fireblocksResponse_1.convertToFireblocksResponse);
    };
    return OnchainDataApi;
}(base_1.BaseAPI));
exports.OnchainDataApi = OnchainDataApi;
/**
 * @export
 */
exports.GetAccessRegistryCurrentStateSortByEnum = {
    DateAdded: 'dateAdded',
    Address: 'address'
};
/**
 * @export
 */
exports.GetAccessRegistryCurrentStateOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetContractBalanceHistoryIntervalEnum = {
    Hour: 'hour',
    Day: 'day',
    Week: 'week',
    Month: 'month'
};
/**
 * @export
 */
exports.GetContractBalanceHistorySortByEnum = {
    BlockTimestamp: 'blockTimestamp'
};
/**
 * @export
 */
exports.GetContractBalanceHistoryOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetContractTotalSupplyIntervalEnum = {
    Hour: 'hour',
    Day: 'day',
    Week: 'week',
    Month: 'month'
};
/**
 * @export
 */
exports.GetContractTotalSupplySortByEnum = {
    BlockTimestamp: 'blockTimestamp'
};
/**
 * @export
 */
exports.GetContractTotalSupplyOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetLatestBalancesForContractSortByEnum = {
    AccountAddress: 'accountAddress',
    BlockTimestamp: 'blockTimestamp'
};
/**
 * @export
 */
exports.GetLatestBalancesForContractOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
/**
 * @export
 */
exports.GetOnchainTransactionsSortByEnum = {
    BlockTimestamp: 'blockTimestamp',
    BlockNumber: 'blockNumber',
    TransactionHash: 'transactionHash'
};
/**
 * @export
 */
exports.GetOnchainTransactionsOrderEnum = {
    Asc: 'ASC',
    Desc: 'DESC'
};
//# sourceMappingURL=onchain-data-api.js.map