# Recover an unresolved ResolveSignal payment

Keep the payment quote's `escrow.vault`, `escrow.complete_by`, payer address
and payment transaction hash. These are financial references, not your business
input or result. Send payments only to the vault in your quote.

If the service failed, ResolveSignal normally refunds automatically. If its operator is
offline, anyone can submit `refund()` to that vault on Arc Mainnet (chain 5042)
after the onchain `completeBy` timestamp, provided the vault is still Open.
The caller pays gas in USDC. The refund recipient is permanently the original
payer; the caller cannot redirect funds. Do not send funds to the factory or
implementation contract.

Minimal ABI:

```json
[
  {"type":"function","name":"status","stateMutability":"view","inputs":[],"outputs":[{"type":"uint8"}]},
  {"type":"function","name":"completeBy","stateMutability":"view","inputs":[],"outputs":[{"type":"uint64"}]},
  {"type":"function","name":"payer","stateMutability":"view","inputs":[],"outputs":[{"type":"address"}]},
  {"type":"function","name":"refund","stateMutability":"nonpayable","inputs":[],"outputs":[]},
  {"type":"function","name":"returnSurplus","stateMutability":"nonpayable","inputs":[],"outputs":[]},
  {"type":"function","name":"returnNativeDust","stateMutability":"nonpayable","inputs":[],"outputs":[]}
]
```

Status: 0 Open, 1 Completed, 2 Refunded. A Completed vault cannot be refunded by
this contract. For Completed/Refunded vaults, `returnSurplus()` returns late/extra
ERC20 USDC to the fixed payer. After that, `returnNativeDust()` can return the
remaining native amount below one ERC20 atomic unit. A token blocklist or a payer
contract that rejects native transfers may prevent the respective claim.

You can use an Arc-compatible wallet or Foundry with your own encrypted keystore:

```sh
cast call "$VAULT" "status()(uint8)" --rpc-url https://rpc.mainnet.arc.io
cast call "$VAULT" "completeBy()(uint64)" --rpc-url https://rpc.mainnet.arc.io
cast call "$VAULT" "payer()(address)" --rpc-url https://rpc.mainnet.arc.io
# Check chain, vault, payer and deadline before sending this gas-bearing transaction.
cast send "$VAULT" "refund()" --rpc-url https://rpc.mainnet.arc.io --account YOUR_KEYSTORE
```

Never share a private key with ResolveSignal or put it in a command line flag. The API's
response timeout is separate from the onchain refund deadline. Retain your quote
until resolution; completed business input/output is deleted after delivery.
