CLI Tutorial
In this tutorial, you will learn how to use the Fiammad Command Line Interface(CLI) to send requests related to zkpverify.
Preparations
Before you can use CLI, you need to prepare the proof for testing, and a simple way to do this is to use the fiamma git repository provides some sample prover code for generating test proof files, which can be used to easily generate test proof public_input and vk.
Note! Fiamma currently supports zkp authentication with a variety of proofs, the list of supported proofs is shown in Support ProofSystem. For the bitvm proof system , there is currently no open source specific prover, we give a sample generated by our test, soon we will open source bitvm proof system
1. Clone Fiamma Git repository
ZKPVerify Module
1. Send your proof to Fiamma network
Submit BitVM proof
The BitVM proof need the proof file, public input file and verifying key file. You may set gas and fees.
The current Fiamma network chain-id is fiamma-testnet-1
, the namespace is test-namespace
, the data_location should be FIAMMA , the proof system is GROTH16_BN254_BITVM
or FFPLONK_BN254_BITVM
and the node is https://testnet-rpc.fiammachain.io.
Example Proof system use GROTH16_BN254_BITVM.
Send BitVM proof:
2. Get Proof id
When you have finished submitting your proof, there are two ways to query the proof id of the proof you have submitted.
Get Proof Id by tx event
When you submit a proof, you will receive a transaction hash. Typically, if the transaction is successful, by querying the transaction details using the hash, you can retrieve an event list where you can filter out the proofId.
Get Proof Id by Manual/Code Calculation
The proof id can be calculated from sha256sum
of proof inputs using shell. It Concatenate the proof system, proof, public input,and vk.
3. Submit community verification to Fiamma network
The community verification need an proof id and verification result.
submit community verification:
Example You may use the above shell to calculate a proof id, and use fiammad command to sumbit community verification with a verification result.
In addition, we provide shell scripts to make it easier to send these commands. The parameter accepted by the script is account.
4. Get proof data by proof id from Fiamma network
You can query proof data stored in the fiamma network by proof id.
Example
5. Get bitvm chanllenge data by proof id from Fiamma network
You can query bitVM chanllenge data stored in the fiamma network by proof id.
Example
6. Get verify result from Fiamma network
You can query proof verify status stored in the fiamma network by proof id.
Example
7. Get verify result by namespace from Fiamma network
You can query proof verify status stored in the fiamma network by namespace.
Example
8. Get pending proofs from Fiamma network
You can queries a list of pending proof verification items in the fiamma network.
Example
9. Get pending proofs by namespace from Fiamma network
You can queries a list of pending proof verification items by namespace in the fiamma network.
Example
BitVMStaker Module
1. Create a new staker account by staker address
You can create a new staker account by staker address in the fiamma network.
Example
2. Get a list of holding information about all the stakers
You can query a list of holding information about all the stakers in the fiamma network.
Example
3. Remove a staker account by staker address
You can remove a staker account by staker address in the fiamma network.
Example
4. Register a new verification key (VK)
You can Register a new verification key (VK) for a specific proof system by vk in the fiamma network.
Example
5. Get a list of registered VKs
You can query a list of registered verification keys (VKs) in the fiamma network.
Example
6. Remove a registered verification key(VK)
You can remove a previously registered verification key (VK) for a specific proof system in the fiamma network.
Example
7. Update committee addresses
You can update the address of the committee responsible for overseeing the blockchain operations or specific proof systems in the fiamma network.
Example
8. Get the committee address
You can query the address associated with the committee responsible for overseeing certain operations or governance in the fiamma network.
Example
Last updated