Struct cli::AccountData
source · pub struct AccountData {
pub address: AccountAddress,
pub authentication_key: Option<Vec<u8>>,
pub key_pair: Option<KeyPair<Ed25519PrivateKey, Ed25519PublicKey>>,
pub sequence_number: u64,
pub status: AccountStatus,
}
Expand description
Struct used to store data for each created account. We track the sequence number so we can create new transactions easily
Fields§
§address: AccountAddress
Address of the account.
authentication_key: Option<Vec<u8>>
Authentication key of the account.
key_pair: Option<KeyPair<Ed25519PrivateKey, Ed25519PublicKey>>
(private_key, public_key) pair if the account is not managed by wallet.
sequence_number: u64
Latest sequence number maintained by client, it can be different from validator.
status: AccountStatus
Whether the account is initialized on chain, cached local only, or status unknown.
Implementations§
source§impl AccountData
impl AccountData
sourcepub fn keypair_as_string(&self) -> Option<(String, String)>
pub fn keypair_as_string(&self) -> Option<(String, String)>
Serialize account keypair if exists.
Trait Implementations§
source§impl Debug for AccountData
impl Debug for AccountData
source§impl<'de> Deserialize<'de> for AccountData
impl<'de> Deserialize<'de> for AccountData
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
source§impl PartialEq<AccountData> for AccountData
impl PartialEq<AccountData> for AccountData
source§fn eq(&self, other: &AccountData) -> bool
fn eq(&self, other: &AccountData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AccountData
impl Serialize for AccountData
impl Eq for AccountData
impl StructuralEq for AccountData
impl StructuralPartialEq for AccountData
Auto Trait Implementations§
impl RefUnwindSafe for AccountData
impl Send for AccountData
impl Sync for AccountData
impl Unpin for AccountData
impl UnwindSafe for AccountData
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.