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

conseiljs-softsigner

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conseiljs-softsigner - npm Package Compare versions

Comparing version 5.0.4 to 5.0.5-beta.1

2

dist/KeyStoreUtils.d.ts

@@ -20,3 +20,3 @@ /// <reference types="node" />

function checkTextSignature(signature: string, message: string, publicKey: string, prehash?: boolean): Promise<boolean>;
function checkSignature(signature: string, bytes: Buffer, publicKey: string): Promise<boolean>;
function checkSignature(signature: string, bytes: Buffer, publicKey: string, prehash?: boolean): Promise<boolean>;
}

@@ -122,3 +122,3 @@ "use strict";

KeyStoreUtils.checkTextSignature = checkTextSignature;
function checkSignature(signature, bytes, publicKey) {
function checkSignature(signature, bytes, publicKey, prehash = false) {
return __awaiter(this, void 0, void 0, function* () {

@@ -140,9 +140,16 @@ const sigPrefix = signature.slice(0, 5);

}
let messageBytes;
if (prehash) {
messageBytes = conseiljs_2.TezosMessageUtils.simpleHash(bytes, 32);
}
else {
messageBytes = bytes;
}
const sig = conseiljs_2.TezosMessageUtils.writeSignatureWithHint(signature, sigPrefix);
const pk = conseiljs_2.TezosMessageUtils.writeKeyWithHint(publicKey, keyPrefix);
if (curve === conseiljs_1.SignerCurve.ED25519) {
return yield CryptoUtils_1.CryptoUtils.checkSignature(sig, bytes, pk);
return CryptoUtils_1.CryptoUtils.checkSignature(sig, messageBytes, pk);
}
if (curve === conseiljs_1.SignerCurve.SECP256K1) {
return secp256k1.ecdsaVerify(sig, bytes, pk);
return secp256k1.ecdsaVerify(sig, messageBytes, pk);
}

@@ -149,0 +156,0 @@ return false;

@@ -10,3 +10,3 @@ /// <reference types="node" />

static createSigner(secretKey: Buffer, password?: string): Promise<Signer>;
private getKey;
getKey(password?: string): Promise<Buffer>;
signOperation(bytes: Buffer, password?: string): Promise<Buffer>;

@@ -13,0 +13,0 @@ signText(message: string, password?: string): Promise<string>;

{
"name": "conseiljs-softsigner",
"version": "5.0.4",
"version": "5.0.5-beta.1",
"description": "ConseilJS software signer plugin for ConseilJS-core. Supports the ED25519 curve via libsodium for tz1-address operations.",

@@ -66,7 +66,7 @@ "browser": "dist/index.js",

"dependencies": {
"bip39": "3.0.3",
"conseiljs": "5.0.7",
"ed25519-hd-key": "1.1.2",
"libsodium-wrappers-sumo": "0.7.8",
"secp256k1": "4.0.2"
"bip39": "3.0.4",
"conseiljs": "5.2.3",
"ed25519-hd-key": "1.3.0",
"libsodium-wrappers-sumo": "0.7.10",
"secp256k1": "4.0.3"
},

@@ -73,0 +73,0 @@ "devDependencies": {

@@ -51,3 +51,3 @@ # ConseilJS-softsigner

<script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs-softsigner/dist-web/conseiljs-softsigner.min.js"
integrity="sha384-5jDKotRViAmj5dYnobDcthO+GCIv7TtF+YMqQgJBD2fCYBUZtdZ2GaetkcaXIo7u"
integrity="sha384-u9SDjbzVJQWfgX206Y01xb84lzX/xlRnQ8CLfoym44rwb3dbexqXk75sy5sLerHV"
crossorigin="anonymous"></script>

@@ -54,0 +54,0 @@ <script>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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