32 releases (breaking)

0.38.0 Oct 24, 2024
0.37.0 May 28, 2024
0.36.1 May 28, 2024
0.35.0 Mar 21, 2024
0.2.0 Nov 15, 2021

#6 in #subxt

Download history 14/week @ 2024-07-29 18/week @ 2024-08-05 16/week @ 2024-08-12 24/week @ 2024-08-19 58/week @ 2024-08-26 51/week @ 2024-09-02 51/week @ 2024-09-09 52/week @ 2024-09-16 95/week @ 2024-09-23 108/week @ 2024-09-30 114/week @ 2024-10-07 45/week @ 2024-10-14 195/week @ 2024-10-21 101/week @ 2024-10-28 89/week @ 2024-11-04 45/week @ 2024-11-11

432 downloads per month

Apache-2.0 OR GPL-3.0 and maybe GPL-3.0-or-later…

1MB
17K SLoC

subxt-cli

Utilities for working with substrate metadata for subxt

USAGE:
subxt <SUBCOMMAND>

FLAGS:
-h, --help
Prints help information

    -V, --version
            Prints version information


SUBCOMMANDS:
codegen     Generate runtime API client code from metadata
help        Prints this message or the help of the given subcommand(s)
metadata    Download metadata from a substrate node, for use with `subxt` codegen

Metadata

Use to download metadata for inspection, or use in the subxt macro. e.g.

subxt metadata -f bytes > metadata.scale

USAGE:
    subxt metadata [OPTIONS]

OPTIONS:
    -f, --format <format>    the format of the metadata to display: `json`, `hex` or `bytes` [default: json]
        --url <url>          the url of the substrate node to query for metadata [default: http://localhost:9933]

Codegen

Use to invoke the subxt-codegen crate which is used by subxt-macro to generate the runtime API and types. Useful for troubleshooting codegen as an alternative to cargo expand, and also provides the possibility to customize the generated code if the macro does not produce the desired API. e.g.

subxt codegen | rustfmt --edition=2018 --emit=stdout

USAGE:
    subxt codegen [OPTIONS]

OPTIONS:
    -f, --file <file>
            the path to the encoded metadata file

        --url <url>
            the url of the substrate node to query for metadata for codegen

Dependencies

~30–45MB
~797K SLoC