Open anxolin opened 3 years ago
https://app.zenhub.com/workspaces/gp-ui-600568e698f7c10017853a08/issues/gnosis/cowswap/793 dex-js will become SDK Rename to gp-sdk Drop legacy code Facade for our SDK:
import { Gp } from 'gp-sdk' const gp = new Gp() gp.getPrice(tokenA, tokenB, ...) gp.signOrder(order) gp.postSignedOrder(signedOrder) gp.signCancelOrder(orderId) gp.postSignedCancelOrder(orderId)
Update:
A new repo has been created https://github.com/gnosis/cow-sdk
Adding to the list of features, the already partially implemented appData handling (see https://github.com/gnosis/cow-sdk/pull/1) It's a requirement for https://github.com/gnosis/gp-ui/issues/849
Please, remember this entitle doing some documentation too, we could prepare it in a google docs and later convert it to proper Gitbook pages
We will need a getting started guide easy enough to follow. Also, ideally automatic generation of the JSDocs for GitBook
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you think it shouldn't be closed, speak now or forever hold your peace.
Description There's many utilities, logics defined in CowSwap that are very interesting to extract to a generic SDK.
Context Balancer replicated many of these logics by copy pasting, but long term it would be good to be able to provide a simple to use TS library that contains these basic utilities that every UI and service using JS/TS would need.
Proposal Simple TS SDK that would expose all reusable pieces of code.
Example:
Get prices from all different sourcesEDIT: Now that the backend already checks the best price, it might be just a good to have but not important anymore. I would leave it out for now