Expand description
Miscellaneous utility helpers.
Modules§
- bits
- Generic
scale_bitsoverbitvec-likeBitOrderandBitFormattypes. - eth
- A couple of convenience types to use for Ethereum style chains.
Structs§
- Account
Id32 - A 32-byte cryptographic identifier. This is a simplified version of Substrate’s
sp_core::crypto::AccountId32. To obtain more functionality, convert this into that type. - Encoded
- Wraps an already encoded byte vector, prevents being encoded as a raw byte vector as part of the transaction payload
- H160
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- H256
- Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
- H512
- Fixed-size uninterpreted hash type with 64 bytes (512 bits) size.
- Range
Map - A map that associates ranges of keys with values.
- Range
MapBuilder - A builder for constructing a
RangeMap. Use ``RangeMap::builder()` to create one. - Static
- If the type inside this implements
Encode, this will implementscale_encode::EncodeAsType. If the type inside this implementsDecode, this will implementscale_decode::DecodeAsType. - Unchecked
Extrinsic - The unchecked extrinsic from substrate.
- Wrapper
Keep Opaque - A wrapper for any type
Twhich implement encode/decode in a way compatible withVec<u8>.WrapperKeepOpaquestores the type only in its opaque format, aka as aVec<u8>. To access the real typeTSelf::try_decodeneeds to be used.
Enums§
- Era
- An era to describe the longevity of a transaction.
- Fetch
Chainspec Error - Possible errors encountered trying to fetch a chain spec from an RPC node.
- Maybe
- A unit marker enum.
- Multi
Address - A multi-format address wrapper for on-chain accounts. This is a simplified version of Substrate’s
sp_runtime::MultiAddress. - Multi
Signature - Signature container that can store known signature types. This is a simplified version of
sp_runtime::MultiSignature. To obtain more functionality, convert this into that type. - No
- A unit marker enum.
- Range
MapError - An error that can occur when calling
RangeMapBuilder::try_add_range(). - Yes
- A unit marker enum.
Traits§
- NoMaybe
- This is implemented for
NoandMaybeand allows us to check at runtime which of these types is present. - YesMaybe
- This is implemented for
YesandMaybeand allows us to check at runtime which of these types is present. - YesNo
- This is implemented for
YesandNoand allows us to check at runtime which of these types is present.
Functions§
- fetch_
chainspec_ from_ rpc_ node - Fetch a chain spec from an RPC node at the given URL.
- strip_
compact_ prefix - Decodes a compact encoded value from the beginning of the provided bytes, returning the value and any remaining bytes.
- to_hex
- A quick helper to encode some bytes to hex.
Type Aliases§
- Keyed
Vec - This represents a key-value collection and is SCALE compatible
with collections like BTreeMap. This has the same type params
as
BTreeMapwhich allows us to easily swap the two during codegen.