feat(cmd/rpc): adding blob module to rpc cli and fixing namespace parsing #2308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does the following:
Adds blob module support
blob.Submit
has been added with custom parsing for posting a single blob.blob.GetAll
also only takes a single namespace id for now. This will make devx easierAdds --print-request flag
Now the request can also be displayed along with the json response. This will both help for debugging and building things that need to build the requests themselves
Fixes namespace parsing
Namespaces are now encoded correctly again. In addition, if you pass a namespace of 8 bytes, it will zero-pad and use share/nID version 0.
Fixes
state.SubmitPayForBlob
Another issue was the change to an array. We now submit an array of a single blob, and changed the order of the arguments.
The order is now: fee, gasLimit, namespaceID, blob data
Adds formatted output
JQ is no longer needed to have an indented output. But colors are missing