Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arcblock/forge-message

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/forge-message - npm Package Compare versions

Comparing version 1.0.33 to 1.1.0

13

lib/message.js

@@ -19,10 +19,3 @@ /* eslint-disable consistent-return */

const { toBN, bytesToHex, isUint8Array, toUint8Array } = require('@arcblock/forge-util');
const {
enums,
messages,
getMessageType,
toTypeUrl,
fromTypeUrl,
addProvider,
} = require('./provider');
const { enums, messages, getMessageType, toTypeUrl, fromTypeUrl, addProvider } = require('./provider');
// eslint-disable-next-line

@@ -405,3 +398,3 @@ const debug = require('debug')(`${require('../package.json').name}`);

const { typeUrl, value } = data;
if (typeUrl === 'json') {
if (['json', 'vc'].includes(typeUrl)) {
return { type: typeUrl, value: JSON.parse(Buffer.from(value, 'base64')) };

@@ -442,3 +435,3 @@ }

anyMessage.setValue(data.value);
} else if (data.typeUrl === 'json') {
} else if (['json', 'vc'].includes(data.typeUrl)) {
anyMessage.setValue(Uint8Array.from(Buffer.from(JSON.stringify(data.value))));

@@ -445,0 +438,0 @@ } else {

{
"name": "@arcblock/forge-message",
"description": "Utility functions to encode and decode message that can send to forge",
"version": "1.0.33",
"version": "1.1.0",
"author": {

@@ -75,3 +75,3 @@ "name": "wangshijun",

},
"gitHead": "52680b5630465c937b6a133503597fb7b5ef9e29"
"gitHead": "5ce499658bd16915c25c54999d9ef8716305d1b8"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc