#json-key #base58 #json-format #solana #tool #convert-json #cli-tool

app solana-base58-json-converter

A CLI tool for converting Solana private key from/to base58 to/from json

1 unstable release

0.1.0 Aug 3, 2022

#15 in #json-key

Download history 7/week @ 2024-02-22 9/week @ 2024-02-29 3/week @ 2024-03-14 24/week @ 2024-03-21 26/week @ 2024-03-28 49/week @ 2024-04-04 11/week @ 2024-04-11

86 downloads per month

MIT license

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

~19–28MB
~466K SLoC