Clarify how ApiId is being generated (#9519)

* Clarify how `ApiId` is being generated

* Clarify more
This commit is contained in:
Bastian Köcher
2021-08-09 13:39:50 +02:00
committed by GitHub
parent 6e0cd5587d
commit 4503a722da
+5
View File
@@ -98,6 +98,11 @@ pub mod embed;
pub use sp_version_proc_macro::runtime_version;
/// The identity of a particular API interface that the runtime might provide.
///
/// The id is generated by hashing the name of the runtime api with BLAKE2 using a hash size
/// of 8 bytes.
///
/// The name of the runtime api is the name of the trait when using `decl_runtime_apis!` macro.
pub type ApiId = [u8; 8];
/// A vector of pairs of `ApiId` and a `u32` for version.