bcoin-org.github.io icon indicating copy to clipboard operation
bcoin-org.github.io copied to clipboard

All buffers should be sent as hex strings

Open bucko13 opened this issue 6 years ago • 0 comments

In general we should probably improve documentation to detail the data types of what is sent in the API, but one problem in particular is for when sending tx information (e.g. for the sign endpoint), error messages indicate that tx should be a buffer, but since JSON doesn't really recognize Buffers and just stringifies the object, what is actually expected is the hex version of the transaction. So whenever an endpoint expects a Buffer, it should actually be sent as a hex.

bucko13 avatar May 15 '18 17:05 bucko13