> ## 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.

# transferTransaction

> Creates a token transfer transaction with Kora as the fee payer.

## JSON-RPC Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "transferTransaction",
  "params": {
    "amount": 1000000,
    "token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "source": "sourcePublicKey",
    "destination": "destinationPublicKey"
  }
}
```

## Parameters

| Parameter     | Type    | Required | Description |
| ------------- | ------- | -------- | ----------- |
| `amount`      | number  | Yes      | Amount in the token's base units (lamports for SOL) |
| `token`       | string  | Yes      | Mint address of the token to transfer |
| `source`      | string  | Yes      | Wallet address that sends the tokens (not a token account) |
| `destination` | string  | Yes      | Wallet address that receives the tokens (not a token account) |
| `signer_key`  | string  | No       | Public key of the Kora signer to use. It must be one of the node's signers. Defaults to the signer pool's selection strategy |

## JSON-RPC Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockhash": "base58Blockhash",
    "message": "base64EncodedMessage",
    "signer_pubkey": "3Z1Ef7YaxK8oUMoi6exf7wYZjZKWJJsrzJXSt1c3qrDE",
    "transaction": "base64EncodedTransaction"
  }
}
```

The JSON-RPC result contains only `transaction`, `message`, `blockhash`, and
`signer_pubkey`. The TypeScript SDK adds an `instructions` field, which it
decodes from the transaction.

## cURL Example

```bash
curl -X POST http://localhost:8080 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"transferTransaction","params":{"amount":1000000,"token":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","source":"sourcePublicKey","destination":"destinationPublicKey"}}'
```

## TypeScript SDK

```typescript
const transfer = await client.transferTransaction({
  amount: 1000000, // 1 USDC (6 decimals)
  token: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  source: "sourceWalletPublicKey",
  destination: "destinationWalletPublicKey",
});
console.log("Transaction:", transfer.transaction);
console.log("Message:", transfer.message);
console.log("Instructions:", transfer.instructions); // added by the SDK
```
