pub struct Slate {
Show 13 fields pub version_info: VersionCompatInfo, pub num_participants: u8, pub id: Uuid, pub state: SlateState, pub tx: Option<Transaction>, pub amount: u64, pub fee_fields: FeeFields, pub ttl_cutoff_height: u64, pub kernel_features: u8, pub offset: BlindingFactor, pub participant_data: Vec<ParticipantData>, pub payment_proof: Option<PaymentInfo>, pub kernel_features_args: Option<KernelFeaturesArgs>,
}
Expand description

A ‘Slate’ is passed around to all parties to build up all of the public transaction data needed to create a finalized transaction. Callers can pass the slate around by whatever means they choose, (but we can provide some binary or JSON serialization helpers here).

Fields

version_info: VersionCompatInfo

Versioning info

num_participants: u8

The number of participants intended to take part in this transaction

id: Uuid

Unique transaction ID, selected by sender

state: SlateState

Slate state

tx: Option<Transaction>

The core transaction data: inputs, outputs, kernels, kernel offset Optional as of V4 to allow for a compact transaction initiation

amount: u64

base amount (excluding fee)

fee_fields: FeeFields

fee amount and shift

ttl_cutoff_height: u64

TTL, the block height at which wallets should refuse to process the transaction and unlock all associated outputs

kernel_features: u8

Kernel Features flag - 0: plain 1: coinbase (invalid) 2: height_locked 3: NRD

offset: BlindingFactor

Offset, needed when posting of transasction is deferred

participant_data: Vec<ParticipantData>

Participant data, each participant in the transaction will insert their public data here. For now, 0 is sender and 1 is receiver, though this will change for multi-party

payment_proof: Option<PaymentInfo>

Payment Proof

kernel_features_args: Option<KernelFeaturesArgs>

Kernel features arguments

Implementations

Return the transaction, throwing an error if it doesn’t exist to be used at points in the code where the existence of a transaction is assumed

As above, but return mutable reference

number of participants

Recieve a slate, upgrade it to the latest version internally Throw error if this can’t be done

Upgrade a versioned slate

Compact the slate for initial sending, storing the excess + offset explicit and removing my input/output data This info must be stored in the context for repopulation later

Build a new empty transaction. Wallet currently only supports tx with “features and commit” inputs.

Create a new slate

Removes any signature data that isn’t mine, for compacting slates for a return journey

Adds selected inputs and outputs to the slate’s transaction Returns blinding factor

Update the tx kernel based on kernel features derived from the current slate. The fee may change as we build a transaction and we need to update the tx kernel to reflect this during the tx building process.

Completes callers part of round 1, adding public key info to the slate

This is the msg that we will sign as part of the tx kernel.

Completes caller’s part of round 2, completing signatures

Creates the final signature, callable by either the sender or recipient (after phase 3: sender confirmation)

Return the sum of public nonces

Return the sum of public blinding factors

Adds participants public keys to the slate data and saves participant’s transaction context sec_key can be overridden to replace the blinding factor (by whoever split the offset)

Add our contribution to the offset based on the excess, inputs and outputs

Calculate the excess

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

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Serialize this value into the given Serde serializer. Read more

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

Clone this value, and then immediately put it into a Box behind a trait object of this trait. Read more

Returns the address of self. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Clone this value, and then immediately put it into a Box behind a trait object of this trait. Read more

Returns the address of self. Read more

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. 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)

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

Converts the given value to a String. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more