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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Send dollars

> Send 1 USDC (test dollars on devnet) to a new address: your first transaction.

<div className="sol-stepper not-prose" data-path="quickstart">
<div className="sol-stepper-nav" role="navigation" aria-label="Quickstart · ~8 min">
<ol>
<li data-state="done"><a href="/developers/docs/quickstart/check-balance"><span className="sol-stepper-n">Step 1<span className="sol-vh">, </span><span className="sol-stepper-done">Done</span><span className="sol-vh">: </span></span><span className="sol-stepper-t">Check a balance</span></a></li>
<li data-state="current"><a href="/developers/docs/quickstart/send-dollars" aria-current="step"><span className="sol-stepper-n">Step 2<span className="sol-vh">: </span></span><span className="sol-stepper-t">Send dollars</span></a></li>
<li data-state="todo"><a href="/developers/docs/quickstart/create-asset"><span className="sol-stepper-n">Step 3<span className="sol-vh">: </span></span><span className="sol-stepper-t">Create an asset</span></a></li>
<li data-state="todo"><a href="/developers/docs/quickstart/send-asset"><span className="sol-stepper-n">Step 4<span className="sol-vh">: </span></span><span className="sol-stepper-t">Send the asset</span></a></li>
<li data-state="todo"><a href="/developers/docs/quickstart/freeze-holder"><span className="sol-stepper-n">Step 5<span className="sol-vh">: </span></span><span className="sol-stepper-t">Freeze a holder</span></a></li>
</ol>
</div>
</div>

Every change on Solana is a transaction: a list of instructions, signed by the
accounts they spend from. In this step you send 1 USDC from your wallet to a
new address. It settles in under a second, and the fee is a fraction of a cent,
paid in SOL.

## Send the transaction

Save this as `send-dollars.ts` next to `client.ts` and run
`npx tsx send-dollars.ts`.

<Tabs>
<Tab title="TypeScript">
<div className="sol-tab-label">TypeScript</div>

```ts
import { generateKeyPairSigner } from "@solana/kit";
import { client, tokenBalance, USDC_MINT } from "./client";

const wallet = client.identity;
if (Number(await tokenBalance(wallet.address)) < 1) {
  console.log(
    `No devnet USDC yet. Get some for ${wallet.address} at https://faucet.circle.com (pick Solana Devnet), then run this again.`,
  );
  process.exit(0);
}

// A brand-new address to pay. Any Solana address works here.
const { address: recipient } = await generateKeyPairSigner();

// Opens the recipient's USDC token account if needed, then moves 1 USDC
// (1,000,000 base units: USDC has 6 decimals) with TransferChecked.
const { context } = await client.token.instructions
  .transferToATA({
    mint: USDC_MINT,
    authority: wallet,
    recipient,
    amount: 1_000_000n,
    decimals: 6,
  })
  .sendTransaction();

