> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-sdk/resources/exported-types.md).

# Exported types

The SDK is written in TypeScript and ships with full type definitions. No extra `@types` package is needed.

## Types

```ts
import type {
  // Client
  BaasClient,
  BaasClientOptions,
  // Auth & sessions
  BaasSession,
  AuthStateChangeCallback,
  BaasAuthClient,
  EIP1193Provider,
  // Chains
  BaasChain,
  BaasChainsClient,
  ChainChangeCallback,
  // User
  BaasUserClient,
  BaasUser,
  // Errors
  BaasErrorCode,
  BaasApiErrorLevel,
  // Smart contracts — fluent chain
  ContractStep,
  AddressStep,
  FunctionStep,
  TerminalStep,
  SendOptions,
  SimulateOptions,
  EstimateGasOptions,
  // Typed wrapper for overload disambiguation
  TypedValue,
  // Wallet
  BaasWallet,
  BaasTransaction,
  SendTransactionOptions,
  SignMessageOptions,
  GetBalanceOptions,
  // viem re-export
  TransactionReceipt,
} from '@baas/sdk';
```

{% hint style="info" %}
`TransactionReceipt` is re-exported from viem, so you can type the result of `tx.wait()` without installing viem yourself.
{% endhint %}

## Error classes

Error classes are exported as values, so you can use `instanceof`:

```ts
import {
  BaasError,
  BaasAuthError,
  BaasWalletError,
  BaasNetworkError,
  BaasApiError,
} from '@baas/sdk';
```

## Helpers

```ts
import { Typed, Units } from '@baas/sdk';
```

* `Typed` provides ABI type wrappers for disambiguating Solidity overloads when JavaScript can't distinguish scalar types (e.g. `Typed.uint8(100)` vs `Typed.uint256(100)`). See [Disambiguating overloaded functions](/baas-sdk/blockchain/smart-contracts.md#disambiguating-overloaded-functions).
* `Units` converts between human amounts and raw on-chain values (wei, token base units). See [Unit conversion](/baas-sdk/blockchain/units.md).

## Next

* [API reference](/baas-sdk/resources/api-reference.md) — every method, option, and signature.
* [Error handling](/baas-sdk/resources/error-handling.md) — the typed error hierarchy.
* [Integration guides](/baas-sdk/integrations.md) — TypeScript setup and supported environments.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.baas.sh/baas-sdk/resources/exported-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
