Struct snarkvm_dpc::base_dpc::transaction::DPCTransaction[][src]

pub struct DPCTransaction<C: BaseDPCComponents> {
    pub network: Network,
    pub ledger_digest: MerkleTreeDigest<C::MerkleParameters>,
    pub old_serial_numbers: Vec<<C::AccountSignature as SignatureScheme>::PublicKey>,
    pub new_commitments: Vec<<C::RecordCommitment as CommitmentScheme>::Output>,
    pub program_commitment: <C::ProgramVerificationKeyCommitment as CommitmentScheme>::Output,
    pub local_data_root: <C::LocalDataCRH as CRH>::Output,
    pub value_balance: AleoAmount,
    pub signatures: Vec<<C::AccountSignature as SignatureScheme>::Output>,
    pub encrypted_records: Vec<EncryptedRecord<C>>,
    pub transaction_proof: <C::OuterSNARK as SNARK>::Proof,
    pub memorandum: [u8; 32],
    pub inner_circuit_id: <C::InnerSNARKVerificationKeyCRH as CRH>::Output,
}

Fields

network: Network

The network this transaction is included in

ledger_digest: MerkleTreeDigest<C::MerkleParameters>

The root of the ledger commitment Merkle tree

old_serial_numbers: Vec<<C::AccountSignature as SignatureScheme>::PublicKey>

The serial numbers of the records being spend

new_commitments: Vec<<C::RecordCommitment as CommitmentScheme>::Output>

The commitment of the new records

program_commitment: <C::ProgramVerificationKeyCommitment as CommitmentScheme>::Output

The commitment to the old record death and new record birth programs

local_data_root: <C::LocalDataCRH as CRH>::Output

The root of the local data merkle tree

value_balance: AleoAmount

A transaction value balance is the difference between input and output record balances. This value effectively becomes the transaction fee for the miner. Only coinbase transactions can have a negative value balance representing tokens being minted.

signatures: Vec<<C::AccountSignature as SignatureScheme>::Output>

Randomized signatures that allow for authorized delegation of transaction generation

encrypted_records: Vec<EncryptedRecord<C>>

Encrypted record and selector bits of the new records generated by the transaction

transaction_proof: <C::OuterSNARK as SNARK>::Proof

Zero-knowledge proof attesting to the valididty of the transaction

memorandum: [u8; 32]

Public data associated with the transaction that must be unique among all transactions

inner_circuit_id: <C::InnerSNARKVerificationKeyCRH as CRH>::Output

The ID of the inner SNARK being used

Implementations

impl<C: BaseDPCComponents> DPCTransaction<C>[src]

pub fn new(
    old_serial_numbers: Vec<Self::SerialNumber>,
    new_commitments: Vec<Self::Commitment>,
    memorandum: Self::Memorandum,
    ledger_digest: MerkleTreeDigest<C::MerkleParameters>,
    inner_circuit_id: <C::InnerSNARKVerificationKeyCRH as CRH>::Output,
    transaction_proof: <C::OuterSNARK as SNARK>::Proof,
    program_commitment: <C::ProgramVerificationKeyCommitment as CommitmentScheme>::Output,
    local_data_root: <C::LocalDataCRH as CRH>::Output,
    value_balance: AleoAmount,
    network: Network,
    signatures: Vec<<C::AccountSignature as SignatureScheme>::Output>,
    encrypted_records: Vec<EncryptedRecord<C>>
) -> Self
[src]

Trait Implementations

impl<C: BaseDPCComponents> Clone for DPCTransaction<C> where
    C: BaseDPCComponents
[src]

impl<C: BaseDPCComponents> Debug for DPCTransaction<C>[src]

impl<C: BaseDPCComponents> Eq for DPCTransaction<C> where
    C: BaseDPCComponents
[src]

impl<C: BaseDPCComponents> FromBytes for DPCTransaction<C>[src]

impl<C: BaseDPCComponents> PartialEq<DPCTransaction<C>> for DPCTransaction<C> where
    C: BaseDPCComponents
[src]

impl<C: BaseDPCComponents> ToBytes for DPCTransaction<C>[src]

impl<C: BaseDPCComponents> Transaction for DPCTransaction<C>[src]

type Commitment = <C::RecordCommitment as CommitmentScheme>::Output

type Digest = MerkleTreeDigest<C::MerkleParameters>

type EncryptedRecord = EncryptedRecord<C>

type InnerSNARKID = <C::InnerSNARKVerificationKeyCRH as CRH>::Output

type LocalDataRoot = <C::LocalDataCRH as CRH>::Output

type Memorandum = [u8; 32]

type ProgramCommitment = <C::ProgramVerificationKeyCommitment as CommitmentScheme>::Output

