Function subxt_codegen::generate_runtime_api_from_bytes
source · pub fn generate_runtime_api_from_bytes(
item_mod: ItemMod,
bytes: &[u8],
derives: DerivesRegistry,
type_substitutes: TypeSubstitutes,
crate_path: CratePath
) -> TokenStream2Expand description
Generates the API for interacting with a substrate runtime, using metadata bytes.
Arguments
item_mod- The module declaration for which the API is implemented.bytes- The raw metadata bytes.derives- Provide custom derives for the generated types.type_substitutes- Provide custom type substitutes.crate_path- Path to thesubxtcrate.
Note: This is a wrapper over RuntimeGenerator for static metadata use-cases.