@stacks/transactions
Advanced tools
Comparing version 6.14.1-pr.86 to 6.14.1-pr.87
@@ -209,3 +209,3 @@ "use strict"; | ||
exports.sigHashPreSign = sigHashPreSign; | ||
function makeSigHashPostSign(curSigHash, pubKey, signature) { | ||
function sigHashPostSign(curSigHash, pubKey, signature) { | ||
const hashLength = 32 + 1 + constants_1.RECOVERABLE_ECDSA_SIG_LENGTH_BYTES; | ||
@@ -226,3 +226,3 @@ const pubKeyEncoding = (0, keys_1.publicKeyIsCompressed)(pubKey.data) | ||
const publicKey = (0, keys_1.createStacksPublicKey)((0, keys_1.privateKeyToPublic)(privateKey)); | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
return { | ||
@@ -237,3 +237,3 @@ nextSig: signature, | ||
const publicKey = (0, keys_1.createStacksPublicKey)((0, keys_1.publicKeyFromSignatureVrs)(sigHashPre, signature, pubKeyEncoding)); | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
return { | ||
@@ -240,0 +240,0 @@ pubKey: publicKey, |
@@ -189,3 +189,3 @@ import { bytesToHex, concatArray, hexToBytes, intToBigInt, intToBytes, writeUInt16BE, } from '@stacks/common'; | ||
} | ||
function makeSigHashPostSign(curSigHash, pubKey, signature) { | ||
function sigHashPostSign(curSigHash, pubKey, signature) { | ||
const hashLength = 32 + 1 + RECOVERABLE_ECDSA_SIG_LENGTH_BYTES; | ||
@@ -206,3 +206,3 @@ const pubKeyEncoding = publicKeyIsCompressed(pubKey.data) | ||
const publicKey = createStacksPublicKey(privateKeyToPublic(privateKey)); | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
return { | ||
@@ -216,3 +216,3 @@ nextSig: signature, | ||
const publicKey = createStacksPublicKey(publicKeyFromSignatureVrs(sigHashPre, signature, pubKeyEncoding)); | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
return { | ||
@@ -219,0 +219,0 @@ pubKey: publicKey, |
@@ -52,3 +52,3 @@ import { bytesToHex, bytesToUtf8, concatArray, hexToBytes, hexToInt, intToBigInt, intToBytes, intToHex, isInstance, utf8ToBytes, writeUInt32BE, writeUInt8, } from '@stacks/common'; | ||
case StacksWireType.PostCondition: | ||
return deserializePostCondition(bytesReader); | ||
return deserializePostConditionWire(bytesReader); | ||
case StacksWireType.PublicKey: | ||
@@ -215,3 +215,3 @@ return deserializePublicKey(bytesReader); | ||
case StacksWireType.PostCondition: | ||
l.push(deserializePostCondition(bytesReader)); | ||
l.push(deserializePostConditionWire(bytesReader)); | ||
break; | ||
@@ -251,3 +251,3 @@ case StacksWireType.PublicKey: | ||
} | ||
export function deserializePostCondition(serialized) { | ||
export function deserializePostConditionWire(serialized) { | ||
const bytesReader = isInstance(serialized, BytesReader) | ||
@@ -254,0 +254,0 @@ ? serialized |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deserializePublicKey = exports.serializePublicKeyBytes = exports.serializePublicKey = exports.serializeTransactionAuthFieldBytes = exports.serializeTransactionAuthField = exports.serializeMessageSignatureBytes = exports.serializeMessageSignature = exports.deserializeTransactionAuthField = exports.deserializeMessageSignature = exports.deserializePayload = exports.serializePayloadBytes = exports.serializePayload = exports.deserializePostCondition = exports.serializePostConditionWireBytes = exports.serializePostConditionWire = exports.deserializeLPList = exports.serializeLPListBytes = exports.serializeLPList = exports.deserializeAsset = exports.serializeAssetBytes = exports.serializeAsset = exports.deserializeMemoString = exports.serializeMemoStringBytes = exports.serializeMemoString = exports.deserializeLPString = exports.serializeLPStringBytes = exports.serializeLPString = exports.deserializePrincipal = exports.serializePrincipalBytes = exports.serializePrincipal = exports.deserializeAddress = exports.serializeAddressBytes = exports.serializeAddress = exports.deserializeStacksWire = exports.serializeStacksWireBytes = exports.serializeStacksWire = void 0; | ||
exports.deserializePublicKey = exports.serializePublicKeyBytes = exports.serializePublicKey = exports.serializeTransactionAuthFieldBytes = exports.serializeTransactionAuthField = exports.serializeMessageSignatureBytes = exports.serializeMessageSignature = exports.deserializeTransactionAuthField = exports.deserializeMessageSignature = exports.deserializePayload = exports.serializePayloadBytes = exports.serializePayload = exports.deserializePostConditionWire = exports.serializePostConditionWireBytes = exports.serializePostConditionWire = exports.deserializeLPList = exports.serializeLPListBytes = exports.serializeLPList = exports.deserializeAsset = exports.serializeAssetBytes = exports.serializeAsset = exports.deserializeMemoString = exports.serializeMemoStringBytes = exports.serializeMemoString = exports.deserializeLPString = exports.serializeLPStringBytes = exports.serializeLPString = exports.deserializePrincipal = exports.serializePrincipalBytes = exports.serializePrincipal = exports.deserializeAddress = exports.serializeAddressBytes = exports.serializeAddress = exports.deserializeStacksWire = exports.serializeStacksWireBytes = exports.serializeStacksWire = void 0; | ||
const common_1 = require("@stacks/common"); | ||
@@ -57,3 +57,3 @@ const BytesReader_1 = require("../BytesReader"); | ||
case types_1.StacksWireType.PostCondition: | ||
return deserializePostCondition(bytesReader); | ||
return deserializePostConditionWire(bytesReader); | ||
case types_1.StacksWireType.PublicKey: | ||
@@ -238,3 +238,3 @@ return deserializePublicKey(bytesReader); | ||
case types_1.StacksWireType.PostCondition: | ||
l.push(deserializePostCondition(bytesReader)); | ||
l.push(deserializePostConditionWire(bytesReader)); | ||
break; | ||
@@ -277,3 +277,3 @@ case types_1.StacksWireType.PublicKey: | ||
exports.serializePostConditionWireBytes = serializePostConditionWireBytes; | ||
function deserializePostCondition(serialized) { | ||
function deserializePostConditionWire(serialized) { | ||
const bytesReader = (0, common_1.isInstance)(serialized, BytesReader_1.BytesReader) | ||
@@ -332,3 +332,3 @@ ? serialized | ||
} | ||
exports.deserializePostCondition = deserializePostCondition; | ||
exports.deserializePostConditionWire = deserializePostConditionWire; | ||
function serializePayload(payload) { | ||
@@ -335,0 +335,0 @@ return (0, common_1.bytesToHex)(serializePayloadBytes(payload)); |
{ | ||
"name": "@stacks/transactions", | ||
"version": "6.14.1-pr.86+f239c214", | ||
"version": "6.14.1-pr.87+9e99ed78", | ||
"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.86+f239c214", | ||
"@stacks/network": "^6.14.1-pr.86+f239c214", | ||
"@stacks/common": "^6.14.1-pr.87+9e99ed78", | ||
"@stacks/network": "^6.14.1-pr.87+9e99ed78", | ||
"c32check": "^2.0.0", | ||
@@ -37,3 +37,3 @@ "lodash.clonedeep": "^4.5.0" | ||
"devDependencies": { | ||
"@stacks/encryption": "^6.14.1-pr.86+f239c214", | ||
"@stacks/encryption": "^6.14.1-pr.87+9e99ed78", | ||
"@types/common-tags": "^1.8.0", | ||
@@ -67,3 +67,3 @@ "@types/elliptic": "^6.4.12", | ||
}, | ||
"gitHead": "f239c214525eacd57217b56af8dd258b72219865" | ||
"gitHead": "9e99ed7869f581f4033767ec3dd81fb1d6f1e1e6" | ||
} |
@@ -388,3 +388,3 @@ import { | ||
/** @internal */ | ||
function makeSigHashPostSign(curSigHash: string, pubKey: PublicKeyWire, signature: string): string { | ||
function sigHashPostSign(curSigHash: string, pubKey: PublicKeyWire, signature: string): string { | ||
// new hash combines the previous hash and all the new data this signature will add. This | ||
@@ -424,3 +424,3 @@ // includes: | ||
const publicKey = createStacksPublicKey(privateKeyToPublic(privateKey)); | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
@@ -447,3 +447,3 @@ return { | ||
const nextSigHash = makeSigHashPostSign(sigHashPre, publicKey, signature); | ||
const nextSigHash = sigHashPostSign(sigHashPre, publicKey, signature); | ||
@@ -450,0 +450,0 @@ return { |
@@ -128,3 +128,3 @@ import { | ||
case StacksWireType.PostCondition: | ||
return deserializePostCondition(bytesReader); | ||
return deserializePostConditionWire(bytesReader); | ||
case StacksWireType.PublicKey: | ||
@@ -332,3 +332,3 @@ return deserializePublicKey(bytesReader); | ||
case StacksWireType.PostCondition: | ||
l.push(deserializePostCondition(bytesReader)); | ||
l.push(deserializePostConditionWire(bytesReader)); | ||
break; | ||
@@ -383,3 +383,3 @@ case StacksWireType.PublicKey: | ||
/** @internal */ | ||
export function deserializePostCondition( | ||
export function deserializePostConditionWire( | ||
serialized: string | Uint8Array | BytesReader | ||
@@ -386,0 +386,0 @@ ): PostConditionWire { |
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 not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1871588