Skip to content
Open
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
2 changes: 1 addition & 1 deletion content/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ navigation:
path: wallets/pages/third-party/signers/turnkey.mdx
- page: Other signers
path: wallets/pages/third-party/signers/custom-integration.mdx
- section: Account kit
- section: Account Kit (v4)
collapsed: true
contents:
- section: Login methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Your JWTs must contain these claims:

<Note>
Generate the `targetPublicKey` from the [authentication
SDK](/docs/wallets/reference/account-kit/signer/classes/AlchemySignerWebClient/targetPublicKey).
SDK](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/signer/src/client/base.ts).
</Note>

<Tip>
Expand Down
4 changes: 2 additions & 2 deletions content/wallets/pages/concepts/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Middleware allows you to avoid having to write the same flows over and over when
<Tip>
When using the [React](/docs/wallets/react/quickstart),
[Core](/docs/wallets/core/overview), or
[Infra](/docs/wallets/reference/account-kit/infra) packages, the Smart Account
[Infra](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/account-kit/infra) packages, the Smart Account
Clients are already configured to use the appropriate middleware for your
needs. If you want to sponsor gas, the Smart Account Clients in these packages
abstract the relevant middleware away since all you need is a
Expand All @@ -24,7 +24,7 @@ Middleware allows you to avoid having to write the same flows over and over when
As mentioned above, the client can be configured with a series of middleware that always run in the same order:

1. `dummyPaymasterAndData` - Generates a dummy paymaster and data for gas estimation if using a paymaster (default: noop)
2. `feeEstimator` - Estimates the fees for a transaction. If you are using Wallet APIs RPCs, use the [`alchemyFeeEstimator`](/docs/wallets/reference/account-kit/infra) middleware.
2. `feeEstimator` - Estimates the fees for a transaction. If you are using Wallet APIs RPCs, use the [`alchemyFeeEstimator`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/infra/src/middleware/feeEstimator.ts) middleware.
3. `gasEstimator` - Estimates the gas limits for a transaction. The default middleware calls the underlying RPC to `eth_estimateUserOperationGas`.
4. `customMiddleware` - Allows you to define custom middleware to run before requesting sponsorship if there are any additional steps you need to take before requesting sponsorship. (default: noop)
5. `paymasterAndData` - Requests gas sponsorship. (default: noop)
Expand Down
4 changes: 2 additions & 2 deletions content/wallets/pages/core/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ how you can leverage this package to build your own integration with Wallet APIs

`@account-kit/core` is itself a higher level wrapper around the three lower level SDKs:

* [`@account-kit/infra`](/docs/wallets/reference/account-kit/infra) - this package contains all of the Smart Account Client and Gas Manager definitions you need to interact with the infrastructure services.
* [`@account-kit/infra`](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/account-kit/infra) - this package contains all of the Smart Account Client and Gas Manager definitions you need to interact with the infrastructure services.
* [`@account-kit/signer`](/docs/wallets/signer/what-is-a-signer) - this package contains all of the utilities you need to instantiate and interact with the authentication service. This allows you to provision wallets for your users that can be used as owners on smart wallets.
* [`@account-kit/smart-contracts`](/docs/wallets/reference/account-kit/smart-contracts) - this package contains all definitions for the smart contracts and allows you to provision and deploy smart contracts for your users seamlessly.
* [`@account-kit/smart-contracts`](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/account-kit/smart-contracts) - this package contains all definitions for the smart contracts and allows you to provision and deploy smart contracts for your users seamlessly.

Using these packages directly offers you the most control over your stack, but requires significantly more work to get started.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ any other provider's URL.

## Splitting bundler traffic and node RPC traffic

You may want to use a different RPC provider for your bundler traffic and your node traffic. This is a common use case, and you can do this by leveraging the [`split`](/docs/wallets/reference/aa-sdk/core/functions/split) transport and passing it to your `createSmartAccountClient` call. For example:
You may want to use a different RPC provider for your bundler traffic and your node traffic. This is a common use case, and you can do this by leveraging the [`split`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/aa-sdk/core/src/transport/split.ts) transport and passing it to your `createSmartAccountClient` call. For example:

### Bundler and Gas Manager with third-party RPCs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ const smartAccountClient = createLightAccountAlchemyClient({

To use non-Alchemy supported chains, use the `createSmartAccountClient` method from `@aa-sdk/core` or any of the non-Alchemy `create*Client` methods exported from `@account-kit/smart-contracts` with a `chain` definition for your chain and a `transport` pointing to your RPC provider.

See [`createSmartAccountClient`](/docs/wallets/reference/aa-sdk/core/functions/createSmartAccountClient) for more information.
See [`createSmartAccountClient`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/aa-sdk/core/src/client/smartAccountClient.ts) for more information.
2 changes: 1 addition & 1 deletion content/wallets/pages/react-native/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ slug: wallets/react-native/overview
import { ExpoIcon } from "../../components/icons/ExpoIcon";
import { ReactNativeIcon } from "../../components/icons/ReactNativeIcon";

