> ## Documentation Index
> Fetch the complete documentation index at: https://kit.near.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first NEAR transaction in under 2 minutes

Let's get you connected to the NEAR Testnet and sending your first transaction in under 2 minutes.

## Prerequisites

<CardGroup cols={3}>
  <Card title="Node.js or Bun" icon="node-js" horizontal>
    Any recent version works
  </Card>

  <Card title="Testnet Account" icon="wallet" horizontal href="https://testnet.mynearwallet.com/">
    Create one for free
  </Card>

  <Card title="Private Key" icon="key" horizontal>
    Starts with `ed25519:...`
  </Card>
</CardGroup>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install near-kit
  ```

  ```bash bun theme={null}
  bun add near-kit
  ```

  ```bash yarn theme={null}
  yarn add near-kit
  ```

  ```bash pnpm theme={null}
  pnpm add near-kit
  ```
</CodeGroup>

## Your First Script

<Steps>
  <Step title="Create a file named index.ts">
    ```typescript theme={null}
    import { Near } from "near-kit"

    async function main() {
      // 1. Initialize the client
      // In a real app, ALWAYS use environment variables for keys!
      const near = new Near({
        network: "testnet",
        privateKey: "ed25519:...", // Replace with your actual private key
        defaultSignerId: "your-account.testnet", // Replace with your account ID
      })

      console.log("🔗 Connected to Testnet")

      // 2. Read some data (Free!)
      // Let's check the balance of the account we just connected
      const balance = await near.getBalance("your-account.testnet")
      console.log(`💰 Balance: ${balance}`)

      // 3. Write some data (Send a transaction)
      // We will send 1 NEAR to ourselves.
      // Note: "1 NEAR" is a string. No math required.
      console.log("💸 Sending 1 NEAR...")

      const result = await near
        .transaction("your-account.testnet")
        .transfer("your-account.testnet", "1 NEAR")
        .send()

      console.log(`✅ Transaction successful!`)
      console.log(`   Hash: ${result.transaction.hash}`)
    }

    main().catch(console.error)
    ```
  </Step>

  <Step title="Run it">
    <CodeGroup>
      ```bash bun theme={null}
      bun run index.ts
      ```

      ```bash tsx theme={null}
      npx tsx index.ts
      ```
    </CodeGroup>
  </Step>

  <Step title="See the result">
    You should see output like:

    ```
    🔗 Connected to Testnet
    💰 Balance: 10.5 NEAR
    💸 Sending 1 NEAR...
    ✅ Transaction successful!
       Hash: 9abc123...
    ```
  </Step>
</Steps>

## What's Next?

<CardGroup cols={2}>
  <Card title="Reading Data" icon="book-open" href="/essentials/reading-data">
    Query account state, balances, and contract data
  </Card>

  <Card title="Writing Data" icon="pen" href="/essentials/writing-data">
    Build and send transactions
  </Card>
</CardGroup>
