Node CLI References

Pocket Core CLI Interface Specification

Version RC-0.5.1 - Nightly Release

Overview

This document serves as a specification for the Command Line Interface of the Pocket Core application. There's no protocol verification for these commands because they map closely to protocol functions.

Namespaces

The CLI will contain multiple namespaces listed below:

  • Default Namespace: These functions will be called when the namespace is blank
  • Accounts: Contains all the calls pertinent to accounts and their local storage.
  • Nodes: Contains all the functions for Node upkeep.
  • Apps: Contains all the functions for app upkeep.
  • Query: All queries to the world state are contained in this call.

CLI Functions Format

Each CLI Function will be in the following format:

  • Binary Name: The name of the binary for Pocket Core, for example: pocket
  • Namespace: The namespace of the function, or blank for the default namespace: accounts
  • Function Name: The name of the actual function to be called: create
  • (Optional): Space separated function arguments, e.g.: pocket accounts create <passphrase>

Default Namespace

The default namespace contains functions that are pertinent to the execution of the Pocket Node.

  • pocket start <datadir>

    Starts the Pocket Node, picks up the config from the assigned <datadir>.

    Arguments:

    • <datadir>: The data directory where the configuration files for this node are specified.
  • pocket reset

    Reset the Pocket node.
    Deletes the following files / folders:

    • .pocket/data
    • priv_val_key
    • priv_val_state
    • node_keys
  • pocket help

Accounts Namespace Functions

The accounts namespace handles all account-related interactions, from creating and deleting accounts, to importing and exporting accounts.

  • pocket accounts build-MS-Tx <your-signer-address> <json-message> <ordered-comma-separated-hex-pubkeys> <chainID> <fees>

    Create a multisig public key with a comma separated list of hex encoded public keys

    Arguments:

    • <ordered-comma-separated-hex-pubkeys>: The exact order in which key olders will sign the Multi-Sig-TX.

    Example:

pocket accounts build-MS-Tx d91051b6e028c1747c79fc0f19fbb70d8235e2c7 "{\"type\":\"pos\/Send\",\"value\":{\"from_address\":\"154fa37d8b9c6b1343620fc02abcc3bb126cfaba\",\"to_address\":\"448c23cd4f025ae76196c2b8dc5387990190474c\",\"amount\":\"1\"}}" 0b7477e98009ce1f8815a05fe5d01bcd9f14295a8d2a3e72bfd5cd215692d86d testnet 100000
  • pocket accounts create

    Creates and persists a new account in the Keybase. Will prompt the user for a BIP-0039 password for the generated mnemonic and for a passphrase to encrypt the generated keypair.

    Example:

"Account generated successfully:
Address: 537e590ef91f126c2b2659d602900cf1acfb1e0d"
  • pocket accounts delete <address>

    Deletes an account from the keybase. Will prompt the user for the account passphrase

    Arguments:

    • <address>: The address to be deleted.
      Example:
pocket accounts delete 59f08710afbad0e20352340780fdbf4e47622a7c

KeyPair 59f08710afbad0e20352340780fdbf4e47622a7c deleted successfully.
  • pocket accounts export <address> --path<path>

    Exports the account with <address>, encrypted and ASCII armored. Will prompt the user for the account passphrase and an encryption passphrase for the exported account.

    Arguments:

    • <address>: The address of the account to be exported.
      Example:
pocket accounts export 59f08710afbad0e20352340780fdbf4e47622a7c --path /$HOME/Desktop
"Exported Armor Private Key:
{""kdf"":""scrypt"",""salt"":""9BA82EA...0880DAA9"",""secparam"":""12"",""hint"":""pocket"",""ciphertext"":""ABWgBC...oS""}
Export Completed"
  • pocket accounts export-raw <address>

    Exports the raw private key in hex format. Will prompt the user for the account passphrase. NOTE: THIS METHOD IS NOT RECOMMENDED FOR SECURITY REASONS, USE AT YOUR RISK.*

    Arguments:

    • <address>: The address of the account to be exported.
      Example:
