diff --git a/README.md b/README.md index af659e1..fe2d45b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,41 @@ Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB). +See the [SSB Binary Field Encodings Specification](https://github.com/ssbc/ssb-bfe-spec) for details. + +## Encoding + +```elixir +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](https://hex.pm/docs/publish), the package can be installed @@ -15,7 +50,12 @@ def deps do end ``` +## Documentation + Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) and published on [HexDocs](https://hexdocs.pm). Once published, the docs can be found at . +## License + +LGPL-3.0.