# `BSV.Transaction.P2PKH`
[🔗](https://github.com/Bittoku/bsv_sdk_elixir/blob/main/lib/bsv/transaction/p2pkh.ex#L1)

P2PKH signing template.

# `t`

```elixir
@type t() :: %BSV.Transaction.P2PKH{
  private_key: BSV.PrivateKey.t(),
  sighash_flag: non_neg_integer()
}
```

# `estimate_length`

Estimated unlocking script length in bytes (sig + pubkey ≈ 106).

# `lock`

```elixir
@spec lock(String.t()) :: {:ok, BSV.Script.t()} | {:error, term()}
```

Create a P2PKH locking script from an address string.

# `sign`

Sign a transaction input, producing a P2PKH unlocking script.

# `unlock`

```elixir
@spec unlock(
  BSV.PrivateKey.t(),
  keyword()
) :: t()
```

Create an unlocker struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
