Crate grin_api[][src]

Re-exports

pub use crate::auth::BasicAuthMiddleware;
pub use crate::auth::BasicAuthURIMiddleware;
pub use crate::auth::MWC_BASIC_REALM;
pub use crate::auth::MWC_BASIC_REALM;
pub use crate::auth::MWC_FOREIGN_BASIC_REALM;
pub use crate::auth::MWC_FOREIGN_BASIC_REALM;

Modules

auth
client

High level JSON/HTTP client API

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.

BlockHeaderInfo
BlockHeaderPrintable
BlockOutputs
BlockPrintable
CompactBlockPrintable
Error

Errors that can be returned by an ApiEndpoint implementation.

Foreign

Main interface into all node API functions. Node APIs are split into two separate blocks of functionality called the ‘Owner’ and ‘Foreign’ APIs

Libp2pMessages

Libp2p message from this node

Libp2pPeers

Libp2p peers from the node There are libp2p peers node is connected to and node peers with tor addresses libp2p peers are preferable, nodes wit tor addresses can be used to expand the network

LocatedTxKernel
LoggingMiddleware
Node
Output
OutputListing
OutputPrintable
Owner

Main interface into all node API functions. Node APIs are split into two seperate blocks of functionality called the ‘Owner’ and ‘Foreign’ APIs

PoolInfo
PrintableCommitment
QueryParams
Router
Status

Status page containing different server information

TLSConfig

TLS config

Tip

The state of the current fork tip

TxHashSet

TxHashSet

TxHashSetNode

Wrapper around a list of txhashset nodes, so it can be presented properly via json

TxKernelPrintable
Version

API Version Information

Enums

ErrorKind
OutputType
RouterError

Traits

ForeignRpc

Public definition used to generate Node jsonrpc api.

Handler
OwnerRpc

Public definition used to generate Node jsonrpc api.

Functions

get_server_onion_address
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

reset_server_onion_address
response

Text response as future

result_to_response

Convert Result to ResponseFuture

set_server_onion_address

Type Definitions

HandlerObj
ResponseFuture