wallet exposes unspent outputs via a getter

also add reverseEndian method to convert
This commit is contained in:
Wei Lu 2014-03-22 14:37:09 +08:00
parent 68e8834c66
commit 16dc68cbaa
4 changed files with 67 additions and 8 deletions

View file

@ -158,6 +158,10 @@ function wordArrayToBytes(wordArray) {
return wordsToBytes(wordArray.words)
}
function reverseEndian (hex) {
return bytesToHex(hexToBytes(hex).reverse())
}
module.exports = {
lpad: lpad,
bytesToHex: bytesToHex,
@ -175,5 +179,6 @@ module.exports = {
bytesToWords: bytesToWords,
wordsToBytes: wordsToBytes,
bytesToWordArray: bytesToWordArray,
wordArrayToBytes: wordArrayToBytes
wordArrayToBytes: wordArrayToBytes,
reverseEndian: reverseEndian
}