Skip to content

Commit

Permalink
Merge branch 'alchemyplatform:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
moldy530 authored Feb 1, 2024
2 parents e2637b4 + 6965d74 commit 86c511b
Show file tree
Hide file tree
Showing 42 changed files with 340 additions and 382 deletions.
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export { isSmartAccountClient } from "./client/isSmartAccountClient.js";
export {
ConnectionConfigSchema,
SmartAccountClientOptsSchema as SmartAccountProviderOptsSchema,
createPublicErc4337ClientSchema,
} from "./client/schema.js";
export type * from "./client/smartAccountClient.js";
export {
Expand Down
2 changes: 1 addition & 1 deletion site/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineConfig({
logo: "/kit-logo.svg",
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Docs", link: "/overview/getting-started" },
{ text: "Docs", link: "/getting-started/setup" },
{
text: "Examples",
link: "https://github.com/alchemyplatform/aa-sdk/tree/main/examples",
Expand Down
75 changes: 57 additions & 18 deletions site/.vitepress/sidebar/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,35 @@ export const newSidebar: DefaultTheme.Sidebar = [
{
text: "Getting Started",
items: [
{ text: "Setup your project", link: "/overview/getting-started" },
{ text: "Deploy your first account", link: "/smart-accounts/overview" },
{ text: "Setup your project", link: "/getting-started/setup" },
{
text: "Deploy your first account",
link: "/getting-started/deploy-an-account",
},
// I'm leaving these here for now because I'm not sure if we still want them
// There's good content in here so we may want to keep it somewhere
{
text: "What is Account Kit?",
link: "/overview/introduction",
},
{
text: "Why Account Kit?",
link: "/overview/why-account-kit",
},
{
text: "FAQs",
link: "/faqs",
},
],
},
{
text: "Choosing a Smart Account",
items: [
{ text: "Introduction", link: "/" },
{ text: "Introduction", link: "/smart-accounts/" },
{
text: "Modular Account",
collapsed: false,
base: "/smart-accounts/modular-account",
items: [
{ text: "Introduction", link: "/" },
{ text: "Getting started", link: "/" },
Expand All @@ -24,22 +42,18 @@ export const newSidebar: DefaultTheme.Sidebar = [
},
{
text: "Light Account",
collapsed: true,
items: [
{ text: "Introduction", link: "/" },
{ text: "Getting started", link: "/" },
{ text: "Deployments", link: "/" },
],
link: "/smart-accounts/light-account/",
},
{
text: "Custom Accounts",
collapsed: true,
base: "/smart-accounts/custom",
items: [
{ text: "Use your own", link: "/" },
{ text: "Contribute your account", link: "/" },
{ text: "Use your own", link: "/using-your-own" },
{ text: "Contribute your account", link: "/contributing" },
],
},
{ text: "Gas Benchmarks", link: "/" },
{ text: "Gas Benchmarks", link: "/smart-accounts/gas-benchmarks" },
],
},
{
Expand Down Expand Up @@ -85,17 +99,42 @@ export const newSidebar: DefaultTheme.Sidebar = [
},
{
text: "Using Smart Accounts",
base: "/using-smart-accounts",
items: [
{ text: "Send User Operations", link: "/" },
{ text: "Batch User Operations", link: "/" },
{ text: "Simulate User Operations", link: "/" },
{ text: "Send User Operations", link: "/send-user-operations" },
{ text: "Batch User Operations", link: "/batch-user-operations" },
{
text: "Sponsoring Gas",
collapsed: false,
base: "/using-smart-accounts/sponsoring-gas",
items: [
{ text: "Alchemy Gas Manager", link: "/gas-manager" },
{ text: "Check Eligibility", link: "/checking-eligibility" },
],
},
{ text: "Simulate User Operations", link: "/simulate-user-operations" },
{
text: "Transfer Ownership",
base: "/using-smart-accounts/transfer-ownership",
collapsed: false,
items: [{ text: "Modular Account" }, { text: "Light Account" }],
items: [
{ text: "Modular Account", link: "/modular-account" },
{ text: "Light Account", link: "/light-account" },
],
},
{ text: "Session Keys", link: "/session-keys" },
{
text: "Alchemy Enhanced Apis",
base: "/using-smart-accounts/enhanced-apis",
collapsed: true,
items: [
{
text: "Get Account's NFTs",
link: "/nft",
},
{ text: "Get Account's Tokens", link: "/token" },
],
},
{ text: "Session Keys", link: "/" },
{ text: "Alchemy Enhanced Apis", link: "/" },
],
},
{
Expand Down
6 changes: 3 additions & 3 deletions site/overview/faqs.md → site/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Right now, `UserOperation`s are sent to a private mempool for all networks other
### Can I simulate `UserOperation`s the same way I simulate transactions?

::: details Answer
Yes! Check out [this guide](/tutorials/sim-user-operation.html).
Yes! Check out [this guide](/using-smart-accounts/simulate-user-operations.html).
:::

## Gas Estimation
Expand Down Expand Up @@ -106,7 +106,7 @@ Gas sponsorship is available on testnet for all tiers. For support on mainnet, y
### How is gas sponsored? Do I need to fund the Gas Manager?

::: details Answer
We front the gas for your application and put the USD equivalent on your bill at the end of the month. No need to worry about pre-funding the Gas Manager or conversions, we’ve got you covered! You can follow [this guide](/tutorials/sponsoring-gas/sponsoring-gas.html) for more details on how to sponsor `UserOperation`s.
We front the gas for your application and put the USD equivalent on your bill at the end of the month. No need to worry about pre-funding the Gas Manager or conversions, we’ve got you covered! You can follow [this guide](/using-smart-accounts/sponsoring-gas/gas-manager.html) for more details on how to sponsor `UserOperation`s.
:::

### What are my gas sponsorship limits?
Expand All @@ -124,7 +124,7 @@ Currently, we don’t support this, but we are actively exploring. Please [reach
### How is the Gas Manager protected from DDOS attacks?

::: details Answer
In your Gas Manager policy, you can configure spending rules per address, per app, and/or policy wide limits. See how to set up these policies [here](/tutorials/sponsoring-gas/sponsoring-gas.html#_2-create-a-gas-manager-policy).
In your Gas Manager policy, you can configure spending rules per address, per app, and/or policy wide limits. See how to set up these policies [here](/using-smart-accounts/sponsoring-gas/gas-manager.html#_2-create-a-gas-manager-policy).
:::

## Common Errors {#common-errors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ outline: deep
head:
- - meta
- property: og:title
content: Smart Accounts
content: Deploy your first account
- - meta
- name: description
content: Follow this guide to understand the end-to-end process of integrating smart accounts in your applications with Account Kit.
Expand All @@ -16,14 +16,9 @@ head:
- - meta
- name: twitter:description
content: Follow this guide to understand the end-to-end process of integrating smart accounts in your applications with Account Kit.
prev:
text: Packages Overview
link: /package-overview
next:
text: Choosing a Smart Account
---

# Overview
# Deploy your first account

In this guide we'll explain the end-to-end journey of integrating smart accounts in your applications with Account Kit. We'll cover the necessary steps such as creating an Alchemy account, selecting the right account and Signer and sending a User Operation. Additionally, we'll touch upon advanced functionalities like sponsoring gas, batching transactions and transferring ownership.

Expand All @@ -33,29 +28,30 @@ Before diving into smart accounts, it's important to [set up your Alchemy accoun

## 2. Deploying a Smart Account

The next step is to select the right smart account implementation for your application. We recommend using `LightAccount`, which is a simple, secure, and cost-effective solution for most use cases. It supports features such as owner transfers, [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) message signing, batched transactions and more. However, if you're looking for more advanced features, you can use your own account implementation. We'll cover both options in detail in the following sections:
The next step is to select the right smart account implementation for your application. We recommend using `ModularAccount`, [TODO: WILL HALP ME WITH YOUR WORDS]. We'll cover all the options in detail in the following sections:

- [Using Light Account](/smart-accounts/accounts/guides/light-account)
- [Using your own account implementation](/smart-accounts/accounts/guides/using-your-own)
- [Using Modular Accounts](/smart-accounts/modular-account/)
- [Using Light Account](/smart-accounts/light-account/)
- [Using your own account implementation](/smart-accounts/custom/using-your-own)

::: tip Note
The `LightAccount` implementation is not [ERC-6900](/smart-accounts/accounts/guides/modular-account) compliant. The `ModularAccount` implementation is launching later this year and will be EIP-6900 compatible. However, `LightAccount` is forward-compatible with `ModularAccount` and can be upgraded to it in the future.
The `LightAccount` implementation is not [ERC-6900](/smart-accounts/modular-account/) compliant. The `ModularAccount` implementation is launching later this year and will be EIP-6900 compatible. However, `LightAccount` is forward-compatible with `ModularAccount` and can be upgraded to it in the future.
:::

## 3. Choosing a Signer

A Signer is the entity that signs transactions (User Operations) on behalf of the smart account. It can be an EOA, a custodial service, or a multi-party computation (MPC) service. We explain the different types of signers in detail in the [overview](signers/choosing-a-signer) section on choosing a Signer and offer integration guides in these docs, many of which use our `aa-signers` SDK.
A Signer is the entity that signs transactions (User Operations) on behalf of the smart account. It can be an EOA, a custodial service, or a multi-party computation (MPC) service. We explain the different types of signers in detail in the [overview](/smart-accounts/signers/choosing-a-signer) section on choosing a Signer and offer integration guides in these docs, many of which use our `aa-signers` SDK.

At this point you should be able to integrate smart accounts in your application. However, there are a few advanced features that can help you improve the user experience and save on gas costs. Information about these can be found in the `Guides` section.

## 4. Sponsoring Gas

Being able to sponsor gas for your users is one of the most powerful features enabled by smart accounts and can help you build a seamless user experience. We'll cover this in detail with code examples in the [Sponsoring Gas](/tutorials/sponsoring-gas/sponsoring-gas) section.
Being able to sponsor gas for your users is one of the most powerful features enabled by smart accounts and can help you build a seamless user experience. We'll cover this in detail with code examples in the [Sponsoring Gas](/using-smart-accounts/sponsoring-gas/gas-manager) section.

## 5. Batching Transactions

Transaction batching allows you to bundle multiple transaction calls into a single User Operation and execute them in a single atomic transaction. This can help you save on gas costs and improve the user experience. We'll cover this in detail with code examples in the [Batching Transactions](/tutorials/batching-transactions) section.
Transaction batching allows you to bundle multiple transaction calls into a single User Operation and execute them in a single atomic transaction. This can help you save on gas costs and improve the user experience. We'll cover this in detail with code examples in the [Batching Transactions](/using-smart-accounts/batch-user-operations) section.

## 6. Transferring Ownership

Ownership is an important aspect of smart accounts. The Light Account implementation allows you to transfer the ownership of a smart account to another entity. We'll cover this in detail with code examples in the [Transferring Ownership](/tutorials/transferring-ownership) section.
Ownership is an important aspect of smart accounts. The Light Account implementation allows you to transfer the ownership of a smart account to another entity. We'll cover this in detail with code examples in the [Transferring Ownership](/using-smart-accounts/transfer-ownership/light-account) section.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Smart Account Address: 0xYOUR_SMART_ACCOUNT_ADDRESS

To deploy the smart account and send UOs on its behalf, you'll need to add native token to your smart account.

At scale, you might consider using our Gas Manager to [sponsor UserOperations](/tutorials/sponsoring-gas/sponsoring-gas) for smart accounts. But for the purpose of this example, and because we're using a testnet, let's fund the account using the [Alchemy Faucet](https://sepoliafaucet.com). Make sure to log in with Alchemy to receive your testnet tokens.
At scale, you might consider using our Gas Manager to [sponsor UserOperations](/using-smart-accounts/sponsoring-gas/gas-manager) for smart accounts. But for the purpose of this example, and because we're using a testnet, let's fund the account using the [Alchemy Faucet](https://sepoliafaucet.com). Make sure to log in with Alchemy to receive your testnet tokens.

<img src="/images/alchemy-faucet.png" width="auto" height="auto" alt="Account Kit Overview" style="display: block; margin: auto;">

Expand Down Expand Up @@ -163,12 +163,12 @@ In this guide, we initialized an `AlchemyProvider` with the `aa-alchemy` package

1. To learn more about the different packages and their use cases, check out the [Packages Overview](/overview/package-overview) page.

2. To learn about the end-to-end process of integrating smart accounts in your applications, check out the section on [Smart Accounts](/smart-accounts/overview).
2. To learn about the end-to-end process of integrating smart accounts in your applications, check out the section on [Smart Accounts](/smart-accounts/).

3. To learn about the `owner` field on your smart account, check out the section on [Choosing a Signer](/smart-accounts/signers/choosing-a-signer) to own the smart account.

4. To learn more about different User Operations you can send with different `target` and `data` fields in the `sendUserOperation` function above, look at our [How to Send a User Operation](/tutorials/send-user-operation) guide for an example using NFT mints.
4. To learn more about different User Operations you can send with different `target` and `data` fields in the `sendUserOperation` function above, look at our [How to Send a User Operation](/using-smart-accounts/send-user-operations) guide for an example using NFT mints.

5. To explore more ways to use Account Kit, check out the many step-by-step guides, such as [How to Sponsor Gas for a User Operation](/tutorials/sponsoring-gas/sponsoring-gas) or [How to Fetch Smart Account Data](/tutorials/enhanced-apis/nft).
5. To explore more ways to use Account Kit, check out the many step-by-step guides, such as [How to Sponsor Gas for a User Operation](/using-smart-accounts/sponsoring-gas/gas-manager) or [How to Fetch Smart Account Data](/using-smart-accounts/enhanced-apis/nft).

6. To see Account Kit in action, check out our [Demos](/overview/demos).
Loading

0 comments on commit 86c511b

Please sign in to comment.