@marinade.finance/cli-common
Advanced tools
Comparing version 2.0.17 to 2.0.18
{ | ||
"name": "@marinade.finance/cli-common", | ||
"version": "2.0.17", | ||
"version": "2.0.18", | ||
"description": "CLI tooling", | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"@solana/web3.js": "^1.78.5", | ||
"@marinade.finance/web3js-common": "^2.0.17", | ||
"@marinade.finance/web3js-common": "^2.0.18", | ||
"@types/expand-tilde": "^2.0.0", | ||
@@ -38,3 +38,3 @@ "bn.js": "^5.2.1", | ||
"@solana/web3.js": "^1.78.5", | ||
"@marinade.finance/web3js-common": "^2.0.17", | ||
"@marinade.finance/web3js-common": "^2.0.18", | ||
"bn.js": "^5.2.1", | ||
@@ -41,0 +41,0 @@ "borsh": "^0.7.0", |
@@ -12,3 +12,3 @@ "use strict"; | ||
try { | ||
return new web3_js_1.PublicKey(pubkeyOrPath); | ||
return await parsePubkeyWithPath(pubkeyOrPath); | ||
} | ||
@@ -53,2 +53,10 @@ catch (err) { | ||
exports.parseFile = parseFile; | ||
async function parsePubkeyWithPath(pubkeyOrPath) { | ||
try { | ||
return new web3_js_1.PublicKey(pubkeyOrPath); | ||
} | ||
catch (err) { | ||
return new web3_js_1.PublicKey(new Uint8Array(JSON.parse(await (0, promises_1.readFile)((0, expand_tilde_1.default)(pubkeyOrPath), 'utf-8')))); | ||
} | ||
} | ||
function getClusterUrl(url) { | ||
@@ -55,0 +63,0 @@ let clusterUrl = url === 'd' |
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
28825
501