A simple example for reference purposes is available [here](https://github.com/alchemyplatform/aa-sdk/tree/main/examples/react-native-expo-example). This was built using Expo, but the same principles apply to a bare React Native app as well.
A simple example for reference purposes is available [here](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/examples/react-native-expo-example). This was built using Expo, but the same principles apply to a bare React Native app as well.

## Getting Started

Expand Down
4 changes: 2 additions & 2 deletions content/wallets/pages/react/customization/theme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Theme customizations and styling are passed through `withAccountKitUi`, the Wall

## Colors

The [Wallet APIs Theme](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/tailwind/types.ts) object passed to `withAccountKitUi` supports an overridable `colors` object which accepts a set of color values. Each color is a key-value pair where the key is the name of the color and the value is an object containing the `light` and `dark` mode value to use.
The [Wallet APIs Theme](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/tailwind/types.ts) object passed to `withAccountKitUi` supports an overridable `colors` object which accepts a set of color values. Each color is a key-value pair where the key is the name of the color and the value is an object containing the `light` and `dark` mode value to use.

### Border colors

Expand Down Expand Up @@ -173,7 +173,7 @@ The available options are:

Unlike colors and border radius, illustration styles are not passed through the Tailwind plugin.

Customize the illustration style of various icons used in the components by passing one of the [enum values](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/types.ts) to `illustrationStyle` in your `uiConfig` when you call `createConfig`.
Customize the illustration style of various icons used in the components by passing one of the [enum values](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/types.ts) to `illustrationStyle` in your `uiConfig` when you call `createConfig`.

```ts twoslash
import { createConfig } from "@account-kit/react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ This command passes in flags to use Typescript, Tailwind and the next app router

You need these three libraries:

* **@account-kit/infra**: Core interfaces and functions for Wallet APIs ([learn more](/docs/wallets/reference/account-kit/infra))
* **@account-kit/react**: React Hooks, components and utilities for Wallet APIs ([learn more](/docs/wallets/reference/account-kit/react))
* **@account-kit/infra**: Core interfaces and functions for Wallet APIs ([learn more](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/account-kit/infra))
* **@account-kit/react**: React Hooks, components and utilities for Wallet APIs ([learn more](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/account-kit/react))
* **@tanstack/react-query**: A required async state library to make Wallet APIs react hooks easier to use ([learn more about this library's motivation here](https://tanstack.com/query/latest/docs/framework/react/overview))

Go ahead and install them to the project with a single command:
Expand Down
2 changes: 1 addition & 1 deletion content/wallets/pages/react/login-methods/eoa-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If you don't want to use pre-built UI components, you can use React hooks to cus

### EVM connectors

Use the [useConnect](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useConnect) hook to allow users to connect their EOA via available connectors:
Use the [useConnect](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useConnect.ts) hook to allow users to connect their EOA via available connectors:

```tsx twoslash
// @noErrors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type PasskeyAuthType = {
};
```

You can find the full type definition in the [Account Kit source code](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/components/auth/types.ts).
You can find the full type definition in the [Account Kit source code](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/components/auth/types.ts).

For more details on UI component customization, see the [UI Components](/docs/wallets/react/ui-components) documentation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type SocialAuthType = {
};
```

You can find the full type definition in the [Account Kit source code](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/components/auth/types.ts).
You can find the full type definition in the [Account Kit source code](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/components/auth/types.ts).

For more details on UI component customization, see the [UI Components](/docs/wallets/react/ui-components) documentation.

