29 releases (breaking)

new 0.35.3 Apr 11, 2024
0.35.0 Mar 21, 2024
0.33.0 Dec 7, 2023
0.32.1 Oct 5, 2023
0.2.0 Nov 15, 2021

#268 in Magic Beans

Download history 10/week @ 2023-12-21 8/week @ 2023-12-28 19/week @ 2024-01-04 27/week @ 2024-01-11 31/week @ 2024-01-18 43/week @ 2024-01-25 60/week @ 2024-02-01 49/week @ 2024-02-08 42/week @ 2024-02-15 75/week @ 2024-02-22 79/week @ 2024-02-29 42/week @ 2024-03-07 33/week @ 2024-03-14 151/week @ 2024-03-21 219/week @ 2024-03-28 126/week @ 2024-04-04

534 downloads per month

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

1MB
19K 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

~40–55MB
~1M SLoC