Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

updated guide #478

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 36 additions & 18 deletions src/app/connect/in-app-wallet/how-to/export-private-key/page.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import ExportKey from "./export-priv-key.png";
import { Callout, DocImage, createMetadata } from "@doc";
import { Callout, DocImage, createMetadata, Step, Steps } from "@doc";
import ManageWallet from './manage-wallet.png'
import ExportKey from './export-key.png'
import ConfirmReveal from './confirm-reveal.png'
import ExportedKey from './exported-key.png'

export const metadata = createMetadata({
image: {
Expand All @@ -8,30 +11,45 @@ export const metadata = createMetadata({
},
title: "Export private key | thirdweb In-App Wallet",
description:
"Allow your users to export the private key for their in-app wallet embedding this page in an iframe",
"Learn how to export private keys for thirdweb in-app wallets",
});

# Export private key
# Export Private Key

Allow your users to export the private key for their in-app wallet embedding this page in an iframe:
Learn how to export the private key for a thirdweb in-app wallet using the Connect modal.

```html
<iframe
src="https://embedded-wallet.thirdweb.com/sdk/2022-08-12/embedded-wallet/export?clientId=CLIENT_ID" allow="clipboard-read; clipboard-write"
/>
```
<Steps>

The user will be presented with a form to sign in to reveal their private key:
<Step title="Login">
Login to your in-app wallet on the application.
</Step>

<DocImage src={ExportKey} className="max-w-[550px]" />
<Step title="Manage">
Select "Manage Wallet".
<DocImage src={ManageWallet} />
</Step>

## Use cases
<Step title="Export">
Choose "Export Private Key" and confirm the action to reveal the private key.
<DocImage src={ExportKey} />
</Step>

- As your users gain familiarity with the blockchain, they may want to manage their wallet in another app.
- Your users may lose access to their email (e.g. corporate account) and want to fully own their wallet.
<Step title="Confirm">
Confirm you want to reveal your private key.
<Callout variant="warning" title="Secure Private Keys">
Revealing private keys can compromise your assets and security. Keep them safe and confidential at all times.
</Callout>
<DocImage src={ConfirmReveal} />
</Step>

<Callout title="Note" variant="info">
<Step title="Reveal">
Copy the exported private key directly from the modal.
<DocImage src={ExportedKey} />
</Step>

The export private key embed is only embeddable on sites whitelisted by your client ID in the allowed domains section. Visit the [Settings tab](https://thirdweb.com/dashboard/settings) on the Dashboard to configure your Client ID.
</Steps>

</Callout>

<Callout variant="info" title="Advanced Configuration">
As an advanced option, to hide the export private key option from the modal, set the `hidePrivateKeyOption` to `true`
</Callout>
Loading