Terrasol.Author (Terrasol v2.0.2)

View Source

Handling of Earthstar author strings and resulting Terrasol.Author.t structures

Summary

Types

t()

An Earthstar author

Functions

Fill a Terrasol.Author structure from an address string or (possibly incomplete) map.

Create a Terrasol.Author structure from a keypair.json-style file

Parse an author address into a Terrasol.Author

Write a keypair.json-style file from a supplied identity. As a secret file, the publickey must be included.

Types

t()

@type t() :: %Terrasol.Author{
  privatekey: nil | binary(),
  publickey: binary(),
  shortname: String.t(),
  string: String.t()
}

An Earthstar author

Functions

build(input)

Fill a Terrasol.Author structure from an address string or (possibly incomplete) map.

Internal conflict resolution is determinisitic, but depends on implementation-specific ordering which is not gauranteed and should not be depended upon being the same between versions.

:error on invalid input

from_keypair_file(filename)

Create a Terrasol.Author structure from a keypair.json-style file

:error on error

parse(address)

Parse an author address into a Terrasol.Author

:error on invalid input

to_keypair_file(author, filename)

Write a keypair.json-style file from a supplied identity. As a secret file, the publickey must be included.