Using the SDK

The Namada SDK

The Namada software development kit (SDK) can be found in the namada repo under the path `namada/crates (opens in a new tab). The SDK is written in Rust and can be used to interact with the Namada blockchain, by constructing transactions, signing them, and submitting them to the network.

Quick Start

A good starting point to see the SDK in use is to check-out the namada interface (opens in a new tab) repo. This repo contains a simple web application that uses the SDK to interact with the Namada blockchain. However, it is important to note the added complexity arising from the application integrating javascript using wasm-bindgen (opens in a new tab), which is not necessary.

Installation

The Namada SDK can be installed by creating a new Rust project and adding the following to the Cargo.toml file:

[package]
name = "namada-sdk-example"
version = "0.1.0"
edition = "2021"
 
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
[dependencies]
clap = { version = "4.4.2", features = ["derive", "env"] }
rand = {version = "0.8", default-features = false}
rand_core = {version = "0.6", default-features = false}
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
namada_sdk = { git = "https://github.com/anoma/namada", rev = "v0.31.8", default-features = false, features = ["tendermint-rpc", "std", "async-send", "download-params", "rand"] }
tendermint-config = "0.34.0"
tendermint-rpc = { version = "0.34.0", features = ["http-client"]}
tokio = {version = "1.8.2", default-features = false}
tempfile = "3.8.0"
async-trait = "0.1.74"
markdown-gen = "1.2.1"
reqwest = "0.11.22"
minio = "0.1.0"
itertools = "0.12.0"
 
[build-dependencies]
vergen = { version = "8.0.0", features = ["build", "git", "gitcl"] }

Once the sdk is installed, you can use it to interact with the Namada blockchain.

Table of contents