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

@stacks/transactions

Package Overview
Dependencies
Maintainers
5
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/transactions - npm Package Compare versions

Comparing version 6.14.1-pr.79 to 6.14.1-pr.81

2

dist/authorization.d.ts

@@ -50,3 +50,3 @@ import { IntegerType, PrivateKey, PublicKey } from '@stacks/common';

export declare function deserializeSpendingCondition(bytesReader: BytesReader): SpendingCondition;
export declare function makeSigHashPreSign(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType): string;
export declare function sigHashPreSign(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType): string;
export declare function nextSignature(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType, privateKey: PrivateKey): {

@@ -53,0 +53,0 @@ nextSig: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deserializeAuthorization = exports.serializeAuthorization = exports.setSponsor = exports.setSponsorNonce = exports.setNonce = exports.getFee = exports.setFee = exports.verifyOrigin = exports.intoInitialSighashAuth = exports.createSponsoredAuth = exports.createStandardAuth = exports.nextVerification = exports.nextSignature = exports.makeSigHashPreSign = exports.deserializeSpendingCondition = exports.serializeSpendingCondition = exports.deserializeMultiSigSpendingCondition = exports.deserializeSingleSigSpendingCondition = exports.serializeMultiSigSpendingCondition = exports.serializeSingleSigSpendingCondition = exports.isNonSequentialMultiSig = exports.isSequentialMultiSig = exports.isSingleSig = exports.createMultiSigSpendingCondition = exports.createSingleSigSpendingCondition = exports.createSpendingCondition = exports.emptyMessageSignature = void 0;
exports.deserializeAuthorization = exports.serializeAuthorization = exports.setSponsor = exports.setSponsorNonce = exports.setNonce = exports.getFee = exports.setFee = exports.verifyOrigin = exports.intoInitialSighashAuth = exports.createSponsoredAuth = exports.createStandardAuth = exports.nextVerification = exports.nextSignature = exports.sigHashPreSign = exports.deserializeSpendingCondition = exports.serializeSpendingCondition = exports.deserializeMultiSigSpendingCondition = exports.deserializeSingleSigSpendingCondition = exports.serializeMultiSigSpendingCondition = exports.serializeSingleSigSpendingCondition = exports.isNonSequentialMultiSig = exports.isSequentialMultiSig = exports.isSingleSig = exports.createMultiSigSpendingCondition = exports.createSingleSigSpendingCondition = exports.createSpendingCondition = exports.emptyMessageSignature = void 0;
const common_1 = require("@stacks/common");

@@ -186,3 +186,3 @@ const constants_1 = require("./constants");

exports.deserializeSpendingCondition = deserializeSpendingCondition;
function makeSigHashPreSign(curSigHash, authType, fee, nonce) {
function sigHashPreSign(curSigHash, authType, fee, nonce) {
const hashLength = 32 + 1 + 8 + 8;

@@ -198,3 +198,3 @@ const sigHash = curSigHash +

}
exports.makeSigHashPreSign = makeSigHashPreSign;
exports.sigHashPreSign = sigHashPreSign;
function makeSigHashPostSign(curSigHash, pubKey, signature) {

@@ -213,6 +213,6 @@ const hashLength = 32 + 1 + constants_1.RECOVERABLE_ECDSA_SIG_LENGTH_BYTES;

function nextSignature(curSigHash, authType, fee, nonce, privateKey) {
const sigHashPreSign = makeSigHashPreSign(curSigHash, authType, fee, nonce);
const signature = (0, keys_1.signWithKey)(privateKey, sigHashPreSign);
const sigHashPre = sigHashPreSign(curSigHash, authType, fee, nonce);
const signature = (0, keys_1.signWithKey)(privateKey, sigHashPre);
const publicKey = (0, keys_1.createStacksPublicKey)((0, keys_1.privateKeyToPublic)(privateKey));
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);
return {

@@ -225,5 +225,5 @@ nextSig: signature,

function nextVerification(initialSigHash, authType, fee, nonce, pubKeyEncoding, signature) {
const sigHashPreSign = makeSigHashPreSign(initialSigHash, authType, fee, nonce);
const publicKey = (0, keys_1.createStacksPublicKey)((0, keys_1.publicKeyFromSignatureVrs)(sigHashPreSign, signature, pubKeyEncoding));
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const sigHashPre = sigHashPreSign(initialSigHash, authType, fee, nonce);
const publicKey = (0, keys_1.createStacksPublicKey)((0, keys_1.publicKeyFromSignatureVrs)(sigHashPre, signature, pubKeyEncoding));
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);
return {

@@ -230,0 +230,0 @@ pubKey: publicKey,

@@ -50,3 +50,3 @@ import { IntegerType, PrivateKey, PublicKey } from '@stacks/common';

export declare function deserializeSpendingCondition(bytesReader: BytesReader): SpendingCondition;
export declare function makeSigHashPreSign(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType): string;
export declare function sigHashPreSign(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType): string;
export declare function nextSignature(curSigHash: string, authType: AuthType, fee: IntegerType, nonce: IntegerType, privateKey: PrivateKey): {

@@ -53,0 +53,0 @@ nextSig: string;

@@ -170,3 +170,3 @@ import { bytesToHex, concatArray, hexToBytes, intToBigInt, intToBytes, writeUInt16BE, } from '@stacks/common';

}
export function makeSigHashPreSign(curSigHash, authType, fee, nonce) {
export function sigHashPreSign(curSigHash, authType, fee, nonce) {
const hashLength = 32 + 1 + 8 + 8;

@@ -195,6 +195,6 @@ const sigHash = curSigHash +

export function nextSignature(curSigHash, authType, fee, nonce, privateKey) {
const sigHashPreSign = makeSigHashPreSign(curSigHash, authType, fee, nonce);
const signature = signWithKey(privateKey, sigHashPreSign);
const sigHashPre = sigHashPreSign(curSigHash, authType, fee, nonce);
const signature = signWithKey(privateKey, sigHashPre);
const publicKey = createStacksPublicKey(privateKeyToPublic(privateKey));
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);
return {

@@ -206,5 +206,5 @@ nextSig: signature,

export function nextVerification(initialSigHash, authType, fee, nonce, pubKeyEncoding, signature) {
const sigHashPreSign = makeSigHashPreSign(initialSigHash, authType, fee, nonce);
const publicKey = createStacksPublicKey(publicKeyFromSignatureVrs(sigHashPreSign, signature, pubKeyEncoding));
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const sigHashPre = sigHashPreSign(initialSigHash, authType, fee, nonce);
const publicKey = createStacksPublicKey(publicKeyFromSignatureVrs(sigHashPre, signature, pubKeyEncoding));
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);
return {

@@ -211,0 +211,0 @@ pubKey: publicKey,

{
"name": "@stacks/transactions",
"version": "6.14.1-pr.79+e78cc744",
"version": "6.14.1-pr.81+991a12b8",
"description": "Javascript library for constructing transactions on the Stacks blockchain.",

@@ -30,4 +30,4 @@ "license": "MIT",

"@noble/secp256k1": "1.7.1",
"@stacks/common": "^6.14.1-pr.79+e78cc744",
"@stacks/network": "^6.14.1-pr.79+e78cc744",
"@stacks/common": "^6.14.1-pr.81+991a12b8",
"@stacks/network": "^6.14.1-pr.81+991a12b8",
"c32check": "^2.0.0",

@@ -37,3 +37,3 @@ "lodash.clonedeep": "^4.5.0"

"devDependencies": {
"@stacks/encryption": "^6.14.1-pr.79+e78cc744",
"@stacks/encryption": "^6.14.1-pr.81+991a12b8",
"@types/common-tags": "^1.8.0",

@@ -67,3 +67,3 @@ "@types/elliptic": "^6.4.12",

},
"gitHead": "e78cc744e5e8d2c14534bb9ae2fe4f347997b4d6"
"gitHead": "991a12b82dd40702205904ef4ad7a5efff09f359"
}

@@ -342,3 +342,4 @@ import {

export function makeSigHashPreSign(
/** @ignore */
export function sigHashPreSign(
curSigHash: string,

@@ -402,7 +403,7 @@ authType: AuthType,

} {
const sigHashPreSign = makeSigHashPreSign(curSigHash, authType, fee, nonce);
const sigHashPre = sigHashPreSign(curSigHash, authType, fee, nonce);
const signature = signWithKey(privateKey, sigHashPreSign);
const signature = signWithKey(privateKey, sigHashPre);
const publicKey = createStacksPublicKey(privateKeyToPublic(privateKey));
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);

@@ -423,9 +424,9 @@ return {

) {
const sigHashPreSign = makeSigHashPreSign(initialSigHash, authType, fee, nonce);
const sigHashPre = sigHashPreSign(initialSigHash, authType, fee, nonce);
const publicKey = createStacksPublicKey(
publicKeyFromSignatureVrs(sigHashPreSign, signature, pubKeyEncoding)
publicKeyFromSignatureVrs(sigHashPre, signature, pubKeyEncoding)
);
const nextSigHash = makeSigHashPostSign(sigHashPreSign, publicKey, signature);
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature);

@@ -432,0 +433,0 @@ return {

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