Altcha.V2.Payload (Altcha v2.3.0)

Copy Markdown View Source

A client-submitted V2 payload containing the original challenge and the solution. Typically Base64-encoded JSON sent from the browser widget.

Summary

Functions

Converts a Payload to a JSON-encodable map in the wire format the widget submits, with the nested challenge and solution converted too.

Types

t()

@type t() :: %Altcha.V2.Payload{
  challenge: Altcha.V2.Challenge.t(),
  solution: Altcha.V2.Solution.t()
}

Functions

from_json(json)

from_map(map)

to_map(payload)

Converts a Payload to a JSON-encodable map in the wire format the widget submits, with the nested challenge and solution converted too.