pub struct TransactionSigner {
pub account: H160,
pub scopes: Vec<WitnessScope>,
pub allowed_contracts: Option<Vec<H160>>,
pub allowed_groups: Option<Vec<Secp256r1PublicKey>>,
pub rules: Option<Vec<WitnessRule>>,
}
Expand description
Represents a transaction signer in the NEO blockchain.
This struct contains information about the signer, including the account, scopes, allowed contracts, allowed groups, and witness rules.
Fields§
§account: H160
§scopes: Vec<WitnessScope>
§allowed_contracts: Option<Vec<H160>>
§allowed_groups: Option<Vec<Secp256r1PublicKey>>
§rules: Option<Vec<WitnessRule>>
Implementations§
Source§impl TransactionSigner
impl TransactionSigner
Sourcepub fn new(account: H160, scopes: Vec<WitnessScope>) -> Self
pub fn new(account: H160, scopes: Vec<WitnessScope>) -> Self
Creates a new TransactionSigner
with basic information.
§Arguments
account
- The account hash of the signer.scopes
- The witness scopes for this signer.
Sourcepub fn new_full(
account: H160,
scopes: Vec<WitnessScope>,
allowed_contracts: Vec<H160>,
allowed_groups: Vec<Secp256r1PublicKey>,
rules: Vec<WitnessRule>,
) -> Self
pub fn new_full( account: H160, scopes: Vec<WitnessScope>, allowed_contracts: Vec<H160>, allowed_groups: Vec<Secp256r1PublicKey>, rules: Vec<WitnessRule>, ) -> Self
Creates a new TransactionSigner
with full information.
§Arguments
account
- The account hash of the signer.scopes
- The witness scopes for this signer.allowed_contracts
- The list of allowed contract script hashes.allowed_groups
- The list of allowed group public keys.rules
- The list of witness rules.
Trait Implementations§
Source§impl Clone for TransactionSigner
impl Clone for TransactionSigner
Source§fn clone(&self) -> TransactionSigner
fn clone(&self) -> TransactionSigner
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 TransactionSigner
impl Debug for TransactionSigner
Source§impl Default for TransactionSigner
impl Default for TransactionSigner
Source§fn default() -> TransactionSigner
fn default() -> TransactionSigner
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransactionSigner
impl<'de> Deserialize<'de> for TransactionSigner
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 Hash for TransactionSigner
impl Hash for TransactionSigner
Source§impl Into<TransactionSigner> for &Signer
impl Into<TransactionSigner> for &Signer
Source§fn into(self) -> TransactionSigner
fn into(self) -> TransactionSigner
Converts this type into the (usually inferred) input type.
Source§impl Into<TransactionSigner> for &mut Signer
impl Into<TransactionSigner> for &mut Signer
Source§fn into(self) -> TransactionSigner
fn into(self) -> TransactionSigner
Converts this type into the (usually inferred) input type.
Source§impl Into<TransactionSigner> for Signer
impl Into<TransactionSigner> for Signer
Source§fn into(self) -> TransactionSigner
fn into(self) -> TransactionSigner
Converts this type into the (usually inferred) input type.
Source§impl NeoSerializable for TransactionSigner
impl NeoSerializable for TransactionSigner
Source§impl PartialEq for TransactionSigner
impl PartialEq for TransactionSigner
Source§impl Serialize for TransactionSigner
impl Serialize for TransactionSigner
Source§impl SignerTrait for TransactionSigner
impl SignerTrait for TransactionSigner
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>
Source§impl ValueExtension for TransactionSigner
impl ValueExtension for TransactionSigner
impl StructuralPartialEq for TransactionSigner
Auto Trait Implementations§
impl Freeze for TransactionSigner
impl RefUnwindSafe for TransactionSigner
impl Send for TransactionSigner
impl Sync for TransactionSigner
impl Unpin for TransactionSigner
impl UnwindSafe for TransactionSigner
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