# Getting Started

**Prerequisites**

* **Node.js**: Ensure you have Node.js installed (version 14 or higher recommended).
* **Package Manager**: You will need npm or yarn to install the SDK.
* **Basic Knowledge**: Familiarity with JavaScript, blockchain concepts, and Telegram mini-apps is helpful.

**Installation**

To get started with TMAWallet, install the SDK using npm or yarn:

```sh
npm install @tmawallet/sdk
```

or

```sh
yarn add @tmawallet/sdk
```

**Basic Setup**

Below is a simple example of how to set up TMAWallet in your project and create a wallet:

```javascript
import { TMAWalletClient } from '@tmawallet/sdk';

(async () => {
  // Initialize the TMAWallet client with your project's public token
  const tmaWallet = new TMAWalletClient('your_project_public_token');

  // Initialize the wallet
  await tmaWallet.init();

  // Check if a bundle exists or create a new one
  if (!tmaWallet.isBundleExists) {
    await tmaWallet.createBundle();
  }

  console.log('Wallet address:', tmaWallet.walletAddress);
})();
```

This example shows how to initialize the TMAWallet client, create a bundle if it doesn't exist, and retrieve the wallet address.

**Quick Start Guide**

1. **Install the SDK**: Use npm or yarn to install TMAWallet.
2. **Initialize the Client**: Import `TMAWalletClient` and initialize it with your project's public token.
3. **Create or Restore a Wallet**: Use `createBundle()` to create a new wallet or check the existing wallet bundle.
4. **Interact with Ethereum**: Use the SDK to sign transactions, connect to Ethereum, and interact with smart contracts.


---

# Agent Instructions: 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://tmawallet.gitbook.io/docs/getting-started.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.
