Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 923 Bytes

README.md

File metadata and controls

43 lines (31 loc) · 923 Bytes

BorshEx

⚠️ Work in progress

Elixir implementation of Binary Object Representation Serializer for Hashing (borsh)

Installation

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

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

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

Usage

defmodule BorshEx.FakeData do
  use BorshEx.Schema

  defstruct a: nil, b: nil, c: nil

  borsh_schema do
    field :a, "u8"
    field :b, "u64"
    field :c, "string"
  end
end

Copyright and License

Copyright (c) 2022, Stéphane Robino This library is licensed under the BSD-2-Clause.