pub struct KeyPairAccount {
pub pub_key: Byte32,
}
Expand description
Represents an ed25519 keypair Algorand account.
An Algorand keypair account is defined by a 32-byte Ed25519 public key.
Fields§
§pub_key: Byte32
The 32-byte Ed25519 public key associated with this account.
Implementations§
Source§impl KeyPairAccount
impl KeyPairAccount
Sourcepub fn from_pubkey(pub_key: &Byte32) -> Self
pub fn from_pubkey(pub_key: &Byte32) -> Self
Creates a new KeyPairAccount
from a 32-byte public key.
§Arguments
pub_key
- The 32-byte Ed25519 public key.
§Returns
A new KeyPairAccount
instance containing the provided public key.
Trait Implementations§
Source§impl Clone for KeyPairAccount
impl Clone for KeyPairAccount
Source§fn clone(&self) -> KeyPairAccount
fn clone(&self) -> KeyPairAccount
Returns a copy 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 KeyPairAccount
impl Debug for KeyPairAccount
Source§impl Default for KeyPairAccount
impl Default for KeyPairAccount
Source§fn default() -> KeyPairAccount
fn default() -> KeyPairAccount
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyPairAccount
impl<'de> Deserialize<'de> for KeyPairAccount
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 Display for KeyPairAccount
impl Display for KeyPairAccount
Source§impl From<Address> for KeyPairAccount
impl From<Address> for KeyPairAccount
Source§impl From<KeyPairAccount> for Address
impl From<KeyPairAccount> for Address
Source§fn from(account: KeyPairAccount) -> Address
fn from(account: KeyPairAccount) -> Address
Converts an KeyPairAccount
into an Address
by wrapping its public key.
Source§impl FromStr for KeyPairAccount
impl FromStr for KeyPairAccount
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses an KeyPairAccount
from a string by first parsing it as an Address
.
§Arguments
s
- A string slice representing an Algorand address.
§Returns
An KeyPairAccount
if the string is a valid address, or an error otherwise.
Source§type Err = AlgoKitTransactError
type Err = AlgoKitTransactError
The associated error which can be returned from parsing.
Source§impl PartialEq for KeyPairAccount
impl PartialEq for KeyPairAccount
Source§impl Serialize for KeyPairAccount
impl Serialize for KeyPairAccount
impl StructuralPartialEq for KeyPairAccount
Auto Trait Implementations§
impl Freeze for KeyPairAccount
impl RefUnwindSafe for KeyPairAccount
impl Send for KeyPairAccount
impl Sync for KeyPairAccount
impl Unpin for KeyPairAccount
impl UnwindSafe for KeyPairAccount
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