Crate grin_api

Source

Re-exports§

pub use crate::auth::BasicAuthMiddleware;
pub use crate::auth::BasicAuthURIMiddleware;
pub use crate::auth::GRIN_BASIC_REALM;
pub use crate::auth::GRIN_FOREIGN_BASIC_REALM;
pub use crate::foreign_rpc::ForeignRpc;
pub use crate::owner_rpc::OwnerRpc;
pub use crate::types::*;

Modules§

auth
client
High level JSON/HTTP client API
foreign_rpc
JSON-RPC Stub generation for the Foreign API
json_rpc
JSON RPC Client functionality
owner_rpc
JSON-RPC Stub generation for the Owner API
types

Macros§

must_get_query
parse_param
parse_param_no_err
right_path_element
w_fut

Structs§

ApiServer
HTTP server allowing the registration of ApiEndpoint implementations.
Foreign
Main interface into all node API functions. Node APIs are split into two seperate blocks of functionality called the ‘Owner’ and ‘Foreign’ APIs
LoggingMiddleware
Node
Owner
Main interface into all node API functions. Node APIs are split into two seperate blocks of functionality called the ‘Owner’ and ‘Foreign’ APIs
QueryParams
Router
TLSConfig
TLS config

Enums§

Error
Errors that can be returned by an ApiEndpoint implementation.
RouterError

Traits§

Handler

Functions§

json_response
Utility to serialize a struct into JSON and produce a sensible Response out of it.
json_response_pretty
Pretty-printed version of json response as future
just_response
Text response as HTTP response
node_apis
Listener version, providing same API but listening for requests on a port and wrapping the calls
not_found
parse_body
Parse request body
response
Text response as future
result_to_response
Convert Result to ResponseFuture

Type Aliases§

HandlerObj
ResponseFuture