Socket
Socket
Sign inDemoInstall

dcl-crypto

Package Overview
Dependencies
294
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.3.0

1

dist/Authenticator.d.ts

@@ -7,2 +7,3 @@ import { EthereumProvider } from 'web3x/providers';

static validateSignature(expectedFinalAuthority: string, authChain: AuthChain, provider: EthereumProvider, dateToValidateExpirationInMillis?: number): Promise<ValidationResult>;
static isValidAuthChain(authChain: AuthChain): boolean;
static createEthereumMessageHash(msg: string): string;

@@ -9,0 +10,0 @@ static createEIP1271MessageHash(msg: string): string;

@@ -19,2 +19,8 @@ "use strict";

let currentAuthority = '';
if (!Authenticator.isValidAuthChain(authChain)) {
return {
ok: false,
message: 'ERROR: Malformed authChain'
};
}
for (let authLink of authChain) {

@@ -44,2 +50,15 @@ const validator = getValidatorByType(authLink.type);

}
static isValidAuthChain(authChain) {
for (const [index, authLink] of authChain.entries()) {
// SIGNER should be the first one
if (index === 0 && authLink.type !== types_1.AuthLinkType.SIGNER) {
return false;
}
// SIGNER should be unique
if (authLink.type === types_1.AuthLinkType.SIGNER && index !== 0) {
return false;
}
}
return true;
}
static createEthereumMessageHash(msg) {

@@ -46,0 +65,0 @@ let msgWithPrefix = `\x19Ethereum Signed Message:\n${msg.length}${msg}`;

2

package.json
{
"name": "dcl-crypto",
"version": "2.2.0",
"version": "2.3.0",
"description": "Crypto auth for Decentraland",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc