pub fn generate_runtime_api_from_url(
    item_mod: ItemMod,
    url: &Uri,
    derives: DerivesRegistry,
    crate_path: CratePath
) -> TokenStream2
Expand description

Generates the API for interacting with a substrate runtime, using metadata that can be downloaded from a node at the provided URL. This function blocks while retrieving the metadata.

Arguments

  • item_mod - The module declaration for which the API is implemented.
  • url - HTTP/WS URL to the substrate node you’d like to pull metadata from.
  • derives - Provide custom derives for the generated types.
  • crate_path - Path to the subxt crate.

Note: This is a wrapper over RuntimeGenerator for static metadata use-cases.