Crate rgb

Source

Re-exports§

pub extern crate rgb_invoice as invoice;

Modules§

aluvm
AluVM ISA extension for zero knowledge applications, implementing Galois field arithmetics.
popls
Proof of publication layers supported by RGB.
stlstl
uri

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.
Assignment
AuthToken
Authorization token used for controlling the destructible memory cell access.
Builder
BuilderRef
CallParams
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.
Consignment
Contract
ContractId
Unique contract identifier equivalent to the contract genesis commitment
ContractMeta
Metadata about the contract.
ContractState
ContractStateName
Contracts
Collection of RGB smart contracts and contract issuers, which can be cached in memory.
CoreParams
CreateParams
Parameters used by RGB for contract creation operations.
DataCell
DeedBuilder
EffectiveState
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.
ImmutableState
Input
Operation input for a destructible (read-once) state.
InvalidContractRef
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
Ledger
Contract with all its state and operations, supporting updates and rollbacks.
NamedState
NoClientWitness
Some single-use seal protocols may not distinguish client-side seal closing witness and have just the published one. To use SealWitness type in such protocols, the SingleUseSeal must set its SingleUseSeal::CliWitness to NoClientWitness type.
OpBuilder
OpBuilderRef
OpRels
Operation
Operation under a contract which may update the contract state.
OperationSeals
Combination of an operation with operation-defined seals.
Opid
Unique operation (genesis, extensions & state transition) identifier equivalent to the commitment hash
Outpointbitcoin
OwnedApi
API for owned (destrictible, or read-once) state.
OwnedState
Element of the contract owned state, carrying information about its confirmation status.
ParseLayer1Error
ProcessedState
RawData
The raw data for the immutable (read-only) memory cells.
RawState
Satisfaction
SealWitness
Seal closing witness, consisting of published and client-side parts.
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.
Transition
State transitions keeping track of the operation reference plus the state destroyed by the operation.
Txidbitcoin
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.
WalletState
Witness
fe256
Element of a Galois finite field.

Enums§

AcceptError
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.
ConsumeError
ContractName
Contract name.
ContractRef
EitherSeal
Endpoint
Instr
Complete AluVM instruction set for the Ultrasonic virtual machine, which includes the following architectures:
IssueError
IssuerError
IssuerSpec
ParseAddrError
Errors during parsing CellAddr from a string representation.
ParseVersionedError
Errors happening during parsing of a versioned contract or codex ID.
RawBuilder
RawConvertor
SealError
Errors indicating cases of failed single-use seal verification with SealWitness::verify_seal_closing and SealWitness::verify_seals_closing procedures.
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.
SyncError
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).
VerificationError
Errors returned from the verification.
VersionRange
WitnessStatus
The status of the witness transaction.

Constants§

CONSIGN_MAGIC_NUMBERbinfile
CONSIGN_VERSION
DEEDS_MAGIC_NUMBER
DEEDS_VERSION
ISA_ULTRASONIC
AluVM ISA architecture id for Ultrasonic ISA extension.
ISSUER_MAGIC_NUMBER
The magic number used in storing issuer as a binary file.
ISSUER_VERSION
The issuer encoding version used in storing issuer as a binary file.
LIB_NAME_RGB
Strict type library name for all RGB-related types.
LIB_NAME_SEALS
Strict type library name for single-use seals.
LIB_NAME_SONIC
LIB_NAME_ULTRASONIC
Strict type library name for the types defined in this crate.
MAX_CONSIGNMENT_OPS
TOTAL_RAW_BYTES

Traits§

ClientSideWitness
A client-side part of the seal closing witness SealWitness.
ContractApi
API exposed by the contract required for evaluating and verifying the contract state (see ContractVerify).
ContractVerify
Main implementation of the contract verification procedure.
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).
Pile
Persistent storage for contract witness and single-use seal definition data.
PublishedWitness
A published part of the seal closing witness SealWitness.
ReadOperation
Provider which reads an operation and its seals from a consignment stream.
RgbSeal
A type which serves as a single-use seal protocol implementation for RGB contracts.
RgbSealDef
A type which serves as a definition of a single-use seal for RGB contracts.
SingleUseSeal
Trait for the types implementing single-use seal protocol, composing all their components (seal definition, message, and seal closing withness) together, and implementing the logic of the protocol-specific verification of the seal closing over the message (see Self::is_included).
Stock
Stock is a persistence API for keeping and accessing contract data.
Stockpile
Stockpile provides a specific persistence implementation for the use in crate::Contracts. It allows for it to abstract from a specific storage media, whether it is a file system, database, or a network service. Its main task is to load already known contract issuers and contract runtimes (Contract); or to add new ones via the Self::import_issuer and Self::issue procedures.

Functions§

parse_consignment

Type Aliases§

CallId
Identifier of a contract method call.
MethodName
StateName
StateTy