Crate concordium_rust_sdk

Source
Expand description

A library for interacting with the Concordium blockchain. The library is structured around multiple modules.

  • v2 contains the main entrypoint to the library. In particular it contains the Client struct which maintains a connection to the node, and supports queries and node manipulation. This client uses gRPC API version 2 of the Concordium node.
  • constants contains a number of constants and type definitions that are relevant when using the chain.
  • types contains most type definitions to model responses as well as types defining transactions. The latter are in a submodule types::transactions.

In addition to these, the library re-exports a number of core crates that implement the core cryptographic protocols of the Concordium blockchain.

  • id is the implementation of most of the protocols in the identity layer
  • common has some common type definitions, as well as traits and helpers for binary serialization
  • encrypted_transfers implements structures and zero knowledge proofs related to encrypted transfers. Note that this functionality has been deprecated in protocol version 7.
  • eddsa_ed25519 is a re-export of the signature scheme used for blocks and accounts on the Concordium blockchain.
  • aggregate_sig is a re-export of the BLS signature scheme, used by the validators. This is useful for constructing baker transactions.
  • ecvrf is a re-export of the implementation of the VRF function used to determine lottery winners in consensus.
  • concordium_base is a re-export as base. The main purpose of this is to enable the use of concordium_base_derive serialization macros.

Re-exports§

pub use concordium_base as base;

Modules§

aggregate_sig
Implementation of aggregate signatures specified in https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04
cis0
This module contains types and functions for interacting with smart contracts following the CIS-0 specification.
cis2
This module contains types and functions for interacting with smart contracts following the CIS-2 specification.
cis3
This module contains types and functions for interacting with smart contracts following the CIS-3 specification.
cis4
This module contains types and functions for interacting with smart contracts following the CIS-4 specification.
common
Common types and operations used throughout the Concordium chain development.
constants
Various constants and types that apply to the chain.
contract_client
This module contains a generic client that provides conveniences for interacting with any smart contract instance, as well as for creating new ones.
ecvrf
Implementation of the verifiable random function as specified in https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-09.
eddsa_ed25519
A few helpers around the dalek ed25519 signature scheme.
encrypted_transfers
This library provides the API needed by the chain, the wallet, and the supporting tools to deal with encrypted amounts.
endpoints
Wrapper for the node’s GRPC API. The return values are parsed and wrapped in structured values.
id
This module and its submodules implement the Concordium identity layer, providing the core functionality for all entities involved (users, identity providers, and the chain).
indexer
Support for writing indexers using the Rust SDK.
signatures
Functionality for generating, and verifying account signatures.
smart_contracts
Functions and types related to smart contracts.
types
Type definitions used throughout the rest of the SDK.
v2
This module exposes Client which is a wrapper around the generated gRPC rust client, providing a more ergonomic interface than the generated client. See Client for documentation of how to use.
web3id
Functionality for retrieving, verifying, and registering web3id credentials.