type SerialNumber = <C::AccountSignature as SignatureScheme>::PublicKey

type ValueBalance = AleoAmount

fn transaction_id(&self) -> Result<[u8; 32], TransactionError>[src]

Transaction id = Hash of (serial numbers || commitments || memo)

Auto Trait Implementations

impl<C> RefUnwindSafe for DPCTransaction<C> where
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::Output: RefUnwindSafe,
    <<<C as BaseDPCComponents>::MerkleParameters as MerkleParameters>::H as CRH>::Output: RefUnwindSafe,
    <<C as DPCComponents>::InnerSNARKVerificationKeyCRH as CRH>::Output: RefUnwindSafe,
    <<C as DPCComponents>::LocalDataCRH as CRH>::Output: RefUnwindSafe,
    <<C as DPCComponents>::ProgramVerificationKeyCommitment as CommitmentScheme>::Output: RefUnwindSafe,
    <<C as DPCComponents>::RecordCommitment as CommitmentScheme>::Output: RefUnwindSafe,
    <<C as BaseDPCComponents>::OuterSNARK as SNARK>::Proof: RefUnwindSafe,
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::PublicKey: RefUnwindSafe,
    <<C as DPCComponents>::AccountEncryption as EncryptionScheme>::Text: RefUnwindSafe

impl<C> Send for DPCTransaction<C> where
    <<<C as BaseDPCComponents>::MerkleParameters as MerkleParameters>::H as CRH>::Output: Send,
    <<C as DPCComponents>::InnerSNARKVerificationKeyCRH as CRH>::Output: Send,
    <<C as DPCComponents>::LocalDataCRH as CRH>::Output: Send,
    <<C as DPCComponents>::ProgramVerificationKeyCommitment as CommitmentScheme>::Output: Send,
    <<C as DPCComponents>::RecordCommitment as CommitmentScheme>::Output: Send,
    <<C as BaseDPCComponents>::OuterSNARK as SNARK>::Proof: Send,
    <<C as DPCComponents>::AccountEncryption as EncryptionScheme>::Text: Send

impl<C> Sync for DPCTransaction<C> where
    <<<C as BaseDPCComponents>::MerkleParameters as MerkleParameters>::H as CRH>::Output: Sync,
    <<C as DPCComponents>::InnerSNARKVerificationKeyCRH as CRH>::Output: Sync,
    <<C as DPCComponents>::LocalDataCRH as CRH>::Output: Sync,
    <<C as DPCComponents>::ProgramVerificationKeyCommitment as CommitmentScheme>::Output: Sync,
    <<C as DPCComponents>::RecordCommitment as CommitmentScheme>::Output: Sync,
    <<C as BaseDPCComponents>::OuterSNARK as SNARK>::Proof: Sync,
    <<C as DPCComponents>::AccountEncryption as EncryptionScheme>::Text: Sync

impl<C> Unpin for DPCTransaction<C> where
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::Output: Unpin,
    <<<C as BaseDPCComponents>::MerkleParameters as MerkleParameters>::H as CRH>::Output: Unpin,
    <<C as DPCComponents>::InnerSNARKVerificationKeyCRH as CRH>::Output: Unpin,
    <<C as DPCComponents>::LocalDataCRH as CRH>::Output: Unpin,
    <<C as DPCComponents>::ProgramVerificationKeyCommitment as CommitmentScheme>::Output: Unpin,
    <<C as DPCComponents>::RecordCommitment as CommitmentScheme>::Output: Unpin,
    <<C as BaseDPCComponents>::OuterSNARK as SNARK>::Proof: Unpin,
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::PublicKey: Unpin,
    <<C as DPCComponents>::AccountEncryption as EncryptionScheme>::Text: Unpin

impl<C> UnwindSafe for DPCTransaction<C> where
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::Output: UnwindSafe,
    <<<C as BaseDPCComponents>::MerkleParameters as MerkleParameters>::H as CRH>::Output: UnwindSafe,
    <<C as DPCComponents>::InnerSNARKVerificationKeyCRH as CRH>::Output: UnwindSafe,
    <<C as DPCComponents>::LocalDataCRH as CRH>::Output: UnwindSafe,
    <<C as DPCComponents>::ProgramVerificationKeyCommitment as CommitmentScheme>::Output: UnwindSafe,
    <<C as DPCComponents>::RecordCommitment as CommitmentScheme>::Output: UnwindSafe,
    <<C as BaseDPCComponents>::OuterSNARK as SNARK>::Proof: UnwindSafe,
    <<C as DPCComponents>::AccountSignature as SignatureScheme>::PublicKey: UnwindSafe,
    <<C as DPCComponents>::AccountEncryption as EncryptionScheme>::Text: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,