๐ง Not production ready. At all. ๐ง
Elixir client SDK for the Flow blockchain. The goal is to have feature-parity with the officially supported JS and Go SDKs. This may mean having an API for common or all gRPC methods defined at https://docs.onflow.org/access-api#block-headers.
โ Ping
โ Execute scripts at latest block
โ Decode JSON-Cadence Data Interchange Format into a suitable Elixir format
๐ง Block Headers
๐ง Blocks
๐ง Scripts
๐ง Events
๐ง Transactions
๐ง Accounts
If available in Hex, the package can be installed
by adding flow_ex
to your list of dependencies in mix.exs
:
def deps do
[
{:flow_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/flow_ex.
- https://github.com/elixir-grpc/grpc/tree/master/examples
- https://github.com/elixir-grpc/grpc/blob/master/examples/helloworld/priv/client.exs
- https://www.onflow.org/post/interact-with-flow-using-ruby
- https://github.com/elixir-grpc/grpc
- https://github.com/elixir-protobuf/protobuf
- https://github.com/onflow/flow-emulator/blob/master/README.md#starting-the-server
- Run
git submodule init
initialize the git submodule. - Run
git submodule update --remote
to pull the latest commit (though we expect the contracts to infrequently if ever change). - If there are changes to the Flow contracts, re-generate Elixir code from the protobufs. See Protobuf Generation.
- Install the Flow CLI.
- Run
flow emulator start
See Generate Elixir code in Elixir-Protobuf for more details.
brew install protobuf
protoc -I flow/protobuf/ --elixir_out=plugins=grpc:./lib/ flow/protobuf/flow/**/*.proto