Skip to content

Commit

Permalink
ZMQ PUB/SUB JSON Types (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimalinux authored Nov 21, 2024
1 parent c54bb0c commit 4b925b8
Show file tree
Hide file tree
Showing 6 changed files with 695 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ members = [
"rpc/json-rpc",
"rpc/types",
"rpc/interface",
"zmq/types",
]

[profile.release]
Expand Down Expand Up @@ -79,6 +80,7 @@ cuprate-types = { path = "types", default-features =
cuprate-json-rpc = { path = "rpc/json-rpc", default-features = false }
cuprate-rpc-types = { path = "rpc/types", default-features = false }
cuprate-rpc-interface = { path = "rpc/interface", default-features = false }
cuprate-zmq-types = { path = "zmq/types", default-features = false }

# External dependencies
anyhow = { version = "1", default-features = false }
Expand Down
5 changes: 5 additions & 0 deletions books/architecture/src/appendix/crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ cargo doc --open --package cuprate-blockchain
| [`cuprate-rpc-interface`](https://doc.cuprate.org/cuprate_rpc_interface) | [`rpc/interface/`](https://github.com/Cuprate/cuprate/tree/main/rpc/interface) | RPC interface & routing
| [`cuprate-rpc-handler`](https://doc.cuprate.org/cuprate_rpc_handler) | [`rpc/handler/`](https://github.com/Cuprate/cuprate/tree/main/rpc/handler) | RPC inner handlers

## ZMQ
| Crate | In-tree path | Purpose |
|-------|--------------|---------|
| [`cuprate-zmq-types`](https://doc.cuprate.org/cuprate_zmq_types) | [`zmq/types/`](https://github.com/Cuprate/cuprate/tree/main/zmq/types) | Message types for ZMQ Pub/Sub interface

## 1-off crates
| Crate | In-tree path | Purpose |
|-------|--------------|---------|
Expand Down
20 changes: 20 additions & 0 deletions zmq/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "cuprate-zmq-types"
version = "0.1.0"
edition = "2021"
description = "Types for the ZMQ Pub/Sub API"
license = "MIT"
authors = ["dimalinux"]
repository = "https://github.com/Cuprate/cuprate/tree/main/zmq/types"

[dependencies]
serde = { workspace = true, features = ["derive"] }
hex = { workspace = true, features = ["std", "serde"] }
cuprate-types = { workspace = true, features = ["hex"] }

[dev-dependencies]
serde_json = { workspace = true, features = ["std"] }
assert-json-diff = "2.0.2"

[lints]
workspace = true
Loading

0 comments on commit 4b925b8

Please sign in to comment.