# `Tune.Artifact`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/artifact.ex#L1)

A versioned learned-value artifact with safe provenance.

# `t`

```elixir
@type t() :: %Tune.Artifact{
  parameters: map(),
  provenance: map(),
  target_fingerprint: String.t(),
  version: pos_integer()
}
```

# `decode`

```elixir
@spec decode(String.t(), keyword()) :: {:ok, t()} | {:error, Exception.t()}
```

Decodes and validates a JSON artifact.

# `encode`

```elixir
@spec encode(t()) :: {:ok, String.t()} | {:error, Exception.t()}
```

Encodes a validated artifact as canonical JSON.

# `new`

```elixir
@spec new(map()) :: {:ok, t()} | {:error, Exception.t()}
```

Builds and validates an artifact from data.

# `validate`

```elixir
@spec validate(t()) :: :ok | {:error, Exception.t()}
```

Validates an artifact.

---

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