33c3d1fcbd
Example: ``` > tezos-client rpc get /chains/main/blocks/head/context/raw/json/\?depth\=1 | jq { "commitments": [], "contracts": { "global_counter": 0, "index": [] }, "cycle": [ 4, 3, 2, 1, 0 ], "delegates": [ "tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN", "tz1faswCTDciRzE4oJ9jn2Vm2dvjeyA9fUzU", "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv", "tz1b7tUupMgCNw2cCLpKTkSD1NZzB5TkP2sv", "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx" ], "last_block_priority": 0, "rolls": { "index": [], "next": 2000, "owner": {} }, "votes": { "ballots": [], "current_period_kind": "proposal", "current_quorum": 8000, "listings": [], "proposals": [] } } > tezos-client rpc get /chains/main/blocks/head/context/raw/json/cycle/4\?depth\=2 | jq { "last_roll": [ [ 0, 2000 ] ], "nonces": [], "random_seed": "97d50852c159ada8e9f107e98f693b059ba28336c723e6cd0f6353eb3c0cb415", "roll_snapshot": 0 } > tezos-client rpc get /chains/main/blocks/head/context/raw/json/cycle/5\?depth\=2 | jq { "last_roll": [ [ 1, 2000 ], [ 0, 2000 ] ], "nonces": [], "roll_snapshot": 2 } ``` |
||
---|---|---|
.. | ||
lib_ezresto | ||
lib_ezresto-directory | ||
lib_resto | ||
lib_resto-cohttp | ||
lib_resto-directory | ||
lib_resto-json | ||
.gitignore | ||
.ocp-indent | ||
.travis.yml | ||
CHANGES.md | ||
jbuild | ||
LICENSE | ||
Makefile | ||
ocplib-resto.version | ||
README.md |
ocplib-resto (WIP)
This is a minimal OCaml library for type-safe HTTP/JSON RPCs.
This is based on a notion of service, à la Eliom, and it uses
ocplib-json-typed
for self-documenting JSON encoders.
See test_ezresto-directory/ezResto_test.ml
or test_resto-directory/resto_test.ml
for example.`