pocket accounts export-raw 59f08710afbad0e20352340780fdbf4e47622a7c
passphrase: 
"Exported Raw Private Key:
74b9f...ad5187c539f"
  • pocket accounts get-validator

    Retrieves the main validator from the priv_val file
    Example:

pocket accounts get-validator
Validator Address:59F08710AFBAD0E20352340780FDBF4E47622A7C
  • pocket accounts import-armored <armor>

    Imports an account using the Encrypted ASCII armored <armor> string. Will prompt the user for a decryption passphrase of the <armor> string and for an encryption passphrase to store in the Keybase.

    Arguments:

    • <armor>: The encrypted encoded private key to be imported.
      Example output:
pocket accounts import-armored ./Desktop/private_folder/key.json
"Account imported successfully:
cbfc8ad012c9d2b74f4d6fa4c4d37e9ddc78cae1"
  • pocket accounts import-raw <private-key-hex>

    Imports an account using the provided
    Will prompt the user for a passphrase to encrypt the generated keypair.

    Arguments:

    • <private-key-hex>: The raw hex string of the account you are impoting.
  • pocket accounts list

    Lists all the account addresses stored in the keybase.
    Example:

pocket accounts list
(0)53d809964195172f2970219dfcb0007f33150623
(1) 59f08710afbad0e20352340780fdbf4e47622a7c
  • pocket accounts set-validator <address>

    Sets the main validator account that will be used across all Tendermint functions

    Arguments:

    • <address>: The address you want your validator to be identied by.
      Example:
pocket accounts set-validator 59F08710AFBAD0E20352340780FDBF4E47622A7C
passphrase: 
  • pocket accounts send-raw-tx <fromAddr> <txBytes>

    Sends presigned transaction through the tendermint node

    Arguments:

    • < fromAddr >: The address sending the TX.
    • < txBytes >: The pre-signed txBytes
      Example:
pocket accounts send-raw-tx 59F08710AFBAD0E20352340780FDBF4E47622A7C 04cb3c3b41df9...c872ab2937835aa34ff3b9cbc...fc4bd7a644334cf1608
  • pocket accounts send-tx <fromAddr> <toAddr> <amount> <chainID> <fee> <memo>

    Sends uPOKT to with the specified .
    Prompts the user for account passphrase.

    Arguments:

    • < fromAddr >: The address sending and signing for the TX.
    • < toAddr >: The address recieving the TX
    • < amount >: The amount in uPOKT wish to be sent.
    • < chainID >: The network name that TX will be relayed on: mainnet or testnet
    • < fee >: The network fee
    • < memo >: a memo wish to be attached to the TX
      Example output:
pocket accounts send-tx 59f08710afbad0e20352340780fdbf4e47622a7c 83007e56cb884dca0b87253be6b518615d49db43 1000000 mainnet 10000 example-tx
  • pocket accounts show <address>

    Lists an account address and public key.

    Arguments:

    • <address>: The address to be fetched.

    Example:

pocket accounts show 59f08710afbad0e20352340780fdbf4e47622a7c
Address:    59f08710afbad0e20352340780fdbf4e47622a7c
Public Key: 87d0cfcca00db63702829f15cb45d3139de5578c926d4118d5093bd237962d2f
  • pocket accounts sign <address> <msg>

    Signs the specified <msg> using the specified <address> account credentials. Will prompt the user for the account passphrase.

    Arguments:

    • <address>: The address to be deleted.
    • <msg>: The message to be signed in hex string format.
      Example:
pocket accounts sign 59f08710afbad0e20352340780fdbf4e47622a7c 1234
Enter passphrase:
Original Message:   1234
Signature:  04cb3c3b41df9...c872ab2937835aa34ff3b9cbc...fc4bd7a644334cf1608
  • pocket accounts sign-ms-tx <your-signer-address> <hex-amino-stdtx> <ordered-comma-separated-hex-pubkeys> <chainID>

    Create a multisig public key with a comma separated list of hex encoded public keys

    Arguments:

    • <ordered-comma-separated-hex-pubkeys>: The exact order in which key olders will sign the Multi-Sig-TX.
      Example:
