{"id":24380608,"url":"https://github.com/diodechain/candid","last_synced_at":"2025-10-26T17:13:50.937Z","repository":{"id":257870154,"uuid":"873788472","full_name":"diodechain/candid","owner":"diodechain","description":"Elixir library for encoding and decoding candid. The binary encoding format for the Internet Computer (ICP).","archived":false,"fork":false,"pushed_at":"2025-01-22T13:37:45.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T23:04:56.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diodechain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T18:08:23.000Z","updated_at":"2025-01-22T13:37:49.000Z","dependencies_parsed_at":"2024-10-16T20:28:44.840Z","dependency_job_id":"4651bfc6-e511-4fda-8d7b-f313f758a5a9","html_url":"https://github.com/diodechain/candid","commit_stats":null,"previous_names":["diodechain/candid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diodechain%2Fcandid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diodechain%2Fcandid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diodechain%2Fcandid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diodechain%2Fcandid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diodechain","download_url":"https://codeload.github.com/diodechain/candid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312144,"owners_count":21082638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-19T08:27:33.045Z","updated_at":"2025-10-26T17:13:50.929Z","avatar_url":"https://github.com/diodechain.png","language":"Elixir","funding_links":[],"categories":["Candid"],"sub_categories":["Candid implementations"],"readme":"# Candid\n\nCandid is a binary encoding format for the Internet Computer (ICP).\n\nThis library allows to encode and decode Candid messages.\n\n## Installation\n\nThis package can be installed\nby adding `candid` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:candid, \"~\u003e 1.0.0\"}\n  ]\nend\n```\n\n## Usage\n\n```elixir\ntype_spec = [{:vec, {:record, [{0, :blob}, {1, :blob}]}}]\n\nmessages = [\n  {\"key1\", \"hello world\"},\n  {\"key2,\" \"hello candid\"}\n]\n\n^messages = Candid.encode_parameters(type_spec, messages)\n|\u003e Candid.decode_parameters()\n```\n\n## Support types and shorthands:\n\nFor convenience there are type shorthands for :variant, and :record\n- Record: `%{name =\u003e type_value}` e.g. %{a: :text}\n- Variant: `[type]` e.g. `[{:ok, :text}, :error]`\n\nOther complex types have to be defined as tuples:\n- Opt: `{:opt, type}` e.g. `{:opt, :nat}`\n- Vec: `{:vec, type}` e.g. `{:vec, :nat}`\n\nAnd simple types are just atoms:\n- `:null`\n- `:bool`\n- `:nat` (`:nat8`, `:nat16`, `:nat32`, `:nat64`)\n- `:int` (`:int8`, `:int16`, `:int32`, `:int64`)\n- `:float32`, `:float64`\n- `:text`\n- `:principal`\n- `:blob`\n- `:empty`\n\n\n## Completion\n\nThis library does not yet support loading of .did file specifications. PRs and contributions to extend this library are welcome though!\n\n## Documentation\n\nThe documentation for this library can be found at [https://hexdocs.pm/candid](https://hexdocs.pm/candid).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiodechain%2Fcandid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiodechain%2Fcandid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiodechain%2Fcandid/lists"}