Crate cbe_sdk

source ·
Expand description

The Cartallum CBE host and client SDK.

This is the base library for all off-chain programs that interact with Cartallum CBE or otherwise operate on Cartallum CBE data structures. On-chain programs instead use the cbe-program crate, the modules of which are re-exported by this crate, like the relationship between the Rust core and std crates. As much of the functionality of this crate is provided by cbe-program, see that crate’s documentation for an overview.

Many of the modules in this crate are primarily of use to the Cartallum CBE runtime itself. Additional crates provide capabilities built on cbe-sdk, and many programs will need to link to those crates as well, particularly for clients communicating with Cartallum CBE nodes over RPC.

Such crates include:

  • cbe-client - For interacting with a Cartallum CBE node via the JSON-RPC API.
  • cbe-cli-config - Loading and saving the Cartallum CBE CLI configuration file.
  • cbe-clap-utils - Routines for setting up the CLI using clap, as used by the Cartallum CBE CLI. Includes functions for loading all types of signers supported by the CLI.

Re-exports

pub extern crate bs58;
pub use signer::signers;

Modules

The Cartallum CBE Account type.
Account information.
Useful extras for Account state.
The definition of address lookup table accounts.
Hashing with the blake3 hash function.
Utilities for the borsh serialization format.
The latest BPF loader native program.
The original and now deprecated Cartallum CBE BPF loader.
An upgradeable BPF loader native program.
Cartallum CBE helper macros for declaring built-in programs.
Defines traits for blocking (synchronous) and non-blocking (asynchronous) communication with a Cartallum CBE server as well a a trait that encompasses both.
Information about the network’s clock, ticks, slots, etc.
Definitions of commitment levels.
The compute budget native program.
Debug-formatting of account data.
Converting custom error codes to enums.
BIP-44 derivation paths.
Serde helpers.
The Rust-based BPF program entrypoint supported by the latest BPF loader.
The Rust-based BPF program entrypoint supported by the original BPF loader.
Information about the current epoch.
Configuration for epochs and slots.
Used by validators to run events on exit.
Methods for working with Feature accounts.
Collection of all runtime features.
Fee structures.
Calculation of transaction fees.
The chain’s genesis config.
The list of slot boundaries at which a hard fork should occur.
Hashing with the SHA-256 hash function, and a general Hash type.
A designated address for burning scoobies.
configuration for network inflation
Types for directing the execution of Cartallum CBE programs.
Hashing with the keccak (SHA-3) hash function.
Sequences of Instructions executed within a single transaction.
The native loader native program.
Definitions for the native CBC token and its fractional scoobies.
Durable transaction nonces.
Functions related to nonce accounts.
Off-chain message container for storing non-transaction messages.
The definition of a Cartallum CBE network packet.
Definitions of Cartallum CBE’s proof of history.
Cartallum CBE precompiled programs.
Cross-program invocation.
The ProgramError type and related definitions.
Basic low-level memory operations.
A C representation of Rust’s Option, used across the FFI boundary for Cartallum CBE program interfaces.
The Pack serialization trait.
Implementations of syscalls used when cbe-program is built for non-SBF targets.
Contains a single utility function for deserializing from bincode.
Cartallum CBE account addresses.
Definitions related to Cartallum CBE over QUIC.
Helpers for the recent blockhashes sysvar.
Configuration for network rent.
Enumeration of reward types.
RPC default port numbers.
A trait for sanitizing values and members of over the wire messages.
Defines the ScoobiesError type.
A vector of Cartallum CBE SDK IDs.
Public key recovery from secp256k1 ECDSA signatures.
Helpers for reading and writing bytes.
Compact serde-encoding of vectors with small length.
Calculation of shred versions.
Functionality for public and private keys.
Abstractions and implementations for transaction signers.
A type to hold data for the SlotHashes sysvar.
A type to hold data for the SlotHistory sysvar.
A type to hold data for the StakeHistory sysvar.
Declarations of Cartallum CBE program syscalls.
Instructions and constructors for the system program.
The system_transaction module provides functionality for creating system transactions.
Access to special accounts with dynamically-updated data.
The timing module provides std::time utility functions.
Atomically-committed sequences of instructions.
Data shared between program runtime and built-in programs as well as SBF programs.
Defines the TransportError type.

Macros

Define the default global allocator.
Define the default global panic handler.
Convenience macro to declare a built-in program.
Same as declare_id except report that this id has been deprecated.
Same as [declare_sysvar_id] except that it reports that this ID has been deprecated.
Convenience macro to declare a static public key and functions to interact with it.
Declares an ID that implements SysvarId.
entrypointDeprecated
Implements the Sysvar::get method for both SBF and host targets.
Print a message to the log.
program_stubsDeprecated
Convenience macro to define a static public key.
Convenience macro to define multiple static public keys.
A proc-macro which respans the tokens in its first argument (a Path) to be resolved at the tokens of its second argument. For internal use only.
Convenience macro for AddAssign with saturating arithmetic. Replace by std::num::Saturating once stable
Convenience macro for doing integer division where the operation’s safety can be checked at compile-time.

Attribute Macros