pocket accounts sign-ms d91051b6e028c1747c79fc0f19fbb70d8235e2c7 cb01db0b170d0a33a5e344a60a14154fa37d8b9c6b1343620fc02abcc3bb126cfaba1214448c23cd4f025ae76196c2b8dc5387990190474c1a0131120f0a0575706f6b7412063130303030301a750a2bf325b8ad0a259d544774200b7477e98009ce1f8815a05fe5d01bcd9f14295a8d2a3e72bfd5cd215692d86d1246b2f515f90a403d35224e02e3363410a1d767ee1b3a6e7de7cff5d1e767cb62ca5cfe0e2a8b7a2b39ac3aacd37dbe493e375142a9d979f45bebf2fdb9f17d66a2274469d7080328b99ca4ecb1c9a5d671 31f6e95be47cecefd9fa0d96491853e9ef73fb21dd88b1623207e273284e1498,0b7477e98009ce1f8815a05fe5d01bcd9f14295a8d2a3e72bfd5cd215692d86d testnet
  • pocket accounts sign-ms-next <your-signer-address> <hex-amino-stdtx> <chainID>

    sign a multisignature transaction using the transaciton object, result is hex encoded std tx object

📘

Note

NOTE: you MUST be the next signer (in order of public keys in the ms public key object) or the signature will be invalid.

Arguments:

  • <your-signer-address>: Your signer address.
  • <hex-amino-stdtx>: A transaction encoded in amino bytes formatted as a hex string
  • < chainID >: The network name that TX will be relayed on: mainnet or testnet
    Example:
pocket accounts sign-ms-next d91051b6e028c1747c79fc0f19fbb70d8235e2c7 cb01db0b170d0a33a5e344a60a14154fa37d8b9c6b1343620fc02abcc3bb126cfaba1214448c23cd4f025ae76196c2b8dc5387990190474c1a0131120f0a0575706f6b7412063130303030301a750a2bf325b8ad0a259d544774200b7477e98009ce1f8815a05fe5d01bcd9f14295a8d2a3e72bfd5cd215692d86d1246b2f515f90a403d35224e02e3363410a1d767ee1b3a6e7de7cff5d1e767cb62ca5cfe0e2a8b7a2b39ac3aacd37dbe493e375142a9d979f45bebf2fdb9f17d66a2274469d7080328b99ca4ecb1c9a5d671 testnet
  • pocket accounts update-passphrase <address>

    Updates the passphrase for the indicated account. Will prompt the user for the current account passphrase and the new account passphrase.

    Arguments:

    • <address>: The address to be deleted.
      Example:
pocket accounts update-passphrase 59f08710afbad0e20352340780fdbf4e47622a7c
Enter passphrase:
Enter new passphrase:
Successfully updated account: 59f08710afbad0e20352340780fdbf4e47622a7c

Gov Namespace

Functions for all of the governance-related activities within the network.

  • pocket gov burn <amount> <fromAddr> <toAddr> <chainID> <fees>

    If authorized, burn funds from the DAO.

    Arguments:

    • <amount>: The amount to be burned
    • <address>: The authorized address.
    • <toAddr>: leave black " "
    • <chainID>:
    • <fees>:
      Example:
