Build with Neo Rust SDK

A comprehensive Rust library for building applications on the Neo N3 blockchain ecosystem

Loading blockchain data...

Key Features

Wallet Management

Create, load, and manage Neo N3 wallets with support for various key formats and storage options.

Transaction Building

Build and sign transactions with a fluent API for all Neo transaction types, including multi-sig support.

Smart Contract Integration

Deploy and invoke smart contracts with automatic parameter type conversion and response handling.

Getting Started

Add the Neo Rust SDK to your Cargo.toml file:

Cargo.toml
[dependencies]
neo3 = "0.1.9"

Code Examples

main.rs
use neo::prelude::*;

fn main() -> Result<()> {
    // Create a new wallet
    let wallet = Wallet::new();
    
    // Print the wallet address
    println!("New wallet address: {}", wallet.address());
    
    Ok(())
}
contract_example.rs
use neo::prelude::*;

async fn invoke_contract() -> Result<()> {
    let wallet = Wallet::load("wallet.json", "password")?;
    let account = wallet.default_account()?;
    
    // Connect to Neo node
    let client = NeoClient::connect_to_testnet().await?;
    
    // Invoke contract method
    let result = client
        .invoke_function(
            "0xd2a4cff31913016155e38e474a2c06d08be276cf",
            "transfer",
            [
                ContractParameter::hash160(account.address()),
                ContractParameter::hash160("NbnjKGMBJzJ6j5PHeYhjJDaQ5Vy5UYu4Fv"),
                ContractParameter::integer(100),
                ContractParameter::any(None)
            ],
            account,
        )
        .await?;
    
    println!("Transaction: {}", result.tx_id);
    
    Ok(())
}

Key Components

NEP-17 Token Support

Interact with NEP-17 tokens directly with built-in support.

NNS Integration

Work with the Neo Name Service for human-readable addresses.

Famous Contract Support

Direct interfaces for Flamingo, NeoburgerNeo, and other popular contracts.

Neo X Support

EVM compatibility and bridge functionality for cross-chain operations.

SGX Support

Secure operations within Intel SGX enclaves for enhanced security.

Asynchronous API

First-class async/await support for efficient blockchain interactions.