xrpl-accountlib
Advanced tools
Comparing version 8.2.1 to 8.3.0
@@ -93,7 +93,14 @@ "use strict"; | ||
var Signature = require("elliptic/lib/elliptic/ec/signature"); | ||
function ifUint8ToHex(data) { | ||
if (typeof data === "string" && data.match(",")) { | ||
data = Buffer.from(data.split(",").map(function (n) { return Number(n); })) | ||
.toString('hex') | ||
.toUpperCase(); | ||
} | ||
return data; | ||
} | ||
function computeBinaryTransactionHash(txBlobHex) { | ||
var prefix = hash_prefixes_1.HashPrefix.transactionID.toString().toUpperCase(); | ||
// const input = BufferPf.from(prefix + txBlobHex, "hex"); | ||
var prefix = ifUint8ToHex(hash_prefixes_1.HashPrefix.transactionID.toString().toUpperCase()); | ||
var input = Buffer.from(prefix + txBlobHex, "hex"); | ||
return (0, hashes_1.sha512Half)(input).toString().toUpperCase(); | ||
return ifUint8ToHex((0, hashes_1.sha512Half)(input).toString().toUpperCase()); | ||
} | ||
@@ -100,0 +107,0 @@ exports.computeBinaryTransactionHash = computeBinaryTransactionHash; |
{ | ||
"name": "xrpl-accountlib", | ||
"version": "8.2.1", | ||
"version": "8.3.0", | ||
"description": "XRPL Account helper: generation, derivation and signing", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3696155
90658