Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB).
Go to file
2022-09-22 15:28:18 +01:00
lib remove comment 2022-09-22 15:28:18 +01:00
test add tests for encoding boolean, nil, list, map and tuple 2022-09-21 12:10:30 +01:00
.formatter.exs add elixir project files 2022-05-05 19:50:19 +02:00
.gitignore add lockfile to ignore list 2022-09-20 19:34:41 +01:00
mix.exs update manifest 2022-09-19 16:39:48 +01:00
README.md add license and docs about encoding support 2022-09-21 12:35:18 +01:00

SsbBfe

Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB).

See the SSB Binary Field Encodings Specification for details.

Encoding

SsbBfe.encode(value)

Elixir Types

Encoding of the following Elixir types is supported:

  • List
  • Map
  • Tuple
  • String
  • Boolean
  • Nil
  • Integer
  • Float

Note: encoding of structs is not supported. You may wish to convert your struct to amap and encode it that way.

Scuttlebutt Types

Encoding of the following Scuttlebutt types is supported:

  • Feed (classic)
  • Message (classic)
  • Blob
  • Signature
  • Private message (box, box2)

Note: encoding of URIs is not currently supported, nor are other formats such as Gabby Grove and Bendy Butt.

Installation

If available in Hex, the package can be installed by adding ssb_bfe to your list of dependencies in mix.exs:

def deps do
  [
    {:ssb_bfe, "~> 0.1.0"}
  ]
end

Documentation

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ssb_bfe.

License

LGPL-3.0.