# Submit transfer requests

With the wallet set up, funded, and policy in place, you can submit transfer requests.

AgentPay SDK enables operators to perform native-asset transfers, ERC-20 transfers, ERC-20 approvals, and explicit transaction broadcasts across EVM networks. All signing and broadcasting is performed locally on the operator's machine. WLFI does not facilitate, process, or custody any funds.

## Before you submit

Before any transfer or approval, confirm three things:

1. The machine already has a wallet
2. The wallet is funded on the correct network
3. Policy allows the request or intentionally routes it into approval

If any of those are unclear, go back to [Wallet setup](/agentpay-sdk/workflows/wallet-setup.md), [Funding](/agentpay-sdk/workflows/funding.md), or [Policy](/agentpay-sdk/workflows/policy.md) first.

## Create a native-asset transfer

Use `transfer-native` for the network's native asset:

```bash
agentpay transfer-native \
  --network <NETWORK_NAME> \
  --to 0x1111111111111111111111111111111111111111 \
  --amount 0.001 \
  --json
```

`--amount` uses configured asset units, not wei.

`transfer-native` supports `--broadcast` to sign and send the transaction through RPC in the same step, the same way `transfer` and `approve` do.

## Create an ERC-20 transfer

Use `transfer` for ERC-20 transfer requests:

```bash
agentpay transfer \
  --network <NETWORK_NAME> \
  --token <TOKEN_ADDRESS> \
  --to 0x2222222222222222222222222222222222222222 \
  --amount 1 \
  --json
```

If you want the CLI to broadcast the signed transaction through RPC in the same step, add `--broadcast`.

{% hint style="info" %}
After broadcast, the CLI waits up to 30 seconds for an on-chain receipt, polling every 2 seconds. A timeout does **not** mean the transaction failed - it may still be pending in the mempool. Check manually with `agentpay rpc receipt --hash <tx_hash>`, or pass `--no-wait` to skip receipt polling entirely.
{% endhint %}

## Approve a spender

Use `approve` when another wallet or contract needs allowance:

```bash
agentpay approve \
  --network <NETWORK_NAME> \
  --token <TOKEN_ADDRESS> \
  --spender 0x3333333333333333333333333333333333333333 \
  --amount 1 \
  --json
```

Like `transfer`, `approve` also supports `--broadcast`.

Approving a spender allows that address or contract to transfer tokens from the wallet up to the approved amount. Only approve trusted contracts and use the smallest practical allowance.

## Additional flags

The `transfer`, `transfer-native`, and `approve` commands support additional broadcast-related flags when used with `--broadcast`:

* `--from <address>` - sender address override
* `--nonce <nonce>` - explicit nonce override
* `--gas-limit <gas>` - gas limit override
* `--max-fee-per-gas-wei <wei>` - max fee per gas override
* `--max-priority-fee-per-gas-wei <wei>` - priority fee per gas override
* `--tx-type <type>` - typed transaction value (default `0x02`)
* `--no-wait` - skip the 30-second on-chain receipt wait after broadcast
* `--reveal-raw-tx` - include the signed raw transaction bytes in output
* `--reveal-signature` - include `r`/`s`/`v` signer fields in output
* `--rpc-url <url>` - RPC URL override, used only for broadcast

The standalone `broadcast` command requires `--gas-limit` and `--max-fee-per-gas-wei` explicitly and resolves the sender address and RPC URL from config rather than taking `--from` or `--rpc-url` overrides.

The `broadcast` and `tx broadcast` commands additionally support `--value-wei`, `--data-hex`, and `--delegation-enabled`.

Run `agentpay <command> --help` for the full flag reference.

## Additional signing actions

Beyond standard transfers and approvals, the SDK daemon also supports signing:

* **Permit2 PermitSingle** - Permit2 typed-data authorization
* **EIP-3009 TransferWithAuthorization** - gasless transfer authorization
* **EIP-3009 ReceiveWithAuthorization** - gasless receive authorization

