> For the complete documentation index, see [llms.txt](https://doc.crocwallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.crocwallet.com/developers/install-sdk.md).

# Install the SDK

## Requirements

* Croc Wallet Extension 1.0.0 or newer. These integration examples were checked against the 1.0.0 provider source.
* Node.js 20 or newer for package installation and tests.
* A browser dApp served from an identifiable HTTP or HTTPS origin. The Extension obtains the requesting origin from the browser, not dApp metadata.

Install [SDK 1.0.0 from npm](https://www.npmjs.com/package/@croc-wallet/dapp-sdk):

```sh
npm install @croc-wallet/dapp-sdk
```

```ts
import { MINIMAL_CAPABLE_VERSION, CrocWalletError, crocWallet } from "@croc-wallet/dapp-sdk";

const availability = await crocWallet.checkExtensionAvailability({ timeoutMs: 1500 });
if (availability.status !== "installed" || !availability.isExtensionCapableByVersion) {
  throw new Error(`Croc Wallet ${MINIMAL_CAPABLE_VERSION} or newer is required`);
}
console.log("Installed Extension:", availability.currentVersion);
```

`MINIMAL_CAPABLE_VERSION` is `"1.0.0"`. Croc Wallet Extension, SDK and documentation use the aligned version `1.0.0`.

## Singleton or factory

Use `crocWallet` for browser integration. It resolves `window.crocWallet` when called and waits briefly for `crocWallet#initialized` if injection is still in progress. This event signals injection readiness, not account authorization.

For an existing provider or a test harness, use the factory:

```ts
import { createCrocWalletSdk } from "@croc-wallet/dapp-sdk";

const sdk = createCrocWalletSdk({ provider: window.crocWallet });
```

Supplying a provider selects the delegation target; it does not import credentials. The SDK requires no Backend token or private key.

## Integration contract

* `connect()` and `getSession()` return `UniversalSession`, with `namespaces` and `croc.schemaVersion === 1`; read the approved namespace accounts from this session.
* Read addresses from `session.croc.primaryAddresses` and per-chain accounts from `session.croc.accountsByChain`.
* Use `request({ chainId, method, params })` for supported namespace operations. `chainId` is always explicit.
* Use the typed EVM, Solana and Canton helpers in the [API reference](/developers/api-reference.md).
* The SDK does not export account/balance aliases, transfer facade, `signMessage`, `signLoginChallenge`, `status`, `isConnected`, `utils`, or named window-event helpers.

Next: [connect to Croc Wallet](/developers/connect-wallet.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.crocwallet.com/developers/install-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
