[][src]Crate casperlabs_types

Types used to allow creation of Wasm contracts and tests for use on the CasperLabs Platform.

no_std

By default, the library is no_std, however you can enable full std functionality by enabling the crate's std feature.

Modules

account

Contains types and constants associated with user accounts.

api_error

Contains ApiError and associated helper functions.

bytesrepr

Contains serialization and deserialization code for types used throughout the system.

system_contract_errors

Home of error types returned by system contracts.

Structs

AccessRights

A struct which behaves like a set of bitflags to define access rights associated with a URef.

BlockTime

A newtype wrapping a u64 which represents the block time.

CLTypeMismatch

Error while converting a CLValue into a given type.

CLValue

A CasperLabs value, i.e. a value which can be stored and manipulated by smart contracts.

ProtocolVersion

A newtype wrapping a SemVer which represents a CasperLabs Platform protocol version.

SemVer

A struct for semantic versioning.

U128

Little-endian large integer type

U256

Little-endian large integer type

U512

Little-endian large integer type

URef

Represents an unforgeable reference, containing an address in the network's global storage and the AccessRights of the reference.

Enums

ApiError

Errors which can be encountered while running a smart contract.

CLType

CasperLabs types, i.e. types which can be stored and manipulated by smart contracts.

CLValueError

Error relating to CLValue operations.

ContractRef

A reference to a smart contract stored on the network.

Key

The type under which data (e.g. CLValues, smart contracts, user accounts) are indexed on the network.

Phase

The phase in which a given contract is executing.

SystemContractType

System contract types.

TransferredTo

The result of a successful transfer between purses.

UIntParseError

Error type for parsing U128, U256, U512 from a string.

VersionCheckResult

The result of ProtocolVersion::check_next_version.

Constants

ACCESS_RIGHTS_SERIALIZED_LENGTH

The number of bytes in a serialized AccessRights.

BLAKE2B_DIGEST_LENGTH

The number of bytes in a Blake2b hash

BLOCKTIME_SERIALIZED_LENGTH

The number of bytes in a serialized BlockTime.

KEY_HASH_LENGTH

The number of bytes in a Key::Hash.

KEY_LOCAL_LENGTH

The number of bytes in a Key::Local.

KEY_LOCAL_SEED_LENGTH

The number of bytes in the seed for a new Key::Local.

PHASE_SERIALIZED_LENGTH

The number of bytes in a serialized Phase.

UREF_ADDR_LENGTH

The number of bytes in a URef address.

UREF_SERIALIZED_LENGTH

The number of bytes in a serialized URef where the AccessRights are not None.

Traits

CLTyped

A type which can be described as a CLType.

Functions

named_key_type

Returns the CLType describing a "named key" on the system, i.e. a (String, Key).

Type Definitions

TransferResult

The result of an attempt to transfer between purses.