"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable @typescript-eslint/no-explicit-any */
const Account_1 = __importDefault(require("../../../../domain/context/account/Account"));
const PublicKey_1 = __importDefault(require("../../../../domain/context/account/PublicKey"));
const HWCSettings_1 = __importDefault(require("../../../../core/settings/walletConnect/HWCSettings"));
const DfnsSettings_1 = __importDefault(require("../../../../core/settings/custodialWalletSettings/DfnsSettings"));
const FireblocksSettings_1 = __importDefault(require("../../../../core/settings/custodialWalletSettings/FireblocksSettings"));
const AWSKMSSettings_1 = __importDefault(require("../../../../core/settings/custodialWalletSettings/AWSKMSSettings"));
class RequestMapper {
    static mapAccount(account) {
        return account
            ? new Account_1.default({
                id: account.accountId,
                evmAddress: account.evmAddress,
                publicKey: account.publicKey?.key && account.publicKey.type
                    ? new PublicKey_1.default({
                        key: account.publicKey?.key ?? "",
                        type: account.publicKey?.type ?? "",
                    })
                    : undefined,
            })
            : undefined;
    }
    static hwcRequestToHWCSettings(req) {
        return new HWCSettings_1.default(req.projectId, req.dappName, req.dappDescription, req.dappURL, req.dappIcons);
    }
    static dfnsRequestToDfnsSettings(req) {
        return new DfnsSettings_1.default(req.serviceAccountPrivateKey, req.credentialId, req.authorizationToken, req.urlApplicationOrigin, req.applicationId, req.baseUrl, req.walletId, req.hederaAccountId, req.publicKey);
    }
    static fireblocksRequestToFireblocksSettings(req) {
        return new FireblocksSettings_1.default(req.apiKey, req.apiSecretKey, req.baseUrl, req.assetId, req.vaultAccountId, req.hederaAccountId);
    }
    static awsKmsRequestToAwsKmsSettings(req) {
        return new AWSKMSSettings_1.default(req.awsAccessKeyId, req.awsSecretAccessKey, req.awsRegion, req.awsKmsKeyId, req.hederaAccountId);
    }
}
exports.default = RequestMapper;
