import { ensure } from '@universal-login/commons';
export var getEtherscanUrl = function (chainName, transactionHash) {
    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