Skip to content

Commit

Permalink
[Off-Chain] Add EventsReplayClient Generic Event Listener (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
h5law authored Dec 7, 2023
1 parent f30bafd commit 4d10f32
Show file tree
Hide file tree
Showing 62 changed files with 1,824 additions and 633 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ trigger_ci: ## Trigger the CI pipeline by submitting an empty commit; See https:

.PHONY: go_docs
go_docs: check_godoc ## Generate documentation for the project
echo "Visit http://localhost:6060/pkg/pocket/"
echo "Visit http://localhost:6060/pkg/github.com/pokt-network/poktroll/"
godoc -http=:6060

.PHONY: openapi_gen
Expand Down
21 changes: 12 additions & 9 deletions docs/pkg/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
- [Best Practices](#best-practices)
- [FAQ](#faq)


## Overview

The `client` package exposes go APIs to facilitate interactions with the Pocket network.
Expand All @@ -26,11 +25,12 @@ It includes lower-level interfaces for working with transactions and subscribing
## Features

| Interface | Description |
|-------------------------|----------------------------------------------------------------------------------------------------|
| ----------------------- | -------------------------------------------------------------------------------------------------- |
| **`SupplierClient`** | A high-level client for use by the "supplier" actor. |
| **`TxClient`** | A high-level client used to build, sign, and broadcast transaction from cosmos-sdk messages. |
| **`TxContext`** | Abstracts and encapsulates the transaction building, signing, encoding, and broadcasting concerns. |
| **`BlockClient`** | Exposes methods for receiving notifications about newly committed blocks. |
| **`DelegationClient`** | Exposes methods for receiving notifications about new delegation changes from application. |
| **`EventsQueryClient`** | Encapsulates blockchain event subscriptions. |
| **`Connection`** | A transport agnostic communication channel for sending and receiving messages. |
| **`Dialer`** | Abstracts the establishment of connections. |
Expand All @@ -42,7 +42,7 @@ It includes lower-level interfaces for working with transactions and subscribing
title: Component Diagram Legend
---
flowchart
c[Component]
d[Dependency Component]
s[[Subcomponent]]
Expand All @@ -60,21 +60,24 @@ c --> s
title: Clients Dependency Tree
---
flowchart
sup[SupplierClient]
tx[TxClient]
txctx[[TxContext]]
bl[BlockClient]
subgraph bl[BlockClient]
bl_evt_replay[EventsReplayClient]
end
subgraph del[DelegationClient]
del_evt_replay[EventsReplayClient]
end
evt[EventsQueryClient]
conn[[Connection]]
dial[[Dialer]]
sup --"#SignAndBroadcast()"--> tx
tx --"#CommittedBlocksSequence()"--> bl
tx --"#BroadcastTx"--> txctx
tx --"#EventsBytes()"--> evt
bl --"#EventsBytes()"--> evt
bl_evt_replay --"#EventsBytes()"--> evt
del_evt_replay --"#EventsBytes()"--> evt
evt --> conn
evt --"#DialContext()"--> dial
dial --"(returns)"--> conn
Expand Down Expand Up @@ -144,4 +147,4 @@ While `TxClient` is centered around signing and broadcasting transactions, `TxCo

#### Can I extend or customize the provided interfaces?

Yes, the package is designed with modularity in mind. You can either implement the interfaces based on your requirements or extend them for additional functionalities.
Yes, the package is designed with modularity in mind. You can either implement the interfaces based on your requirements or extend them for additional functionalities.
Loading

0 comments on commit 4d10f32

Please sign in to comment.