aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

Add TS SDK for v1 API

Open banool opened this issue 3 years ago • 0 comments
trafficstars

Description

This PR moves the existing TS SDK into a v0 directory and makes a new v1 directory for the new SDK. The v1 SDK is initially a copy of the v0 SDK, but the client code is regenerated and the wrapping SDK code is fixed accordingly.

Some other changes:

  • Updated everything to work with the new lower snake case module names.
  • Removed any deprecated functions, now is a good time.
  • Updated most dependencies.
  • Cut over to a better OpenAPI client generator, the one we're using for the v0 client is no longer maintained and outputs code that needs to be fixed up.

Still todo:

  • Not only cut over all docs to point to a valid location, but rewrite them for the v1 SDK.
  • Update all the comments for the wrapper functions in the SDK.
  • Consider removing the wrapper functions from the SDK somehow, they're very thin.
  • At this point I've updated all of the tests except those in the transaction builder.
  • Clean up the GitHub actions, there's some duplication now.

Test Plan

From ecosystem/typescript/sdk/v1:

yarn test

This change is Reviewable

banool avatar Jul 29 '22 00:07 banool