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
// We use some internal methods only when the server feature is enabled, so we need to allow dead code and unused imports when the server feature is not enabled.
//! This crate provides a BRC20 programmable module implementation.
//!
//! It has a JSON-RPC server that runs the BRC20 programmable module, and a client
//! for interacting with the server. The server is built using the `jsonrpsee` crate.
//!
//! Types used in the BRC20 programmable module are defined in the `types` module.
//!
//! The server is started using the `start` function, and it allows configuring the server
//! with a custom configuration. The server listens for incoming JSON-RPC requests and
//! responds to them. The server supports the Ethereum JSON-RPC API, which allows users
//! to interact with the BRC20 programmable module using standard Ethereum JSON-RPC methods.
//!
//! The client includes methods for deploying contracts, calling contracts, depositing and
//! withdrawing tokens, it also includes methods for interacting with the underlying EVM, such as
//! getting block information, transaction information, and logs.
//!
//! Refer to [README](https://github.com/bestinslot-xyz/brc20-programmable-module/blob/main/README.md)
//! for more details on JSON-RPC methods and their usage.
//!
//! # Example
//!
//! ```
//! use std::error::Error;
//!
//! use brc20_prog::Brc20ProgApiClient;
//! use jsonrpsee::http_client::HttpClientBuilder;
//!
//! async fn print_block_number() -> Result<(), Box<dyn Error>> {
//! let client = HttpClientBuilder::default().build("https://url:port")?;
//! println!("eth_blockNumber: {}", client.eth_block_number().await?);
//! Ok(())
//! }
//! ```
//!
pub
pub
pub
pub
pub
pub
pub use Brc20ProgApiClient;
pub use Brc20ProgConfig;
pub use start;