OneChain Labs SDKs

OneChain TypeScript SDK Quick Start

The OneChain TypeScript SDK is a modular library of tools for interacting with the OneChain blockchain. Use it to send queries to RPC nodes, build and sign transactions, and interact with a OneChain or local network.

Installation

npm i @onelabs/sui

Network locations

The following table lists the locations for OneChain networks.

NetworkFull nodefaucet
localhttp://127.0.0.1:9000 (default)http://127.0.0.1:9123/gas (default)
Devnethttps://rpc-devnet.onelabs.cc:443https://rpc-devnet.onelabs.cc:443/gas
Testnethttps://rpc-testnet.onelabs.cc:443https://rpc-testnet.onelabs.cc:443/gas
Mainnethttps://rpc.mainnet.onelabs.cc:443null

Use dedicated nodes/shared services rather than public endpoints for production apps. The public endpoints maintained by OneChain Labs (rpc-.<NETWORK>.onelabs.cc:443) are rate-limited, and support only 100 requests per 30 seconds or so. Do not use public endpoints in production applications 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). You can find a list of reliable RPC endpoint providers for OneChain on the OneChain Dev Portal using the Node Service tab.

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.

On this page