Comparing version 1.4.1 to 1.5.0
{ | ||
"name": "arweave", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Arweave JS client library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -132,7 +132,2 @@ # Arweave JS | ||
// "e": ... | ||
arweave.wallets.jwkToAddress(jwk).then((address) => { | ||
console.log(address); | ||
// 1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY | ||
)}; | ||
}); | ||
@@ -147,3 +142,3 @@ ``` | ||
//1seRanklLU_1VTGkEk7P0xAwMJfA7owA1JHW5KyZKlY | ||
)}; | ||
}); | ||
``` | ||
@@ -150,0 +145,0 @@ |
@@ -9,4 +9,17 @@ "use strict"; | ||
common_1.default.init = function (apiConfig = {}) { | ||
function protocolToDefaultPort(protocol) { | ||
if (protocol == 'http') { | ||
return 80; | ||
} | ||
if (protocol == 'https') { | ||
return 443; | ||
} | ||
} | ||
const protocol = apiConfig.protocol || window.location.protocol.replace(':', ''); | ||
const host = apiConfig.host || window.location.hostname; | ||
const port = apiConfig.port || protocolToDefaultPort(protocol); | ||
return new common_1.default({ | ||
api: apiConfig, | ||
api: Object.assign({}, apiConfig, { host, | ||
protocol, | ||
port }), | ||
crypto: new webcrypto_driver_1.default() | ||
@@ -13,0 +26,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
793468
8576
420