These are submitted through the `broadcast` command with the appropriate calldata. The policy engine decodes these payloads and applies spending limits to the inner amount. Refer to the SDK source code and `agentpay broadcast --help` for calldata construction details.

## Broadcast explicitly

The lower-level broadcast commands sign through the daemon and send to chain in one step.

{% hint style="warning" %}
Both `broadcast` and `tx broadcast` sign **and** send to the network. They are not sign-only commands. Use `transfer` or `approve` without `--broadcast` if you want sign-only output.
{% endhint %}

### Nonce reservation

For broadcast transactions, the SDK automatically reserves an exact nonce with a 2-minute lease before signing. If signing fails, the nonce reservation is released. This prevents nonce conflicts when multiple agents share a vault key.

Policy-checked broadcast:

```bash
agentpay broadcast \
  --network <NETWORK_NAME> \
  --to 0x1111111111111111111111111111111111111111 \
  --gas-limit 21000 \
  --max-fee-per-gas-wei 2000000000 \
  --value-wei 1000000000000000
```

Explicit sign-and-send:

```bash
agentpay tx broadcast \
  --network <NETWORK_NAME> \
  --rpc-url <RPC_URL> \
  --from <FROM_ADDRESS> \
  --to <TO_ADDRESS> \
  --value-wei 1000000000000000
```

{% hint style="warning" %}
**Amount units differ by command.** `transfer`, `transfer-native`, and `approve` accept `--amount` in token units (e.g. `5` for 5 USD1). `broadcast` and `tx broadcast` accept only wei-denominated fields (`--value-wei`). Do not mix them up.
{% endhint %}

## Example sequence

This is a minimal ERC-20 transfer flow using the default BSC + USD1 example:

```bash
agentpay wallet --json
agentpay rpc balance --address <ADDRESS> --rpc-url https://bsc.drpc.org --json
agentpay transfer \
  --network bsc \
  --token 0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d \
  --to 0x1111111111111111111111111111111111111111 \
  --amount 5 \
  --broadcast \
  --json
```

If policy requires approval, the request pauses locally and waits for a human decision. Signing and broadcast still happen locally.

## Broadcast auto-wait

When a `--broadcast` command (`transfer`, `transfer-native`, or `approve`) hits a manual approval rule, the CLI stays alive and polls the daemon every 2 seconds for up to 5 minutes. If approved within that window, it continues automatically - do not rerun the command.

If the original process has already exited after approval, use `agentpay admin resume-manual-approval-request --approval-request-id <UUID>` instead of rebuilding the transaction.

For the full approval flow (local CLI, output shape), see [Manual approval](/agentpay-sdk/workflows/manual-approval.md).

## Example host requests

With the skill pack installed, these requests should map cleanly:

```
Sign and broadcast a transfer of 5 USD1 on BSC to 0x1111111111111111111111111111111111111111.
```

```
Sign and broadcast a transfer of 0.001 BNB on BSC to 0x2222222222222222222222222222222222222222.
```

```
Approve 10 USD1 on BSC for 0x3333333333333333333333333333333333333333.
```

{% hint style="info" %}
These examples use `bsc` and `eth` because those networks have built-in default RPC URLs. If you reference a network without a saved RPC URL, add `--rpc-url` or configure one first with `agentpay admin chain add`.
{% endhint %}

## Request security

Every sign request sent to the daemon carries:

* **One-time request ID** - UUID for replay detection; the daemon rejects any ID it has seen before
* **2-minute default request TTL** - configurable up to 5 minutes; requests claiming longer are rejected
* **30-second clock skew tolerance** - future-dated requests beyond 30 seconds are rejected
* **32 KB max payload** - oversized payloads are rejected with `PayloadTooLarge` before policy evaluation

These apply to all sign, nonce-reserve, and nonce-release operations.

For the core workflow sequence, return to [Workflows](/agentpay-sdk/workflows.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.worldlibertyfinancial.com/agentpay-sdk/workflows/transfers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
