cryptocoinjs / hdkey

JavaScript component for Bitcoin hierarchical deterministic keys (BIP32)
MIT License
201 stars 74 forks source link

Unable to sign transaction and get privkey object #18

Closed prahaladbelavadi closed 4 years ago

prahaladbelavadi commented 6 years ago

I'm trying to sign a transaction from by keys generated here

I get an error from assert saying that my transaction length is an invalid message length.

screen shot 2018-04-18 at 5 17 31 pm

I'm guessing this is mostly due to the transaction being invalid I got the transaction from here

I tried copying the transaction output from here before being signed but I was unable to decode what was in the buffer.

How do you suggest I go about creating a transaction I can import or verify the usage of being able to sign the transaction ?

The Privatekey object from the hdkey isn't logging out either I'm testing it out here

Thanks

RyanZim commented 4 years ago

sign is for signing hashes that are 32 bytes (256 bits) long.