"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var commons_1 = require("@universal-login/commons");
exports.getEtherscanUrl = function (chainName, transactionHash) {
    commons_1.ensure(chainName.length !== 0, Error, 'Invalid chain name');
    var protocolPrefix = 'https://';
    var explorerUrl = 'etherscan.io/tx/';
    var canonicalChainName = chainName.toLowerCase().trim();
    var baseName = canonicalChainName === 'mainnet' ? explorerUrl : canonicalChainName + "." + explorerUrl;
    return "" + protocolPrefix + baseName + transactionHash;
};
//# sourceMappingURL=getEtherscanUrl.js.map