@ocap/message
Advanced tools
Comparing version 1.6.5 to 1.7.0
@@ -396,5 +396,10 @@ /* eslint-disable consistent-return */ | ||
if (data.type && data.value) { | ||
return data; | ||
} | ||
const { typeUrl, value } = data; | ||
if (['json', 'vc'].includes(typeUrl)) { | ||
return { type: typeUrl, value: JSON.parse(Buffer.from(value, 'base64')) }; | ||
const decoded = JSON.parse(Buffer.from(value, 'base64')); | ||
return { type: typeUrl, value: decoded }; | ||
} | ||
@@ -401,0 +406,0 @@ |
{ | ||
"name": "@ocap/message", | ||
"description": "Utility functions to encode and decode message that can send to forge", | ||
"version": "1.6.5", | ||
"version": "1.7.0", | ||
"author": { | ||
@@ -18,4 +18,4 @@ "name": "wangshijun", | ||
"dependencies": { | ||
"@ocap/proto": "^1.6.5", | ||
"@ocap/util": "^1.6.5", | ||
"@ocap/proto": "^1.7.0", | ||
"@ocap/util": "^1.7.0", | ||
"debug": "^4.3.1", | ||
@@ -72,3 +72,3 @@ "google-protobuf": "^3.9.0", | ||
}, | ||
"gitHead": "5779448f13824de38978df3c84c9da0c1e1ad989" | ||
"gitHead": "71ea796283983ac5b5a799fe8c48e629e92c2511" | ||
} |
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
27559
816
Updated@ocap/proto@^1.7.0
Updated@ocap/util@^1.7.0