Skip to main content

Synopsis

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: Example:

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.