"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerPrivateRoutes = exports.createRouter = void 0;
const cloud_library_1 = require("@dfns/cloud-library");
const private_api_client_1 = require("@dfns/private-api-client");
const handlers_1 = require("./handlers");
const createRouter = () => new cloud_library_1.BusinessLogicMap();
exports.createRouter = createRouter;
function registerPrivateRoutes(businessLogicMap, network, walletImplementation, blockchainImplementation) {
    businessLogicMap.registerOperation((0, handlers_1.getAddress)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetAddress, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getBalance)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetBalance, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getAssetBalance)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetAssetBalance, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getNativeBalance)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetNativeBalance, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.listTransactions)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsListTransactions, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.submitGenericTransaction)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsSubmitGenericTransaction, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.submitPaymentTransaction)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsSubmitPaymentTransaction, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getNftBalance)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetNftBalance, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getNft)(walletImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetNft, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.getContract)(blockchainImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsGetContract, network),
    });
    businessLogicMap.registerOperation((0, handlers_1.callContractView)(blockchainImplementation), {
        http: (0, private_api_client_1.getBlockchainIntegrationEndpointDetails)(private_api_client_1.PrivateApiEndpoint.BlockchainIntegrationsCallContractView, network),
    });
}
exports.registerPrivateRoutes = registerPrivateRoutes;