"./pocket_core gov burn 202690 59f08710afbad0e20352340780fdbf4e47622a7c "" mainnet 10000
Enter Password: 
{
    ""height"": ""0"",
    ""logs"": [
        {
            ""events"": [
                {
                    ""attributes"": [
                        {
                            ""key"": ""action"",
                            ""value"": ""dao_tranfer""
                        }
                    ],
                    ""type"": ""message""
                }
            ],
            ""log"": """",
            ""msg_index"": 0,
            ""success"": true
        }
    ],
    ""raw_log"": ""[{\""msg_index\"":0,\""success\"":true,\""log\"":\""\"",\""events\"":[{\""type\"":\""message\"",\""attributes\"":[{\""key\"":\""action\"",\""value\"":\""dao_tranfer\""}]}]}]"",
    ""txhash"": ""9FF926915D7A529B56B68CD5E60273151959CDFB7EA1B90EBC4FCB2274A9B1BD""
}
"
  • pocket gov change_param <fromAddr> <chainID> <paramKey module/param> <paramValue (jsonObj)> <fees>

    If authorized, submit a tx to change any param from any module. Will prompt the user for the account passphrase.

    Arguments:

    • <fromAddr> : address requesting the change
    • <chainID> : network identifer: testnet or mainnet
    • <paramKey module/param> : See callout at below
    • <paramValue (jsonObj)>: See callout at below
    • <fees>: Network fee: 10000
      Example:
"pocket gov change_param 9bc2a4e9aa704f2b9677ff60033a0d579b6dee4c mainnet pocketcore/MinimumNumberOfProofs \""3\"" 10000
Enter Password: 
http://localhost:8081/v1/client/rawtx
{
    ""height"": ""0"",
    ""logs"": [
        {
            ""events"": [
                {
                    ""attributes"": [
                        {
                            ""key"": ""action"",
                            ""value"": ""change_param""
                        }
                    ],
                    ""type"": ""message""
                }
            ],
            ""log"": """",
            ""msg_index"": 0,
            ""success"": true
        }
    ],
    ""raw_log"": ""[{\""msg_index\"":0,\""success\"":true,\""log\"":\""\"",\""events\"":[{\""type\"":\""message\"",\""attributes\"":[{\""key\"":\""action\"",\""value\"":\""change_param\""}]}]}]"",
    ""txhash"": ""5FDA316F39BDAA0C8C8549444A57F2C41FC4A8D1984675403D190967DBCEE772""
}"

📘

List of Parameters

You can find a list of parameters here:
https://governance.docs.pokt.network/docs/submit-a-pup

  • pocket gov transfer <amount> <fromAddr> <toAddr> <chainID> <fees>
    If authorized, move funds from the DAO

    Arguments:

    • <amount>: The amount of POKT to be transfered from the DAO.
    • <fromAddr>: leave blank with " "
    • <toAddr>: The address recieving the funds.
    • <chainID>: The ID of the network: mainnet or testnet.
    • <fees>: Network fee
      Example:
