xpring-eng / XpringKit

XpringKit provides a Swift SDK for interacting with Xpring Protocols (XRP/PayID/ILP). This library is deprecated.
https://xrpl.org/
MIT License
26 stars 14 forks source link

How do I run the GRPC Server? #62

Closed dangell7 closed 4 years ago

dangell7 commented 4 years ago

This sdk is confusing to say the least...

As a developer I would expect the same access to the ledger that is given over the api through web sockets or rpc. I'm under the impression this is not the case with grpc and I need to run my own adaptor over my local server to interact. Is that correct?

dangell7 commented 4 years ago

If that is correct, why don't I, as a developer, have access to that?

keefertaylor commented 4 years ago

I'm sorry that you're feeling confused. I think you may be trying to use features of the XRP Ledger that this SDK doesn't yet support. As far as gRPC, you shouldn't really need to worry about the networking aspects of the SDK, as this is abstracted away from you as a developer (which is one of the points of having an SDK). Instead, you can just call native methods on the SDK.

In specific regards to missing features: This SDK is in early days and doesn't support every feature of the XRP ledger. It supports some common features and will add more over time. The features supported are available in the README. If there's something you're interested in, feel free to open an issue (as you've been doing) so that we know there's demand.

As far as your networking questions: gRPC is a networking technology that this SDK uses to connect to XRP nodes. Note that gRPC is internally encapsulated in this SDK and you don't touch it as a user.


In response to specific questions:

As a developer I would expect the same access to the ledger that is given over the api through web sockets or rpc.

Xpring SDK is aimed at making common features (payments, balances, wallet creation, etc) of the XRP ledger easier to work with for developers. If you'd like the full capabilities of working with raw API calls to rippled's API, you're better off just writing your own requests.

I'm under the impression this is not the case with grpc and I need to run my own adaptor over my local server to interact. Is that correct?

gRPC is just a network protocol which connects to a remote service to make RPCs.

Right now, the remote service is a shim layer which wraps around a rippled node. Conceptually this looks like

XpringKit <---grpc---> gRPC Shim <---> rippled node

At the moment, Xpring hosts this shim layer on testnet as a convenience. In the future, rippled nodes will provide a native gRPC interface.

If that is correct, why don't I, as a developer, have access to that?

Xpring has decided that we'd rather focus on getting an implementation in rippled as a way for developers to self host, as opposed to open sourcing and supporting a shim layer.


Thanks for the feedback and let me know if I can elaborate on anything that may still be confusing.

dangell7 commented 4 years ago

I guess I'm just upset as I thought this was much farther along with the official announcement and all. I guess I'll wait. If you want to know what common features are required for a wallet application to send and receive payments. I'll list them here for my specific use case. 1. Wallet Creation, Backup, Restore. 2. Balance (Websocket and single call) 3. Transaction List 4. a way for the application to set a specific ID to tract application specific transactions. aka Invoice ID. 5. Escrow 6. Smart Contracts (this WAS a must for me but decided to work around it)