Crate gclient::ext::sp_core

Expand description

Shareable Substrate types.

Modules§

  • Collection types that have an upper limit on how many elements that they can contain, and supporting traits that aid in defining the limit.
  • Cryptographic utilities.
  • Contains the crate::defer! macro for deferring the execution of code until the current scope is dropped. This helps with always executing cleanup code.
  • Simple ECDSA secp256k1 API.
  • Simple Ed25519 API.
  • A fixed hash type.
  • Hashing functions.
  • Wrapper type for byte collections that outputs hex.
  • Offchain workers types
  • Serde
  • Lowest-abstraction level for the Substrate runtime: just exports useful primitives from std or client/alloc to be used with any code that depends on the runtime. Substrate runtime standard library as compiled when linked with Rust’s standard library.
  • Simple sr25519 (Schnorr-Ristretto) API.
  • Primitive types for storage related stuff.
  • Types that should only be used for testing!
  • Shareable Substrate traits.
  • An unsigned fixed-size integer.

Macros§

Structs§

  • Concrete implementation of Hasher using Blake2b 256-bit hashes
  • Hex-serialized shim for Vec<u8>.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Const getter for a basic type.
  • Implement Get by returning Default for any type that implements Default.
  • Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
  • Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
  • Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
  • Concrete implementation of Hasher using Keccak 256-bit hashes
  • Stores the encoded RuntimeMetadata for the native side as opaque type.
  • Simple blob to hold a PeerId without committing to its format.
  • Little-endian large integer type 256-bit unsigned integer.
  • Little-endian large integer type 512-bits unsigned integer.

Enums§

  • A since derivation junction description. It is the single parameter used when creating a new secret key from an existing secret key and, in the case of SoftRaw and SoftIndex a new public key from an existing public key.
  • A log level matching the one from log crate.
  • Log level filter that expresses which log levels should be filtered.
  • The void type - it cannot exist.

Constants§

Traits§

  • Trait used for types that are really just a fixed-length array.
  • Trait that allows zero-copy read of value-references from slices in LE format.
  • Trait that allows zero-copy write of value-references to slices in LE format.
  • A trait for querying a single value from a type.
  • Trait describing an object that can hash a slice of bytes. Used to abstract other types over the hashing algorithm. Defines a single hash method and an Out associated type with the necessary bounds.
  • Items implementing MaxEncodedLen have a statically known maximum encoded size.
  • Trait suitable for typical cryptographic PKI key pair type.
  • Trait suitable for typical cryptographic key public type.
  • Try and collect into a collection C.
  • Provide a simple 4 byte identifier for a type.
  • A trait for querying a single value from a type defined in the trait.

Functions§

  • Do a Blake2 128-bit hash and return result.
  • Do a Blake2 256-bit hash and return result.
  • Hash conversion. Used to convert between unbound associated hash types in traits, implemented by the same hash type. Panics if used to convert between different hash types.
  • Do a keccak 256-bit hash and return result.
  • Do a XX 64-bit hash and return result.
  • Do a XX 128-bit hash and return result.
  • Do a XX 256-bit hash and return result.

Derive Macros§

  • Derive parity_scale_codec::Decode and for struct and enum.
  • Derive parity_scale_codec::Encode and parity_scale_codec::EncodeLike for struct and enum.
  • Derive parity_scale_codec::MaxEncodedLen for struct and enum.