Skip to content

Elixir library for encoding and decoding candid. The binary encoding format for the Internet Computer (ICP).

License

Notifications You must be signed in to change notification settings

diodechain/candid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Candid

Candid is a binary encoding format for the Internet Computer (ICP).

This library allows to encode and decode Candid messages.

Installation

This package can be installed by adding candid to your list of dependencies in mix.exs:

def deps do
  [
    {:candid, "~> 1.0.0"}
  ]
end

Usage

type_spec = [{:vec, {:record, [{0, :blob}, {1, :blob}]}}]

messages = [
  {"key1", "hello world"},
  {"key2," "hello candid"}
]

^messages = Candid.encode_parameters(type_spec, messages)
|> Candid.decode_parameters()

Completion

This library is currently in the early stages of development and does not yet support all Candid formats (only those we need for our use cases at the moment). PRs and contributions to extend this library are welcome though!

Documentation

The documentation for this library can be found at https://hexdocs.pm/candid.

About

Elixir library for encoding and decoding candid. The binary encoding format for the Internet Computer (ICP).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages