Crate sonicapi

Source

Modules§

aluvm
AluVM ISA extension for zero knowledge applications, implementing Galois field arithmetics.
stl
Ultrasonic strict types library.

Macros§

impl_serde_str_bin_wrapper
Implement serde serialize and deserialize traits for a type wrapping another type, such that it uses Display and FromStr for human-readable serialization, and binary for non-human readable.
test_serde_str_bin_wrapper
Testing macro for implementations of impl_serde_str_bin_wrapper.
uasm
Macro compiler for AluVM assembler.

Structs§

Api
API is an interface implementation.
ApisChecksum
API checksum computed from a set of contract APIs present in Semantics.
Articles
Articles contain the contract and all related codex and API information for interacting with it.
ArticlesId
Articles id is a versioned variant for the contract id, which includes information about a specific API version.
AuthToken
Authorization token used for controlling the destructible memory cell access.
Builder
BuilderRef
CallRequest
Call request provides information for constructing [hypersonic::CallParams].
CallState
Combination of a method name and an optional state name used in API requests.
CellAddr
Address of the memory cell.
CellLock
Custom lock conditions specific to a single destructible lock cell.
Codex
Codex is a crucial part of a contract; it provides a set of commitments to the contract terms and conditions expressed as a deterministic program able to run in SONIC computer model.
CodexId
Unique codex identifier - a commitment to all the Codex data.
ContractId
Unique contract identifier equivalent to the contract genesis commitment
ContractMeta
Metadata about the contract.
CoreParams
DataCell
Genesis
Contract genesis.
GlobalApi
API for global (immutable, or append-only) state.
Identity
An ASCII printable string up to 4096 chars representing identity of a developer.
Input
Operation input for a destructible (read-once) state.
IoCat
Category of operation input or output data.
Issue
Information on the issue of the contract.
IssueParams
Issuer
An issuer contains information required for the creation of a contract and interaction with an existing contract.
IssuerId
Issuer id is a versioned variant for the codex id, which includes information about a specific API version.
Layer1
NamedState
OpBuilder
OpBuilderRef
Operation
Operation under a contract which may update the contract state.
Opid
Unique operation (genesis, extensions & state transition) identifier equivalent to the commitment hash
OwnedApi
API for owned (destrictible, or read-once) state.
ParseLayer1Error
RawData
The raw data for the immutable (read-only) memory cells.
Semantics
A helper structure to store the contract semantics, made of a set of APIs, corresponding type system, and libs, used by the codex.
SigBlob
A signature blob.
StateAtom
StateCell
Read-once access-controlled memory cell, defining destructible part of the contract state.
StateData
State kept in the immutable (read-only) memory cells.
StateUnknown
Error indicating that an API was asked to convert a state which is not known to it.
UsonicCore
ALU Core extension for USONIC ISA.
VerifiedOperation
Provably verified operation, which can be constructed only by running [Codex::verify] method.
VmContext
Context object provided to the VM instance, containing references to the operation inputs and outputs.
fe256
Element of a Galois finite field.

Enums§

Aggregator
A set of pre-defined top-level state aggregators (see crate::Api::aggregators.
CallError
Contract operation verification errors returned by Codex::verify.
CallScope
Consensus
Consensus (layer 1) which is used by a contract.
ContractName
Contract name.
Endpoint
Instr
Complete AluVM instruction set for the Ultrasonic virtual machine, which includes the following architectures:
IssuerSpec
ParseAddrError
Errors during parsing CellAddr from a string representation.
ParseVersionedError
Errors happening during parsing of a versioned contract or codex ID.
RawBuilder
RawConvertor
SemanticError
Errors happening if it is attempted to construct an invalid semantic object Semantics or upgrade it inside a contract issuer or articles.
StateArithm
StateBuildError
StateBuilder
StateCalc
StateCalcError
StateConvertError
StateConvertor
StateSelector
Structure which allows applying aggregators either to a global or a different aggregated state.
StateValue
A value stored in a single memory cell.
SubAggregator
A set of pre-defined state sub-aggregators (see crate::Api::aggregators.
UsonicInstr
The instruction set uses iterator semantics and not random access semantic to correspond to the RISC type of the machine and not to add assumptions about abilities to access the operation state randomly. Operation state is always iterated, such that not a single state element can be missed (as long as the iterator runs to the end).
VersionRange

Constants§

ISA_ULTRASONIC
AluVM ISA architecture id for Ultrasonic ISA extension.
ISSUER_MAGIC_NUMBERbinfile
The magic number used in storing issuer as a binary file.
ISSUER_VERSIONbinfile
The issuer encoding version used in storing issuer as a binary file.
LIB_NAME_SONIC
LIB_NAME_ULTRASONIC
Strict type library name for the types defined in this crate.
TOTAL_RAW_BYTES

Traits§

LibRepo
The trait providing access to all the VM code libraries used by the contract, in both operation verification or state access conditions.
Memory
The trait, which must be implemented by a client library for a structure providing access to the valid and most recent contract state, consisting of two parts: destructible (also called read-once, or owned) and immutable (also called read-only, append-only or global).

Type Aliases§

CallId
Identifier of a contract method call.
MethodName
StateName
StateTy