Altcha.V2.Challenge (Altcha v2.3.0)

Copy Markdown View Source

A V2 PoW challenge containing parameters and an optional HMAC signature.

Summary

Functions

Converts a JSON string or map to a Challenge struct.

Converts a Challenge to a JSON-encodable map in the wire format, as served to the widget. "signature" is omitted when nil.

Types

t()

@type t() :: %Altcha.V2.Challenge{
  parameters: Altcha.V2.ChallengeParameters.t(),
  signature: String.t() | nil
}

Functions

from_json(json)

Converts a JSON string or map to a Challenge struct.

from_map(map)

to_map(challenge)

Converts a Challenge to a JSON-encodable map in the wire format, as served to the widget. "signature" is omitted when nil.