Countersign.Disclosure (Countersign v0.1.0)

Copy Markdown View Source

The package's default consumer disclosure: what a signer reads and accepts before an electronic signature, in the spirit of the U.S. ESIGN Act's consumer consent (15 U.S.C. 7001(c)). It says what will be signed electronically, that the signer may sign on paper instead, that consent may be withdrawn before signing, what the signer needs to read the document, how to get a copy, and that the sender keeps the record.

A host uses it unless its Countersign.Config names another :disclosure (%{version: pos_integer, text: String.t()}). A request stores the version and sha256 its signer accepted, so a later change to the text never rewrites what an earlier signer saw: change the text, bump the version.

Paragraphs are separated by a blank line.

Summary

Functions

The disclosure as Countersign.Config holds it.

The text's paragraphs, for a page to render one by one.

The SHA-256 of text/0, 64 lowercase hex characters.

The disclosure's text, paragraphs separated by a blank line.

The disclosure's version.

Functions

default()

@spec default() :: Countersign.Config.disclosure()

The disclosure as Countersign.Config holds it.

paragraphs(text)

@spec paragraphs(String.t()) :: [String.t()]

The text's paragraphs, for a page to render one by one.

sha256()

@spec sha256() :: String.t()

The SHA-256 of text/0, 64 lowercase hex characters.

text()

@spec text() :: String.t()

The disclosure's text, paragraphs separated by a blank line.

version()

@spec version() :: pos_integer()

The disclosure's version.