pub struct ContractSigner { /* private fields */ }
Expand description
Represents a contract signer in the NEO blockchain.
This struct contains information about the contract signer, including the signer hash, scopes, allowed contracts, allowed groups, and witness rules.
Implementations§
Source§impl ContractSigner
impl ContractSigner
pub fn verify_params(&self) -> &Vec<ContractParameter>
Source§impl ContractSigner
impl ContractSigner
Sourcepub fn called_by_entry(
contract_hash: H160,
verify_params: &[ContractParameter],
) -> Self
pub fn called_by_entry( contract_hash: H160, verify_params: &[ContractParameter], ) -> Self
Creates a new ContractSigner
with the “Called By Entry” scope.
§Arguments
contract_hash
- The hash of the contract.verify_params
- The parameters for contract verification.
Sourcepub fn global(contract_hash: H160, verify_params: &[ContractParameter]) -> Self
pub fn global(contract_hash: H160, verify_params: &[ContractParameter]) -> Self
Creates a new ContractSigner
with the “Global” scope.
§Arguments
contract_hash
- The hash of the contract.verify_params
- The parameters for contract verification.
Trait Implementations§
Source§impl Clone for ContractSigner
impl Clone for ContractSigner
Source§fn clone(&self) -> ContractSigner
fn clone(&self) -> ContractSigner
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 ContractSigner
impl Debug for ContractSigner
Source§impl<'de> Deserialize<'de> for ContractSigner
impl<'de> Deserialize<'de> for ContractSigner
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<ContractSigner> for Signer
impl From<ContractSigner> for Signer
Source§fn from(contract_signer: ContractSigner) -> Self
fn from(contract_signer: ContractSigner) -> Self
Converts to this type from the input type.
Source§impl Hash for ContractSigner
impl Hash for ContractSigner
Source§impl Into<ContractSigner> for &mut Signer
impl Into<ContractSigner> for &mut Signer
Source§fn into(self) -> ContractSigner
fn into(self) -> ContractSigner
Converts this type into the (usually inferred) input type.
Source§impl Into<ContractSigner> for Signer
impl Into<ContractSigner> for Signer
Source§fn into(self) -> ContractSigner
fn into(self) -> ContractSigner
Converts this type into the (usually inferred) input type.
Source§impl NeoSerializable for ContractSigner
impl NeoSerializable for ContractSigner
Source§impl PartialEq for ContractSigner
impl PartialEq for ContractSigner
Source§impl Serialize for ContractSigner
impl Serialize for ContractSigner
Source§impl SignerTrait for ContractSigner
impl SignerTrait for ContractSigner
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>
impl StructuralPartialEq for ContractSigner
Auto Trait Implementations§
impl Freeze for ContractSigner
impl RefUnwindSafe for ContractSigner
impl Send for ContractSigner
impl Sync for ContractSigner
impl Unpin for ContractSigner
impl UnwindSafe for ContractSigner
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