Struct avalanche_sdk::wallet::Wallet
source · [−]pub struct Wallet<T: ReadOnly + SignOnly> {Show 13 fields
pub http_rpc_endpoint: String,
pub network_id: u32,
pub network_name: String,
pub keychain: Keychain<T>,
pub x_address: String,
pub p_address: String,
pub c_address: String,
pub short_address: Id,
pub eth_address: String,
pub x_chain_id: Id,
pub p_chain_id: Id,
pub c_chain_id: Id,
pub avax_asset_id: Id,
}Fields
http_rpc_endpoint: Stringnetwork_id: u32network_name: Stringkeychain: Keychain<T>x_address: Stringp_address: Stringc_address: Stringshort_address: Ideth_address: Stringx_chain_id: Idp_chain_id: Idc_chain_id: Idavax_asset_id: IdImplementations
sourceimpl<T> Wallet<T> where
T: ReadOnly + SignOnly + Clone,
impl<T> Wallet<T> where
T: ReadOnly + SignOnly + Clone,
sourcepub async fn add_validator(
&self,
node_id: Id,
stake_amount: u64,
validate_start: DateTime<Utc>,
validate_end: DateTime<Utc>,
validate_reward_fee_percent: u32
) -> Result<()>
pub async fn add_validator(
&self,
node_id: Id,
stake_amount: u64,
validate_start: DateTime<Utc>,
validate_end: DateTime<Utc>,
validate_reward_fee_percent: u32
) -> Result<()>
Adds a node as a validator. ref. https://github.com/ava-labs/avalanchego/blob/v1.7.9/vms/platformvm/add_validator_tx.go ref. https://github.com/ava-labs/avalanchego/blob/v1.7.9/vms/platformvm/spend.go ref. https://github.com/ava-labs/avalanchego/blob/v1.7.9/wallet/chain/p/builder.go ref. https://github.com/ava-labs/subnet-cli/blob/6bbe9f4aff353b812822af99c08133af35dbc6bd/client/p.go “AddValidator”
Trait Implementations
sourceimpl<'de, T: ReadOnly + SignOnly> Deserialize<'de> for Wallet<T> where
T: Deserialize<'de>,
impl<'de, T: ReadOnly + SignOnly> Deserialize<'de> for Wallet<T> where
T: Deserialize<'de>,
sourcefn 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<T> RefUnwindSafe for Wallet<T> where
T: RefUnwindSafe,
impl<T> Send for Wallet<T> where
T: Send,
impl<T> Sync for Wallet<T> where
T: Sync,
impl<T> Unpin for Wallet<T> where
T: Unpin,
impl<T> UnwindSafe for Wallet<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more