> For the complete documentation index, see [llms.txt](https://docs.hotdao.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotdao.ai/hot-kit/installation.md).

# Installation

{% hint style="info" %}
To fully utilize the features of HOT Kit, obtain a free API key from the platform at [pay.hot-labs.org/admin/api-keys](https://pay.hot-labs.org/admin/api-keys).
{% endhint %}

### Client-side setup

`npm install @hot-labs/kit`

HOT Kit require you to install **node-polyfills** and react to work, for **vite** you need to complete the following extra steps:

`npm install vite-plugin-node-polyfills @vitejs/plugin-react`

Then in your `vite.config.ts` add this plugins:

```ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";

export default defineConfig({
  plugins: [nodePolyfills(), react()],
});
```

Also HotConnector use React and ReactDOM to render UI, you should install this deps to start work:

```
npm install react react-dom
```

And now your can initialize connector:

```ts
import { HotConnector } from "@hot-labs/kit";
import { defaultConnectors } from "@hot-labs/kit/defaults";

const connector = new HotConnector({
  connectors: defaultConnectors,
  apiKey: "Get on https://pay.hot-labs.org/admin/api-keys for free",

  // optional get on https://dashboard.reown.com
  walletConnect: {
    projectId: "1292473190ce7eb75c9de67e15aaad99",
    metadata: {
      name: "Example App",
      description: "Example App",
      url: window.location.origin,
      icons: ["/favicon.ico"],
    },
  },
});
```

### Nodejs setup

```
npm install @hot-labs/kit
```

To work server-side, you cannot use the HotConnector class, but you can use components from the library available via `@hot-labs/kit/core`. Additional build configuration or polyfills are not needed. Instead of using a UI to connect an external wallet, you need to directly create a wallet using your private key.

```typescript
import { tokens, Network } from '@hot-labs/kit/core';
import { NearWallet } from '@hot-labs/kit/near';

// optional, refresh tokens and rates in background process
tokens.startTokenPolling()

// Force refresh tokens list
tokens.refreshTokens()

const privateKey = Buffer.from(process.env.PRIVATE_KEY, 'hex')
const wallet = await NearWallet.fromPrivateKey(privateKey, process.env.SIGNER_ID);

const usdc = tokens.get("native", Network.Base)
const balances = await wallet.fetchBalances() as Record<string, bigint>
console.log(`${usdc.float(balances[usdc.id])} ${usdc.symbol}) // 2.3 USDC

```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.hotdao.ai/hot-kit/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
