|
@@ -8,13 +8,13 @@ use {
|
|
|
solana_transaction_status::{TransactionDetails, UiTransactionEncoding},
|
|
solana_transaction_status::{TransactionDetails, UiTransactionEncoding},
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSignatureStatusConfig {
|
|
pub struct RpcSignatureStatusConfig {
|
|
|
pub search_transaction_history: bool,
|
|
pub search_transaction_history: bool,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, Copy, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSendTransactionConfig {
|
|
pub struct RpcSendTransactionConfig {
|
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
@@ -25,14 +25,14 @@ pub struct RpcSendTransactionConfig {
|
|
|
pub min_context_slot: Option<Slot>,
|
|
pub min_context_slot: Option<Slot>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSimulateTransactionAccountsConfig {
|
|
pub struct RpcSimulateTransactionAccountsConfig {
|
|
|
pub encoding: Option<UiAccountEncoding>,
|
|
pub encoding: Option<UiAccountEncoding>,
|
|
|
pub addresses: Vec<String>,
|
|
pub addresses: Vec<String>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSimulateTransactionConfig {
|
|
pub struct RpcSimulateTransactionConfig {
|
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
@@ -46,7 +46,7 @@ pub struct RpcSimulateTransactionConfig {
|
|
|
pub min_context_slot: Option<Slot>,
|
|
pub min_context_slot: Option<Slot>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcRequestAirdropConfig {
|
|
pub struct RpcRequestAirdropConfig {
|
|
|
pub recent_blockhash: Option<String>, // base-58 encoded blockhash
|
|
pub recent_blockhash: Option<String>, // base-58 encoded blockhash
|
|
@@ -54,7 +54,7 @@ pub struct RpcRequestAirdropConfig {
|
|
|
pub commitment: Option<CommitmentConfig>,
|
|
pub commitment: Option<CommitmentConfig>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcLeaderScheduleConfig {
|
|
pub struct RpcLeaderScheduleConfig {
|
|
|
pub identity: Option<String>, // validator identity, as a base-58 encoded string
|
|
pub identity: Option<String>, // validator identity, as a base-58 encoded string
|
|
@@ -62,7 +62,7 @@ pub struct RpcLeaderScheduleConfig {
|
|
|
pub commitment: Option<CommitmentConfig>,
|
|
pub commitment: Option<CommitmentConfig>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcBlockProductionConfigRange {
|
|
pub struct RpcBlockProductionConfigRange {
|
|
|
pub first_slot: Slot,
|
|
pub first_slot: Slot,
|
|
@@ -78,7 +78,7 @@ pub struct RpcBlockProductionConfig {
|
|
|
pub commitment: Option<CommitmentConfig>,
|
|
pub commitment: Option<CommitmentConfig>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcGetVoteAccountsConfig {
|
|
pub struct RpcGetVoteAccountsConfig {
|
|
|
pub vote_pubkey: Option<String>, // validator vote address, as a base-58 encoded string
|
|
pub vote_pubkey: Option<String>, // validator vote address, as a base-58 encoded string
|
|
@@ -88,7 +88,7 @@ pub struct RpcGetVoteAccountsConfig {
|
|
|
pub delinquent_slot_distance: Option<u64>,
|
|
pub delinquent_slot_distance: Option<u64>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(untagged)]
|
|
#[serde(untagged)]
|
|
|
pub enum RpcLeaderScheduleConfigWrapper {
|
|
pub enum RpcLeaderScheduleConfigWrapper {
|
|
|
SlotOnly(Option<Slot>),
|
|
SlotOnly(Option<Slot>),
|
|
@@ -111,7 +111,7 @@ pub enum RpcLargestAccountsFilter {
|
|
|
NonCirculating,
|
|
NonCirculating,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcLargestAccountsConfig {
|
|
pub struct RpcLargestAccountsConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|
|
@@ -119,7 +119,7 @@ pub struct RpcLargestAccountsConfig {
|
|
|
pub filter: Option<RpcLargestAccountsFilter>,
|
|
pub filter: Option<RpcLargestAccountsFilter>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSupplyConfig {
|
|
pub struct RpcSupplyConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|
|
@@ -128,7 +128,7 @@ pub struct RpcSupplyConfig {
|
|
|
pub exclude_non_circulating_accounts_list: bool,
|
|
pub exclude_non_circulating_accounts_list: bool,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcEpochConfig {
|
|
pub struct RpcEpochConfig {
|
|
|
pub epoch: Option<Epoch>,
|
|
pub epoch: Option<Epoch>,
|
|
@@ -137,7 +137,7 @@ pub struct RpcEpochConfig {
|
|
|
pub min_context_slot: Option<Slot>,
|
|
pub min_context_slot: Option<Slot>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcAccountInfoConfig {
|
|
pub struct RpcAccountInfoConfig {
|
|
|
pub encoding: Option<UiAccountEncoding>,
|
|
pub encoding: Option<UiAccountEncoding>,
|
|
@@ -147,7 +147,7 @@ pub struct RpcAccountInfoConfig {
|
|
|
pub min_context_slot: Option<Slot>,
|
|
pub min_context_slot: Option<Slot>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcProgramAccountsConfig {
|
|
pub struct RpcProgramAccountsConfig {
|
|
|
pub filters: Option<Vec<RpcFilterType>>,
|
|
pub filters: Option<Vec<RpcFilterType>>,
|
|
@@ -156,7 +156,7 @@ pub struct RpcProgramAccountsConfig {
|
|
|
pub with_context: Option<bool>,
|
|
pub with_context: Option<bool>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub enum RpcTransactionLogsFilter {
|
|
pub enum RpcTransactionLogsFilter {
|
|
|
All,
|
|
All,
|
|
@@ -164,21 +164,21 @@ pub enum RpcTransactionLogsFilter {
|
|
|
Mentions(Vec<String>), // base58-encoded list of addresses
|
|
Mentions(Vec<String>), // base58-encoded list of addresses
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcTransactionLogsConfig {
|
|
pub struct RpcTransactionLogsConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|
|
|
pub commitment: Option<CommitmentConfig>,
|
|
pub commitment: Option<CommitmentConfig>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub enum RpcTokenAccountsFilter {
|
|
pub enum RpcTokenAccountsFilter {
|
|
|
Mint(String),
|
|
Mint(String),
|
|
|
ProgramId(String),
|
|
ProgramId(String),
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSignatureSubscribeConfig {
|
|
pub struct RpcSignatureSubscribeConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|
|
@@ -186,14 +186,14 @@ pub struct RpcSignatureSubscribeConfig {
|
|
|
pub enable_received_notification: Option<bool>,
|
|
pub enable_received_notification: Option<bool>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub enum RpcBlockSubscribeFilter {
|
|
pub enum RpcBlockSubscribeFilter {
|
|
|
All,
|
|
All,
|
|
|
MentionsAccountOrProgram(String),
|
|
MentionsAccountOrProgram(String),
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcBlockSubscribeConfig {
|
|
pub struct RpcBlockSubscribeConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|
|
@@ -204,7 +204,7 @@ pub struct RpcBlockSubscribeConfig {
|
|
|
pub max_supported_transaction_version: Option<u8>,
|
|
pub max_supported_transaction_version: Option<u8>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcSignaturesForAddressConfig {
|
|
pub struct RpcSignaturesForAddressConfig {
|
|
|
pub before: Option<String>, // Signature as base-58 string
|
|
pub before: Option<String>, // Signature as base-58 string
|
|
@@ -246,7 +246,7 @@ pub trait EncodingConfig {
|
|
|
fn new_with_encoding(encoding: &Option<UiTransactionEncoding>) -> Self;
|
|
fn new_with_encoding(encoding: &Option<UiTransactionEncoding>) -> Self;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Copy, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcBlockConfig {
|
|
pub struct RpcBlockConfig {
|
|
|
pub encoding: Option<UiTransactionEncoding>,
|
|
pub encoding: Option<UiTransactionEncoding>,
|
|
@@ -289,7 +289,7 @@ impl From<RpcBlockConfig> for RpcEncodingConfigWrapper<RpcBlockConfig> {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Copy, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcTransactionConfig {
|
|
pub struct RpcTransactionConfig {
|
|
|
pub encoding: Option<UiTransactionEncoding>,
|
|
pub encoding: Option<UiTransactionEncoding>,
|
|
@@ -307,7 +307,7 @@ impl EncodingConfig for RpcTransactionConfig {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(untagged)]
|
|
#[serde(untagged)]
|
|
|
pub enum RpcBlocksConfigWrapper {
|
|
pub enum RpcBlocksConfigWrapper {
|
|
|
EndSlotOnly(Option<Slot>),
|
|
EndSlotOnly(Option<Slot>),
|
|
@@ -323,7 +323,7 @@ impl RpcBlocksConfigWrapper {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#[derive(Debug, Clone, Copy, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
|
|
+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
#[serde(rename_all = "camelCase")]
|
|
#[serde(rename_all = "camelCase")]
|
|
|
pub struct RpcContextConfig {
|
|
pub struct RpcContextConfig {
|
|
|
#[serde(flatten)]
|
|
#[serde(flatten)]
|