pub struct Credentials { /* private fields */ }
Expand description
Credentials that can be used to sign transactions
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn new(
network: Network,
master_key: ExtendedPrivKey,
index: u32,
) -> StacksResult<Self>
pub fn new( network: Network, master_key: ExtendedPrivKey, index: u32, ) -> StacksResult<Self>
Creates credentials from the network and private key
Sourcepub fn private_key(&self) -> PrivateKey
pub fn private_key(&self) -> PrivateKey
Returns the private key
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Returns the public key
Sourcepub fn address(&self) -> StacksAddress
pub fn address(&self) -> StacksAddress
Returns the Stacks P2PKH address
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
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 Credentials
impl Debug for Credentials
Source§impl<'de> Deserialize<'de> for Credentials
impl<'de> Deserialize<'de> for Credentials
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 Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
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