[][src]Struct sn_transfers::ReplicaSigning

pub struct ReplicaSigning { /* fields omitted */ }

The Replica is the part of an AT2 system that forms validating groups, and signs individual transfers between wallets. Replicas validate requests to debit an wallet, and apply operations that has a valid "debit agreement proof" from the group, i.e. signatures from a quorum of its peers. Replicas don't initiate transfers or drive the algo - only Actors do.

Implementations

impl ReplicaSigning[src]

pub fn new(
    secret_key: SecretKeyShare,
    key_index: usize,
    peer_replicas: PublicKeySet
) -> Self
[src]

A new instance

pub fn replicas_pk_set(&self) -> PublicKeySet[src]

pub fn sign_transfer(
    &self,
    signed_transfer: &SignedTransfer
) -> Result<Option<(SignatureShare, SignatureShare)>, Error>
[src]

pub fn sign_validated_debit(
    &self,
    debit: &SignedDebit
) -> Result<Option<SignatureShare>, Error>
[src]

pub fn sign_validated_credit(
    &self,
    credit: &SignedCredit
) -> Result<Option<SignatureShare>, Error>
[src]

pub fn sign_credit_proof(
    &self,
    proof: &CreditAgreementProof
) -> Result<Option<SignatureShare>, Error>
[src]

Trait Implementations

impl Clone for ReplicaSigning[src]

impl Debug for ReplicaSigning[src]

impl Eq for ReplicaSigning[src]

impl PartialEq<ReplicaSigning> for ReplicaSigning[src]

impl StructuralEq for ReplicaSigning[src]

impl StructuralPartialEq for ReplicaSigning[src]

Auto Trait Implementations

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<T> From<T> for T[src]

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

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>,