pub struct AccountSigner {
pub account: Account,
/* private fields */
}
Expand description
Represents an account signer in the NEO blockchain.
This struct contains information about the account signer, including the signer hash, scopes, allowed contracts, allowed groups, and witness rules.
Fields§
§account: Account
Implementations§
Source§impl AccountSigner
impl AccountSigner
Sourcepub fn none(account: &Account) -> Result<Self, TransactionError>
pub fn none(account: &Account) -> Result<Self, TransactionError>
Creates a new AccountSigner
with no scope.
§Arguments
account
- The account to create the signer for.
Sourcepub fn called_by_entry(account: &Account) -> Result<Self, TransactionError>
pub fn called_by_entry(account: &Account) -> Result<Self, TransactionError>
Creates a new AccountSigner
with the “Called By Entry” scope.
§Arguments
account
- The account to create the signer for.
Sourcepub fn global(account: &Account) -> Result<Self, TransactionError>
pub fn global(account: &Account) -> Result<Self, TransactionError>
Creates a new AccountSigner
with the “Global” scope.
§Arguments
account
- The account to create the signer for.
Sourcepub fn is_multi_sig(&self) -> bool
pub fn is_multi_sig(&self) -> bool
Checks if the account is a multi-signature account.
Sourcepub fn get_script_hash(&self) -> H160
pub fn get_script_hash(&self) -> H160
Returns the script hash of the account.
Source§impl AccountSigner
impl AccountSigner
pub fn new(account: &Account, scope: WitnessScope) -> Self
pub fn none_hash160(account_hash: H160) -> Result<Self, TransactionError>
pub fn called_by_entry_hash160( account_hash: H160, ) -> Result<Self, TransactionError>
pub fn global_hash160(account_hash: H160) -> Result<Self, TransactionError>
Trait Implementations§
Source§impl Clone for AccountSigner
impl Clone for AccountSigner
Source§fn clone(&self) -> AccountSigner
fn clone(&self) -> AccountSigner
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AccountSigner
impl Debug for AccountSigner
Source§impl<'de> Deserialize<'de> for AccountSigner
impl<'de> Deserialize<'de> for AccountSigner
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 From<AccountSigner> for Signer
impl From<AccountSigner> for Signer
Source§fn from(account_signer: AccountSigner) -> Self
fn from(account_signer: AccountSigner) -> Self
Converts to this type from the input type.
Source§impl Hash for AccountSigner
impl Hash for AccountSigner
Source§impl Into<AccountSigner> for Signer
impl Into<AccountSigner> for Signer
Source§fn into(self) -> AccountSigner
fn into(self) -> AccountSigner
Converts this type into the (usually inferred) input type.
Source§impl NeoSerializable for AccountSigner
impl NeoSerializable for AccountSigner
Source§impl PartialEq for AccountSigner
impl PartialEq for AccountSigner
Source§impl Serialize for AccountSigner
impl Serialize for AccountSigner
Source§impl SignerTrait for AccountSigner
impl SignerTrait for AccountSigner
fn get_type(&self) -> SignerType
fn get_signer_hash(&self) -> &H160
fn set_signer_hash(&mut self, signer_hash: H160)
fn get_scopes(&self) -> &Vec<WitnessScope>
fn get_scopes_mut(&mut self) -> &mut Vec<WitnessScope>
fn set_scopes(&mut self, scopes: Vec<WitnessScope>)
fn get_allowed_contracts(&self) -> &Vec<H160>
fn get_allowed_contracts_mut(&mut self) -> &mut Vec<H160>
fn get_allowed_groups(&self) -> &Vec<Secp256r1PublicKey>
fn get_allowed_groups_mut(&mut self) -> &mut Vec<Secp256r1PublicKey>
fn get_rules(&self) -> &Vec<WitnessRule>
fn get_rules_mut(&mut self) -> &mut Vec<WitnessRule>
fn set_allowed_contracts( &mut self, contracts: Vec<H160>, ) -> Result<(), BuilderError>
fn set_allowed_groups( &mut self, groups: Vec<Secp256r1PublicKey>, ) -> Result<(), BuilderError>
fn set_rules( &mut self, rules: Vec<WitnessRule>, ) -> Result<&mut Self, BuilderError>
fn check_depth( &self, condition: &WitnessCondition, depth: i8, ) -> Result<(), BuilderError>
fn validate_subitems( &self, count: usize, _name: &str, ) -> Result<(), BuilderError>
Auto Trait Implementations§
impl Freeze for AccountSigner
impl RefUnwindSafe for AccountSigner
impl Send for AccountSigner
impl Sync for AccountSigner
impl Unpin for AccountSigner
impl UnwindSafe for AccountSigner
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more