Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: implement an initial mempool.space websocket client, and library for block-events #3

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2f6ebcf
chore: update cargo.toml and move main.rs to bin.rs
oleonardolima May 16, 2022
2862e53
wip(lib): extract ws subscription to another fn
oleonardolima May 16, 2022
4841927
wip(lib): move ws connection and polling fn to lib module
oleonardolima May 16, 2022
2968ade
wip: comment connection
oleonardolima May 25, 2022
74a6119
wip: add rust-bitcoin as deps
oleonardolima May 26, 2022
dba6c3c
wip(client+api): add initial ws client for mempool spa
oleonardolima May 26, 2022
f39468e
wip(lib): update lib and bin to use mempool space module
oleonardolima May 26, 2022
bf12173
fix(logging): add env-logger deps
oleonardolima May 26, 2022
071055e
chore: remove unnecessary log prefix
oleonardolima May 26, 2022
85d36d0
wip: websocket fn returns a stream of BlockExtended
oleonardolima May 26, 2022
85dce36
chore(bin+lib): refactor cli and lib fns, to use specific enums
oleonardolima May 27, 2022
ba33217
chore: remove TODOs and keep some APIs simple
oleonardolima May 27, 2022
88edad2
chore(bin+api): use rust-bitcoin type for BlockHash and Address
oleonardolima May 28, 2022
8aca8c9
fix: remove solvable TODOs
oleonardolima May 31, 2022
868b7d5
refactor: update lib to return stream of block events instead
oleonardolima May 31, 2022
181ef0e
chore: update README, remove trailing spaces, fix deps usage
oleonardolima Jun 1, 2022
10e1e11
chore: add pull request template
oleonardolima Jun 2, 2022
4f01ccf
fix: formatting with cargo fmt
oleonardolima Jun 2, 2022
2147092
fix: apply suggestions from cargo clippy
oleonardolima Jun 2, 2022
612f8ac
fix: apply review suggestions
oleonardolima Jun 7, 2022
bddefcb
chore: update README example
oleonardolima Jun 7, 2022
d9ea581
refactor: Lloyd's re-engineering of API (#7)
LLFourn Jun 24, 2022
4c41c16
chore: update bin, and update example in README
oleonardolima Jun 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Description

<!-- Describe the purpose of this PR, what's being adding and/or fixed -->

### Notes to the reviewers

<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->

### Checklists

#### All Submissions:

* [ ] I've signed all my commits
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [ ] I ran `cargo fmt` and `cargo clippy` before committing

#### New Features:

* [ ] I've added tests for the new feature
* [ ] I've added docs for the new feature
* [ ] I've updated `CHANGELOG.md`

#### Bugfixes:

* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
140 changes: 139 additions & 1 deletion Cargo.lock

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

26 changes: 21 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
[package]
name = "block-explorer-cli"
name = "block-events"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
authors = ["Leonardo Souza <[email protected]>", "LLFourn <[email protected]>"]
repository = "https://github.com/oleonardolima/block-events"
description = "A real-time stream block events library, covering connected and disconnected blocks.\nThis a work in progress project for Summer of Bitcoin 2022."
keywords = ["bitcoin", "blockchain", "blocks", "mempool-space", "stream", "events", "summer-of-bitcoin"]
readme = "README.md"
license = "MIT OR Apache-2.0"

[dependencies]
anyhow = { version = "1.0" }
async-stream = { version = "0.3.3"}
bitcoin = { version = "0.28", features = ["use-serde", "base64"] }
clap = { version = "3.0", features = ["derive"]}
futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
env_logger = { version = "0.9.0" }
futures-core = { version = "0.3" }
futures-util = { version = "0.3" }
log = { version = "0.4" }
serde = { version = "1.0.117", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
tokio = { version = "1.0.0", features = ["io-util", "io-std", "macros", "net", "rt-multi-thread", "time"] }
tokio-tungstenite = { version = "0.17.1", features = ["connect", "native-tls"]}
url = { version = "2.0.0" }

[lib]
name = "block_events"
path = "src/lib.rs"

[[bin]]
name = "block-events-cli"
path = "src/bin.rs"
Loading