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:
The machine already has a wallet
The wallet is funded on the correct network
Policy allows the request or intentionally routes it into approval
If any of those are unclear, go back to Wallet setup, Funding, or Policy first.
Create a native-asset transfer
Use transfer-native for the network's native asset:
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:
If you want the CLI to broadcast the signed transaction through RPC in the same step, add --broadcast.
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.
Approve a spender
Use approve when another wallet or contract needs allowance:
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 (default0x02)--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- includer/s/vsigner 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.
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.
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:
Explicit sign-and-send:
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.
Example sequence
This is a minimal ERC-20 transfer flow using the default BSC + USD1 example:
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.
Example host requests
With the skill pack installed, these requests should map cleanly:
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.
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
PayloadTooLargebefore policy evaluation
These apply to all sign, nonce-reserve, and nonce-release operations.
For the core workflow sequence, return to Workflows.
Last updated