console.log("Sent 1 USDC to", recipient);
console.log("Signature:", context.signature);
console.log(
  `Explorer: https://explorer.solana.com/tx/${context.signature}?cluster=devnet`,
);
console.log("Recipient balance:", await tokenBalance(recipient), "USDC");
```

<div className="sol-term not-prose" data-term="paths/start/quickstart/send" data-tab="TypeScript" data-kind="block" data-steps="1" data-l-run="Run" data-l-run-step="Run step" data-l-next="Next step" data-l-all="Run all" data-l-again="Run again" data-l-running="Running…" data-l-tx="Sending transaction…" data-l-http="Requesting…" data-l-call="Running…" data-l-confirming="Confirming…" data-l-done="Done" data-l-copied="Copied" data-l-step="Step">
<div className="sol-term-head"><span className="sol-term-title">Output of npx tsx send-dollars.ts</span><span className="sol-term-env">Local test network (Surfpool)</span><button type="button" className="sol-term-copy" data-act="copy">Copy</button></div>
<div className="sol-term-screen" role="region" tabIndex="0" aria-label="Output of npx tsx send-dollars.ts: Output">
<div className="sol-term-step" data-step="1" data-pending="tx">
<div className="sol-term-row sol-term-cmd"><span className="sol-term-ps" aria-hidden="true">\$</span> npx tsx send-dollars.ts</div>
<div className="sol-term-row sol-term-ln">Sent 1 USDC to <span className="sol-h" title="7uayuZtw7YLxuGqU9cQ47wGqPsoZBhivDHDfLqP6Xckz"><span className="sol-h-f">7uayuZtw7YLxuGqU9cQ47wGqPsoZBhivDHDfLqP6Xckz</span><span className="sol-h-s" aria-hidden="true">7uay…Xckz</span></span></div>
<div className="sol-term-row sol-term-ln"><span className="sol-term-k">Signature\:</span> <span className="sol-h" title="66vHKDBp1xddS9Sc4SA5ymX56HNjsRoPaFwZud4dTEsFQeWmQ4LEDq1AGd4T69tQZHE8VwiHx9mozFG8p4qVxeQE"><span className="sol-h-f">66vHKDBp1xddS9Sc4SA5ymX56HNjsRoPaFwZud4dTEsFQeWmQ4LEDq1AGd4T69tQZHE8VwiHx9mozFG8p4qVxeQE</span><span className="sol-h-s" aria-hidden="true">66vH…xeQE</span></span></div>
<div className="sol-term-row sol-term-ln"><span className="sol-term-k">Explorer\:</span> `https://explorer.solana.com/tx/66vHKDBp1xddS9Sc4SA5ymX56HNjsRoPaFwZud4dTEsFQeWmQ4LEDq1AGd4T69tQZHE8VwiHx9mozFG8p4qVxeQE?cluster=devnet`</div>
<div className="sol-term-row sol-term-ln">Recipient <span className="sol-term-k">balance\:</span> 1 USDC</div>
<div className="sol-term-result"><span className="sol-term-badge" data-tone="ok">Confirmed</span></div>
</div>
</div>
<div className="sol-term-foot"><button type="button" className="sol-term-btn" data-act="run">Run</button><span className="sol-term-status"></span><span className="sol-term-sr" role="status"></span></div>
</div>

</Tab>
<Tab title="CLI">
<div className="sol-tab-label">CLI</div>

```bash
USDC=4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
solana-keygen new --no-bip39-passphrase -o recipient.json  # a new address
# Opens the recipient's USDC token account, then sends 1 USDC
spl-token transfer $USDC 1 recipient.json \
  --fund-recipient --allow-unfunded-recipient
spl-token balance $USDC --owner recipient.json
```

</Tab>
</Tabs>

The script prints a link to your transaction in Solana Explorer.

What the code does:

- `tokenBalance(...)`, from `client.ts`, checks that you have at least 1 USDC
  before sending.
- `client.token.instructions.transferToATA(...)` builds two instructions:
  1. Open the recipient's USDC token account if it doesn't exist (and do
     nothing if it does). Your wallet pays its small deposit.
  2. Move 1 USDC: 1,000,000 base units, because USDC has 6 decimals. As a
     `TransferChecked` instruction, it also checks the mint and decimals, so a
     wrong amount fails instead of sending 1,000 times too much.
- `.sendTransaction()` puts both in one transaction, with your wallet as fee
  payer, signs and sends it, and returns its signature once confirmed. The
  account is never opened without the payment arriving.

<Tip>
**No devnet USDC yet?** The script says so instead of sending. Get test USDC
as in [step 1](/developers/docs/quickstart/check-balance#get-test-dollars),
then run `npx tsx send-dollars.ts` again.
</Tip>

<div className="sol-concept not-prose">
[<span className="sol-concept-name">Token accounts</span> <span className="sol-concept-def">Wallets don't hold tokens directly.</span>](/developers/docs/tokens/basics/create-token-account)
</div>

<div className="sol-concept not-prose">
[<span className="sol-concept-name">Transactions</span> <span className="sol-concept-def">A transaction is a signed request to change the shared ledger.</span>](/developers/docs/core/transactions)
</div>

<div className="sol-concept not-prose">
[<span className="sol-concept-name">Fees</span> <span className="sol-concept-def">Every transaction pays a small flat network fee, currently a fraction of a cent, whatever the amount.</span>](/developers/docs/core/fees)
</div>
