Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yukibtc/braiinspool-rs-sdk
Braiins Pool API SDK
https://github.com/yukibtc/braiinspool-rs-sdk
bitcoin mining mining-monitor mining-pool rust slushpool
Last synced: 8 days ago
JSON representation
Braiins Pool API SDK
- Host: GitHub
- URL: https://github.com/yukibtc/braiinspool-rs-sdk
- Owner: yukibtc
- License: mit
- Created: 2022-11-14T23:09:49.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-15T10:00:07.000Z (about 2 years ago)
- Last Synced: 2024-03-14T23:07:35.015Z (8 months ago)
- Topics: bitcoin, mining, mining-monitor, mining-pool, rust, slushpool
- Language: Rust
- Homepage: https://crates.io/crates/braiinspool
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Braiins Pool API SDK
## Description
[Braiins](https://braiins.com) client library to check miners status from [Rust](https://rust-lang.org).
## Example
```toml
braiinspool = "0.1"
tokio = { version = "1", features = ["full"] }
``````rust,no_run
use braiinspool::model::{DailyRewards, PoolStats, UserProfile, Workers};
use braiinspool::{Client, Error};#[tokio::main]
async fn main() -> Result<(), Error> {
// Init client
let client = Client::new("apikey", Some("socks5h://127.0.0.1:9050"))?;// Check tor connection
println!("{}", client.check_tor_connection().await?);// Get pool stats
let pool_stats: PoolStats = client.pool_stats().await?;
println!("{:#?}", pool_stats);// Get user profile
let user_profile: UserProfile = client.user_profile().await?;
println!("{:#?}", user_profile);// Get daily rewards
let daily_rewards: DailyRewards = client.daily_rewards().await?;
println!("{:#?}", daily_rewards);// Get workers
let workers: Workers = client.workers().await?;
println!("{:#?}", workers);Ok(())
}
```## License
This project is distributed under the MIT software license - see the [LICENSE](./LICENSE) file for details