1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # Neo RPC Client Module
//!
//! The RPC module provides client implementations for interacting with Neo nodes
//! through JSON-RPC API calls.
//!
//! ## Overview
//!
//! This module implements RPC client functionality for communicating with Neo blockchain nodes, including:
//!
//! - **Transport Protocols**: HTTP and WebSocket transport implementations
//! - **Connection Management**: Connection pooling and request batching
//! - **Pub/Sub Support**: Real-time notifications for blockchain events
//! - **Client Interfaces**: Type-safe wrappers for Neo's JSON-RPC methods
//!
//! ## Example
//!
//! ```no_run
//! use neo3::neo_clients::{HttpProvider, RpcClient, APITrait};
//! // use neo3::neo_types::Address;
//! // use neo3::neo_protocol::{ApplicationLog, Nep17Balances};
//! // use primitive_types::{H160, H256};
//! // use std::str::FromStr;
//!
//! async fn rpc_examples() -> Result<(), Box<dyn std::error::Error>> {
//! // Create an HTTP client connected to a Neo TestNet node
//! let provider = HttpProvider::new("https://testnet1.neo.org:443")?;
//! let client = RpcClient::new(provider);
//!
//! // Get basic blockchain information
//! let block_count = client.get_block_count().await?;
//! println!("Current block height: {}", block_count);
//!
//! let best_block_hash = client.get_best_block_hash().await?;
//! println!("Best block hash: {}", best_block_hash);
//!
//! // Get detailed block information
//! // let block = client.get_block(best_block_hash, true).await?;
//! // println!("Block time: {}, tx count: {}", block.time, block.tx.len());
//!
//! // Query account information
//! // let address = Address::from_str("NUVPACTpQvd2HHmBgFjJJRWwVXJiR3uAEh")?;
//! // let script_hash = address.to_script_hash();
//!
//! // Get NEP-17 token balances
//! // let balances = client.get_nep17_balances(script_hash).await?;
//! // for balance in balances.balances {
//! // println!("Token: {}, Amount: {}", balance.asset_hash, balance.amount);
//! // }
//!
//! // Get application logs for a transaction
//! // if let Some(tx) = block.tx.as_ref().and_then(|txs| txs.first()) {
//! // let app_log = client.get_application_log(tx.hash).await?;
//! // println!("Transaction triggers: {} executions", app_log.executions.len());
//! // }
//!
//! Ok(())
//! }
//! ```
pub use *;
pub use ;
pub use *;
pub use *;