Module concordium_base::transactions
source · Expand description
Definition of transactions and other transaction-like messages, together with their serialization, signing, and similar auxiliary methods.
Modules
- High level wrappers for making transactions with minimal user input. These wrappers handle encoding, setting energy costs when those are fixed for transaction. See also the send module above which combines construction with signing.
- Energy costs of transactions.
- High level wrappers for making transactions with minimal user input. These wrappers handle encoding, setting energy costs when those are fixed for transaction.
Structs
- The most straighforward account access structure is a map of public keys with the account threshold.
- An account transaction signed and paid for by a sender account. The payload type is a generic parameter to support two kinds of payloads, a fully deserialized Payload type, and an EncodedPayload. The latter is useful since deserialization of some types of payloads is expensive. It is thus useful to delay deserialization until after we have checked signatures and the sender account information.
- Payload of the
AddBaker
transaction. This transaction registers the account as a baker. - Auxiliary type that contains public keys and proof of ownership of those keys. This is used in the
AddBaker
andUpdateBakerKeys
transaction types. The proofs are either constructed forAddBaker
orUpdateBakerKeys
and the genericV
is used as a marker to distinguish this in the type. See the markers:AddBakerKeysMarker
andUpdateBakerKeysMarker
. - Payload for configuring a baker. The different constructors cover the different common cases. The Default implementation produces an empty configure that will have no effects.
- Payload for configuring delegation. The Default implementation produces an empty configuration that will not change anything.
- An account transaction payload that has not yet been deserialized. This is a simple wrapper around
Vec<u8>
with bespoke serialization. - Data needed to initialize a smart contract.
- A data that was registered on the chain.
- Type safe wrapper to record the size of the transaction payload.
- A data that was registered on the chain.
- An error used to signal that an object was too big to be converted.
- Registered data is too large.
- Header of an account transaction that contains basic data to check whether the sender and the transaction is valid.
- An error that occurs when trying to convert an invalid i32 tag to a TransactionType.
- Data needed to update a smart contract instance.
Enums
- Marker for
BakerKeysPayload
indicating the proofs contained inBakerKeysPayload
have been generated for anAddBaker
transaction. - A block item are data items that are transmitted on the network either as separate messages, or as part of blocks. They are the only user-generated (as opposed to protocol-generated) message.
- Marker for
ConfigureBakerKeysPayload
indicating the proofs contained inConfigureBaker
have been generated for anConfigureBaker
transaction. - Payload of an account transaction.
- Types of account transactions.
- Marker for
BakerKeysPayload
indicating the proofs contained inBakerKeysPayload
have been generated for anUpdateBakerKeys
transaction.
Traits
- A signing implementation that knows the number of keys up-front.
- Implementations of this trait are structures which can produce public keys with which transaction signatures can be verified.
- A helper trait so that we can treat payload and encoded payload in the same place.
- Abstraction of private keys.
Functions
- Compute the transaction sign hash from an encoded payload and header.
- Parse an encoded payload of specified length.
- Sign the header and payload, construct the transaction, and return it.
- Verify a signature on the transaction sign hash. This is a low-level operation that is useful to avoid recomputing the transaction hash.
Type Definitions
- Mapping of credential indices to account credentials with proofs. This structure is used when sending transactions that update credentials.
- Baker keys payload containing proofs construct for a
AddBaker
transaction. - Baker keys payload containing proofs construct for a
UpdateBakerKeys
transaction. - Baker keys payload containing proofs construct for a
ConfigureBaker
transaction.