diff --git a/README.md b/README.md index e60a81ff..af68e186 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ and is receiving breaking changes frequently.** To use the library, include in your toml: ```toml -stellar-xdr = { version = "...", default-features = true, features = [...] } +stellar-xdr = { version = "...", default-features = true, features = [] } ``` ##### Features @@ -66,24 +66,28 @@ the root of the crate. To use the CLI: -```toml +```console cargo install --locked stellar-xdr --version ... --features cli ``` ##### Examples Parse a `TransactionEnvelope`: -```rust -echo -n 'AAAAA...' | stellar-xdr decode --type TransactionEnvelope +```console +stellar-xdr decode --type TransactionEnvelope << - +AAAAA... +- ``` Parse a `ScSpecEntry` stream from a contract: -```rust -echo -n 'AAAAA...' | stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted +```console +stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted << - +AAAAA... +- ``` Parse a `BucketEntry` framed stream from a bucket file: -```rust +```console stellar-xdr decode --type BucketEntry --input stream-framed --output json-formatted bucket.xdr ``` diff --git a/src/lib.rs b/src/lib.rs index 723f3bb1..6d905d0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ //! To use the library, include in your toml: //! //! ```toml -//! stellar-xdr = { version = "...", default-features = true, features = [...] } +//! stellar-xdr = { version = "...", default-features = true, features = [] } //! ``` //! //! #### Features @@ -68,7 +68,7 @@ //! //! To use the CLI: //! -//! ```toml +//! ```console //! cargo install --locked stellar-xdr --version ... --features cli //! ``` //! @@ -76,12 +76,16 @@ //! //! Parse a `TransactionEnvelope`: //! ```console -//! echo -n 'AAAAA...' | stellar-xdr decode --type TransactionEnvelope +//! stellar-xdr decode --type TransactionEnvelope << - +//! AAAAA... +//! - //! ``` //! //! Parse a `ScSpecEntry` stream from a contract: //! ```console -//! echo -n 'AAAAA...' | stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted +//! stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted << - +//! AAAAA... +//! - //! ``` //! //! Parse a `BucketEntry` framed stream from a bucket file: