Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK README Update #432

Merged
merged 5 commits into from
Nov 27, 2024
Merged

SDK README Update #432

merged 5 commits into from
Nov 27, 2024

Conversation

omkarshanbhag
Copy link
Contributor

@omkarshanbhag omkarshanbhag commented Nov 26, 2024

Summary & Motivation

This PR edits the SDK Readme as part of the usability sprint Phase 2. Context on the change can be found here. The goals with this change, as outlined in the usability sprint are as follows:

Usability Sprint Notes
*Clean up packages presentation - hide packages not meant to be imported/used directly
*Clarify which of sdk browser, server, react to use
*Clarify which versions of packages are compatible with each other
*Which SDK functions are web-based without looking at the code for function signature and details
*Break down table of SDK packages into recommended (our SDK packages), ecosystems (viem, cosmos, ethers, eip1193, etc), internal/others
*Hide non used packaged by default
*Make Stackblitz links more prominent

A google doc containing drafts and comments on the proposed edits is available here: https://docs.google.com/document/d/1mb7YuV4K7FD3SKgqs-nHVuwUHd6bzG3eP1v9UMXIf0c/edit?tab=t.0#heading=h.2nbyu6aagpgj

How I Tested These Changes

Did you add a changeset?

If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

Copy link

codesandbox-ci bot commented Nov 26, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@omkarshanbhag omkarshanbhag changed the title section 1 SDK README Update Nov 26, 2024
@omkarshanbhag omkarshanbhag requested review from taylorjdawson, r-n-o and andrewkmin and removed request for taylorjdawson and r-n-o November 26, 2024 20:10
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated
| Package | Description | NPM | Changelog | Docs |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------- |
| [@turnkey/sdk-browser](/packages/sdk-browser) | The `@turnkey/sdk-browser` package exposes functionality that lets developers build browser based applications that interact with the Turnkey API with different types of authentication. It consists of different clients that enable requests to the API to be authenticated via different auth methods like user sessions, passkeys and iFrames. It also contains methods to manage information and state related to authentication like auth bundles and sessions, retrieving user information and server signing API requests. | [![npm](https://img.shields.io/npm/v/@turnkey/http?color=%234C48FF)](https://www.npmjs.com/package/@turnkey/sdk-browser) | [CHANGELOG](/packages/sdk-browser/CHANGELOG.md) | [Docs](https://docs.turnkey.com/sdks/javascript-browser) |
| [@turnkey/sdk-server](https://github.com/tkhq/sdk/tree/main/packages/sdk-server) | The `@turnkey/sdk-server` package exposes functionality that lets developers build server-side functionality for applications that interact with the Turnkey API with different types of authentication – allowing applications to authenticate users, manage sessions, and perform organizational operations securely and efficiently. It consists of an API Client and API Proxies that enable requests to the Turnkey API to be authenticated with the appropriate credentials. Specifically, the API Client manages requests signed by the user's authentication details, and the API proxies handle requests signed by the parent organization's authentication details. Use this package to handle server-side interactions for applications that interact with the Turnkey API. | [![npm](https://img.shields.io/npm/v/@turnkey/sdk-server?color=%234C48FF)](https://www.npmjs.com/package/@turnkey/sdk-server) | [CHANGELOG](/packages/sdk-server/CHANGELOG.md) | [Docs](https://docs.turnkey.com/sdks/javascript-server) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @turnkey/sdk-server package exposes functionality that lets developers build server-side functionality for applications that interact with the Turnkey API with different types of authentication – allowing applications to authenticate users, manage sessions, and perform organizational operations securely and efficiently. It consists of an API Client and API Proxies that enable requests to the Turnkey API to be authenticated with the appropriate credentials. Specifically, the API Client manages requests signed by the user's authentication details, and the API proxies handle requests signed by the parent organization's authentication details. Use this package to handle server-side interactions for applications that interact with the Turnkey API.

The upshot of @turnkey/sdk-server is that it allows people to use Turnkey with an API key credential (P256 keypair that can be created using our @turnkey/crypto library)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can say Turnkey requests to be (optionally) proxied through Backend? given not all setups will require a proxy setup

Copy link
Collaborator

@andrewkmin andrewkmin Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End Uers sub-org --> End User's sub-org

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitate to include @turnkey/sdk-react-native-passkey-stamper alongside @turnkey/sdk-browser and @turnkey/sdk-react given it's specifically for stamping only, whereas the other two are a bit more wholistic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some further color on the proxy requests -- def agree that its optional and that its not an expectation. The reason I explicitly included it like that is to show all flows of Turnkey requests between App Client/App Server and the Turnkey API. Agree that including the optionally will help make that clear.

Agree on the other two points as well!

Copy link
Contributor

@r-n-o r-n-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@r-n-o r-n-o merged commit 2d010a6 into main Nov 27, 2024
5 checks passed
@r-n-o r-n-o deleted the omkar/sdk-readme-update branch November 27, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants