This commit is contained in:
commit
36b8e0c538
@ -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))
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user