pocket gov transfer 100 "" ba68fe785427235622953942525968390b443709 pocket-test 10000
Enter Password: 
http://localhost:8081/v1/client/rawtx
{
    ""height"": ""0"",
    ""logs"": [
        {
            ""events"": [
                {
                    ""attributes"": [
                        {
                            ""key"": ""action"",
                            ""value"": ""dao_tranfer""
                        }
                    ],
                    ""type"": ""message""
                }
            ],
            ""log"": """",
            ""msg_index"": 0,
            ""success"": true
        }
    ],
    ""raw_log"": ""[{\""msg_index\"":0,\""success\"":true,\""log\"":\""\"",\""events\"":[{\""type\"":\""message\"",\""attributes\"":[{\""key\"":\""action\"",\""value\"":\""dao_tranfer\""}]}]}]"",
    ""txhash"": ""4409A5BAC88F8D5832387A9ECC5E606E2750955AAA76AC54EF06A208BDD77E25""
}"
  • pocket gov upgrade <fromAddr> <atHeight> <version>, <chainID> <fees>

    If authorized, upgrade the protocol. Will prompt the user for the account passphrase.

    Arguments:

    • <fromAddr>: The address of the sender.
    • < atHeight >: The height in which the protocol will be updated on.
    • < version >: The version the protocol will be updated to
    • <chainID>: Network identifier: testnet or mainnet
    • <fees>: Network Fee
      Example:
 pocket gov upgrade 9bc2a4e9aa704f2b9677ff60033a0d579b6dee4c 60 "2.0" mainnet 10000
Enter Password: 
http://localhost:8081/v1/client/rawtx
{
    "height": "0",
    "logs": [
        {
            "events": [
                {
                    "attributes": [
                        {
                            "key": "action",
                            "value": "upgrade"
                        }
                    ],
                    "type": "message"
                }
            ],
            "log": "",
            "msg_index": 0,
            "success": true
        }
    ],
    "raw_log": "[{\"msg_index\":0,\"success\":true,\"log\":\"\",\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"upgrade\"}]}]}]",
    "txhash": "406DFE6CFC80B622D0F77E7491AE7A1BB39880EA2B43DF52A10DBCB44E65BC25"
}

Nodes Namespace

Functions for Node's management.

  • pocket nodes stake <fromAddr> <amount> <chains> <serviceURI> <chainID> <fees>

    Stakes the Node into the network, making it available for service. Prompts the user for the <fromAddr> account passphrase.

    Arguments:

    • <fromAddr>: The address of the sender.
    • <amount>: The amount of POKT to stake. Must be higher than the current minimum amount of Node Stake parameter.
    • <chains>: A comma-separated list of chain Network Identifiers.
    • <serviceURL>: The Service URL Applications will use to communicate with Nodes for Relays.
    • <chainID>: ID of the network you are staking your node on.
    • <fee>: Network fee
      Example:
pocket nodes stake 59f08710afbad0e20352340780fdbf4e47622a7c 15010000000 0001,0021 https://mynode.net:8081 mainnet 10000
  • pocket nodes unstake <fromAddr> <chainID> <fee>

    Unstakes a Node from the network, changing its status to Unstaking. Prompts the user for the <fromAddr> account passphrase.

    Arguments:

    • <fromAddr>: The address of the sender.
    • <chainID>: network of the address you want to unjail on: testnet or mainnet
    • <fee>: Network fee.
      Example:
pocket nodes unstake 59f08710afbad0e20352340780fdbf4e47622a7c mainnet 10000
  • pocket nodes unjail <fromAddr> <chainID> <fees>

    Unjails a Node from the network, allowing it to participate in service and consensus again. Prompts the user for the <fromAddr> account passphrase.

    Arguments:

    • <fromAddr>: The address of the sender.
      -<chainID>: network of the address you want to unjail on: testnet or mainnet
    • <fees>: the fee amount
      Example output:
pocket nodes unjail 59f08710afbad0e20352340780fdbf4e47622a7c mainnet 100000

Util Namespace

Generic utility functions for diverse use cases.

  • pocket util decode-tx <tx>

    Decodes a given transaction encoded in Amino base64 bytes

    Arguments:

    • <tx>: The Transaction Hash
  • pocket util delete-chains

    Delete the chains file for network identifiers

  • pocket util generate-chains

    Creates a Network Identifier hash, used as a parameter for both Node and App stake.

    Example:

pocket util generate-chains
Enter the ID of the network identifier:
0001
Enter the URL of the network identifier:
http://my-node-url
Would you like to enter another network identifier? (y/n)
n
chains.json contains:

0001 @ http://my-node-url
If incorrect: please remove the chains.json with the delete-chains command
  • pocket util export-genesis-for-reset <height><newChainID>

    exports new genesis based on state

    Arguments:

    • < height >: The height .
    • < newChainID >: The network identifier for the blockchain that will be accessed, ETH e.g. 1, 4.
      Example:
pocket util export-genesis-for-reset 2999 mainnet-2
  • pocket util unsafe-rollback <height>

    Rollbacks the blockchain, the state, and app to a previous height

    Arguments:

    • <height>: The height you want your node to roll back to
      Example:
pocket util unsafe-rollback 2054

Query Namespace

Queries the current world state built on the Pocket node.

  • pocket query account <accAddr> <height>

    Retrieves the account structure for a specific address.

    Arguments:

    • < accAddr >: The address of the account you wish to query
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
 pocket query account e6946760d9833f49da39aae9500537bef6f33a7a
http://localhost:8082/v1/query/account
{
    "address": "e6946760d9833f49da39aae9500537bef6f33a7a",
    "coins": [
        {
            "amount": "18446743929701367201",
            "denom": "upokt"
        }
    ],
    "public_key": "4ac6202fca022b932be12a5bd51dc8375bfee843f4f90c412e83ad9af1069361"
}

** POCKET QUERY ACCOUNT-TXS IS REQUIRES LOWER CASE AT THIS TIME ** (2021/01/18)
Here is a Bash command that will do a conversion for you:
echo "ANFJ8746JFKIE" | tr '[:upper:]' '[:lower:]'

  • pocket query account-txs <address> <page> <per_page> <prove> <received>

    Retrieves the transactions sent by the address.

    Arguments:

    • <address>: The address of the account you want to query
    • <page> : Is what page of the list you want to be on
    • <per_page>: How many transactions you want to see "per_page"
    • <prove> : The Tendermint merkle proof that the transaction exists. This can be true or false
    • <received>: describe whether you are the sender or recepient of the transactions
      Example:
pocket query account-txs e6946760d9833f49da39aae9500537bef6f33a7a
  • pocket query balance <accAddr> <height>

    Returns the balance of the specified <accAddr> at the specified <height>. If no height specified it will query the balance at the current height

    Arguments:

    • <accAddr>: The address of the account to query.
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
http://localhost:8082/v1/query/balance
{
    "balance": 22999070910
}

  • pocket query block <height>

    Returns the block at the specified height.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query block 2000
  • pocket query block-txs <height> <page> <per_page> <prove>

    Retrieves the transactions in the block <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
    • <page>: Is what page of the list you want to be on
    • <per_page>: How many transactions you want to see "per_page"
    • <prove>: The Tendermint Merkle proof that the transaction exists. This can be true or false
      Example:
pocket query block-txs 4495
http://localhost:8082/v1/query/blocktxs
{
    "total_count": 0,
    "txs": []
}
  • pocket query height

    Returns the current block height known by this node.

    Example output:

pocket query height
http://localhost:8082/v1/query/height
{
    "height": 4491
}
  • pocket query nodes --staking-status=<stakingStatus> --page=<page> --limit=<limit> <height>

    Returns a page containing a list of nodes known at the specified <height>.

    Options:

    • --staking-status: Filters the node list with a staking status. Supported statuses are: STAKED, UNSTAKED and UNSTAKING.
    • --page: The current page you want to query.
    • --limit: The maximum amount of nodes per page.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query nodes
  • pocket query node <nodeAddr> <height>

    Returns the node at the specified <height>.

    Arguments:

    • <nodeAddr>: The node address to be queried.
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query node e6946760d9833f49da39aae9500537bef6f33a7a
{
    "address": "e6946760d9833f49da39aae9500537bef6f33a7a",
    "chains": [
        "0002",
        "0023",
        "0022",
        "0020"
    ],
    "jailed": false,
    "public_key": "4ac6202fca022b932be12a5bd51dc8375bfee843f4f90c412e83ad9af1069361",
    "service_url": "https://node2.testnet.pokt.network:443",
    "status": 2,
    "tokens": "999999999000000",
    "unstaking_time": "0001-01-01T00:00:00Z"
}
  • pocket query node-params <height>

    Returns the list of node params specified in the <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query node-params

{
    "dao_allocation": "10",
    "downtime_jail_duration": "3600000000000",
    "max_evidence_age": "120000000000",
    "max_jailed_blocks": "37960",
    "max_validators": "5000",
    "maximum_chains": "15",
    "min_signed_per_window": "6.000000000000000000",
    "proposer_allocation": "1",
    "relays_to_tokens_multiplier": "0",
    "session_block_frequency": "4",
    "signed_blocks_window": "10",
    "slash_fraction_double_sign": "0.050000000000000000",
    "slash_fraction_downtime": "0.000001000000000000",
    "stake_denom": "upokt",
    "stake_minimum": "15000000000",
    "unstaking_time": "3600000000000"
}
  • pocket query supply <height>

    Returns the total amount of POKT staked/unstaked by nodes, apps, DAO, and totals at the specified <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query supply
http://localhost:8082/v1/query/supply
{
    "app_staked": "1542099237724",
    "dao": "50000096646730",
    "node_staked": "5001315185588861",
    "total": "147579001422608721340",
    "total_staked": "5052857381473315",
    "total_unstaked": "147573948565227248025"
}
  • pocket query apps --staking-status=<stakingStatus> --page=<page> --limit=<limit> <height>

    Returns a page containing a list of applications known at the specified <height>.

    Options:

    • --staking-status: Filters the node list with a staking status. Supported statuses are: STAKED, UNSTAKED and UNSTAKING.
    • --page: The current page you want to query.
    • --limit: The maximum amount of nodes per page.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query apps 
  • pocket query app <appAddr> <height>

    Returns the application at the specified <height>.

    Arguments:

    • <appAddr>: The application address to be queried.
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
 pocket query app fc36567876dbec7c128184d06d54930f4c3c9e17
http://localhost:8082/v1/query/app
{
    "address": "fc36567876dbec7c128184d06d54930f4c3c9e17",
    "chains": [
        "0001",
        "0002",
        "0003"
    ],
    "jailed": false,
    "max_relays": "9248",
    "public_key": "3f0c5e25c9c47e88c314d002ae34068f1f2598469e045d553fecd8a2ac8b904b",
    "staked_tokens": "5538000000",
    "status": 2,
    "unstaking_time": "0001-01-01T00:00:00Z"
}
  • pocket query app-params <height>

    Returns the list of node params specified in the <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query app-params
http://localhost:8082/v1/query/appparams
{
    "app_stake_minimum": "1000000",
    "base_relays_per_pokt": "167",
    "max_applications": "9223372036854775807",
    "maximum_chains": "15",
    "participation_rate_on": false,
    "stability_adjustment": "0",
    "unstaking_time": "3600000000000"
}
  • pocket query supported-networks <height>

    Returns the list Network Identifiers supported by the network at the specified <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query supported-networks
[
    "0001",
    "0021"
]
  • pocket query pocket-params <height>

    Returns the list of Pocket Network params specified in the <height>.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query pocket-params
{
    "claim_expiration": "120",
    "minimum_number_of_proofs": "10",
    "proof_waiting_period": "3",
    "replay_attack_burn_multiplier": "3",
    "session_node_count": "5",
    "supported_blockchains": [
        "0001",
        "0021"
    ]
}
  • pocket query node-claim <nodeAddr> <appPubKey> <claimType> <networkId> <sessionHeight> <height>

    Gets node pending claim for verified proof of work submitted for a specific session.

    Arguments:

    • <nodeAddr>: address of the node you want to query
    • <appPubKey>: public key of the application you want to query
    • <claimType>: relay or challenge
    • <networkId>: The Network Identifier of the blockchain that was serviced.
    • <sessionHeight>: the height of the session you are querying
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
  • pocket query node-claims

    Retrieves the list of all pending proof of work submitted by <nodeAddr> at <height>.

    Arguments:

    • <nodeAddr>: address of the node you want to query
    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query node-claims e6946760d9833f49da39aae9500537bef6f33a7a
http://localhost:8082/v1/query/nodeclaims
{
    "page": 0,
    "result": null,
    "total_pages": 0
}
  • pocket query param

    Returns the list of Pocket Network params specified in the <height>.

  • pocket query params

    Returns the list of Pocket Network params specified in the <height>.
    Example:

pocket query params
  • pocket query tx <hash>

    Returns a result transaction object
    Arguments:

    • <hash>: The hash of the transaction to query.
      Example:
pocket query tx 4F1321F73EF5FCEC32ED32E824320DA4832B598F36E92332E68D2022FB231515
  • pocket query upgrade <height>

    Retrieves the latest protocol upgrade by governance.

    Arguments:

    • <height>: The specified height of the block to be queried. Defaults to 0 which brings the latest block known to this node.
      Example:
pocket query upgrade
http://localhost:8082/v1/query/upgrade
{
    "Height": 0,
    "Version": "0"
}

Updated 2 months ago


Node CLI References


Suggested Edits are limited on API Reference Pages

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