1 unstable release
0.1.0 | Aug 3, 2022 |
---|
#15 in #json-key
28 downloads per month
13KB
Solana Base58 <-> JSON Converter
A small CLI tool to convert Solana keys from/to Base58 format to/from JSON format.
Installation
cargo install solana-base58-json-converter
Usage
Convert JSON key to Base58
$ sbjc --json "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"
1111111111111111111111111111111111111111111111111111111111111111
Or
$ cat key.json
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
$ sbjc --json key.json
1111111111111111111111111111111111111111111111111111111111111111
Convert Base58 key to JSON
$ sbjc --base58 1111111111111111111111111111111111111111111111111111111111111111
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
or
$ sbjc --base58 1111111111111111111111111111111111111111111111111111111111111111 > key.json
$ cat key.json
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
Dependencies
~20–29MB
~482K SLoC