UNPKG

@portis/web3

Version:

Portis Web3 SDK

12 lines 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function validateSecureOrigin() { var isLocalhost = location.hostname === 'localhost' || location.hostname === '127.0.0.1'; var isSecureOrigin = location.protocol === 'https:'; var isSecure = isLocalhost || isSecureOrigin; if (!isSecure) { throw "[Portis] Access to the WebCrypto API is restricted to secure origins.\nIf this is a development environment please use http://localhost:" + location.port + " instead.\nOtherwise, please use an SSL certificate."; } } exports.validateSecureOrigin = validateSecureOrigin; //# sourceMappingURL=secureOrigin.js.map