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

# Transfer

> Transfer tokens between addresses using a sender signer and recipient address. Scales the human-readable amount using the token's decimals.

## `vault.transfer(Transfer)`

Transfer tokens between addresses, scaling the human-readable amount using the token's decimals.

### Transfer Type Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| **from** | `Signer` | Required | Sender wallet (must hold balance). Must be connected to a provider. |
| **to** | `string` | Required | Recipient address. |
| **token** | `string` | Required | Token address. |
| **transferAmountHuman** | `string` | Required | Human-readable amount; scaled by token decimals. |

### Returns

| Field | Type | Description |
| - | - | - |
| **status** | `transferred` | Status of the operation. |
| **token** | `string` | Token address. |
| **sender** | `string` | Sender address. |
| **recipient** | `string` | Recipient address. |
| **amount** | `{ human: string; units: bigint; decimals: number }` | Amount details. |
| **receipt** | `TransactionReceipt` | Transaction receipt for the transfer. |

### Usage

#### TypeScript

```TypeScript theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
import 'dotenv/config';
import { RWA, Chain, type SDKInit } from "@peaq-network/rwa";
import { JsonRpcProvider, Wallet } from "ethers";

async function main() {
  // 0. Create RWA instance and provider
  const provider = new JsonRpcProvider(process.env.HTTPS_BASE_URL);
  const init: SDKInit = { chainId: Chain.AGUNG, provider: provider };
  const rwa_sdk = new RWA(init);

  // 1. Sender
  const alice = new Wallet(process.env.ALICE_PRIVATE_KEY!, provider);

  // 2. Recipient
  const bob = process.env.BOB_PUBLIC_ADDRESS!;

  // 3. Transfer
  const result = await rwa_sdk.vault.transfer({
    from: alice,
    to: bob,
    token: "0x2a6aA5ef4e236aeE4247EAA7B926cd843a95bFc8",
    transferAmountHuman: "1"
  });
  console.log("Result", result);
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
```

#### JavaScript

```js theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
import 'dotenv/config';
import { RWA, Chain } from "@peaq-network/rwa";
import { JsonRpcProvider, Wallet } from "ethers";

async function main() {
  // 0. Create RWA instance and provider
  const provider = new JsonRpcProvider(process.env.HTTPS_BASE_URL);
  const rwa_sdk = new RWA({ chainId: Chain.AGUNG, provider });

  // 1. Sender
  const alice = new Wallet(process.env.ALICE_PRIVATE_KEY, provider);

  // 2. Recipient
  const bob = process.env.BOB_PUBLIC_ADDRESS;

  // 3. Transfer
  const result = await rwa_sdk.vault.transfer({
    from: alice,
    to: bob,
    token: "0x2a6aA5ef4e236aeE4247EAA7B926cd843a95bFc8",
    transferAmountHuman: "1"
  });
  console.log("Result", result);
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
```

### Example outputs

```
Result {
  status: 'transferred',
  token: '0x2a6aA5ef4e236aeE4247EAA7B926cd843a95bFc8',
  sender: '0x16cd4D21537eD8F33bE08271A9FA6DCC426709b2',
  recipient: '0xbA9274C766A5961C40bB4a3e0e107699EE9Dab9C',
  amount: {
    human: '1',
    units: 1000000000000000000n,
    decimals: 18
  },
  receipt: TransactionReceipt {
    ...
  }
}
```

Before you transfer:

* The token must be unpaused. New vault tokens start paused; the Vault Factory owner unpauses with [Unpause Token](/peaqchain/sdk-reference/rwa/vault/unpauseToken).
* The sender pays a transfer fee in PEAQ (minimum 1 PEAQ). Set the allowance first with [Ensure Transfer Fee Allowance](/peaqchain/sdk-reference/rwa/vault/ensureTransferFeeAllowance).
* The recipient must be verified in the token's Identity Registry (an identity with a KYC claim, topic 666) and the transfer must pass the token's compliance modules, otherwise the call reverts with `Transfer not possible`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.