# `BoundedAuthorityProtocol.RoleAttestation.V1`
[🔗](https://github.com/baselabs/bounded_authority_protocol/blob/v1.0.0/lib/bounded_authority_protocol/role_attestation/v1.ex#L1)

Explicit entry point for the byte-distinct role-attestation profile (bap-role-attestation/1).

# `assemble_compact`

```elixir
@spec assemble_compact(BoundedAuthorityProtocol.V1.SigningInput.t(), binary()) ::
  {:ok, binary()} | {:error, :invalid}
```

Assembles a role attestation at profile maxima.

# `assemble_compact`

```elixir
@spec assemble_compact(
  BoundedAuthorityProtocol.V1.SigningInput.t(),
  binary(),
  BoundedAuthorityProtocol.V1.Bounds.t() | map()
) :: {:ok, binary()} | {:error, :invalid}
```

Assembles a role attestation under caller bounds.

Since 0.9.0, assembly also refuses, with `{:error, :invalid}`, a
signature that no conforming signer emits: an Ed25519 signature whose `S` is not below the group
order or whose `R` is non-canonical or of small order (erratum 3). It never rewrites the
signature bytes it accepts.

# `attestation_signing_input`

```elixir
@spec attestation_signing_input(
  BoundedAuthorityProtocol.RoleAttestation.V1.RoleAttestation.t(),
  BoundedAuthorityProtocol.V1.Bounds.t() | map()
) :: {:ok, BoundedAuthorityProtocol.V1.SigningInput.t()} | {:error, :invalid}
```

Builds the deterministic role-attestation signing input.

# `decode_attestation`

```elixir
@spec decode_attestation(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) ::
  {:ok, BoundedAuthorityProtocol.RoleAttestation.V1.DecodedAttestation.t()}
  | {:error, :invalid}
```

Boundedly decodes a role attestation without evaluating trust.

# `verify_attestation`

```elixir
@spec verify_attestation(
  binary(),
  BoundedAuthorityProtocol.RoleAttestation.V1.ExpectedAttestation.t()
) ::
  {:ok, BoundedAuthorityProtocol.RoleAttestation.V1.AttestationFacts.t()}
  | {:error, :invalid}
```

Verifies a role attestation against caller-supplied attestor trust, subject binding, and now.

---

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