pub struct PublicKey {
pub single: String,
pub multi: Option<MultiKey>,
pub smart_contract_auth: Option<String>,
pub governance_auth: Option<String>,
}Fields§
§single: StringBase58-encoded single public key (e.g. "A_c_7kdro2TE...").
multi: Option<MultiKey>§smart_contract_auth: Option<String>Smart-contract auth identifier in the form "sc_<contract>_<instance>",
e.g. "sc_sc_test_proxy_1". Used to identify a smart contract as a
restricted-key holder.
governance_auth: Option<String>Governance auth identifier.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn sc(contract: &str, instance: Option<&str>) -> Self
pub fn sc(contract: &str, instance: Option<&str>) -> Self
Build a PublicKey that authorizes a smart contract, identified by
its name and optional instance (defaults to "1").
Equivalent to populating smart_contract_auth with the string
returned by crate::wallet::sc_auth and leaving all other fields
at their defaults.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
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 PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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