# CLI Command Overview

{% hint style="info" %}
Note! that the CLI here refers to transactions and queries in the fiamma verification network and doesn't include the regular cosmos application chain.
{% endhint %}

The Fiamma Command Line Interface(CLI) provides essential commands to manage zero-knowledge proofs and staker accounts, streamlining interactions with the blockchain. Use the commands and options as described to perform operations effectively.

Use CLI tools `fiammad` you can:

* send **zkpverify transactions** with `tx zkpverify [command] [flags]` and queries with `query zkpverify [command] [flags]`
* send **bitvmstaker transactions** with `tx bitvmstaker [command] [flags]` and queries with `query bitvmstaker [command] [flags]`

Global Flags usually contains: `--from`, `--chain-id`, `--gas`, `--node`, `--keyring-backend`.

command currently support:

## Tx Type CLI

**Zkpverify transactions**

* [`submit-proof`](#submit-proof)
* [`submit-community-verification`](#submit-community-verification)

**Bitvmstaker transactions**

* [`create-staker`](#create-staker)
* [`register-vk`](#register-vk)
* [`remove-staker`](#remove-staker)
* [`remove-vk`](#remove-vk)
* [`update-committee-address`](#update-committee-address)

### **submit-proof**

A (zkpverify) operation for verifying a proof by namespace, proof\_system, proof, public\_input and vk.

request params:

```
{
  "namespace": "string",
  "proof_system": "string",
  "proof": "string",
  "public_input": "string",
  "vk": "string"
}
```

### **submit-community-verification**

A community (zkpverify) operation for verifying a proof by proof\_id and verify\_result.

request params:

```
{
  "proof_id": "string",
  "verify_result": "bool"
}
```

### **create-staker**

A committee (bitvmstaker) operation for create a new staker account on the Fiamma blockchain by staker address.

request params:

```
{
  "staker_address": "string"
}
```

### **remove-staker**

A committee (bitvmstaker) operation for removing a staker account on the Fiamma blockchain by staker address. This action can be necessary for managing the network's staker list, ensuring that only valid stakers participate.

request params:

```
{
  "staker_address": "string"
}
```

### **register-vk**

A committee (bitvmstaker) operation for registering a new verification key (VK) for a specific proof system on the blockchain by verification key. This is essential for validating the correctness of proofs submitted to the network.

request params:

```
{
  "vk": "string"
}
```

### **remove-vk**

A committee (bitvmstaker) operation for removing a previously registered verification key (VK) for a specific proof system on the blockchain by verification key. This command is essential for maintaining the integrity of the verification processes by allowing the removal of outdated or incorrect VKs.

request params:

```
{
  "vk": "string"
}
```

### **update-committee-address**

A committee (bitvmstaker) operation for updating the address of the committee responsible for overseeing the blockchain operations or specific proof systems. This is crucial for ensuring that the governance structure is current and that the correct addresses are in use for administrative tasks.

request params:

```
{
  "new_committee_address": "string"
}
```

## Query Type CLI

**Zkpverify queries**

* [`get-proof-data`](#get-proof-data)
* [`get-bitvm-challenge-data`](#get-bitvm-challenge-data)
* [`get-verify-result`](#get-verify-result)
* [`get-verify-results-by-namespace`](#get-verify-results-by-namespace)
* [`pending-proof`](#pending-proof)
* [`pending-proof-by-namespace`](#pending-proof-by-namespace)

**Bitvmstaker queries**

* [`all-staker-info`](#all-staker-info)
* [`committee-address`](#committee-address)
* [`registered-vk-list`](#registered-vk-list)

### **get-bitvm-challenge-data**

Query bitVM chanllenge data stored in the fiamma by proof\_id.

request params:

```
{
  "proof_id": "string",
}
```

response:

```
{
  "bitvm_challenge_data": {
    "proposer": "string",
    "public_input": "string",
    "verify_result": "bool",
    "vk": "string",
    "witness": "string"
  }
}
```

### **get-proof-data**

Query Proof data stored in the fiamma by proof\_id.

request params:

```
{
  "proof_id": "string",
}
```

response:

```
{
  "proof_data": {
    "proof_system": "integer",
    "proof": "string",
    "public_input": "string",
    "vk": "string",
    "namespace": "string"
  }
}
```

### **get-verify-result**

Query Proof verify status stored in the fiamma by proof\_id.

request params:

```
{
  "proof_id": "string",
}
```

response:

```
{
  verify_result: {
      "proof_id": "string",
      "proof_system": "string",
      "data_commitment": "string",
      "data_location": "string",
      "result": "bool",
      "status": "integer",
      "community_verification_count": "integer",
      "namespace": "string"
  }
}
```

### **get-verify-results-by-namespace**

Query Proof verify status stored in the fiamma by namespace.

request params:

```
{
  "namespace": "string",
}
```

response:

```
{
  verify_result: [
    {
      "proof_id": "string",
      "proof_system": "string",
      "data_commitment": "string",
      "data_location": "string",
      "result": "bool",
      "status": "integer",
      "community_verification_count": "integer",
      "namespace": "string"
    },
    ...
  ]
}
 
```

### **pending-proof**

Queries a list of pending proof verification items.

There is no request param for this method.

response:

```
{
  "pending_proofs": [
    {
      "proof_id": "string",
      "proof_system": "string",
      "data_commitment": "string",
      "data_location": "string",
      "result": bool,
      "status": "string",
      "community_verification_count": "string",
      "namespace": "string"
    },
    ...
  ],
  "pagination": {
    "next_key": "string",
    "total": "integer"
  }
}
```

### **pending-proof-by-namespace**

Queries a list of pending proof verification items by namespace.

request params:

```
{
  "namespace": "string",
}
```

response:

```
{
  "pending_proofs": [
    {
      "proof_id": "string",
      "proof_system": "string",
      "data_commitment": "string",
      "data_location": "string",
      "result": bool,
      "status": "string",
      "community_verification_count": "string",
      "namespace": "string"
    },
    ...
  ],
  "pagination": {
    "next_key": "string",
    "total": "integer"
  }
}
```

### **all-staker-info**

Queries a list of holding information about all the stakers. It may include details such as staker\_index and staker\_address.

response:

```
{
  "all_staker_info": [
    {
      "staker_index": "integer",
      "staker_address": "string"
    },
    ...
  ],
  "pagination": {
    "next_key": "string",
    "total": "integer"
  }
}
```

### **committee-address**

Queries the address associated with the committee responsible for overseeing certain operations or governance within Fiamma blockchain system.

response:

```
{
  "committeeAddress": "string",
}
```

### **registered-vk-list**

Queries a list of registered verification keys (VKs).

response:

```
{
  "registered_vk_list": [
    ["string"]
    ,
    ...
  ],
  "pagination": {
    "next_key": "string",
    "total": "integer"
  }
}
```


---

# 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://docs.fiammalabs.io/our-product-suite/bitvm-powered-zkp-verification-layer/developer-guides/fiamma-cli/cli-command-overview.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.
