Mind Network Docs
  • 🧠 What is Mind Network
  • Background
    • 🔐 HTTPZ
  • 🚀 Challenges and Solutions
  • Research
    • 📚 FHE Research
      • FHE 101
      • FHE Validation
      • FHE Consensus
      • FHE Chain
      • FHE Transaction
      • FHE Scheme
      • FHE Data
  • Product
    • 🛠️ Product Overview
    • 🌐 AgenticWorld 🔥
      • AgenticWorld User Guide
        • DeepSeek Hub
        • Agent Launch @ Mainnet
        • Agent Launch @ Testnet
      • Rewards Rule
      • Revenue and Payment
      • Bridge
    • ⛓️ MindChain
      • MindChain Developer Guide
    • 🌉 FHEBridge
      • FHEBridge Guide - Transfer
      • FHEBridge Guide - Bridge
      • FHEBridge Guide - Manage
    • MINDV (Ended)
      • MindV User Guide (Ended)
      • vFHE Explanation (Ended)
  • Usecase
    • DeepSeek Integrates FHE Rust SDK
    • MindX - Encrypted LLM
    • AI Agents Framework: ElizaOS and Virtuals
    • Multi-Agents: Swarms Shield Hub
    • World AI Health Hub
    • Fair Randomness in Decentralized Systems
    • FHE+TEE: Security in Decentralized AI Governance
    • Decentralized GPU Computation
    • MindLake - FHE Encrypted DataLake
  • Data Encryption
  • Crosschain Infra
  • Storage Secruity
  • Governance
    • $FHE
    • Tokenomics
    • Get $FHE
  • Community
    • 🪪 CitizenZ
    • 🎙️ FHECon
    • 🎤 X On My Mind
  • Deverloper Guide
    • Developer Overview
    • Hub Tutorial
      • SDK For Hub Framework
      • Validator Tutorial - Randgen Hub Voter as the example
  • Consensus Tutorial
  • Security and Privacy
    • Audit - FHEBridge
    • Audit - Restake
    • Multi-Sig & Timelock
    • Mind Network Terms of Service
    • Mind Network Privacy Policy
    • Mind Network Airdrop Terms of Service
    • Mind Network Airdrop Privacy Policy
  • Other
    • Airdrop User Guide
    • Early-bird Rewards
    • FAQ
    • Official Links
    • Brandkit
Powered by GitBook
On this page
  • Quick Start
  • CLI Help
  • CLI Example
  • License

Was this helpful?

Consensus Tutorial

PreviousValidator Tutorial - Randgen Hub Voter as the exampleNextAudit - FHEBridge

Last updated 2 months ago

Was this helpful?

mind_sdk_fcn is a Native Rust SDK by

Quick Start

TFHE-rs-v1.0.0 marks the first official stable release, see more details . Rustc-v1.84.0 is required to compile TFHE-rs v1.0.0. You can upgrade rustc like rustup update stable.

Install

[dependencies]
mind_sdk_fcn = "*

build

cargo build --debug
cargo build --release

run

cd msn
cargo build && ./target/debug/mind_sdk_fcn --log-level=info --node-config-file=./config/config_fcn.toml check-fcn-wallet-address
cargo run --log-level=debug --node-config-file=./config/config_fvn.toml register 0x06eF5C5ba427434bf36469B877e4ea9044D1b735

CLI Help

# ./bin/fcn --help

FHE Decryption Node Cli

Usage: fcn [OPTIONS] <COMMAND>

Commands:
  check-fcn-wallet-address  check fcn wallet address, by default will use ./config/testnet_config_fcn.toml
  check-gas-balance         check fcn wallet gas balance, need gas fee to talk onchain
  run-once                  Run in loop mode
  run-loop                  Run in loop mode
  check-rewards             check received rewards onchain
  check-tx                  check voting tx history on the explore
  help                      Print this message or the help of the given subcommand(s)

Options:
      --node-config-file <NODE_CONFIG_FILE>
          fcn config file, contains all the config to run fcn [default: ./config/testnet_config_fcn.toml]
      --log-level <LOG_LEVEL>
          control level of print, useful for debug, default is info [default: info] [possible values: debug, info, warn, error]
      --fcn-wallet-private-key <FDN_WALLET_PRIVATE_KEY>
          fcn wallet private key is needed if to load a different wallet from testnet_config_fcn.toml to sign the message onchain, by default load from ./config/testnet_config_fcn.toml
      --from-block-number <FROM_BLOCK_NUMBER>
          starting block number, if not set, will use the value in node_config_file
  -h, --help
          Print help
  -V, --version
          Print version

CLI Example

## command
./bin/randgen --log-level=info --node-config-file=./config/testnet_config_fcn.toml check-fcn-wallet-address
{
  "app": "fcn",
  "command": "check-fcn-wallet-address",
  "arg": "",
  "status": true,
  "result": "0x161FE9d92689D27653c63984f3195811491167A0",
  "note": ""
}

## command
./bin/randgen --log-level=info --node-config-file=./config/testnet_config_fcn.toml check-gas-balance
{
  "app": "fcn",
  "command": "check-gas-balance",
  "arg": "fcn_wallet: 0x161FE9d92689D27653c63984f3195811491167A0",
  "status": true,
  "result": "29307405505000000",
  "note": ""
}

## command
./bin/randgen --log-level=info --node-config-file=./config/testnet_config_fcn.toml check-rewards
{
  "app": "fcn",
  "command": "check-rewards",
  "arg": "fcn_wallet: 0x161FE9d92689D27653c63984f3195811491167A0",
  "status": true,
  "result": "0",
  "note": "fcn_wallet: 0x161FE9d92689D27653c63984f3195811491167A0, received_rewards: 0"
}

## command
./bin/randgen --log-level=debug --from-block-number=100000 --node-config-file=./config/testnet_config_fcn.toml run-once
{
  "app": "fcn",
  "command": "register",
  "arg": "hot_wallet: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, voter_wallet: 0x06eF5C5ba427434bf36469B877e4ea9044D1b735",
  "status": true,
  "result": "registration successful !",
  "note": "is_registered: true, hot_wallet: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, voter_wallet: 0x06eF5C5ba427434bf36469B877e4ea9044D1b735"
}

## command
./bin/randgen --log-level=info --from-block-number=100000 --node-config-file=./config/testnet_config_fcn.toml check-tx
{
  "app": "fcn",
  "command": "check-tx",
  "arg": "0x51B5de8555cc55f62c039c3aA3d9a5eBF8Fc30EE",
  "status": true,
  "result": "check on the explore: testnet: https://explorer-testnet.mindnetwork.xyz/address/0x51B5de8555cc55f62c039c3aA3d9a5eBF8Fc30EE, mainnet: https://explorer.mindnetwork.xyz/address/0x51B5de8555cc55f62c039c3aA3d9a5eBF8Fc30EE",
  "note": ""
}

License

This project is licensed under the MIT License.

Mind Network
here