From baad28a6b1df36f66eae1fb723bbcfdc61592a51 Mon Sep 17 00:00:00 2001 From: Adam Egyed <5456061+adamegyed@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:47:11 -0800 Subject: [PATCH 1/3] feat: add mekong devnet support (#1239) --- account-kit/infra/src/chains.ts | 18 ++++++++++++++++++ account-kit/infra/src/index.ts | 1 + 2 files changed, 19 insertions(+) diff --git a/account-kit/infra/src/chains.ts b/account-kit/infra/src/chains.ts index 0b1b24d4f2..a67f006df6 100644 --- a/account-kit/infra/src/chains.ts +++ b/account-kit/infra/src/chains.ts @@ -478,3 +478,21 @@ export const arbitrumNova: Chain = { ...vabn.rpcUrls, }, }; + +export const mekong: Chain = defineChain({ + id: 7078815900, + name: "Mekong Pectra Devnet", + nativeCurrency: { name: "eth", symbol: "eth", decimals: 18 }, + rpcUrls: { + default: { + http: ["https://rpc.mekong.ethpandaops.io"], + }, + }, + blockExplorers: { + default: { + name: "Block Explorer", + url: "https://explorer.mekong.ethpandaops.io", + }, + }, + testnet: true, +}); diff --git a/account-kit/infra/src/index.ts b/account-kit/infra/src/index.ts index 814451230d..d0f4b43ae8 100644 --- a/account-kit/infra/src/index.ts +++ b/account-kit/infra/src/index.ts @@ -39,6 +39,7 @@ export { unichainSepolia, inkMainnet, inkSepolia, + mekong, } from "./chains.js"; export type * from "./client/decorators/alchemyEnhancedApis.js"; export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js"; From 4e5edbcfe9b523e299343068c8a0bf9b5ef54956 Mon Sep 17 00:00:00 2001 From: Rob <30500864+RobChangCA@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:10:57 -0500 Subject: [PATCH 2/3] docs: update export private key (#1197) --- site/pages/signer/export-private-key.mdx | 30 +++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/site/pages/signer/export-private-key.mdx b/site/pages/signer/export-private-key.mdx index d056766a4c..4f6495a80a 100644 --- a/site/pages/signer/export-private-key.mdx +++ b/site/pages/signer/export-private-key.mdx @@ -8,7 +8,35 @@ description: Learn how to enable a user to export their private key with the Alc The Alchemy Signer allows you to export a user's private key, allowing them a right to exit at any time. It is considered a best practice to allow your users to export their private key, as it gives them full control over their account. The private key export method does not rely on Alchemy's infrastructure, so even if Alchemy is down, a user can still export their private key. -## Usage +## Using [useExportAccount](/reference/account-kit/react/hooks/useExportAccount) + +A hook use to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe. + +### Import + +```ts +import { useExportAccount } from "@account-kit/react"; +``` + +### Usage + +```ts +import { useExportAccount } from "@account-kit/react"; + +const { + exportAccount, + isExported, + isExporting, + error, + ExportAccountComponent, +} = useExportAccount({ + params: { + iframeContainerId: "my-iframe-container", + }, +}); +``` + +## Using the signer To add export private key functionality to your app, you can use the `exportPrivateKey` method on the signer. From 9f750d74a464401dc0bf17d1e3fa6e884b7935da Mon Sep 17 00:00:00 2001 From: Rob <30500864+RobChangCA@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:30:54 -0500 Subject: [PATCH 3/3] docs: tailwind tip (#1198) --- site/pages/react/react-hooks.mdx | 4 ++++ site/pages/react/ui-components.mdx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/site/pages/react/react-hooks.mdx b/site/pages/react/react-hooks.mdx index 1ad9099067..998c446116 100644 --- a/site/pages/react/react-hooks.mdx +++ b/site/pages/react/react-hooks.mdx @@ -7,6 +7,10 @@ description: How to embed our authentication into your customized UI If you don't want to use our pre-built UI components, you can build your own custom UI using the [`useAuthenticate`](/reference/account-kit/react/hooks/useAuthenticate) hook. +:::tip +Tailwind CSS is a required dependency for using Alchemy Account Kit UI components. However, Alchemy Account Kit hooks function independently and do not require Tailwind. +::: + ### Email authentication ```tsx twoslash diff --git a/site/pages/react/ui-components.mdx b/site/pages/react/ui-components.mdx index 59d13f9c7a..0e1bb0db22 100644 --- a/site/pages/react/ui-components.mdx +++ b/site/pages/react/ui-components.mdx @@ -11,6 +11,10 @@ Account Kit allows you to use pre-built, [highly customizable](https://demo.alch - customize [authentication method ui](#customize-authentication-ui) - customize [theme](/react/customization/theme) +:::tip +Tailwind CSS is a required dependency for using Alchemy Account Kit UI components. However, Alchemy Account Kit hooks function independently and do not require Tailwind. +::: + ## Modal auth Assuming your application has been [set up](/react/quickstart), using UI components is the easiest way to authenticate users. All you have to do is leverage the [`useAuthModal`](/reference/account-kit/react/hooks/useAuthModal) hook and provide users a CTA to open the modal.