-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more rest handlers for basecoin #200
Comments
This was referenced Aug 2, 2017
Closed
Next up would be to implement a route for:
|
ethanfrey
pushed a commit
that referenced
this issue
Aug 18, 2017
* Note: Role must be a hex string, as enforced in tests/rest/cli.sh ```shell $ curl -X POST http://localhost:8998/build/create_role --data \ '{ "role":"DEADBEEF", "seq": 1, "min_sigs": 1, "signers": [{ "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9", "app": "role" }] }' ``` ```HTTP HTTP/1.1 200 OK Content-Type: application/json Date: Tue, 08 Aug 2017 19:15:13 GMT Content-Length: 387 { "type": "chain/tx", "data": { "chain_id": "test_chain_id", "expires_at": 0, "tx": { "type": "role/create", "data": { "role": "DEADBEEF", "min_sigs": 1, "signers": [ { "chain": "", "app": "role", "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9" } ] } } } } ``` Updates #200
stale. but related to #324 |
mmsqe
added a commit
to mmsqe/cosmos-sdk
that referenced
this issue
Feb 27, 2024
Problem: v0.47.x is outdated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current setup is nice for sendtx and querying accounts. Ideally, every tx and query that is available in the cli is also available in the rest api.
Minimally, this means:
middleware: support 0 to N "assume_role" assertions and wrap them in reverse order ( as per https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/wrap.go#L25-L38 ) - in all tx constructors - put it somewhere we can reuse it.
tx endpoint
/build/create_role
: same middleware stack as/build/send
, but different tx. Cli equivalent: https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/tx.go#L44-L65except, I think we just want the role as hex, not a string (will fix cli soon)
query endpoint
query/role
: rest equivalent to https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/query.go#L19-L37Also, please allow me to configure which endpoints are present in main.go, without having to cut and paste the ServeCmd into my sub-repo. This is designed to be imported (not forked) and used to build many different commands for each app. So a third party should easily be able to write a new tx or query endpoint, as well as register it with the server. (Or also remove eg. all endpoints except
/query/*
)The text was updated successfully, but these errors were encountered: