wallet exposes unspent outputs via a getter
also add reverseEndian method to convert
This commit is contained in:
parent
68e8834c66
commit
16dc68cbaa
4 changed files with 67 additions and 8 deletions
src
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue