Expand description
Miscellaneous utility helpers.
Modules§
- bits
- Generic
scale_bits
overbitvec
-likeBitOrder
andBitFormat
types.
Structs§
- Account
Id20 - Ethereum-compatible
AccountId
. - 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.
- 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
T
which implement encode/decode in a way compatible withVec<u8>
.WrapperKeepOpaque
stores the type only in its opaque format, aka as aVec<u8>
. To access the real typeT
Self::try_decode
needs to be used. - Yes
- A unit marker struct.
Enums§
- Era
- An era to describe the longevity of a transaction.
- 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.
Functions§
- 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
BTreeMap
which allows us to easily swap the two during codegen.