pub struct AptosConfig {
pub network: AptosNetwork,
pub rpc_url: String,
pub indexer_url: Option<String>,
pub checkpoint: CheckpointConfig,
pub transaction: TransactionConfig,
pub seal_contract: SealContractConfig,
}Expand description
Complete configuration for the Aptos adapter.
Fields§
§network: AptosNetworkNetwork to connect to.
rpc_url: StringRPC URL for the Aptos fullnode.
indexer_url: Option<String>Optional indexer URL for GraphQL queries.
checkpoint: CheckpointConfigCheckpoint verification settings.
transaction: TransactionConfigTransaction submission settings.
seal_contract: SealContractConfigCSVSeal contract deployment details.
Implementations§
Source§impl AptosConfig
impl AptosConfig
Sourcepub fn new(network: AptosNetwork) -> Self
pub fn new(network: AptosNetwork) -> Self
Create a new config for the given network with default RPC URL.
Sourcepub fn with_rpc(network: AptosNetwork, rpc_url: impl Into<String>) -> Self
pub fn with_rpc(network: AptosNetwork, rpc_url: impl Into<String>) -> Self
Create a config with a custom RPC URL.
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Validate the configuration is correct for the target network.
Sourcepub fn f_plus_one(&self) -> u64
pub fn f_plus_one(&self) -> u64
Returns the expected 2f+1 threshold for validator signatures. In production, this should match the actual validator set.
Trait Implementations§
Source§impl Clone for AptosConfig
impl Clone for AptosConfig
Source§fn clone(&self) -> AptosConfig
fn clone(&self) -> AptosConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AptosConfig
impl Debug for AptosConfig
Source§impl Default for AptosConfig
impl Default for AptosConfig
Source§impl<'de> Deserialize<'de> for AptosConfig
impl<'de> Deserialize<'de> for AptosConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AptosConfig
impl RefUnwindSafe for AptosConfig
impl Send for AptosConfig
impl Sync for AptosConfig
impl Unpin for AptosConfig
impl UnsafeUnpin for AptosConfig
impl UnwindSafe for AptosConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more