> 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/sdk.md).

# Introduction

A browser SDK that authenticates the end-users of your BaaS project, with passkeys or external wallets.

Add passkey wallets and on-chain features to your web app with `@baas.sh/sdk`.

* **Authentication:** create accounts with passkeys or connect an external wallet.
* **Wallets:** manage sessions, select EVM networks, read balances, and send transactions.
* **Contracts:** call contracts registered in your BaaS project without importing ABIs.
* **Event search:** filter a [contract's events](/baas-sdk/blockchain/events.md) or the [signed-in user's history](/baas-sdk/manage-user.md#filter-the-users-history) by amount, sender or date, with Smart Units and `and`/`or` helpers.

## Connect your project

Create a BaaS project, enable the wallet modes and networks your app needs, and copy its **Project API URL**. Then create one client in browser code:

```ts
import { createBaasClient } from '@baas.sh/sdk';

const baas = createBaasClient('https://my-project-api.baas.sh');
```

The URL is public. Keep project secret keys out of your frontend. For React or Next.js, use the [React guide](/baas-sdk/integrations/react.md) to initialize the client in browser execution.

The [Quickstart](/baas-sdk/quickstart.md) covers installation, allowed origins, the passkey domain, and your first sign-in. A user is identified by their wallet address (`session.address`). Email helps locate the account; these flows do not verify email ownership.

## Best practices

* **Use SDK methods** for contracts, event searches and user profiles. Accessing another user's profile belongs in your backend, with a [secret key](/baas-console/api-settings/secret-keys.md).
* **Enter amounts with `SmartUnits('1.5')`** when a unit is configured. For raw values and exceptions, see [Smart units](/baas-sdk/blockchain/smart-units.md).
* **Display `formatted`, calculate with `raw`.** Amounts with known decimals return both; use `BigInt(raw)` for exact arithmetic.

## Requirements

Use a modern browser with `fetch`, Web Crypto, and BigInt. Passkeys also need HTTPS (or `localhost`), WebAuthn, and a compatible passkey manager that backs up the credential. External wallets use an EIP-1193 provider.

## Start here

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Quickstart</strong></td><td>Install the SDK and sign in your first user step by step.</td><td><a href="/baas-sdk/quickstart.md">Quickstart</a></td></tr><tr><td><strong>Authentication</strong></td><td>Passkeys vs wallets, sign up vs sign in, and how to choose.</td><td><a href="/baas-sdk/authentication.md">Authentication</a></td></tr><tr><td><strong>API reference</strong></td><td>Look up method signatures, options and return types.</td><td><a href="/baas-sdk/resources/api-reference.md">API reference</a></td></tr></tbody></table>

## Package and license

Install `@baas.sh/sdk`. The package includes ESM, CommonJS, and TypeScript declarations. The SDK is licensed under Apache-2.0, copyright 2026 BaaS.sh. Node.js 20.19 or newer is required by the package.
