Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.41 KB

File metadata and controls

67 lines (48 loc) · 1.41 KB

Keys

A key is required for signing transactions (swaps, transfers). Keys are stored locally at ~/.config/jup/keys/.

Commands

Add a new key

Generate a new key:

jup keys add <name>

Import from a JSON file generated via solana-keygen:

jup keys add <name> --file /path/to/solana-keygen.json

Import from private key or seed phrase:

jup keys add <name> --seed-phrase "word1 word2 ..."
jup keys add <name> --seed-phrase "word1 word2 ..." --derivation-path "m/44'/501'/0'/0'" # optional, defaults to "m/44'/501'/0'/0'"
jup keys add <name> --private-key <key> # accepts hex, base58, base64, or a JSON byte array

List keys

jup keys list
// Example JSON response:
[
  {
    "name": "key1",
    "address": "ABC1...xyz", // Solana wallet address
    "active": true // if true, key is used by default for signing transactions
  }
]

Set the active key

jup keys use <name>

Edit a key

jup keys edit <name> --name <new-name>
jup keys edit <name> --seed-phrase "word1 word2 ..."
jup keys edit <name> --seed-phrase "word1 word2 ..." --derivation-path "m/44'/501'/0'/0'" # optional, defaults to "m/44'/501'/0'/0'"
jup keys edit <name> --private-key <key>

Rename a key and/or replace its credentials. Options can be combined. --seed-phrase and --private-key are mutually exclusive.

Delete a key

jup keys delete <name>