Skip to main content
You can type your own functions against the SDK by importing its exported types, so the compiler catches a wrong chain ID or a missing field before your code runs.
Early release. This is published in @uzolabs/sdk 0.2.0 on npm and you can use it today. The API may change before 1.0, so pin the version.

Import

All types are exported from the package root and from the subpath they belong to. Use import type so nothing is added to your bundle:
Import

Types in 0.2.0

SupportedChainId

Signature
The chain IDs the SDK accepts: 677 for BOT Chain and 968 for BOT Chain Testnet. getAddresses and createExplorerClient take this type, so passing another number literal is a compile error. If the value comes from a wallet at runtime, it’s a plain number, and the SDK checks it and throws UnsupportedChainError.
is-supported.ts

AddressInfo

Returned by getAddressInfo.
boolean
required
true if the address has contract code.
boolean
required
true if the source is verified on BOTScan.
string | null
required
The name BOTScan shows, or null.
{ symbol: string; decimals: number }
Present only for tokens with a symbol and whole-number decimals.

ContractInfo

Returned by getContract.
string
required
The verified contract name, or "" if unverified.
Abi
required
The verified ABI from viem’s Abi type, or [] if unverified.
boolean
required
Whether BOTScan has verified source.
string | null
required
The detected proxy pattern, such as "eip1967", or null.
Address[]
required
Implementation addresses for proxies. Empty otherwise.

ExplorerClient

Signature
The object returned by createExplorerClient. Use it to type a function that accepts a client, or to write a mock in tests.

Address and ABI types

The SDK doesn’t define its own Address, Hex or Abi types. It uses viem’s, so values move between the SDK and viem without conversion. The addresses object and the ABIs are declared as const, so getAddresses(968).usdt has its exact address as its type and ABI reads return typed results.

Planned types

In development. This describes the planned API. It is not published yet and details may change. Follow progress on GitHub.
The brief for the planned modules names two shared types. Their fields aren’t published, so they aren’t listed here. Until they ship, viem’s own types cover the same ground. Pass the result of encodeFunctionData as data in a sendTransaction call, as shown in Send transactions.

Errors

Error classes and codes.

Changelog

What changed in each release.
Last modified on October 3, 2026