# Send

The **Send** operation is used to transfer tokens from one account to another on the Keeta Network. It’s the most basic transaction you can perform.

Below is a minimal example that sends `1 KTA` to a target address using the KeetaNet SDK. Let’s walk through the minimal example for sending tokens using KeetaNet.

{% stepper %}
{% step %}

### Load the Keeta SDK and set up your seed

You import the SDK and use a demo seed to generate an account. In real usage, you’d store this seed securely (never hardcoded).

```typescript
const KeetaNet = require('@keetanetwork/keetanet-client');

const DEMO_ACCOUNT_SEED = 'D3M0D3M0...';
```

{% endstep %}

{% step %}

### Create your signer account

This generates an account object from the seed at index `0`. This account will be used to sign the transaction (i.e., it's the "sender").

```typescript
const sender = KeetaNet.lib.Account.fromSeed(DEMO_ACCOUNT_SEED, 0);
```

{% endstep %}

{% step %}

### Connect to the Keeta test network

This initializes a client session connected to the **testnet**, using the sender account to authenticate.

```typescript
const client = KeetaNet.UserClient.fromNetwork('test', sender);
```

{% endstep %}

{% step %}

### Define the recipient

You define who you're sending tokens to. In this example, it's a faucet address, but it could be any valid Keeta account.

```typescript
const recipient = KeetaNet.lib.Account.fromPublicKeyString('keeta_...');
```

{% endstep %}

{% step %}

### Initialize a transaction builder

This creates a **builder**, which is used to queue one or more operations (like `send`, `setRep`, etc.) that will be packaged into a transaction.

```typescript
const builder = client.initBuilder();
```

{% endstep %}

{% step %}

### Add the send operation

```typescript
builder.send(recipient, 1n, client.baseToken);
```

This is the core of the operation. Let’s break it down:

| Argument           | Meaning                                                     |
| ------------------ | ----------------------------------------------------------- |
| `recipient`        | The recipient account object (created earlier)              |
| `1n`               | The amount to send, in tokens (as a `BigInt`). `1n` = 1 KTA |
| `client.baseToken` | The token to send (usually Keeta's native token, KTA)       |

So this line is saying:

> “Send 1 KTA to the specified recipient.”
> {% endstep %}

{% step %}

### (Optional) Compute the blocks

This step lets you preview how the transaction will be constructed before sending it. It’s useful for debugging or simulation.

```typescript
await client.computeBuilderBlocks(builder);
```

{% endstep %}

{% step %}

### Publish the transaction

This sends your built transaction to the Keeta network, where it will be validated and added to the ledger.

```typescript
await client.publishBuilder(builder);
```

{% endstep %}
{% endstepper %}

If all goes well, you’ve just sent 1 KTA to the recipient. You can now build on this with more operations, like minting, delegating, or managing tokens.

## Complete Code Example

```typescript
const KeetaNet = require('@keetanetwork/keetanet-client');

// ⚠️ Demo seed, replace with working seed
const DEMO_ACCOUNT_SEED = 'D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0D3M0';

async function main() {
	const sender = KeetaNet.lib.Account.fromSeed(DEMO_ACCOUNT_SEED, 0);
	const client = KeetaNet.UserClient.fromNetwork('test', sender);

	const recipient = KeetaNet.lib.Account.fromPublicKeyString(
		'keeta_aabszsbrqppriqddrkptq5awubshpq3cgsoi4rc624xm6phdt74vo5w7wipwtmi'
	);

	const builder = client.initBuilder();
	builder.send(recipient, 1n, client.baseToken); // send 1 KTA

	await client.computeBuilderBlocks(builder); // optional but recommended
	await client.publishBuilder(builder);       // send it to the network

	console.log('✅ Sent 1 KTA');
}

main().catch(console.error);

```


---

# 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/components/blocks/operations/send.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.
