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

Bitcoin transaction input.

# `t`

```elixir
@type t() :: %BSV.Transaction.Input{
  sequence_number: non_neg_integer(),
  source_output: BSV.Transaction.Output.t() | nil,
  source_tx_out_index: non_neg_integer(),
  source_txid: binary(),
  unlocking_script: BSV.Script.t() | nil
}
```

# `from_binary`

```elixir
@spec from_binary(binary()) :: {:ok, t(), binary()} | {:error, term()}
```

Parse an input from raw binary. Returns `{:ok, input, remaining_bytes}` on success.

# `new`

```elixir
@spec new() :: t()
```

Create a new empty input with default values.

# `source_locking_script`

```elixir
@spec source_locking_script(t()) :: BSV.Script.t() | nil
```

Get the locking script of the source output, or `nil` if not set.

# `source_satoshis`

```elixir
@spec source_satoshis(t()) :: non_neg_integer() | nil
```

Get the satoshi value of the source output, or `nil` if not set.

# `to_binary`

```elixir
@spec to_binary(t()) :: binary()
```

Serialize the input to raw binary (wire format).

# `to_binary_cleared`

```elixir
@spec to_binary_cleared(t()) :: binary()
```

Serialize the input with an empty unlocking script (for sighash computation).

---

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