Trait cryptoballot::CryptoBallotTransaction[][src]

pub trait CryptoBallotTransaction: Serialize + Sealed {
    fn id(&self) -> Identifier;
fn public(&self) -> Option<PublicKey>;
fn election_id(&self) -> Identifier;
fn tx_type() -> TransactionType;
fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>; fn as_bytes(&self) -> Vec<u8> { ... } }
Expand description

All CryptoBallot transactions implement this trait

Required methods

fn id(&self) -> Identifier[src]

Expand description

Get the transaction ID

fn public(&self) -> Option<PublicKey>[src]

Expand description

Get the transaction public key, if there is one

fn election_id(&self) -> Identifier[src]

Expand description

Get the transaction election ID

fn tx_type() -> TransactionType[src]

Expand description

Get the transaction Type

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Expand description

Validate the transcation

Loading content...

Provided methods

fn as_bytes(&self) -> Vec<u8>[src]

Expand description

Serialize the transaction to bytes for signing

Loading content...

Implementors

impl CryptoBallotTransaction for DecryptionTransaction[src]

fn public(&self) -> Option<PublicKey>[src]

TODO: Any trustee

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

fn id(&self) -> Identifier[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for ElectionTransaction[src]

fn validate_tx<S: Store>(&self, _store: &S) -> Result<(), ValidationError>[src]

Validate the election transaction

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for EncryptionKeyTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

The validation does the following:

  • Validates that this transaction has been signed by a valid trustee

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for KeyGenCommitmentTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

The validation does the following:

  • Validates that this transaction has been signed by a valid trustee

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for KeyGenPublicKeyTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

The validation does the following:

  • Validates that this transaction has been signed by a valid trustee

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for KeyGenShareTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

The validation does the following:

  • Validates that this transaction has been signed by a valid trustee
  • Validates that there is one share per trustee in the election

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for MixTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for PartialDecryptionTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for VoteTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the vote transaction

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

impl CryptoBallotTransaction for VotingEndTransaction[src]

fn validate_tx<S: Store>(&self, store: &S) -> Result<(), ValidationError>[src]

Validate the transaction

The validation does the following:

  • Validates that this transaction has been signed by a valid election authority

fn id(&self) -> Identifier[src]

fn public(&self) -> Option<PublicKey>[src]

fn election_id(&self) -> Identifier[src]

fn tx_type() -> TransactionType[src]

Loading content...