sologenic / sologenic-xrpl-stream-js

Persistent transaction handling for the XRP Ledger
MIT License
18 stars 11 forks source link

Remove ripple-lib dependency (Bounty: 3000 SOLO) #8

Closed bashash closed 4 years ago

bashash commented 4 years ago

Summary This library uses the following methods from ripple-lib: connect() on() isValidAddress() isConnected() getLedgerVersion() getFee() request() xrpToDrops() sign() submit() getTransaction() txFlags

It is noteworthy that ripple-lib is a heavy library and the methods used here are not really worth piggy backing the whole library. These methods are not very difficult to make in this library.

For signing we can use two lighter libraries: ripple-keypairs & ripple-binary-codec

and for WS we can use: https://github.com/WietseWind/rippled-ws-client

okanaganrusty commented 4 years ago

I don't believe that replacing ripple-lib is the right way to approach this, but rather forking the ripple-lib and stripping it down to a couple of methods as they you'll retain the schema and validation against all requests rather than writing them yourself. This also will allow us to cherry pick commits forward into the library.

coinfielddev commented 4 years ago

The reason I suggested replacing was to make this library lighter. But if we are to maintain a forked version and maintain updates, we might as well just use the main library as there is no point. We can close this issue unless we see some serious benefits of replacing the library. But essentially, if we later need the change, we could be using the following:

rippled-ws-client bip39 ripple-bip32 ripple-keypairs ripple-binary-codec ripple-hashes