Skip to content

key storage copy edits#614

Merged
MasterHW merged 2 commits intomainfrom
exec-key-edits
Mar 31, 2026
Merged

key storage copy edits#614
MasterHW merged 2 commits intomainfrom
exec-key-edits

Conversation

@MasterHW
Copy link
Copy Markdown
Member

No description provided.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
turnkey-docs 🟢 Ready View Preview Mar 30, 2026, 6:06 PM

Wallet Kit provides a drop-in component that handles the entire import flow, including encryption
and secure transport.
Integrate Turnkey into your application to enable wallet import and recovery operations. The
[NodeJS server SDK](https://github.com/tkhq/sdk/tree/main/examples/import-in-node) is well oriented
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just double checking that this is intended, it currently links to an example that uses the Turnkey server sdk rather than linking to the server sdk itself

Copy link
Copy Markdown
Member Author

@MasterHW MasterHW Mar 31, 2026

Choose a reason for hiding this comment

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

good catch, I did ponder what the right link for this should be. I think seeing the sdk in action is most helpful here, its relatively easy to find the package from the example but the opposite is not true.

@MasterHW MasterHW merged commit c5dff1a into main Mar 31, 2026
3 checks passed
You can use the [Embedded Wallet Kit](/reference/embedded-wallet-kit) for fast integration, or [Turnkey SDKs](/sdks/introduction) and the [API](/api-reference/overview) for more customization. Leading apps like [Moonshot](https://www.turnkey.com/customers/how-moonshot-powers-millions-of-self-custodial-wallets-using-turnkey), [Infinex](https://www.turnkey.com/customers/making-onchain-ux-seamless-with-infinex-and-turnkey), and [Axiom](https://www.turnkey.com/customers/axiom-global-defi-trading-platform) use Turnkey for embedded consumer wallets in production.
Turnkey delivers a secure, flexible solution for embedding end-user wallets directly into your
application. Users sign in with familiar methods (passkeys, email, OAuth), without seed phrases,
browser extensions, or external wallets. Turnkey lets you compose your app's core experiences
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

but you can sign in with an external wallet 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

but I don't think its relevant in this context

Leading apps like
[Moonshot](https://www.turnkey.com/customers/how-moonshot-powers-millions-of-self-custodial-wallets-using-turnkey),
[Infinex](https://www.turnkey.com/customers/making-onchain-ux-seamless-with-infinex-and-turnkey),
and [Axiom](https://www.turnkey.com/customers/axiom-global-defi-trading-platform) use Turnkey for
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: feel like Axiom should be the first one

multiple signed actions in a time window. Read-only sessions suit low-touch apps where you mainly
need to read data (e.g., via parent-org access or a read-only session token).
- **Storage:** IndexedDB (web) for persistent, client-held sessions without exposing keys to your
JavaScript; SecureStorage (mobile); or LocalStorage (keys in app-accessible storage).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not relevant to your change but why do we mention local storage here?

- **Trusted vs. untrusted separation:** Verification and execution run only inside secure enclaves. Trusted and untrusted infrastructure are strictly separated so that a breach of your app or backend does not expose keys or signing capability.
- **Keys never leave the enclave:** Private keys live in
[Trusted Execution Environments (TEEs)](/security/secure-enclaves). All derivation and signing
happen inside verifiable infrastructure; only signatures are returned.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

idk how I feel about the:

"only signatures are returned"

feels like it doesn't fit and not necessarily true. For example our eth send transaction does both signing and broadcasting but does not return a signature!

integrity. Raw keys are never exposed to your app or to Turnkey.
- **Authenticator-bound requests:** Every sensitive operation is signed by a user-held authenticator
(passkey, email, etc.). The enclave verifies the signature and then performs the operation. No
request, no signing; a compromise outside the enclave cannot move funds. See
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this feels a bit weird:

"no request, no signing"

verified.
- **Scoped, programmable control:** Choose non-custodial, hybrid, or app-controlled custody.
[Policies](/concepts/policies/quickstart) and sub-organization isolation limit who can sign what.
- **Trusted vs. untrusted separation:** Verification and execution run only inside secure enclaves.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

feels like this says the same thing as *Authenticator-bound requests

User authentication flows into a signed request to Turnkey. Inside the enclave, the [policy engine](/concepts/policies/overview) evaluates the request; key derivation and signing follow, and only the signature is returned. Your app can then broadcast the transaction through another provider or with [Turnkey Transaction Management](https://docs.turnkey.com/concepts/transaction-management#construction-and-broadcast). For data flow and infrastructure details, see [Embedded Wallets overview](/embedded-wallets/overview) and [Secure enclaves](/security/secure-enclaves).
User authentication flows into a signed request to Turnkey. Inside the enclave, the
[policy engine](/concepts/policies/overview) evaluates the request; key derivation and signing
follow, and only the signature is returned. Your app can then broadcast the transaction through
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we sign and broadcast in the same activity, there is no way currently to broadcast just a signature currently (I beleive)

organizationId: process.env.NEXT_PUBLIC_ORGANIZATION_ID!,
authProxyConfigId: process.env.NEXT_PUBLIC_AUTH_PROXY_CONFIG_ID!,
};
const initResult = await turnkeyClient.apiClient().initImportWallet({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think have an .apiClient, also believe we have some sugared methods you can use here instead of using our httpClient


const result = await apiClient.pollTransactionStatus({
sendTransactionStatusId: txStatusId,
const walletImportResult = await turnkeyClient.apiClient().importWallet({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same thing here, no apiClient this is a sdk-server thing I believe

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