bcoin-org / bcoin-org/bcoin-org.github.io

All buffers should be sent as hex strings

Open
#86 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
19
Forks
38
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the API documentation for the sign endpoint and other endpoints that accept transaction information or Buffers. Confirm how JSON represents these values, then document hex strings consistently for every affected endpoint; done means the expected input type is explicit throughout the API documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.