# Class BSV::Wallet::CLI::Commands::Receive <a id="class-BSV-Wallet-CLI-Commands-Receive"></a>

**Inherits:** `BSV::Wallet::CLI::Commands::Base`

+bin/wallet receive+ — accept inbound.

Auto-detects input format from +--file=<path>+ or stdin:

    raw BEEF                       # scan tx outputs for P2PKH to root key; import matches
    BRC-29 envelope (JSON)         # consume per-output derivation hints; import via wallet-payment protocol

Raw BEEF path: the wallet doesn't know in advance which outputs belong to it.
Parses the subject tx, walks each output, checks if its P2PKH lock targets the
wallet's root key's address. Matches are imported via
<code>engine.import_beef</code> with the +basket insertion+ protocol and no
derivation hints — the locking script matches the wallet's per-instance root
P2PKH literal (enforced declaratively by
<code>outputs.spendable_recoverable</code>; HLR #467). Phase 2 scans the root
address only; HD/WBIKD-derived receive addresses are a follow-up.

Envelope path: the sender shipped explicit derivation hints. Each listed
output gets imported via <code>engine.import_beef</code> with the strict
BRC-29 +wallet payment+ protocol carrying the `derivation_prefix` /
`derivation_suffix` / `sender_identity_key` in the `payment_remittance`
object. The spec's `paymentRemittance` has no basket; +--basket=<name>+ rides
at the top level of the output spec (engine-side sibling of
<code>:protocol</code>) and applies only where the envelope itself omits a
basket — silent override of the sender's intent requires
<code>--force-basket</code>.

## Constants
### `MAX_INPUT_BYTES` <a id="constant-MAX_INPUT_BYTES"></a> <a id="MAX_INPUT_BYTES-constant"></a>
32 MiB hard refusal

## Public Instance Methods
### `build_parser()` <a id="method-i-build_parser"></a> <a id="build_parser-instance_method"></a>
Not documented.

### `call(args)` <a id="method-i-call"></a> <a id="call-instance_method"></a>
- **@raise** [UsageError]

### `name()` <a id="method-i-name"></a> <a id="name-instance_method"></a>
Not documented.