Expand Down
2 changes: 1 addition & 1 deletion content/wallets/pages/react/solana-wallets/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function MyComponent() {

## Using the `useSolanaTransaction` hook

If you want to connect to a user’s Solana Wallet and send transactions, you should use the [`useSolanaTransaction`](/docs/wallets/reference/account-kit/react/hooks/useSolanaTransaction) hook. This hook also exposes the Solana wallet address through the `signer.address` parameter.
If you want to connect to a user’s Solana Wallet and send transactions, you should use the [`useSolanaTransaction`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useSolanaTransaction.ts) hook. This hook also exposes the Solana wallet address through the `signer.address` parameter.

## Not using React hooks?

Expand Down
8 changes: 4 additions & 4 deletions content/wallets/pages/react/ui-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If your users have an authenticator app (TOTP) set up, the UI components will au

## Modal auth

Assuming your application has been [set up](/docs/wallets/react/quickstart), using UI components is the easiest way to authenticate users. All you have to do is leverage the [`useAuthModal`](/docs/wallets/reference/account-kit/react/hooks/useAuthModal) hook and provide users a CTA to open the modal.
Assuming your application has been [set up](/docs/wallets/react/quickstart), using UI components is the easiest way to authenticate users. All you have to do is leverage the [`useAuthModal`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useAuthModal.ts) hook and provide users a CTA to open the modal.

```tsx twoslash
import React from "react";
Expand All @@ -43,7 +43,7 @@ export default function MyPage() {
}
```

That's it! When the user clicks that button, the modal will open and they can complete authentication. Once they are authenticated, you can use the [`useAccount`](/docs/wallets/reference/account-kit/react/hooks/useAccount) hook to get the logged in user's SCA address.
That's it! When the user clicks that button, the modal will open and they can complete authentication. Once they are authenticated, you can use the [`useAccount`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useAccount.ts) hook to get the logged in user's SCA address.

**Want to display a loading state during authentication?** <br />
For authentication with redirects in a modal, you may want to add a loading state when users are waiting for authentication to complete.
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function MyLoginPage() {
}
```

That's it! The user can now input their credentials and complete login. Once they are authenticated, you can use the [`useAccount`](/docs/wallets/reference/account-kit/react/hooks/useAccount) hook to get the logged in user's SCA address.
That's it! The user can now input their credentials and complete login. Once they are authenticated, you can use the [`useAccount`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useAccount.ts) hook to get the logged in user's SCA address.

## Customize authentication UI

Expand All @@ -96,7 +96,7 @@ When rendering the authentication component to your users, it's possible to cust
* `sections` object is an array of arrays representing the various sections in descending order, each section (element in the outer array) separated by a divider in the UI
* each item within a section is an `AuthTypes` objects containing configuration parameters for that authentication method.

**The following [`AuthTypes`](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/components/auth/types.ts)
**The following [`AuthTypes`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/components/auth/types.ts)
can be passed into sections:**

### Email
Expand Down
8 changes: 4 additions & 4 deletions content/wallets/pages/recipes/hyperliquid-wallets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ The most important step is getting your API key (`NEXT_PUBLIC_ALCHEMY_API_KEY`)

<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764187311/docs/aa-sdk/images/hyperliquid-dashboard-support.png" alt="Hyperliquid dashboard support" />

Next, navigate to your `page.tsx`, and get the embedded EOA address using [useSigner()](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSigner). This new embedded EOA will be where user assets live and will sign transactions.
Next, navigate to your `page.tsx`, and get the embedded EOA address using [useSigner()](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useSigner.ts). This new embedded EOA will be where user assets live and will sign transactions.

```tsx
const signer = useSigner();
```

Note: to access your embedded EOA, you need to have finished authentication. To check your authentication status, use [useSignerStatus()](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSignerStatus). For example:
Note: to access your embedded EOA, you need to have finished authentication. To check your authentication status, use [useSignerStatus()](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useSignerStatus.ts). For example:

```tsx
...
Expand Down Expand Up @@ -230,7 +230,7 @@ export const HYPERLIQUID_CALLDATA = (() => {

### Using React

If you are working in React, you can use the [useSendUserOperation](https://www.alchemy.com/docs/wallets/reference/account-kit/react/hooks/useSendUserOperation) hook. Make sure you have set up your config from step 1.
If you are working in React, you can use the [useSendUserOperation](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useSendUserOperation.ts) hook. Make sure you have set up your config from step 1.

```tsx
import React from "react";
Expand Down Expand Up @@ -279,7 +279,7 @@ export default ComponentWithSendUserOperation;

### Without React

If you are not using React, you can send the same user operation directly with the [Modular Account V2 client](https://www.alchemy.com/docs/wallets/reference/account-kit/smart-contracts/functions/createModularAccountV2Client) in account-kit, passing in the chain config from step 1 and signer from step 2.
If you are not using React, you can send the same user operation directly with the [Modular Account V2 client](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/smart-contracts/src/ma-v2/client/client.ts) in account-kit, passing in the chain config from step 1 and signer from step 2.

```ts
import { createModularAccountV2Client } from "@account-kit/smart-contracts";
Expand Down
4 changes: 2 additions & 2 deletions content/wallets/pages/recipes/multi-chain-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const config = createConfig({

## Change chains

Once your app is configured to use multiple chains, you can switch between them at any time using the [`useChain`](/docs/wallets/reference/account-kit/react/hooks/useChain) hook.
Once your app is configured to use multiple chains, you can switch between them at any time using the [`useChain`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/react/src/hooks/useChain.ts) hook.

```tsx twoslash
import React from "react";
Expand Down Expand Up @@ -94,7 +94,7 @@ export const config = createConfig({

## Change chains

Once your app is configured to use multiple chains, you can switch between them at any time using the [`setChain`](/docs/wallets/reference/account-kit/core/functions/setChain) function.
Once your app is configured to use multiple chains, you can switch between them at any time using the [`setChain`](https://github.com/alchemyplatform/aa-sdk/blob/v4.x.x/account-kit/core/src/actions/setChain.ts) function.

<Tip>
Changing the chain will trigger state changes in your app (eg. the
Expand Down
2 changes: 1 addition & 1 deletion content/wallets/pages/recipes/smart-wallets-aave.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
slug: wallets/recipes/smart-wallets-aave
---

Learn how to build DeFi applications that interact with Aave using Wallet APIs. This recipe covers supplying and withdrawing assets with both the [Core library](/docs/wallets/reference/aa-sdk/core) and the [Wallet APIs](/docs/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-request-account) for seamless user experiences.
Learn how to build DeFi applications that interact with Aave using Wallet APIs. This recipe covers supplying and withdrawing assets with both the [Core library](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x/aa-sdk/core) and the [Wallet APIs](/docs/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-request-account) for seamless user experiences.

## Prerequisites

Expand Down
Loading
Loading