Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Clarify how ApiId is being generated (#9519)
Browse files Browse the repository at this point in the history
* Clarify how `ApiId` is being generated

* Clarify more
  • Loading branch information
bkchr authored Aug 9, 2021
1 parent f2b3997 commit d7babec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions primitives/version/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d7babec

Please sign in to comment.