A SDK client with browser-specific abstractions for interacting with Turnkey API. Also includes @turnkey/http, a lower-level, fully typed HTTP client.
Turnkey API documentation lives here: https://docs.turnkey.com.
The Passkey client allows for authentication to Turnkey’s API using Passkeys.
The Iframe client can be initialized to interact with Turnkey’s hosted iframes for sensitive operations.
The iframeContainer
parameter is required, and should be a reference to the DOM element that will host the iframe.
The iframeUrl
is the URL of the iframe you wish to interact with.
The example below demonstrates how to initialize the Iframe client for use with Email Auth
by passing in https://auth.turnkey.com
as the iframeUrl
.
Flow | URL |
---|---|
Email Auth | auth.turnkey.com |
Email Recovery | recovery.turnkey.com |
Import Wallet | import.turnkey.com |
Export Wallet | export.turnkey.com |
The Wallet client is designed for using your Solana or EVM wallet to stamp and approve activity requests for Turnkey’s API. This stamping process leverages the wallet’s signature to authenticate requests.
The example below showcases how to use an injected Ethereum wallet to stamp requests to Turnkey’s API. The user will be prompted to sign a message containing the activity request payload to be sent to Turnkey.
@turnkey/sdk-browser
provides TurnkeySDKBrowserClient
, which offers wrappers around commonly used Turnkey activities, such as creating new wallets and wallet accounts.
A SDK client with browser-specific abstractions for interacting with Turnkey API. Also includes @turnkey/http, a lower-level, fully typed HTTP client.
Turnkey API documentation lives here: https://docs.turnkey.com.
The Passkey client allows for authentication to Turnkey’s API using Passkeys.
The Iframe client can be initialized to interact with Turnkey’s hosted iframes for sensitive operations.
The iframeContainer
parameter is required, and should be a reference to the DOM element that will host the iframe.
The iframeUrl
is the URL of the iframe you wish to interact with.
The example below demonstrates how to initialize the Iframe client for use with Email Auth
by passing in https://auth.turnkey.com
as the iframeUrl
.
Flow | URL |
---|---|
Email Auth | auth.turnkey.com |
Email Recovery | recovery.turnkey.com |
Import Wallet | import.turnkey.com |
Export Wallet | export.turnkey.com |
The Wallet client is designed for using your Solana or EVM wallet to stamp and approve activity requests for Turnkey’s API. This stamping process leverages the wallet’s signature to authenticate requests.
The example below showcases how to use an injected Ethereum wallet to stamp requests to Turnkey’s API. The user will be prompted to sign a message containing the activity request payload to be sent to Turnkey.
@turnkey/sdk-browser
provides TurnkeySDKBrowserClient
, which offers wrappers around commonly used Turnkey activities, such as creating new wallets and wallet accounts.