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

# Railgun Private Transfer

Transfer ERC20 tokens privately between Railgun addresses (generates ZK proof, ~20-30s). Requires turnkey (for gas) and railgun (for mnemonic) connectors.

![Railgun Private Transfer logo](https://cdn.b3.fun/b3os-icons/railgun.png)
Catalog action EVM Onchain wallet Gas send

Transfer ERC20 tokens privately between Railgun addresses (generates ZK proof, ~20-30s). Requires turnkey (for gas) and railgun (for mnemonic) connectors.

**Review wallet and value movement**

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `railgun-private-transfer` |
| Category | EVM Onchain |
| Connector | `wallet` |
| Requires gas | Yes |
| Funds movement | `send` |
| Tags | `blockchain`, `privacy`, `railgun`, `transfer`, `zk` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `chainId` | `number` | Yes | Chain ID. Supported: Ethereum \(1\), BNB Chain \(56\), Polygon \(137\), Arbitrum \(42161\) |
| `tokenAddress` | `string` | Yes | ERC20 token contract address to transfer |
| `amount` | `string` | Yes | Amount to transfer in smallest unit \(wei\) as string |
| `recipientRailgunAddress` | `string` | Yes | Recipient Railgun address \(0zk...\) |
| `memoText` | `string` | No | Optional memo text to include with transfer |
| `showSenderAddress` | `boolean` | No | Whether to reveal sender address to recipient \(default: false\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | Yes | - |
| `transactionHash` | `string` | No | Transaction hash of the private transfer |
| `blockNumber` | `number` | No | Block number where the transaction was confirmed |
| `gasUsed` | `string` | No | Gas used for the transfer transaction |
| `proofTime` | `number` | No | Time taken to generate ZK proof in milliseconds |

## Examples

**Workflow node**

```json
{
  "type": "railgun-private-transfer",
  "payload": {
    "chainId": 1,
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "1000000",
    "recipientRailgunAddress": "0zk1q8p9example..."
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/railgun-private-transfer/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "chainId": 1,
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "1000000",
    "recipientRailgunAddress": "0zk1q8p9example..."
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.