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

# cowboy faucet

> Request development funds from a configured faucet

## Synopsis

```bash theme={null}
cowboy faucet request [--address <address>] [--rpc-url <url>]
```

## Subcommands

### `cowboy faucet request`

Request test-network funds for an address.

**Behavior:**

1. Resolve the recipient address, in order: `--address`; the wallet from `--private-key`, `COWBOY_PRIVATE_KEY_FILE`, or `COWBOY_PRIVATE_KEY`; the keystore key the selected environment names (`key`, else `default`). A missing key is an error, not a search for another wallet.
2. Resolve the RPC URL, in order: `--rpc-url`; `COWBOY_RPC_URL`; the selected environment's RPC URL; `http://localhost:4000`. When both the address and the URL come from project discovery they are read from one configuration snapshot, so a concurrent `env use` cannot pair one environment's wallet with another's endpoint.
3. `POST <rpc-url>/faucet` with body `{"address": "<checksum hex>"}`. The client uses a 30-second timeout and follows no redirects.
4. Validate the response: `status` must be `accepted`, `finality` must be `accepted_only`, `tx_hash` must be a `0x`-prefixed 32-byte hash, and `amount` must equal `amount_cby × 10^9`.
5. Print `Faucet request accepted.` with the address, the amount in CBY, and the transaction hash.

**Flags:**

| Flag | Default | Description |
| - | - | - |
| `--address` | Discovered wallet | Recipient address (hex) |
| `--rpc-url` | Environment discovery | RPC endpoint URL |

**Example:**

```bash theme={null}
$ cowboy faucet request
✓ Faucet request accepted.
  Address: 0x7a3B...F92E
  Amount: 5000 CBY
  Transaction: 0x1111...
```

## Edge Cases

* `accepted` means the faucet accepted the transaction, not that it is final; check the balance afterwards.
* A non-2xx response fails with `faucet request failed with HTTP <status>` and up to 1024 printable characters of the body.
* Responses over 64 KiB are refused.
* A plain-HTTP RPC URL to a non-local host prints a warning that requests and responses are sent unencrypted.
* If no wallet can be loaded, the error suggests `cowboy wallet create` or `--address`.


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