Module rings_node::prelude

source ·
Expand description

A prelude is provided which imports all the important data types and traits of ring-network.

Re-exports

  • pub use reqwest;
  • pub use rings_core;
  • pub use rings_rpc;
  • pub use rings_rpc::prelude::http;
  • pub use rings_rpc::prelude::jsonrpc_core;
  • pub use self::rings_core::prelude::base58;
  • pub use self::rings_core::prelude::uuid;
  • pub use self::rings_core::prelude::web3;

Modules

  • A Framing and Message chucking implementation defined in RFC4917https://www.rfc-editor.org/rfc/rfc4975#page-9 This chunking mechanism allows a sender to interrupt a chunk part of the way through sending it. The ability to interrupt messages allows multiple sessions to share a TCP connection, and for large messages to be sent efficiently while not blocking other messages that share the same connection, or even the same MSRP session.
  • A jsonrpc-client.
  • Message and MessageHandler
  • VNode is a special node that only has virtual address

Structs

  • MessageType use to customize message, will be handle by custom_message method.
  • MessageHandler will manage resources.
  • All messages transmitted in RingsNetwork should be wrapped by MessagePayload. It additionally offer transaction ID, origin did, relay, previous hop verification, and origin verification.
  • MessageRelay guide message passing on rings network by relay.
  • PeerRing is used to help a node interact with other nodes. All nodes in rings network form a clockwise ring in the order of Did. This struct takes its name from that. PeerRing implemented Chord algorithm. PeerRing implemented ChordStorage protocol.
  • StorageInstance struct
  • Wrap libsecp256k1::SecretKey.
  • Session is used to verify the message. It’s serializable and can be attached to the message payload.
  • SessionSk holds the Session and its session private key. To prove that the message was sent by the Account of Session, we need to attach session and the signature signed by sk to the payload.
  • SessionSkBuilder is used to build a SessionSk.
  • The transport and dht management.
  • Creates a SwarmBuilder to configure a Swarm.

Enums

Traits

Type Aliases

Attribute Macros