To make it easier to send zkpverify requests to the fiamma network, fiamma supports multi-language sdk, which can be easily used by developers.
Fiamma-sdk-rs
The fiamma-sdk-rs is the Rust SDK for the Fiamma chain, providing a range of APIs for interacting with the Fiamma blockchain. This SDK is primarily designed to simplify the process of blockchain development in Rust, covering fundamental on-chain operations and related functionalities.
Main Features
Transaction Sending and Querying:
Submit a proof to the blockchain.
Create and remove validators on the Fiamma blockchain.
Query transaction status and results.
Proof and challenge data Querying:
Query the necessary proof data.
Query the challenge data related to a specific BitVM proof or transaction
Query the basic account functionality.
API Methods List
1. create_staker
Description: Adds a new validator to the Fiamma network.
Description: contains all the necessary fields for basic account functionality. Parameters: An instance of the Wallet struct created with the PRIVATE_KEY. This wallet will manage the user's account and facilitate interactions with the Fiamma blockchain.
Description: Retrieves the necessary proof data from the Fiamma blockchain.
Parameters:
proof_id: A unique identifier for the proof you want to retrieve.
Response: The ProofData struct corresponds to the MsgSubmitProof structure in that both are designed to encapsulate information relevant to the submission and verification of proofs within the Fiamma blockchain context.
pubstructProofData { #[prost(enumeration ="ProofSystem", tag ="1")]pub proof_system:i32, #[prost(bytes ="vec", tag ="2")]pub proof:::prost::alloc::vec::Vec<u8>, #[prost(bytes ="vec", tag ="3")]pub public_input:::prost::alloc::vec::Vec<u8>, #[prost(bytes ="vec", tag ="4")]pub vk:::prost::alloc::vec::Vec<u8>, #[prost(string, tag ="5")]pub namespace:::prost::alloc::string::String,}
Description: Retrieves the challenge data related to a specific BitVM proof or transaction.
Parameters:
proof_id: A unique identifier for the proof you want to retrieve.
Response:
verify_result (bool): Indicates whether the verification of the challenge was successful.
witness (Vec<u8>): Contains the witness data needed for the proof validation process.
vk (Vec<u8>): Represents the verification key used in the proof system.
public_input (Vec<u8>): Holds the public input data required for the challenge.
proposer (String): Specifies the account or entity that proposed the challenge.
pubstructBitVmChallengeData { #[prost(bool, tag ="1")]pub verify_result:bool, #[prost(bytes ="vec", tag ="2")]pub witness:::prost::alloc::vec::Vec<u8>, #[prost(bytes ="vec", tag ="3")]pub vk:::prost::alloc::vec::Vec<u8>, #[prost(bytes ="vec", tag ="4")]pub public_input:::prost::alloc::vec::Vec<u8>, #[prost(string, tag ="5")]pub proposer:::prost::alloc::string::String,}