sairajzero 2023-08-01 21:20:23 +05:30
commit 36b8e0c538
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
(function (EXPORTS) { //btcOperator v1.1.4
(function (EXPORTS) { //btcOperator v1.1.4a
/* BTC Crypto and API Operator */
const btcOperator = EXPORTS;
@ -462,6 +462,7 @@
n: u.tx_output_n,
value: u.value,
value_hex: u.value_hex,
confirmations: u.confirmations,
script: u.script
})))
}).catch(error => reject(error))

View File

@ -1,4 +1,4 @@
(function (EXPORTS) { //floCrypto v2.3.6a
(function (EXPORTS) { //floCrypto v2.3.6b
/* FLO Crypto Operators */
'use strict';
const floCrypto = EXPORTS;
@ -121,6 +121,7 @@
//Sign data using private-key
floCrypto.signData = function (data, privateKeyHex) {
if (typeof privateKeyHex !== "string") throw new Error("No private key found.");
var key = new Bitcoin.ECKey(privateKeyHex);
var messageHash = Crypto.SHA256(data);
var messageSign = Bitcoin.ECDSA.sign(messageHash, key.priv);