near / near-api-js

JavaScript library to interact with NEAR Protocol via RPC API
https://near.github.io/near-api-js
MIT License
392 stars 245 forks source link

near-api-rust project #510

Closed patrick-fitzgerald closed 3 years ago

patrick-fitzgerald commented 3 years ago

Hi, I see there is a near-api-js and a near-api-py project. Is there any plans to create a near-api-rust library to interact with NEAR Protocol via RPC API? I'm interested in using the RPC API with a rust client. If I was to create my own version. Is this the best source for the up to date protos file?

Thanks, Patrick

bowenwang1996 commented 3 years ago

I think @frol had some ideas on this. Also we no longer use protobuf and currently use https://github.com/near/borsh instead.

frol commented 3 years ago

@patrick-fitzgerald it is JSON-RPC protocol, so there is no ProtoBuf involved. You can follow the docs and implement a simple JSON-based client. We currently have one for internal testing purposes, but it is not published on crates.io, and has quite a few dependencies that would be needed published before we can publish near-jsonrpc-client, also it lacks documentation.

frol commented 3 years ago

@patrick-fitzgerald if you are willing to contribute a re-write (or clean up the existing implementation) with proper documentation and sane usability, we can even create a bounty for that

patrick-fitzgerald commented 3 years ago

@frol Thanks I'll take a look at the internal project. A bounty for a rewrite sounds like a good idea. I could take a look at it some time in the future when I have more time.