@particle-network/auth
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -171,2 +171,5 @@ "use strict"; | ||
} | ||
if (typeof chain.name !== "string" || typeof chain.id !== "number") { | ||
throw types_1.AuthError.paramsError(); | ||
} | ||
if (!Object.keys(types_1.supportChains).includes(chain.name)) { | ||
@@ -311,4 +314,4 @@ throw types_1.AuthError.unsupportedChain(); | ||
}).ciphertext; | ||
const value = crypto_js_1.default.enc.Hex.stringify(cipherText).toUpperCase() + this.secretKey; | ||
const url = `${schema}?params=${value}#${path}`; | ||
const value = encodeURIComponent(crypto_js_1.default.enc.Base64.stringify(cipherText)) + this.secretKey; | ||
const url = `${schema}?params=${value}&encoding=base64#${path}`; | ||
return url; | ||
@@ -315,0 +318,0 @@ } |
{ | ||
"name": "@particle-network/auth", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "lib", |
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
47555
583