Struct safe_network::transfers::WalletReplica[][src]

pub struct WalletReplica { /* fields omitted */ }
Expand description

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

A new Replica instance from a history of events.

A new Replica instance from current state.


––––––––––– Cmds ———————————––

This is the one and only infusion of money to the system. Ever. It is carried out by the first node in the network.

For now, with test token there is no from wallet.., token is created from thin air.

Step 1. Main business logic validation of a debit.

Step 2. Validation of agreement, and order at debit source.

Step 3. Validation of TransferAgreementProof, and credit idempotency at credit destination. (Since this leads to a credit, there is no requirement on order.)


––––––––––– Mutation ———————————

Mutation of state. There is no validation of an event, it (the cmd) is assumed to have been properly validated before the fact is established (event raised), and thus anything that breaks here, is a bug in the validation..

Test-helper API to simulate Client CREDIT Transfers.

Test-helper API to simulate Client DEBIT Transfers.

Step 1. Main business logic validation of a debit.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.