gadget_sdk/
lib.rs

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#![deny(
    missing_copy_implementations,
    unsafe_code,
    unstable_features,
    unused_results
)]
//! Gadget SDK

#![cfg_attr(all(not(feature = "std"), not(feature = "wasm")), no_std)]
extern crate alloc;

/// Benchmark Module
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod benchmark;
/// Sol Bindings
#[allow(missing_copy_implementations)]
pub mod binding;
/// Blockchain clients
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod clients;
/// Gadget configuration
pub mod config;
pub mod error;
/// Event Listener Module
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod event_listener;
/// Blockchain Events Watcher Module
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod event_utils;
/// Command execution module
#[cfg(feature = "std")]
pub mod executor;
/// Keystore Module
pub mod keystore;
pub mod logging;
/// Metrics Module
#[cfg(feature = "std")]
pub mod metrics;
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod mutex_ext;
/// Network Module
#[cfg(feature = "std")] // TODO: Eventually open this up to WASM
pub mod network;
/// Prometheus metrics configuration
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod prometheus;
/// Randomness generation module
pub mod random;
/// Gadget Runner Module
#[cfg(feature = "std")] // TODO: Eventually open this up to WASM
pub mod run;
/// Blueprint runners
pub mod runners;
/// Slashing and quality of service utilities
pub mod slashing;
/// Database storage
#[cfg(feature = "std")]
pub mod store;
/// Protocol execution tracer
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod tracer;
/// Transaction Management Module
#[cfg(any(feature = "std", feature = "wasm"))]
pub mod tx;

/// Gadget Context and context extensions
pub mod contexts;
pub mod docker;
pub mod utils;

// Re-exports
pub use alloy_rpc_types;
pub use async_trait;
pub use blueprint_serde::ByteBuf;
pub use clap;
pub use color_eyre;
pub use error::Error;
pub use futures;
pub use gadget_blueprint_proc_macro::*;
pub use libp2p;
pub use parking_lot;
pub use round_based;
pub use serde;
pub use subxt;
pub use subxt_core;
pub use tangle_subxt;
pub use tokio;
pub use tracing;
pub use uuid;

// External modules usually used in proc-macro codegen.
#[doc(hidden)]
pub mod ext {
    pub use alloy_network;
    pub use alloy_primitives;
    pub use alloy_provider;
    pub use alloy_transport;
    pub use blueprint_serde;
    pub use eigensdk;
    pub use lock_api;
    #[cfg(feature = "std")]
    pub use parking_lot;
    pub use sp_core;
    pub use tangle_subxt;
    pub use tangle_subxt::subxt;
    pub use tangle_subxt::subxt_signer;
}