IOTA TypeScript SDK Quick Start
The IOTA TypeScript SDK is a modular library of tools for interacting with the IOTA blockchain. Use it to send queries to RPC nodes, build and sign transactions, and interact with an IOTA or local network.
Installation
- npm
- Yarn
- pnpm
npm i @iota/iota-sdk
yarn add @iota/iota-sdk
pnpm add @iota/iota-sdk
Network locations
The following table lists the locations for IOTA networks.
It is suggested to use dedicated nodes/shared services rather than public endpoints for production apps with high traffic volume.
You can either run your own full nodes, or outsource this to a professional infrastructure provider (preferred for apps that have high traffic).
IOTA Testnet
Base Token | IOTA Token (no value) |
---|---|
Explorer URL |
|
JSON RPC URL |
|
Indexer RPC |
|
GraphQL RPC |
|
RPC Websocket URL |
|
Faucet URL |
|
IOTA Devnet
Base Token | IOTA Token (no value) |
---|---|
Explorer URL |
|
JSON RPC URL |
|
Indexer RPC |
|
GraphQL RPC |
|
RPC Websocket URL |
|
Faucet URL |
|
IOTA Localnet
To create a local IOTA network, you can refer to Local Development page.
Base Token | IOTA Token |
---|---|
JSON RPC URL |
|
Indexer RPC |
|
GraphQL RPC |
|
RPC Websocket URL |
|
Faucet URL |
|
Module packages
The SDK contains a set of modular packages that you can use independently or together. Import just what you need to keep your code light and compact.
@iota/iota-sdk/client
- A client for interacting with IOTA RPC nodes.@iota/iota-sdk/bcs
- A BCS builder with pre-defined types for IOTA.@iota/iota-sdk/transaction
- Utilities for building and interacting with transactions.@iota/iota-sdk/keypairs/*
- Modular exports for specific KeyPair implementations.@iota/iota-sdk/verify
- Methods for verifying transactions and messages.@iota/iota-sdk/cryptography
- Shared types and classes for cryptography.@iota/iota-sdk/multisig
- Utilities for working with multisig signatures.@iota/iota-sdk/utils
- Utilities for formatting and parsing various IOTA types.@iota/iota-sdk/faucet
- Methods for requesting IOTA from a faucet.