NearApi
Elixir library for DApps development on the NEAR blockchain platform
Currently in active development, so not recommended to use in production
Installation
If available in Hex, the package can be
installed by adding near_api to your list of dependencies in
mix.exs:
def deps do
[
{:near_api, "~> 0.1.4"}
]
endUsage
We used Livebook for API documentation.
To see NEAR API in action please clone this repository and run Livebook locally from your project folder with corresponding .livemd file loaded.
Access Keys
Retrieve information about an account's access keys.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/access-keys">NEAR API Docs: Access Keys</a>
Accounts / Contracts
View details about accounts and contracts as well as perform contract calls.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/contracts">NEAR API Docs: Accounts / Contracts</a>
TBD: Livebook
Block / Chunk
Query the network and get details about specific blocks or chunks.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/block-chunk">NEAR API Docs: Block / Chunk</a>
TBD: Livebook
Gas
Get gas price for a specific block or hash.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/gas">NEAR API Docs: Gas</a>
TBD: Livebook
Protocol
Retrieve current genesis and protocol configuration.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/protocol">NEAR API Docs: Protocol</a>
TBD: Livebook
Network
Return status information for nodes and validators.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/network">NEAR API Docs: Network</a>
TBD: Livebook
Transactions
Send transactions and query their status.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/transactions">NEAR API Docs: Transactions</a>
TBD: Livebook
Sandbox (Backlog)
Patch state on a local sandbox node.
Near Docs: <a target="_blank" href="https://docs.near.org/docs/api/rpc/sandbox">NEAR API Docs: Sandbox</a>
TBD: Livebook
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/alexfilatov/near_api.
- Fork
- Create Pull request
License
Copyright © 2021-present Alex Filatov <alex@alexfilatov.com>
This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the LICENSE file for more details.Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/near_api.