Skip to content

Commit 7e7d609

Browse files
committed
prettier
1 parent 66a8fdc commit 7e7d609

File tree

2 files changed

+77
-67
lines changed

2 files changed

+77
-67
lines changed

examples/import-export-with-rwk/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Example: `import-export-with-rwk`
22

33
This is a minimal Next.js app showing how to implement **import and export for wallets, wallet accounts and raw private keys** using:
4+
45
- [@turnkey/react-wallet-kit](https://docs.turnkey.com/sdks/react)
56
- Turnkey's [import/export iframe flow](https://docs.turnkey.com/embedded-wallets/code-examples/export#embedded-iframe)
67
- Turnkey's managed [Auth Proxy](https://docs.turnkey.com/reference/auth-proxy) (no backend required, your frontend can securely perform sign-up / login without hosting your own authentication server)
@@ -12,12 +13,13 @@ A high-level overview of the experience:
1213
**1. Login or sign-up with a passkey**
1314

1415
Users authenticate via @turnkey/react-wallet-kit. If this is their first time, Turnkey automatically provisions a sub-organization with:
16+
1517
- their new passkey registered as an authenticator
1618
- one HD wallet containing:
17-
- one Ethereum account
18-
- one Solana account
19+
- one Ethereum account
20+
- one Solana account
1921

20-
>Learn how to customize the sub-organization creation parameters → https://docs.turnkey.com/sdks/react/sub-organization-customization
22+
> Learn how to customize the sub-organization creation parameters → https://docs.turnkey.com/sdks/react/sub-organization-customization
2123
2224
**2. Dashboard UI**
2325

@@ -26,44 +28,51 @@ Once authenticated, the dashboard displays two main panels, each with its own li
2628
**HD Wallets & Wallet Accounts**
2729

2830
Shows the user’s Turnkey-created hierarchical wallets:
31+
2932
- HD wallet seeds
3033
- All derived wallet accounts (Ethereum, Solana, etc)
3134

3235
For the selected wallet or account, the actions panel allows:
36+
3337
- Export Wallet
3438
- Export Wallet Account
3539
- Import Wallet (import an entire HD seed phrase)
3640

3741
**Raw Private Keys**
3842

3943
Shows all standalone private keys, which may be:
44+
4045
- imported by the user
4146
- or generated by Turnkey
4247

4348
For the selected private key, the actions panel allows:
49+
4450
- Export Private Key
4551
- Import Private Key (choose curve + address formats)
4652

47-
>Learn the difference between HD wallets, wallet accounts and raw private keys → https://docs.turnkey.com/concepts/wallets
53+
> Learn the difference between HD wallets, wallet accounts and raw private keys → https://docs.turnkey.com/concepts/wallets
4854
4955
**3. Secure iframe-based import/export**
5056

5157
All import/export operations use `@turnkey/iframe-stamper`, ensuring that:
58+
5259
- private key material is encrypted and decrypted only inside an isolated iframe
5360
- your frontend never touches raw keys directly
5461

55-
>For a lower-level example using `@turnkey/iframe-stamper` see → https://github.com/tkhq/sdk/tree/main/examples/import-export-with-iframe-stamper
62+
> For a lower-level example using `@turnkey/iframe-stamper` see → https://github.com/tkhq/sdk/tree/main/examples/import-export-with-iframe-stamper
5663
5764
## How it works
5865

5966
All import/export actions call the high-level helpers in @turnkey/react-wallet-kit:
67+
6068
- [handleExportWallet](https://docs.turnkey.com/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet)
6169
- [handleImportWallet](https://docs.turnkey.com/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-wallet)
6270
- [handleExportWalletAccount](https://docs.turnkey.com/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-wallet-account)
6371
- [handleImportPrivateKey](https://docs.turnkey.com/generated-docs/formatted/react-wallet-kit/client-context-type-handle-import-private-key)
6472
- [handleExportPrivateKey](https://docs.turnkey.com/generated-docs/formatted/react-wallet-kit/client-context-type-handle-export-private-key)
6573

6674
Each helper wraps the appropriate iframe flow and handles:
75+
6776
- iframe initialization and cleanup
6877
- encryption/decryption
6978
- user prompts

0 commit comments

Comments
 (0)