Closed taylorjdawson closed 3 days ago
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.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
Package | New capabilities | Transitives | Size | Publisher |
---|---|---|---|---|
npm/@changesets/cli@2.27.9 | Transitive: environment, eval, filesystem, shell, unsafe | +102 |
16 MB | changesets-release-bot |
npm/usehooks-ts@3.1.0 | None | +1 |
265 kB | junscuzzy |
npm/viem@2.21.35 | Transitive: environment, filesystem, network | +25 |
23.8 MB | awkweb, jmoxey |
🚮 Removed packages: npm/@changesets/cli@2.27.5, npm/viem@2.18.8, npm/viem@2.21.29
Summary & Motivation
Changes
@turnkey/wallet-stamper
WalletStamper
Renamed
recoverPublicKey
togetPublicKey
Reason: Improves clarity and consistency across wallet interfacesUnified
getPublicKey
method signature to take no parameters Reason: The change in method signature forgetPublicKey
(removing parameters) was necessary to allow theTurnkeyWalletClient
to access the public key without needing to provide any additional information. This simplifies the process of retrieving the public key for sub-organization creation as demonstrated in the example.Moved
getPublicKey
toBaseWalletInterface
Reason: Ensures all wallet types implement this essential methodUpdated
SolanaWalletInterface
andEthereumWalletInterface
Reason: Streamlines interfaces by removing redundant method declarationsModified
EthereumWallet
implementation Reason: Aligns with new interface structure and utilizessignMessage
for public key recovery@turnkey/sdk-browser
TurnkeyWalletClient
Added new
TurnkeyWalletClient
to the@turnkey/sdk-browser
Reason: Allows using theWalletStamper
with the browser sdkAdded
getPublicKey
method toTurnkeyWalletClient
Reason: Enables easy access to wallet public key for sub-organization creation and future authentication flowsUpdated
TurnkeyWalletClient
to use newWalletInterface
Reason: Ensures compatibility with the updated Wallet Stamper interfacesAuthClient
(new enum)@turnkey/sdk-react
TurnkeyBrowserClient
,TurnkeyIframeClient
,TurnkeyPasskeyClient
,TurnkeyWalletClient
Added a static
authClient
property to baseTurnkeyBrowserClient
to be used by the child classes. Reason: To track which client was used for the initial authentication, enabling proper client retrieval laterSet specific
authClient
values in each subclass Reason: To ensure each client type is correctly identified for authentication and retrieval purposesUserSession
interfaceUserSession
interface which is to be stored in local storage to track the authentication state of the user. Reason: To eliminate the need to store the write and read sessions separately. Improving clarity and maintainability.authenticatedClient
in the session object Reason: To store the authentication method used in the user's session data. Will be used in the@turnkey/sdk-react
to determine which client to return.This is the new
UserSession
object which gets stored in local storage:StorageKeys
enumUserSession
key:"@turnkey/session/v1"
Added a new storage key to remove reliance on the legacy user session object with the goal of not breaking any existing implementations with past versions of the sdk. Reason: To facilitate future updates without breaking existing implementations and improve backward compatibility.login
andloginWithReadWriteSession
methodsauthenticatedClient
property when creating user sessions Reason: To properly track and store the authentication method used during loginHow 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.