Setup Pocket Core CLI

Pocket Core offers a Command Line Interface(CLI) that you will need to get started managing your application wallet, staking tokens, creating an authentication authorization token, and other services to help maintain your application. You can begin using the Pocket Core CLI after you have downloaded and configured it on your computer by downloading the Binary.

Prerequisites:

Installation:

Installing using Homebrew:

On a Mac or Linux, to install Pocket Core using Homebrew just run the following commands in your terminal:

$   brew tap pokt-network/pocket-core
$   brew install --HEAD pokt-network/pocket-core/pocketcore

Interacting with CLI

Note: For Homebrew users, there is a known bug that requires you to use pocket-core instead of pocket when interacting with the CLI. This will be fixed soon, and we will update out users via CHANGELOG on fix and steps to take in order to update it.

# Test that it's working
$ pocket-core

Pocket is a distributed network that relays data requests and responses to and from any blockchain system.
Pocket verifies all relayed data and proportionally rewards the participating nodes with native cryptographic tokens.

Usage:
  pocket [command]

Available Commands:
  accounts    account management
  apps        application management
  help        Help about any command
  nodes       node management
  query       query the blockchain
  reset       reset pocket-core
  start       starts pocket-core daemon
  util        utilities

Flags:
      --blockTime int             how often should the network create blocks (default 10)
      --datadir string            data directory (default is $HOME/.pocket/
  -h, --help                      help for pocket
      --node string               takes a remote endpoint in the form <protocol>://<host>:<port>
      --persistent_peers string   a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --pocketRPCPort string      the port for pocket rpc (default "8081")
      --seeds string              a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --tmPeersPort string        the port for tendermint p2p (default "26656")
      --tmRPCPort string          the port for tendermint rpc (default "26657")
  -t, --toggle                    help message for toggle

Use "pocket [command] --help" for more information about a command.

Build From Source :

Open up your shell(or terminal) and download the Pocket Core repo from GitHub in the destination directory of your choosing.

# using git clone: 
$  git clone https://github.com/pokt-network/pocket-core.git

# using curl:
$  curl -LJO https://github.com/pokt-network/pocket-core.git

# using wget:
$  wget --no-check-certificate --content-disposition https://github.com/pokt-network/pocket-core

After the repo has been downloaded, go into the pocket-core folder and swap the the latest release candidate: 0.0.1:

$  git checkout tags/RC-0.0.1 -b v0.0.1

After you have swapped to the latest RC, build your binary and add it to your PATH down below.

# First make sure you have $GOPATH setup
echo $GOPATH

# Example output on MacOS
/Users/<your username>/go

# Inside the pocket-core folder, build your pocket binary and put it in the $GOPATH/bin directory
go build -o $GOPATH/bin/pocket ./app/cmd/pocket_core/main.go

# Test that it's working
$ pocket
Pocket is a distributed network that relays data requests and responses to and from any blockchain system.
Pocket verifies all relayed data and proportionally rewards the participating nodes with native cryptographic tokens.

Usage:
  pocket [command]

Available Commands:
  accounts    account management
  apps        application management
  help        Help about any command
  nodes       node management
  query       query the blockchain
  reset       reset pocket-core
  start       starts pocket-core daemon
  util        utilities

Flags:
      --blockTime int             how often should the network create blocks (default 10)
      --datadir string            data directory (default is $HOME/.pocket/
  -h, --help                      help for pocket
      --node string               takes a remote endpoint in the form <protocol>://<host>:<port>
      --persistent_peers string   a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --pocketRPCPort string      the port for pocket rpc (default "8081")
      --seeds string              a comma separated list of PeerURLs: <ID>@<IP>:<PORT>
      --tmPeersPort string        the port for tendermint p2p (default "26656")
      --tmRPCPort string          the port for tendermint rpc (default "26657")
  -t, --toggle                    help message for toggle

Use "pocket [command] --help" for more information about a command.

Your CLI is now built and ready to go, but before you can start connecting your client to one of our supported networks, you will first register your application on the Pocket Network.

Updated 11 days ago


Setup Pocket Core CLI


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.