R5 Network
WebsiteR5 LabsGitHub
  • Getting Started
    • Hello & Welcome!
  • About R5
    • Overview
    • R5 Components
    • Consensus Mechanism
    • zkNet (Privacy)
  • R5 Coin
  • R5 Tokenomics
  • Tutorials & Guides
    • Connect & Use R5
      • R5 Desktop Wallet
      • MetaMask
      • Rabby Wallet
      • Coinbase Wallet
    • zkNet Web Wallet
    • R5 Desktop Wallet
      • Interface Overview
      • Send a Transaction
      • Receive a Transaction
      • Backup Your Wallet
      • Retrieve Your Private Key
    • How To: Deploy a Node
    • How To: Mine R5
    • How To: GPU Mine R5
    • How To: Build R5 From Source
    • How To: Connect Local Nodes
  • For Developers
    • R5 SDK
      • R5 Relayer
      • R5 Console
      • JS Console
      • CLI Wallet
      • SCdev
      • SSL Proxy
    • Hardware Requirements
    • R5 Testnet
    • R5 Devnet
    • Local Networks
    • JSON-RPC API
      • admin
      • debug
      • ethash
      • miner
      • net
      • r5 (eth)
      • rpc
      • txpool
      • web3
    • Indexer API
    • zkNet API
    • Node Configuration
    • Ethash-R5
    • Smart Contracts
    • Wrapped R5 (Native)
    • Tokens & NFTs
  • Bug Bounty Program
  • Resources
    • Website
    • R5 Labs
    • R5 Labs GitHub
Powered by GitBook
On this page
  • Overview
  • Basic Features
  • Home Screen & Navigation
  • Configuration File
  • The r5.key Files
  1. For Developers
  2. R5 SDK

CLI Wallet

PreviousJS ConsoleNextSCdev

Last updated 2 months ago

Overview

The CLI Wallet is an easy-to-use wallet created with developers and advanced users in mind. It allows for fast and intuitive funds management, and it is excellent for generating and managing multiple wallet addresses quickly, without the need added complexity and resource usage inherent from browser extension or desktop wallets.

Basic Features

  • Encryption: The software generate wallet addresses and encrypts its private key using a user-provided password. The encrypted wallet is saved in a r5.key file and decrypted once the user provides the encryption password in the software for usage.

  • Portability: The r5.key files generated can be transported, transferred, or even sent via email to other users. It is excellent for development teams sharing test-wallets and a very efficient way to handle multiple wallet addresses - each one as one separate file.

  • Direct Connection: The wallet connects directly to the RPC node for all queries, and support both local and remote RPC connections.

  • Sending/Receiving Transactions: Sending transactions using the CLI wallet is easy, intuitive, and presented to the user on a step-by-step basis. Gas is calculated automatically but can also be personalised, giving users full control of their transaction parameters.

  • Private Key Management: The wallet can decrypt and expose the wallet private key using the user-provided password, and you can use it to further extend portability by importing the same wallet in multiple devices for testing purposes.

  • Direct-query Transaction History: It offers limited transaction history capabilities, being able to query the last 1,000 blocks for that purpose.

  • Importing Private Keys: The wallet supports importing existing wallet using their private key.

Home Screen & Navigation

The wallet's UI is primarily focused on utility and fast operation, offering developers uncompromised performance via its CLI interface.

  • Address: Public key of the loaded wallet.

  • RPC URL: URL of the current RPC the wallet is connected to.

  • Block Height: Blockchain block height.

  • Query Interval: Interval used by the wallet to update balance and block height.

On the main screen, you will have the navigation options below:

Option
Description

Send Transaction

Used to send funds to another wallet.

Refresh Wallet

Manually updates the current block height and balance.

Transaction History

Queries the last 1,000 blocks for send or received transactions.

Expose Private Key

Exposes the current wallet's private key. Use with caution!

Reset Wallet

Wipes the current wallet and creates a new one. You will lose access to the wallet if you don't backup the r5.key file, and this action cannot be undone.

Exit

Exits the wallet.

Configuration File

You can configure a wallet.ini file to connect to a custom RPC URL and define your preferred query interval. The configuration file is created automatically if not detected when starting. Your configuration file may contain the following parameters:

  • rpc_address - The RPC URL to connect to.

  • query_interval- Interval of time used by the wallet to refresh balances and block height.

An example of a wallet.ini file:

[Wallet]
rpc_address = http://localhost:8545
query_interval = 60

Some RPCs limit the amount of queries per minute users can make. If you set query_interval to be too low and the target RPC has rate-limits in place, the wallet may malfunction.

The r5.key Files

When creating a new wallet, you will be asked to provide a password. The system uses that password to encrypt your new wallet's private key, and saves it to a file named r5.key. This file can be used by multiple individuals and in multiple devices to gain access to the wallet in question.

If you have an existing r5.key file, all you need to do is to place it inside your CLI Wallet's folder and the system should detect it automatically when starting. You will need the encryption password to be able to use the imported wallet.

An example of the contents of an encrypted r5.key file:

{"salt": "L0bDJJaYr4xs4vkHVNBgOw==", "wallet": "gAAAAABnzMYZ0QKVKrSICVU8Ge2tknzvtfOI8lOAEIN1dWKKE6FBRmTjyfLcStzLgRvlgy5QVha1ZH3_19c-U13neT-KOGfvZnO0xHVbM2l6Xm4fgbLBAHjpbTNBkzoQIsTfHA3KtwSeiTeuYC6sEnk0qWhkvacZ-F332XZapvAfUz3Z3KUais9t5YuQE06C1l3SpGpteAsDOt4zJfmSOqFjFZMHTzoiJtUs1lGFvj9MbPhi8_XrdjgqhapasRYKTf70JUw0oPFIhyGG0d-rYfT6WJ1ippK75C0j3S34yfkWstDdjy3xatWNJRbNqlkNovw_UKLTDIzQMqvsyhXGF3-bOOmfbSHYgYZks6Qmn0RtXjPQWlFd0lUtQ9jCuti-ZzK1xsecKqEc"}

How safe are wallet files?

These are encrypted files, and decrypting and gaining access to the wallet's private key will require the encryption password provided when the wallet was created. However, there are no security requirements for these passwords, meaning that weak passwords such as "123" or "abc" can be easily guessed or "bruteforced". It will be up to the user to make sure they use strong passwords when creating their wallets.