Skip to main content

Module data_types

Module data_types 

Source
Expand description

Core data-types used in the Linera protocol.

Structs§

Amount
A non-negative amount of tokens.
AmountConversionError
Error converting from U256 to Amount. This can fail since Amount is a u128.
ApplicationDescription
Description of a user application.
ApplicationPermissions
Permissions for applications on a chain.
Blob
A blob of binary data, with its hash.
BlobContent
A blob of binary data.
BlockHeight
A block height to identify blocks in a chain.
Bytecode
A WebAssembly module’s bytecode.
CanonicalBTreeSet
A BTreeSet that serializes canonically, like a BTreeMap<T, ()>.
ChainDescription
Initial chain configuration and chain origin.
CompressedBytecode
A compressed module bytecode (WebAssembly or EVM).
Cursor
A logical position in a chain’s stream of outgoing messages: the height of the block that produced the message and the index of the message-producing transaction within that block.
Epoch
A number identifying the configuration of the chain (aka the committee).
Event
An event recorded in a block.
InitialChainConfig
The initial configuration for a new chain.
MessagePolicy
Policies for automatically handling incoming messages.
NetworkDescription
A description of the current Linera network to be stored in every node’s database.
NonCanonicalBTreeMap
A BTreeMap that serializes like a Vec<(K, V)> instead of using BCS’s canonical map encoding.
Resources
Resources that an application may spend during the execution of transaction or an application call.
SendMessageRequest
A request to send a message.
StreamUpdate
An update for a stream with new events.
TimeDelta
A duration in microseconds.
Timestamp
A timestamp, in microseconds since the Unix epoch.
U128
A u128 newtype that serializes as a decimal string in human-readable formats (JSON / GraphQL) and as a bare u128 in binary (BCS).

Enums§

ArithmeticError
An error type for arithmetic errors.
BlanketMessagePolicy
A blanket policy to apply to all messages by default.
ChainOrigin
What created a chain.
DecompressionError
A type for errors happening during decompression.
OracleResponse
A record of a single oracle response.
ParseAmountError
Round
An identifier for successive attempts to decide a value in a consensus protocol.

Type Aliases§

CanonicalBTreeMap
A BTreeMap suitable for key position; an alias for BTreeMap itself.
NonCanonicalBTreeSet
A BTreeSet used in value position; the counterpart to NonCanonicalBTreeMap.