Neutron provides a comprehensive suite of SDKs and developer tools to make building on the platform as seamless as possible. This page outlines the core libraries and resources available to developers.

Official SDK Libraries

Neutron SDK (Rust)

The Neutron SDK provides Rust libraries for building smart contracts that interface with Neutron’s specialized modules.

Example Contracts

The SDK repository includes several example contracts demonstrating Neutron’s features:

Getting Started

# Clone the repository
git clone https://github.com/neutron-org/neutron-sdk.git
cd neutron-sdk

# Run tests
make test

# Generate schema
make schema

# Build for production
make build

NeutronJS (TypeScript/JavaScript)

NeutronJS provides TypeScript/JavaScript types and utilities for interacting with the Neutron chain from web applications.

Installation

npm install @neutron-org/neutronjs

Features

  • TypeScript types for all Neutron modules
  • Query functions for accessing chain data
  • Transaction builders for Neutron-specific messages
  • Integration with CosmJS for wallet connections

Example Usage

import { NeutronClient } from '@neutron-org/neutronjs';

// Create a client
const client = await NeutronClient.connect('https://rpc-neutron.keplr.app');

// Query tokens
const balances = await client.getAllBalances('neutron1...');

// Create and broadcast transactions
const msg = {
  typeUrl: '/cosmos.bank.v1beta1.MsgSend',
  value: {
    fromAddress: 'neutron1...',
    toAddress: 'neutron1...',
    amount: [{ denom: 'untrn', amount: '1000000' }]
  }
};

const result = await client.signAndBroadcast([msg], fee, memo);

Boilerplates & Templates

Get started quickly with ready-to-use templates and scaffolding tools:

Boilerplates & Scaffolding

Complete collection of templates, boilerplates, and scaffolding tools for rapid development.

Templates • Integration Tools • Testing

Testing Tools

test-tube

test-tube is a powerful library for building testing environments for CosmWasm smart contracts. It allows you to test your contracts against the actual Cosmos SDK chain’s logic, written in Go, using Rust.

Unlike cw-multi-test which simulates only basic modules, test-tube enables testing against the complete chain implementation, making it ideal for contracts that interact with custom Neutron modules.

Why Use test-tube?

If your contract interacts with Neutron’s custom modules like Interchain Queries, Interchain Transactions, or the DEX module, test-tube provides more realistic testing than cw-multi-test.

Installation & Usage

See the test-tube documentation for setup instructions and examples.

Installing Development Dependencies

To develop for Neutron, you’ll need the following tools:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
rustup target add wasm32-unknown-unknown

# Install Go (required for test-tube and some tooling)
# Download from https://golang.org/dl/

# Install Node.js (for JavaScript/TypeScript development)
# Download from https://nodejs.org/

Additional Resources