Huione Docs
White Paper
Developers
Developers
  • Learn
    • Introduction to Huione Chain
    • Getting started with Huione Chain
  • Architecture
    • What is a Huione Chain Cluster?
    • Clusters
      • Huione Chain Clusters
      • RPC Endpoints
      • Benchmark a Cluster
      • Performance Metrics
    • Consensus
      • Synchronization
      • Leader Rotation
      • Fork Generation
      • Managing Forks
      • Turbine Block Propagation
      • Commitment Status
      • Secure Vote Signing
      • Stake Delegation and Rewards
    • Validators
      • Overview
      • TPU
      • TVU
      • Blockstore
      • Gossip Service
      • The Runtime
    • Dex & Swap
      • Trade on dex
      • Trade on swap
  • CLI
    • Command-line Guide
    • Install the Huione Tool Suite
    • Command-line Wallets
      • Command Line Wallets
      • Paper Wallet
      • File System Wallet
      • Support / Troubleshooting
    • Using Huione Chain CLI
    • Connecting to a Cluster
    • Send and Receive Tokens
    • Staking
    • Deploy a Program
    • Offline Transaction Signing
    • Durable Transaction Nonces
    • CLI Usage Reference
  • Developers
    • Get Started
      • Hello World
      • Local development
      • Rust program
    • Core Concepts
      • Accounts
      • Transactions
        • Overview
        • Versioned Transactions
        • Address Lookup Tables
      • Programs
      • Rent
      • Calling between programs
      • Runtime
    • Clients
      • JSON RPC API -1
      • JSON RPC API -2
      • JSON RPC API -3
      • Web3 JavaScript API
      • Web3 API Reference
      • Rust API
    • Writing Programs
      • Overview
      • Developing with Rust
      • Deploying
      • Debugging
      • Program Examples
      • FAQ
    • Native Programs
      • Overview
      • Sysvar Cluster Data
    • Local Development
      • Huione Test Validator
    • Backward Compatibility Policy
    • Anchor Book
      • Introduction
        • What is Anchor
        • Anchor Documentation
        • Prerequisites
      • Getting Started
        • Installation
        • Hello, Anchor!
      • Anchor Programs In-Depth
        • Essentials
          • High-level Overview
          • The Accounts Struct
          • The Program Module
          • Errors
          • Milestone Project - Tic-Tac-Toe
        • Intermediate
          • Cross-Program Invocations
          • PDAs
          • Events
      • Anchor BTS
        • The Discriminator
      • Anchor References
        • Space Reference
        • Javascript Anchor Types Reference
        • CLI Reference
        • Code References
  • Validators
    • Running a Validator
    • Getting Started
      • Validator Requirements
    • Voting Setup
      • Starting a Validator
      • Vote Account Management
      • Staking
      • Monitoring a Validator
      • Publishing Validator Info
      • Failover Setup
      • Troubleshooting
    • Geyser
      • Geyser Plugins
  • Staking
    • Staking on Huione
    • Stake Account Structure
  • Integrations
    • Add Huione to Your Exchange
    • Retrying Transactions
  • Library
    • Introduction
    • Token Program
    • Associated Token Account Program
    • Memo Program
    • Name Service
    • Feature Proposal Program
    • NFT Program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a new NFT-Mint
        • Cast NFT
        • Transfer an NFT
        • Change account status
        • Permission settings
        • Query Interface
        • Continuous casting
        • Change the Mint attribute
      • Operation Overview
        • Create a new NFT-Mint
        • Transfer NFT
        • Destroy
        • Freeze NFT accounts
        • Update
    • Huione multi-sign program
      • Overview
      • Interface
      • Usage Guidelines
        • Create a multi-signature account
        • Create a proposal account
        • Vote proposal
        • Verify Proposal
        • Add-singer
        • Remove-signer
      • Operation Overview
        • Create a multi-signature account
        • Create a proposal account
        • Vote
        • Verify
        • Add-singer
        • Remove-signer
Powered by GitBook
On this page
  • Local Development Quickstart
  • What you will learn
  • Install the Huione CLI
  • Setup a localhost blockchain cluster
  • Create a file system wallet
  • Airdrop huione tokens to your wallet
  • Next steps

Was this helpful?

  1. Developers
  2. Get Started

Local development

Local Development Quickstart

This quickstart guide will demonstrate how to quickly install and setup your local development environment, getting you ready to start developing and deploying Huione programs to the blockchain.

What you will learn

  • How to install the Huione CLI locally

  • How to setup a localhost Huione cluster/validator

  • How to create a Huione wallet for developing

  • How to airdrop Huione tokens for your wallet

Install the Huione CLI

To interact with the Huione clusters from your terminal, install the Huione CLI tool suite on your local system:

sh -c "$(curl -sSfL https://release.huione.org/stable/install)"

Setup a localhost blockchain cluster

The Huione CLI comes with the test validator built in.

This command line tool will allow you to run a full blockchain cluster on your machine.

huione-test-validator

PRO TIP: Run the Huione test validator in a new/separate terminal window that will remain open. The command line program must remain running for your localhost cluster to remain online and ready for action.

Configure your Huione CLI to use your localhost validator for all your future terminal commands:

huione config set --url localhost

At any time, you can view your current Huione CLI configuration settings:

Huione config get

Create a file system wallet

To deploy a program with Huione CLI, you will need a Huione wallet with Huione tokens to pay for the cost of transactions.

Let's create a simple file system wallet for testing:

huione-keygen new

By default, the huione-keygen command will create a new file system wallet located at ~/.config/huione/id.json. You can manually specify the output file location using the --outfile /path option.

NOTE: If you already have a file system wallet saved at the default location, this command will NOT override it (unless you explicitly force override using the --force flag).

Set your new wallet as default#

With your new file system wallet created, you must tell the Huione CLI to use this wallet to deploy and take ownership of your on chain program:

huione config set -k ~/.config/huione/id.json

Airdrop huione tokens to your wallet

Once your new wallet is set as the default, you can request a free airdrop of huione tokens to it:

huione airdrop 2

NOTE: The huione airdrop command has a limit of how many Huione tokens can be requested per airdrop for each cluster (localhost, testnet, or devent). If your airdrop transaction fails, lower your airdrop request quantity and try again.

You can check your current wallet's Huione balance any time:

huione balance

Next steps

See the links below to learn more about writing Rust based Huione programs:

  • Create and deploy a Huione Rust program

  • Overview of writing huione programs

PreviousHello WorldNextRust program

Last updated 6 months ago

Was this helpful?