#decode #encode-decode #stellar #contract #cli #strkeys #strkey

bin+lib stellar-strkey

Encode and decode strkeys for Stellar

8 releases

0.0.11 Sep 11, 2024
0.0.10 Sep 4, 2024
0.0.8 Oct 24, 2023
0.0.7 Jan 3, 2023
0.0.2 Sep 9, 2022

#3 in #stellar

Download history 3089/week @ 2024-07-18 3751/week @ 2024-07-25 3993/week @ 2024-08-01 2645/week @ 2024-08-08 3069/week @ 2024-08-15 3377/week @ 2024-08-22 3982/week @ 2024-08-29 3945/week @ 2024-09-05 3602/week @ 2024-09-12 3841/week @ 2024-09-19 3618/week @ 2024-09-26 4496/week @ 2024-10-03 4252/week @ 2024-10-10 3096/week @ 2024-10-17 4715/week @ 2024-10-24 5161/week @ 2024-10-31

18,349 downloads per month
Used in 72 crates (25 directly)

Apache-2.0

30KB
681 lines

rs-stellar-strkey

Library and CLI containing types and functionality for working with Stellar Strkeys.

This repository contains code that is in early development, incomplete, not tested, and not recommended for use. The API is unstable, experimental, and is receiving breaking changes frequently.

Usage

Library

To use the library, include in your toml:

stellar-strkey = "..."

This crate does not depend on the std crate and can be used in no_std environments. However, please note that it relies on the alloc crate for certain types such as Vec.

CLI

To use the CLI:

cargo install --locked stellar-strkey --version ... --features cli
Examples

Decode a G account/public-key strkey:

$ stellar-strkey decode GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF
PublicKeyEd25519(PublicKey(0000000000000000000000000000000000000000000000000000000000000000))

Decode a C contract strkey:

$ stellar-strkey decode CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
Contract(Contract(0000000000000000000000000000000000000000000000000000000000000000))

License: Apache-2.0

Dependencies

~0.4–1MB
~22K SLoC