New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/storage

Package Overview
Dependencies
Maintainers
5
Versions
657
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/storage - npm Package Compare versions

Comparing version 6.14.1-next.38 to 6.14.1-next.63

7

dist/esm/hub.js

@@ -1,3 +0,3 @@

import { BadPathError, bytesToHex, ConflictError, DoesNotExist, Logger, megabytesToBytes, NotEnoughProofError, PayloadTooLargeError, PreconditionFailedError, utf8ToBytes, ValidationError, } from '@stacks/common';
import { compressPrivateKey, ecSign, getPublicKeyFromPrivate, hashSha256Sync, publicKeyToBtcAddress, randomBytes, Signature, } from '@stacks/encryption';
import { BadPathError, bytesToHex, ConflictError, DoesNotExist, Logger, megabytesToBytes, NotEnoughProofError, PayloadTooLargeError, PreconditionFailedError, PRIVATE_KEY_BYTES_COMPRESSED, utf8ToBytes, ValidationError, } from '@stacks/common';
import { ecSign, getPublicKeyFromPrivate, hashSha256Sync, publicKeyToBtcAddress, randomBytes, Signature, } from '@stacks/encryption';
import { createFetchFn } from '@stacks/common';

@@ -57,3 +57,4 @@ import { fromByteArray } from 'base64-js';

const digest = hashSha256Sync(utf8ToBytes(challengeText));
const signatureBytes = ecSign(digest, compressPrivateKey(signerKeyHex));
const compressedPrivateKey = signerKeyHex.length === PRIVATE_KEY_BYTES_COMPRESSED * 2 ? signerKeyHex : `${signerKeyHex}01`;
const signatureBytes = ecSign(digest, compressedPrivateKey);
const signature = Signature.fromCompact(bytesToHex(signatureBytes)).toDERHex();

@@ -60,0 +61,0 @@ const publickey = getPublicKeyFromPrivate(signerKeyHex);

@@ -63,3 +63,4 @@ "use strict";

const digest = (0, encryption_1.hashSha256Sync)((0, common_1.utf8ToBytes)(challengeText));
const signatureBytes = (0, encryption_1.ecSign)(digest, (0, encryption_1.compressPrivateKey)(signerKeyHex));
const compressedPrivateKey = signerKeyHex.length === common_1.PRIVATE_KEY_BYTES_COMPRESSED * 2 ? signerKeyHex : `${signerKeyHex}01`;
const signatureBytes = (0, encryption_1.ecSign)(digest, compressedPrivateKey);
const signature = encryption_1.Signature.fromCompact((0, common_1.bytesToHex)(signatureBytes)).toDERHex();

@@ -66,0 +67,0 @@ const publickey = (0, encryption_1.getPublicKeyFromPrivate)(signerKeyHex);

{
"name": "@stacks/storage",
"version": "6.14.1-next.38+3d92cc71",
"version": "6.14.1-next.63+95d4e196",
"description": "Stacks storage library",

@@ -23,6 +23,6 @@ "license": "MIT",

"dependencies": {
"@stacks/auth": "^6.14.1-next.38+3d92cc71",
"@stacks/common": "^6.14.1-next.38+3d92cc71",
"@stacks/encryption": "^6.14.1-next.38+3d92cc71",
"@stacks/network": "^6.14.1-next.38+3d92cc71",
"@stacks/auth": "^6.14.1-next.63+95d4e196",
"@stacks/common": "^6.14.1-next.63+95d4e196",
"@stacks/encryption": "^6.14.1-next.63+95d4e196",
"@stacks/network": "^6.14.1-next.63+95d4e196",
"base64-js": "^1.5.1",

@@ -59,3 +59,3 @@ "jsontokens": "^4.0.1"

},
"gitHead": "3d92cc71fbdc199225fd71111e890ac55ae28022"
"gitHead": "95d4e196cce6322c4cf7f2435ebc25a85e320498"
}

@@ -12,2 +12,3 @@ import {

PreconditionFailedError,
PRIVATE_KEY_BYTES_COMPRESSED,
utf8ToBytes,

@@ -17,3 +18,2 @@ ValidationError,

import {
compressPrivateKey,
ecSign,

@@ -156,3 +156,5 @@ getPublicKeyFromPrivate,

const digest = hashSha256Sync(utf8ToBytes(challengeText));
const signatureBytes = ecSign(digest, compressPrivateKey(signerKeyHex));
const compressedPrivateKey =
signerKeyHex.length === PRIVATE_KEY_BYTES_COMPRESSED * 2 ? signerKeyHex : `${signerKeyHex}01`;
const signatureBytes = ecSign(digest, compressedPrivateKey);
// We only want the DER encoding so use toDERHex provided by @noble/secp256k1

@@ -159,0 +161,0 @@ const signature = Signature.fromCompact(bytesToHex(signatureBytes)).toDERHex();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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