# Service Providers

#### On this page

* [<mark style="color:blue;">Connection Options</mark>](#connection-options)
* [<mark style="color:blue;">Running a Full Node</mark>](#running-a-full-node)
  * [<mark style="color:blue;">What is a Full Node?</mark>](#what-is-a-full-node)
  * [<mark style="color:blue;">Installation and Configuration</mark>](#installation-and-configuration)
* [<mark style="color:blue;">Command-Line Interface</mark>](#command-line-interface)
  * [<mark style="color:blue;">Available Commands</mark>](#available-commands)
  * [<mark style="color:blue;">Remote Access to ICPlazad</mark>](#remote-access-to-icplazad)
  * [<mark style="color:blue;">Create a Key Pair</mark>](#create-a-key-pair)
  * [<mark style="color:blue;">Check your Balance</mark>](#check-your-balance)
* [<mark style="color:blue;">REST API</mark>](#rest-api)
  * [<mark style="color:blue;">Listen for Incoming Transactions</mark>](#listen-for-incoming-transactions)

‘Service Providers’ are defined as entities that provide services for end-users that involve some form of interaction with the ICTech Hub. More specifically, this document is focused on interactions with tokens.

Service Providers are expected to act as trusted points of contact to the blockchain for their end-users. This Service Providers section does not apply to wallet builders that want to provide Light Client functionalities.

This document describes:

* [<mark style="color:blue;">Connection Options</mark>](#connection-options)
* [<mark style="color:blue;">Running a Full Node</mark>](#running-a-full-node)
  * [<mark style="color:blue;">What is a Full Node?</mark>](#what-is-a-full-node)
  * [<mark style="color:blue;">Installation and Configuration</mark>](#installation-and-configuration)
* [<mark style="color:blue;">Command-Line Interface</mark>](#command-line-interface)
  * [<mark style="color:blue;">Available Commands</mark>](#available-commands)
  * [<mark style="color:blue;">Remote Access to ICPlazad</mark>](#remote-access-to-icplazad)
  * [<mark style="color:blue;">Create a Key pair</mark>](#create-a-key-pair)
  * [<mark style="color:blue;">Check your Account</mark>](#check-your-account)
  * [<mark style="color:blue;">Check your Balance</mark>](#check-your-balance)
  * [<mark style="color:blue;">Send coins using the CLI</mark>](#send-coins-using-the-cli)
* [<mark style="color:blue;">\[REST API\]</mark>](#rest-api)
  * [<mark style="color:blue;">\[Listen for incoming transactions\]</mark>](#listen-for-incoming-transactions)

### Connection Options <mark style="color:blue;">#</mark> <a href="#connection-options" id="connection-options"></a>

There are four main technologies to consider to connect to the ICTech Hub:

* Full Nodes: Interact with the blockchain.
* REST Server: Serves for HTTP calls.
* REST API: Use available endpoints for the REST Server.
* GRPC: Connect to the ICTech Hub using gRPC.

### Running a Full Node <mark style="color:blue;">#</mark> <a href="#running-a-full-node" id="running-a-full-node"></a>

#### What is a Full Node? <mark style="color:blue;">#</mark> <a href="#what-is-a-full-node" id="what-is-a-full-node"></a>

A Full Node is a network node that syncs up with the state of the blockchain. It provides blockchain data to others by using RESTful APIs, a replica of the database by exposing data with interfaces. A Full Node keeps in syncs with the rest of the blockchain nodes and stores the state on disk. If the full node does not have the queried block on disk the full node can go find the blockchain where the queried data lives.

#### Installation and Configuration <mark style="color:blue;">#</mark> <a href="#installation-and-configuration" id="installation-and-configuration"></a>

This section describes the steps to run and interact with a full node for the ICTech Hub.

First, you need to [<mark style="color:blue;">install the software.</mark>](/icplaza-docs/chain-dev/installation.md)

Consider running your own ICTech<mark style="color:blue;">Node.</mark>

### Command-Line Interface <mark style="color:blue;">#</mark> <a href="#command-line-interface" id="command-line-interface"></a>

The command-line interface (CLI) is the most powerful tool to access the ICTech Hub and use ICTech. To use the CLI, you must install the latest version of `ICPlaza` on your machine.

Compare your version with [<mark style="color:blue;">the latest release version</mark>](https://github.com/ICPLAZA-org)

```bash
ICPlazad version --long
```

#### Available Commands <mark style="color:blue;">#</mark> <a href="#available-commands" id="available-commands"></a>

All available CLI commands are shown when you run the ICTechd command:

```bash
ICTechd
```

```bash
Stargate ICPlaza Hub App

Usage:
  ICPlazad [command]

Available Commands:


  add-genesis-account Add a genesis account to genesis.json
  collect-gentxs      Collect genesis txs and output a genesis.json file
  debug               Tool for helping with debugging your application
  export              Export state to JSON
  gentx               Generate a genesis tx carrying a self delegation
  help                Help about any command
  init                Initialize private validator, p2p, genesis, and application configuration files
  keys                Manage your application's keys
  migrate             Migrate genesis to a specified target version
  query               Querying subcommands
  start               Run the full node
  status              Query remote node for status
  tendermint          Tendermint subcommands
  testnet             Initialize files for a simapp testnet
  tx                  Transactions subcommands
  unsafe-reset-all    Resets the blockchain database, removes address book files, and resets data/priv_validator_state.json to the genesis state
  validate-genesis    validates the genesis file at the default location or at the location passed as an arg
  version             Print the application binary version information

Flags:
  -h, --help                help for ICPlazad
      --home string         directory for config and data (default "/Users/tobias/.ICPlaza")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors

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

For each displayed command, you can use the `--help` flag to get further information.

```bash
ICPlazad query --help
Usage:
  ICPlazad query [flags]
  ICPlazad query [command]

Aliases:
  query, q

Available Commands:
  account                  Query for account by address
  auth                     Querying commands for the auth module
  bank                     Querying commands for the bank module
  block                    Get verified data for a the block at given height
  distribution             Querying commands for the distribution module
  evidence                 Query for evidence by hash or for all (paginated) submitted evidence
  gov                      Querying commands for the governance module
  ibc                      Querying commands for the IBC module
  ibc-transfer             IBC fungible token transfer query subcommands
  mint                     Querying commands for the minting module
  params                   Querying commands for the params module
  slashing                 Querying commands for the slashing module
  staking                  Querying commands for the staking module
  tendermint-validator-set Get the full tendermint validator set at given height
  tx                       Query for a transaction by hash in a committed block
  txs                      Query for paginated transactions that match a set of events
  upgrade                  Querying commands for the upgrade module

Flags:
      --chain-id string   The network chain ID
  -h, --help              help for query

Global Flags:
      --home string         directory for config and data (default "/Users/tobias/.ICPlaza")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors

Use "ICPlazad query [command] --help" for more information about a command.
```

#### Remote Access to ICPlazad <mark style="color:blue;">#</mark> <a href="#remote-access-to-icplazad" id="remote-access-to-icplazad"></a>

When choosing to remote access a Full Node and ICPlazad, you need a Full Node running and ICTech installed on your local machine.

`ICPlazad` is the tool that enables you to interact with the node that runs on the ICTech Hub network, whether you run it yourself or not.

To set up `ICPlazad` on a local machine and connect to an existing full node, use the following command:

```bash
ICPlazad config <flag> <value>
```

First, set up the address of the full node you want to connect to:

```bash
ICPlazad config node <host>:<port

// example: ICPlazad config node https://77.87.106.33:26657 (note: this is a placeholder)
```

If you run your own full node locally, use `tcp://localhost:26657` as the address.

Finally, set the `chain-id` of the blockchain you want to interact with:

```bash
ICPlazad config chain-id ICPlazahub-4
```

Next, learn to use CLI commands to interact with the full node. You can run these commands as remote control or when you are running it on your local machine.

#### Create a Key Pair # <a href="#create-a-key-pair" id="create-a-key-pair"></a>

The default key is `secp256k1 elliptic curve`. Use the `ICPlazad keys` command to list the keys and generate a new key.

```bash
ICPlazad keys add <your_key_name>
```

You will be asked to create a password (at least 8 characters) for this key-pair. This will return the information listed below:

* `NAME`: Name of your key
* `TYPE`: Type of your key, always `local`.
* `ADDRESS`: Your address. Used to receive funds.
* `PUBKEY`: Your public key. Useful for validators.
* `MNEMONIC`: 24-word phrase. **Save this mnemonic somewhere safe**. This phrase is required to recover your private key in case you forget the password. The mnemonic is displayed at the end of the output.

You can see all available keys by typing:

```bash
ICPlazad keys list
```

Use the `--recover` flag to add a key that imports a mnemonic to your keyring.

```bash
ICPlazad keys add <your_key_name> --recover
```

#### **Check your Account&#x20;**<mark style="color:blue;">**#**</mark>

You can view your account by using the `query account` command.

```bash
ICPlazad query account <YOUR_ADDRESS>
```

It will display your account type, account number, public key and current account sequence.

```bash
'@type': /ICPlaza.auth.v1beta1.BaseAccount
account_number: "xxxx"
address: ICPlazaxxxx
pub_key:
  '@type': /ICPlaza.crypto.secp256k1.PubKey
  key: xxx
sequence: "x"
```

### Check your Balance <mark style="color:blue;">#</mark> <a href="#check-your-balance" id="check-your-balance"></a>

Query the account balance with the command:

```bash
ICPlazad query bank balances <YOUR_ADDRESS>
```

The response contains keys `balances` and `pagination`. Each `balances` entry contains an `amount` held, connected to a `denom` identifier. The typical $ATOM token is identified by the denom `uatom`. Where 1 `uatom` is 0.000001 ATOM.

```bash
balances:
- amount: "12345678"
  denom: uatom
pagination:
  next_key: null
  total: "0"
```

When you query an account that has not received any token yet, the `balances` entry is shown as an empty array.

```bash
balances: []
pagination:
  next_key: null
  total: "0"
```

#### **Send Coins Using the CLI&#x20;**<mark style="color:blue;">**#**</mark>

To send coins using the CLI:

```bash
ICPlazad tx bank send [from_key_or_address] [to_address] [amount] [flags]
```

Parameters:

* `<from_key_or_address>`: Key name or address of sending account.
* `<to_address>`: Address of the recipient.
* `<amount>`: This parameter accepts the format `<value|coinName>`, such as `1000000uatom`.

Flags:

* `--chain-id`: This flag allows you to specify the id of the chain. There are different ids for different testnet chains and mainnet chains.
* `--gas-prices`: This flag allows you to specify the gas prices you pay for the transaction. The format is used as `0.0025uatom`

### REST API <mark style="color:blue;">#</mark> <a href="#rest-api" id="rest-api"></a>

The \[REST API documents] list all the available endpoints that you can use to interact with your full node. Learn how to enable the REST API on your full node.

#### Listen for Incoming Transactions <mark style="color:blue;">#</mark> <a href="#listen-for-incoming-transactions" id="listen-for-incoming-transactions"></a>

The recommended way to listen for incoming transactions is to periodically query the blockchain by using the following HTTP endpoint:

[<mark style="color:blue;">← Deterministic Builds</mark>](/icplaza-docs/chain-dev/resources/deterministic-builds.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ictech.gitbook.io/icplaza-docs/chain-dev/resources/service-providers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
