SiaPrime Wallet Commands

You are here:

If you’re comfortable with the command-line, you can interact with SiaPrime in powerful ways. This is a list of all the commands that SiaPrime understands, and a brief description of what they do.

These can be accessed at any time by using spc help.

All commands start with spc and are followed by a flag or a command.

Usage

spc [flags]

spc [command]

 

You can also use the Terminal in SiaPrime-UI. When doing so, you can type commands without adding spc.

Consensus

Print the current state of consensus such as current block, block height, and target.

Usage

spc consensus [flags]

Flags

-h or --help – help for consensus

-v or --verbose – Display full consensus information

Example output

Synced: Yes

Block:      00000000000000009e74c12f68393e108e3d7d2faad15b46c8a76dd42015fb58

Height:     211104

Target:     [0 0 0 0 0 0 0 9 143 142 0 142 95 25 215 124 32 25 172 35 130 182 56 62 38 203 72 1 134 122 250 161]

Difficulty: 1929422247688414200

Gateway

View and manage the gateway’s connected peers.

Usage

spc gateway [flags] or spc gateway [command]

Flags

-h or --help – help for gateway

Example output

Address: 73.195.240.187:9981 (this is the address of your SiaPrime node)

Active peers: 80

Help

Help about any command.

Usage

spc [flags] or spc [command]

Example output

SiaPrime Client v1.3.5.2

Usage:

  spc [flags]

  spc [command]

Available Commands

  consensus   Print the current state of consensus

  gateway     Perform gateway actions

  help        Help about any command

  host        Perform host actions

  hostdb      Interact with the renter's host database.

  miner       Perform miner actions

  renter      Perform renter actions

  stop        Stop the SiaPrime daemon

  update      Update SiaPrime

  utils       various utilities for working with SiaPrime's types

  version     Print version information

  wallet      Perform wallet actions

Host

View or modify host settings.

Usage

spc host [flags] or spc host [command]

Available Commands

  announce    Announce yourself as a host

  config      Modify host settings

  contracts   Show host contracts

  folder      Add, remove, or resize a storage folder

  sector      Add or delete a sector (add not supported)

Flags

-h or --help – help for host

-v or --verbose – Display detailed host info

Hostdb

View the list of active hosts, the list of all hosts, or query specific hosts. If the ‘-v’ flag is set, a list of recent scans will be provided, with the most recent scan on the right. a ‘0’ indicates that the host was offline, and a ‘1′ indicates that the host was online.

Usage

spc hostdb [flags] or spc hostdb [command]

Available Commands

  view        View the full information for a host.

Flags

-h or --help – help for host

-v or --verbose – Display detailed host info

-n, or —numhosts int – Number of hosts to display from the hostdb

Miner

Perform miner actions and view miner status.

Usage

spc miner [flags] or spc miner [command]

Available Commands

  start       Start cpu mining

  stop        Stop mining

Flags

-h or --help – help for miner

Renter

Perform renter actions – upload, download, rename, delete, load, or share files.

Usage

spc renter [flags] or spc renter [command]

Available Commands

  allowance            View the current allowance

  contracts            View the Renter's contracts

  createbackup         Create a backup of the renter's SiaPrime files

  delete               Delete a file

  download             Download a file

  downloads            View the download queue

  export               export renter data to various formats

  list                 List the status of all files

  loadbackup           Load a backup of the renter's SiaPrime files

  prices               Display the price of storage and bandwidth

  recoveryscanprogress Returns the recovery scan progress.

  rename               Rename a file

  setallowance         Set the allowance

  triggerrecoveryscan  Triggers a recovery scan.

  upload               Upload a file or folder

  uploads              View the upload queue

Flags

-h or --help – help for renter

-v or --verbose – Display detailed renter info

Stop

Stop the SiaPrime daemon.

Usage

spc stop [flags]

Flags

-h or --help – help for stop

Update

Check for (and/or download) available updates for SiaPrime.

Usage

spc update [flags] or spc update [command]

Available Commands

  check       Check for available updates

Flags

-h or --help – help for update

Utils

Various utilities for working with SiaPrime’s types. These commands do not require spc.

Usage

spc utils [command]

Available Commands

  bash-completion Creates bash completion file.

  checksig        verify a signature of the specified hash

  decoderawtxn    convert a base64-encoded transaction to JSON

  encoderawtxn    convert a JSON-encoded transaction to base64

  hastings        convert a currency amount to Hastings

  man-generation  Creates unix style manpages.

  sighash         calculate the SigHash of a transaction

  verify-seed     verify seed is formatted correctly

Flags

-h or --help – help for utils

Version

Print version information.

Usage

spc version [flags]

Flags

-h or --help – help for version

Example output

SiaPrime Client

Version 1.3.5.2

Git Revision 15b9779

Build Time  Mon Dec 17 20:54:32 CST 2018

SiaPrime Daemon

Version 1.3.5.2

Git Revision 15b9779

Build Time  Mon Dec 17 20:54:32 CST 2018

Wallet

Perform wallet actions – generate a new address, send coins to another wallet, or view info about the wallet.

Usage

spc wallet [flags] or spc wallet [command]

Available Commands

  address         Get a new wallet address

  addresses       List all addresses

  balance         View wallet balance

  broadcast       Broadcast a transaction

  change-password Change the wallet password

  init            Initialize and encrypt a new wallet

  init-seed       Initialize and encrypt a new wallet using a pre-existing seed

  load            Load a wallet seed, v0.3.3.x wallet, or spcg keyset

  lock            Lock the wallet

  seeds           View information about your seeds

  send            Send either SiaPrimeCoins or SiaPrimeFunds to an address

  sign            Sign a transaction

  sweep           Sweep SiaPrimeCoins and SiaPrimeFunds from a seed.

  transactions    View transactions

  unlock          Unlock the wallet

Flags

-h or --help – help for wallet

Units

The smallest unit of SiaPrimeCoins is the hasting. One SiaPrimeCoin is 10^24 hastings. Other supported units are:

  pS (pico,  10^-12 SCP)

  nS (nano,  10^-9 SCP)

  uS (micro, 10^-6 SCP)

  mS (milli, 10^-3 SCP)

  SC

  KS (kilo, 10^3 SCP)

  MS (mega, 10^6 SCP)

  GS (giga, 10^9 SCP)

  TS (tera, 10^12 SCP)

Global flags

  -a, --addr string            which host/port to communicate with (i.e. the host/port spc is listening on) (default "localhost:9980")

      --apipassword string     the password for the API's http authentication

  -h, --help                   help for spc

  -d, --spc-directory string   location of the SiaPrime directory (default "/Users/username/Library/Application Support/SiaPrime")

      --useragent string       the useragent used by spc to connect to the daemon's API (default "SiaPrime-Agent")a