# Create Your First Account

To start interacting with KeetaNet, you’ll first need to create an account. Accounts are based on cryptographic key pairs, and they’re derived from a secure seed.

This page shows you how to generate a seed, turn it into an account, and connect that account to the Keeta test network.

{% hint style="info" %}
Want to learn more about what an account is and how it works? Read: [What is an Account →](/components/accounts.md)
{% endhint %}

## Generate a Seed

The KeetaNet SDK includes utilities for generating secure random seeds. These seeds are used to create key pairs — think of them as the starting point for your identity on the network.

{% hint style="warning" %}
Your seed is sensitive information. Anyone with access to your seed can access your account.
{% endhint %}

Here’s how to generate one and use it:

```typescript
import * as KeetaNet from "@keetanetwork/keetanet-client";

async function main() {
  // Generate a secure random seed
  const seed = KeetaNet.lib.Account.generateRandomSeed({ asString: true });
  console.log("Generated seed:", seed);

  // Create an account using the generated seed
  const account = KeetaNet.lib.Account.fromSeed(seed, 0);

  // Connect to the Keeta test network with this account
  const userClient = KeetaNet.UserClient.fromNetwork("test", account);
  console.log("Public key:", account.publicKeyString.toString());
}

main().catch(console.error);
```

#### How it works

* `generateRandomSeed()` creates a strong, random seed.
* `fromSeed(seed, 0)` derives your first account (index `0`) from that seed.
* `UserClient.fromNetwork("test", account)` connects you to the testnet using your new account.
* You can use this client to send transactions, fetch chain data, or interact with the ledger.

## Receive a token

If someone wants to send tokens to your Keeta account, they’ll need your **public address**.

#### Option 1: Public Address from a Newly Created Account

```typescript
import * as KeetaNet from '@keetanetwork/keetanet-client';

// Generate a secure random seed
const seed = KeetaNet.lib.Account.generateRandomSeed({ asString: true });

// Create a new account from the seed (index 0)
const account = KeetaNet.lib.Account.fromSeed(seed, 0);

// Get the public address
const publicKey = account.publicKeyString.toString();
console.log("Your public Keeta address:", publicKey);
```

#### Option 2: Public Address from an Existing Account

If you already have an account, you can share your `publicKey` to receive funds. This is the address others will send tokens to.

```typescript
const existingSeed = "your existing seed string...";
const account = KeetaNet.lib.Account.fromSeed(existingSeed, 0);
const publicKey = account.publicKeyString.toString();
```

## Generate a QR code

You can turn the public address into a QR code so others can scan and send easily. This works great on mobile wallets or in-person payments.

To generate a QR code image:

```typescript
import { toDataURL } from "qrcode";

const qrCode = await toDataURL(accountPublicKey);
```

This gives you a **base64 image URL** (like `data:image/png;base64,...`) that you can embed in an `<img>` tag:

```typescript
<img src={qrCode} />
```

{% hint style="success" %}
You don’t need a specific library — any QR code tool that supports text-to-QR conversion will work. Just pass in the address string, and you're good to go.
{% endhint %}

Now you are ready to start sending your first transaction:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Send a Transaction</strong></td><td><a href="/files/qB78aEdHITclKQ0g5rkL">/files/qB78aEdHITclKQ0g5rkL</a></td><td><a href="/pages/1n1A06zg1iLkDT0hdxP6">/pages/1n1A06zg1iLkDT0hdxP6</a></td></tr></tbody></table>


---

# 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://docs.keeta.com/introduction/create-your-first-account.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.
