quicknode_sdk/admin/
chains.rs1#[cfg(feature = "node")]
2use napi_derive::napi;
3#[cfg(feature = "python")]
4use pyo3::pyclass;
5#[cfg(feature = "python")]
6use pyo3_stub_gen::derive::gen_stub_pyclass;
7use serde::{Deserialize, Serialize};
8
9#[cfg_attr(feature = "python", gen_stub_pyclass)]
11#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
12#[cfg_attr(feature = "node", napi(object))]
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct ChainNetwork {
15 pub slug: String,
17 pub name: String,
19 pub chain_id: Option<i64>,
21}
22
23#[cfg_attr(feature = "python", gen_stub_pyclass)]
25#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
26#[cfg_attr(feature = "node", napi(object))]
27#[derive(Debug, Clone, Serialize, Deserialize)]
28pub struct Chain {
29 pub slug: String,
31 #[serde(default)]
33 pub networks: Vec<ChainNetwork>,
34 pub is_select_chain: Option<bool>,
36}
37
38#[cfg_attr(feature = "python", gen_stub_pyclass)]
40#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
41#[cfg_attr(feature = "node", napi(object))]
42#[derive(Debug, Clone, Serialize, Deserialize)]
43pub struct ListChainsResponse {
44 #[serde(default)]
46 pub data: Vec<Chain>,
47 pub error: Option<String>,
49}