diff --git a/docs/pages/guides/eip7702/faqs.mdx b/docs/pages/guides/eip7702/faqs.mdx index 8bb0a81e..17e00008 100644 --- a/docs/pages/guides/eip7702/faqs.mdx +++ b/docs/pages/guides/eip7702/faqs.mdx @@ -1,5 +1,7 @@ # EIP-7702 FAQs +Answers to common questions about EIP-7702 — what it is, how it relates to ERC-4337, which chains Pimlico supports it on, and how EOAs transition into smart accounts under the new transaction type. + ## What is EIP-7702? EIP-7702 is a proposal that allows EOAs to become smart accounts. It is going live in the Pectra hard fork on Ethereum Mainnet on May 7, but it is already live on some other chains like BSC Mainnet and Odyssey Testnet. diff --git a/docs/pages/guides/eip7702/index.mdx b/docs/pages/guides/eip7702/index.mdx index 736299e0..632d3f39 100644 --- a/docs/pages/guides/eip7702/index.mdx +++ b/docs/pages/guides/eip7702/index.mdx @@ -1,6 +1,6 @@ # EIP-7702 -EIP-7702 is a proposal set for inclusion in the upcoming 2025 Pectra hardfork. The proposal introduces a new transaction type that allows EOA's to assign a "delegation designator" to their account. The delegation designator points to a smart contract and when a transaction is sent to the EOA, it executes the code at the designated address. +EIP-7702 is a transaction type — shipped as part of the Pectra hardfork that activated on Ethereum mainnet in May 2025 — that lets EOAs assign a "delegation designator" pointing to a smart contract. Once set, transactions sent to the EOA execute the code at the designated address. This unlocks huge benefits for EOAs, as they can now access smart account features such as batching transactions, gas sponsorships, passkeys as signers, and more. diff --git a/docs/pages/guides/how-to/accounts/comparison.mdx b/docs/pages/guides/how-to/accounts/comparison.mdx index 88de8172..ec0d5d86 100644 --- a/docs/pages/guides/how-to/accounts/comparison.mdx +++ b/docs/pages/guides/how-to/accounts/comparison.mdx @@ -1,6 +1,6 @@ # Difference between various Smart Account types in permissionless.js -permissionless.js supports 8 types of accounts. Below is an overview of each account type and their key features: +permissionless.js supports 8 ERC-4337 smart account implementations — Safe, Kernel, Nexus, Simple Smart Account, LightAccount, TrustWallet, Etherspot, and Thirdweb. This page compares each one by its key features so you can pick the right account for your application. 1. **Safe** 2. **Kernel** diff --git a/docs/pages/guides/how-to/accounts/use-coinbase-account.mdx b/docs/pages/guides/how-to/accounts/use-coinbase-account.mdx index cc75dae6..a355809c 100644 --- a/docs/pages/guides/how-to/accounts/use-coinbase-account.mdx +++ b/docs/pages/guides/how-to/accounts/use-coinbase-account.mdx @@ -1,8 +1,7 @@ # How to create and use a Coinbase smart account with permissionless.js +Coinbase smart wallet accounts are supported natively by viem. We recommend using the native viem implementation for which the documentation [can be found here](https://viem.sh/account-abstraction/accounts/smart/toCoinbaseSmartAccount). :::warning[Warning] You should still use permissionless to fetch gas prices. As the bundler might not accept the prices fetched from viem. To learn how to use permissionless to fetch gas prices, [check out this guide](/references/permissionless/reference/pimlico-actions/getUserOperationGasPrice#getuseroperationgasprice). ::: - -Coinbase smart wallet accounts are supported natively by viem. We recommend using the native viem implementation for which the documentation [can be found here](https://viem.sh/account-abstraction/accounts/smart/toCoinbaseSmartAccount). \ No newline at end of file diff --git a/docs/pages/guides/how-to/accounts/use-kernel-account.mdx b/docs/pages/guides/how-to/accounts/use-kernel-account.mdx index 4292ee2b..494da5c5 100644 --- a/docs/pages/guides/how-to/accounts/use-kernel-account.mdx +++ b/docs/pages/guides/how-to/accounts/use-kernel-account.mdx @@ -1,11 +1,11 @@ # How to create and use a Kernel account with permissionless.js +[Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). + :::info ZeroDev, the author of Kernel, maintains their own in-house SDK built closely on top of permissionless.js that you can use for the account system while still plugging in all the other components from permissionless.js. Take a look at [their documentation](https://docs.zerodev.app) for more information. ::: -[Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). - ## Picking an EntryPoint Kernel is compatible with EntryPoint versions v0.6 and v0.7. diff --git a/docs/pages/guides/how-to/accounts/use-metamask-account.mdx b/docs/pages/guides/how-to/accounts/use-metamask-account.mdx index 71c0790c..d4501fda 100644 --- a/docs/pages/guides/how-to/accounts/use-metamask-account.mdx +++ b/docs/pages/guides/how-to/accounts/use-metamask-account.mdx @@ -1,11 +1,11 @@ # How to use MetaMask Smart Accounts with permissionless.js +The [MetaMask Delegation Toolkit](https://docs.metamask.io/delegation-toolkit/get-started/quickstart) is a collection of tools for creating MetaMask Smart Accounts. A smart account can delegate to another signer with granular permission sharing. It is built over [ERC-7710](https://eip.tools/eip/7710) and [ERC-7715](https://eip.tools/eip/7715) to support a standardized minimal interface. Requesting ERC-7715 permissions and redeeming ERC-7710 delegations are experimental features. + :::info MetaMask maintains their own in-house SDK built closely on top of viem that you can use for the account system while still plugging in all the other components from permissionless.js. Take a look at [their documentation](https://docs.metamask.io/delegation-toolkit/how-to/send-user-operation) for more information. ::: -The [MetaMask Delegation Toolkit](https://docs.metamask.io/delegation-toolkit/get-started/quickstart) is a collection of tools for creating MetaMask Smart Accounts. A smart account can delegate to another signer with granular permission sharing. It is built over [ERC-7710](https://eip.tools/eip/7710) and [ERC-7715](https://eip.tools/eip/7715) to support a standardized minimal interface. Requesting ERC-7715 permissions and redeeming ERC-7710 delegations are experimental features. - There are two types of accounts involved in delegation: 1. **Delegator account**: A smart account that supports programmable account behavior and advanced features such as multi-signature approvals, automated transaction batching, and custom security policies. diff --git a/docs/pages/guides/how-to/accounts/use-thirdweb-account.mdx b/docs/pages/guides/how-to/accounts/use-thirdweb-account.mdx index 0fbcd838..9222445e 100644 --- a/docs/pages/guides/how-to/accounts/use-thirdweb-account.mdx +++ b/docs/pages/guides/how-to/accounts/use-thirdweb-account.mdx @@ -1,5 +1,7 @@ # How to create and use a Thirdweb account with permissionless.js +[Thirdweb](https://thirdweb.com) provides a managed smart account implementation that integrates with their developer platform. This guide walks through creating a Thirdweb smart account with permissionless.js and sending user operations through a bundler and optional paymaster. + ## Picking an EntryPoint Thirdweb is compatible with EntryPoint versions v0.6 and v0.7. In this guide, we will use EntryPoint v0.7. diff --git a/docs/pages/guides/how-to/accounts/use-trustwallet-account.mdx b/docs/pages/guides/how-to/accounts/use-trustwallet-account.mdx index 3781b3d1..0a3333b8 100644 --- a/docs/pages/guides/how-to/accounts/use-trustwallet-account.mdx +++ b/docs/pages/guides/how-to/accounts/use-trustwallet-account.mdx @@ -1,14 +1,14 @@ # How to create and use a Trust smart account with permissionless.js +Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). +After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. + :::info [Trust Wallet](https://trustwallet.com/), the author of [Barz](https://github.com/trustwallet/barz), provides a smart contract security monitoring service for each and every Barz deployed on-chain including Barz created by SDK. This is a service that TrustWallet provides to builders to build innovative products on top of a secure foundation. Monitoring will automatically start as soon as the Barz account is deployed on-chain; for projects wanting to get security monitoring information, reach out to the smart wallet channel in [TrustWallet Discord](https://discord.gg/trustwallet). ::: -Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). -After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. - With the recent opensource of their Smart Wallet system Barz, their smart account solution, together with their security infrastructure is disclosed for public to support builders build products on a secure foundation. This guide will walk you through how to create and use a Barz account with permissionless.js diff --git a/docs/pages/guides/how-to/erc20-paymaster/architecture.mdx b/docs/pages/guides/how-to/erc20-paymaster/architecture.mdx index c77f8cf9..8c7cc1a7 100644 --- a/docs/pages/guides/how-to/erc20-paymaster/architecture.mdx +++ b/docs/pages/guides/how-to/erc20-paymaster/architecture.mdx @@ -1,5 +1,7 @@ # ERC-20 Paymaster Architecture +This page explains the design of Pimlico's ERC-20 Paymaster — an ERC-4337 paymaster that pays user gas fees in exchange for ERC-20 tokens drawn from the user — including the off-chain pricing API and the formula used to estimate the token cost of a user operation. + :::info You can view the whole ERC-20 Paymaster contract [in our repository](https://github.com/pimlicolabs). diff --git a/docs/pages/guides/how-to/erc20-paymaster/faqs.mdx b/docs/pages/guides/how-to/erc20-paymaster/faqs.mdx index f7ab208f..5893475d 100644 --- a/docs/pages/guides/how-to/erc20-paymaster/faqs.mdx +++ b/docs/pages/guides/how-to/erc20-paymaster/faqs.mdx @@ -1,5 +1,7 @@ # ERC-20 Paymaster FAQs +Answers to common questions about Pimlico's ERC-20 Paymaster — what a paymaster is, how the ERC-20 variant works, which tokens and chains are supported, and how fees are charged. + ## What is a paymaster? A Paymaster is a special smart contract under the [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) specification that user operations are able to delegate the responsibility of gas fee payments to. This means that ERC-4337 smart contract wallets no longer need to necessarily be responsible for directly paying gas fees in ETH. The paymaster contracts are able to use custom logic (with certain limitations) to decide whether or not they are willing to sponsor a user operation. diff --git a/docs/pages/guides/how-to/erc20-paymaster/index.mdx b/docs/pages/guides/how-to/erc20-paymaster/index.mdx index 68239e44..06ddea24 100644 --- a/docs/pages/guides/how-to/erc20-paymaster/index.mdx +++ b/docs/pages/guides/how-to/erc20-paymaster/index.mdx @@ -1,9 +1,9 @@ # ERC-20 Paymaster -![Landscape](/erc20paymaster.png) - Pimlico's ERC-20 Paymaster is a ERC-4337 paymaster that is able to pay for the gas fees of your users in exchange for ERC-20 tokens. +![Landscape](/erc20paymaster.png) + ## Tutorials Learning-oriented lessons that take you through a series of steps to complete a project. Most useful when you want to get started with Pimlico. They all involve the Alto Bundler. diff --git a/docs/pages/guides/how-to/gas-programs/gas-program.mdx b/docs/pages/guides/how-to/gas-programs/gas-program.mdx index c5a2de98..feb084a2 100644 --- a/docs/pages/guides/how-to/gas-programs/gas-program.mdx +++ b/docs/pages/guides/how-to/gas-programs/gas-program.mdx @@ -1,11 +1,11 @@ # How to create a gas program on Pimlico +If you are a chain operator and you would like to be able to easily give out and track gas credits to developers building on your chain, you can create and manage a gas station program using Pimlico sponsorship policies. + :::info This guide is for chain operators who want to create a gas program on Pimlico. If you are a developer looking to use a gas program made by someone else or looking to sponsor your own user operations, you should instead look in the [sponsorship policies guide](/guides/how-to/sponsorship-policies). ::: -If you are a chain operator and you would like to be able to easily give out and track gas credits to developers building on your chain, you can create and manage a gas station program using Pimlico sponsorship policies. - ::::steps ### Create a Pimlico account @@ -48,4 +48,4 @@ After you have created the policy, you should see a page where you can copy a li To use the policy, the grantee will need to have a Pimlico account and will need to click on the link to claim the authorization, and will then be able to use that authorization to pay for gas on your chain as if it was a policy that they owned. More information about using sponsorship policies can be found in the [relevant guide](/guides/how-to/sponsorship-policies). -:::: \ No newline at end of file +:::: diff --git a/docs/pages/guides/how-to/gas-programs/use.mdx b/docs/pages/guides/how-to/gas-programs/use.mdx index 3ecd33ae..9b4bef44 100644 --- a/docs/pages/guides/how-to/gas-programs/use.mdx +++ b/docs/pages/guides/how-to/gas-programs/use.mdx @@ -1,5 +1,7 @@ # How to use the claimed gas grant +Once you have claimed a gas grant from a chain operator's gas program, you can apply it like any other sponsorship policy. This guide shows how to wire the claimed sponsorship policy ID into user operations with permissionless.js so the grant covers gas costs. + ## Usage of Sponsorship Policies with permisionless.js If you are using [permissionless.js](/references/permissionless), you can use the `PimlicoPaymasterClient` to use sponsorship policies. diff --git a/docs/pages/guides/how-to/migration-guide.mdx b/docs/pages/guides/how-to/migration-guide.mdx index 6a40605c..f7909cbf 100644 --- a/docs/pages/guides/how-to/migration-guide.mdx +++ b/docs/pages/guides/how-to/migration-guide.mdx @@ -1,5 +1,7 @@ # Migration Guide +This guide walks through the breaking changes and steps required to upgrade permissionless.js between major versions, starting with the migration from `^0.1.0` to `0.2.0`. + ## 0.2.0 :::warning diff --git a/docs/pages/guides/how-to/parallel-transactions.mdx b/docs/pages/guides/how-to/parallel-transactions.mdx index 8cec23b8..6e0e7db7 100644 --- a/docs/pages/guides/how-to/parallel-transactions.mdx +++ b/docs/pages/guides/how-to/parallel-transactions.mdx @@ -1,6 +1,6 @@ # How to send multiple user operations in parallel -permissionless.js library lets you to send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. +permissionless.js library lets you send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. ## Batching Multiple Calls diff --git a/docs/pages/guides/how-to/paymasters/conditional-sponsoring.mdx b/docs/pages/guides/how-to/paymasters/conditional-sponsoring.mdx index afb8dd94..505263b5 100644 --- a/docs/pages/guides/how-to/paymasters/conditional-sponsoring.mdx +++ b/docs/pages/guides/how-to/paymasters/conditional-sponsoring.mdx @@ -1,9 +1,6 @@ # How to conditionally sponsor a user operation -With permissionless.js and Viem, you can conditionally sponsor a user operation. This can be useful in situations like: - -- Sponsor only first 10 transactions -- Sponsor if they have a specific NFT +With permissionless.js and viem, you can conditionally sponsor a user operation — useful when you want to cap free sponsorship to the first N transactions per user, gate it behind ownership of a specific NFT, or apply any other custom rule. Let's take an example where you want to sponsor only the first 10 transactions. diff --git a/docs/pages/guides/how-to/security/protect-api-keys.mdx b/docs/pages/guides/how-to/security/protect-api-keys.mdx index b724171f..f788d925 100644 --- a/docs/pages/guides/how-to/security/protect-api-keys.mdx +++ b/docs/pages/guides/how-to/security/protect-api-keys.mdx @@ -1,10 +1,6 @@ # How to Protect Your API Keys -Keeping your API keys secure is essential. Here are three main ways to protect them: - -- Restrict access to your API keys. -- Use sponsorship policies. -- Use a proxy server to handle requests to Pimlico. +Pimlico API keys grant access to your sponsorship balance and paid endpoints, so keeping them secure is essential. This guide covers three ways to protect them — restricting access by IP, user agent, and origin, using sponsorship policies to cap spend, and routing requests through a proxy server you control. ## Restrict Access to Your API Keys diff --git a/docs/pages/guides/how-to/sponsorship-policies/index.mdx b/docs/pages/guides/how-to/sponsorship-policies/index.mdx index 37a8709c..d6d19da7 100644 --- a/docs/pages/guides/how-to/sponsorship-policies/index.mdx +++ b/docs/pages/guides/how-to/sponsorship-policies/index.mdx @@ -1,5 +1,7 @@ # How to use Sponsorship Policies +Sponsorship policies let you define custom rules and limits that govern when the verifying paymaster sponsors a user operation, such as global caps, per-user limits, and per-operation limits. This guide walks through creating a policy in the Pimlico dashboard and applying it to user operations with permissionless.js. + ## What are Sponsorship Policies? Sponsorship Policies are hosted policies that allow you to define custom rules for sponsorships. diff --git a/docs/pages/guides/how-to/testing/docker.mdx b/docs/pages/guides/how-to/testing/docker.mdx index 93e0a750..a2e85ba6 100644 --- a/docs/pages/guides/how-to/testing/docker.mdx +++ b/docs/pages/guides/how-to/testing/docker.mdx @@ -1,11 +1,6 @@ # Local Testing With Docker -This guide introduces a ready-to-use mock test environment, that contains: - -- A local Alto bundler -- A mock paymaster -- An Anvil node -- ERC-4337 related contracts, including the EntryPoint and account factories for all major smart account implementations +This guide walks you through a ready-to-use Docker-based mock ERC-4337 test environment that bundles a local Alto bundler, a mock paymaster, an Anvil node, and all ERC-4337 related contracts — the EntryPoint and account factories for every major smart account implementation. The test environment is orchestrated using **docker compose**. Where the docker containers are pulled from [this repo](https://github.com/pimlicolabs/mock-aa-environment). diff --git a/docs/pages/guides/how-to/testing/prool.mdx b/docs/pages/guides/how-to/testing/prool.mdx index 3f999231..b7c54781 100644 --- a/docs/pages/guides/how-to/testing/prool.mdx +++ b/docs/pages/guides/how-to/testing/prool.mdx @@ -1,10 +1,10 @@ # Prool -This guide introduces how to setup and run tests in a mock environment using [Prool](https://github.com/wevm/prool). +This guide walks through setting up and running tests against a mock ERC-4337 environment using [Prool](https://github.com/wevm/prool) — a library by Wevm that lets you programmatically interact with Ethereum server instances like nodes, bundlers, and paymasters. -# Overview +## Overview -Prool is a library by [Wevm](https://github.com/wevm/viem) that lets you programmatically interact with Ethereum server instances like Nodes, Bundlers, and Paymasters. +We will be using [Vitest](https://vitest.dev/) as our testing framework and we will be testing against a fork of Base Mainnet. We will be using [Vitest](https://vitest.dev/) as our testing framework and we will be testing against a fork of Base Mainnet. diff --git a/docs/pages/guides/supported-chains.mdx b/docs/pages/guides/supported-chains.mdx index 4969f857..941fbd92 100644 --- a/docs/pages/guides/supported-chains.mdx +++ b/docs/pages/guides/supported-chains.mdx @@ -1,6 +1,8 @@ # Supported Chains +Pimlico's bundler and paymaster infrastructure is available across dozens of EVM mainnets and testnets. This page lists every supported chain and shows how to target one in your API requests. + All API calls must use the JSON-RPC format and be sent to the following URL: ``` @@ -15,7 +17,7 @@ For example to access Base, both of these endpoints will work: You can also access the public endpoint without an API key ([more info](/references/bundler/public-endpoint)). -# Pimlico supports the following chains: +## Pimlico supports the following chains: import SupportedChains from "../../../data/supported-chains.md" import ChainDetails from "../../../data/chain-details.md"; diff --git a/docs/pages/guides/tutorials/tutorial-2.mdx b/docs/pages/guides/tutorials/tutorial-2.mdx index 016a2d45..93e90531 100644 --- a/docs/pages/guides/tutorials/tutorial-2.mdx +++ b/docs/pages/guides/tutorials/tutorial-2.mdx @@ -1,11 +1,11 @@ # Tutorial 2 — Submit a user operation with an ERC-20 Paymaster +In this tutorial, you will deploy an ERC-4337 smart contract wallet on Base Sepolia, and submit a user operation that pays for its gas fees with USDC using an ERC-20 Paymaster. + :::info You can visit our [ERC-20 Paymaster overview page](/references/paymaster/erc20-paymaster) to learn more about the design and architecture of our ERC-20 Paymaster, and the deployed smart contract addresses. ::: -In this tutorial, you will deploy an ERC-4337 smart contract wallet on Base Sepolia, and submit a user operation that pays for its gas fees with USDC using an ERC-20 Paymaster. - ## Steps ::::steps diff --git a/docs/pages/references/bundler/bundler-errors/invalid-discriminator-value.mdx b/docs/pages/references/bundler/bundler-errors/invalid-discriminator-value.mdx index 402a7c57..1976e711 100644 --- a/docs/pages/references/bundler/bundler-errors/invalid-discriminator-value.mdx +++ b/docs/pages/references/bundler/bundler-errors/invalid-discriminator-value.mdx @@ -1,11 +1,11 @@ # Validation error: Invalid discriminator value +If you see an error similar to the one above, it means you are calling a method on the Pimlico API that is not supported. The most common reason for this is using the Pimlico API endpoint for standard public Ethereum JSON-RPC methods. As a reminder, the Pimlico API only supports bundler and paymaster methods. + ```txt Validation error: Invalid discriminator value. Expected 'eth_chainId' | 'eth_supportedEntryPoints' | 'eth_coinbase' | 'eth_estimateUserOperationGas' | 'eth_sendUserOperation' | 'eth_getUserOperationByHash' | 'eth_getUserOperationReceipt' | 'pm_supportedEntryPoints' | 'pm_sponsorUserOperation' | 'web3_clientVersion' | 'pimlico_getUserOperationStatus' | 'pimlico_getUserOperationGasPrice' | 'pimlico_getBalance' | 'pm_validateSponsorshipPolicies' at \"method\"" ``` -If you see an error similar to the one above, it means you are calling a method on the Pimlico API that is not supported. The most common reason for this is using the Pimlico API endpoint for standard public Ethereum JSON-RPC methods. As a reminder, the Pimlico API only supports bundler and paymaster methods. - ## Possible solutions Make sure you are using a standard RPC endpoint for public Ethereum methods and the Pimlico API endpoint for Pimlico-specific methods. diff --git a/docs/pages/references/bundler/bundler-errors/unknown-error.mdx b/docs/pages/references/bundler/bundler-errors/unknown-error.mdx index b11e7744..e33b8b88 100644 --- a/docs/pages/references/bundler/bundler-errors/unknown-error.mdx +++ b/docs/pages/references/bundler/bundler-errors/unknown-error.mdx @@ -1,7 +1,7 @@ # Unknown error from alto bundler -The bundler encountered an unexpected error. This is either an internal 500 error, or an error with sensitive information that can not returned. +The bundler encountered an unexpected error. This is either an internal 500 error, or an error with sensitive information that cannot be returned. ## Possible solutions -- [Reach out to us](https://t.me/pimlicoHQ) if you see this error. \ No newline at end of file +- [Reach out to us](https://t.me/pimlicoHQ) if you see this error. diff --git a/docs/pages/references/bundler/endpoints/pimlico_getUserOperationStatus.mdx b/docs/pages/references/bundler/endpoints/pimlico_getUserOperationStatus.mdx index cdaac685..7f1fa8b0 100644 --- a/docs/pages/references/bundler/endpoints/pimlico_getUserOperationStatus.mdx +++ b/docs/pages/references/bundler/endpoints/pimlico_getUserOperationStatus.mdx @@ -1,6 +1,6 @@ # pimlico_getUserOperationStatus -This method takes in a user operation hash and returns the status of the operation and, optionally, the transaction hash the bundler is using to bundle the user operation on-chain. The status can be one of the following: +This method takes a user operation hash and returns the current status of the operation along with, when relevant, the transaction hash the bundler is using to bundle it on-chain — covering states like not found, not yet submitted, submitted, included, rejected, failed, and queued. | result | response includes transaction hash | description | diff --git a/docs/pages/references/bundler/endpoints/pimlico_simulateAssetChanges.mdx b/docs/pages/references/bundler/endpoints/pimlico_simulateAssetChanges.mdx index b10373ec..7be4ef30 100644 --- a/docs/pages/references/bundler/endpoints/pimlico_simulateAssetChanges.mdx +++ b/docs/pages/references/bundler/endpoints/pimlico_simulateAssetChanges.mdx @@ -1,5 +1,7 @@ # pimlico_simulateAssetChanges +Returns the ERC-20, ERC-721, ERC-1155, and native token balance changes that would occur if a given user operation were executed on-chain — useful for previewing transfers and balance impact before submitting the user operation. + :::warning NOTICE: This page is still in draft and the API may change. ::: diff --git a/docs/pages/references/bundler/entrypoint-errors/aa13.mdx b/docs/pages/references/bundler/entrypoint-errors/aa13.mdx index 0b4c3c04..b1ff7fef 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa13.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa13.mdx @@ -1,16 +1,14 @@ # AA13 initCode failed or OOG +The EntryPoint failed to create the smart account with the `initCode` provided — either because the `initCode` ran out of gas, or because it reverted during the account deployment process. + :::info OOG = Out Of Gas ::: -The EntryPoint failed to create the smart account with the `initCode` provided. There are two possible reasons: -- The `initCode` ran out of gas -- The `initCode` reverted during the account deployment process - ## Possible solutions - Verify that the factory address in the `initCode` is correct (the factory address is the first 20 bytes of the `initCode`). - Verify that the `initCode` is correct. - Check whether the `verificationGasLimit` is sufficient for the `initCode` to complete without running out of gas. -- If the root cause is a revert, investigate why the `initCode` reverts during the account deployment process using tools like [Tenderly](https://tenderly.co/). \ No newline at end of file +- If the root cause is a revert, investigate why the `initCode` reverts during the account deployment process using tools like [Tenderly](https://tenderly.co/). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa23.mdx b/docs/pages/references/bundler/entrypoint-errors/aa23.mdx index 65fc77d2..c95b6f89 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa23.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa23.mdx @@ -1,14 +1,14 @@ # AA23 reverted (or OOG) +The `validateUserOp` function of the smart account either reverted or ran out of gas. + :::info OOG = Out Of Gas ::: -The `validateUserOp` function of the smart account either reverted or ran out of gas. - ## Possible solutions - Verify that the `verificationGasLimit` is high enough to cover the `validateUserOp` function's gas costs. - Verify that the `validateUserOp` function is implemented with the correct logic, and that the user operation is supposed to be valid. - Make sure the signature verification logic of the smart account is implemented correctly. Namely, correct implementations should **not** revert when the signature is invalid. If you are not looking to use neither time-based signatures nor a signature aggregator, you should simply return `uint(1)` for invalid signatures in the `validateUserOp` function. -- If all else fails, investigate why the `validateUserOp` function reverted using tools like [Tenderly](https://tenderly.co/). \ No newline at end of file +- If all else fails, investigate why the `validateUserOp` function reverted using tools like [Tenderly](https://tenderly.co/). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa30.mdx b/docs/pages/references/bundler/entrypoint-errors/aa30.mdx index 033622cd..152d48db 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa30.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa30.mdx @@ -1,12 +1,12 @@ # AA30 paymaster not deployed +The paymaster contract is not deployed. + :::info The first 20 bytes of the `paymasterAndData` field specify the address of the paymaster contract you are requesting to use. ::: -The paymaster contract is not deployed. - ## Possible solutions - Verify that the `paymasterAndData` field is correct, and that the first 20 bytes are the address of the paymaster contract you intend to use. -- Verify that the paymaster contract is deployed on the network you are using. \ No newline at end of file +- Verify that the paymaster contract is deployed on the network you are using. diff --git a/docs/pages/references/bundler/entrypoint-errors/aa31.mdx b/docs/pages/references/bundler/entrypoint-errors/aa31.mdx index fca9c27d..ad4a5c85 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa31.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa31.mdx @@ -1,13 +1,13 @@ # AA31 paymaster deposit too low +The paymaster contract does not have enough funds deposited into the EntryPoint contract to cover the required prefund of the user operation. + :::info The first 20 bytes of the `paymasterAndData` field specify the address of the paymaster contract you are requesting to use. ::: -The paymaster contract does not have enough funds deposited into the EntryPoint contract to cover the required prefund of the user operation. - ## Possible solutions - Verify that the `paymasterAndData` field is correct, and that the first 20 bytes are the address of the paymaster contract you intend to use. - If you are using your own paymaster contract, deposit more funds into the EntryPoint contract through the `deposit()` function of the paymaster contract. -- If you are using a paymaster service like Pimlico, [reach out to them](https://t.me/pimlicoHQ). \ No newline at end of file +- If you are using a paymaster service like Pimlico, [reach out to them](https://t.me/pimlicoHQ). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa32.mdx b/docs/pages/references/bundler/entrypoint-errors/aa32.mdx index 55b0bed1..76aad15c 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa32.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa32.mdx @@ -1,11 +1,11 @@ # AA32 expired or not due +The paymaster's signature used in the `paymasterAndData` field of the user operation is not valid, because it is outside of the time range it specified. + :::info By default, signatures from Pimlico's verifying paymaster are only valid for 10 minutes. ::: -The paymaster's signature used in the `paymasterAndData` field of the user operation is not valid, because it is outside of the time range it specified. - The paymaster's `validatePaymasterUserOp` function returns `validationData`, a `bytes32` field. This field is a concatenation of the `validAfter`, `validUntil`, and `aggregator` fields. This error occurs when the `block.timestamp` falls after the `validUntil` timestamp, or before the `validAfter` timestamp. @@ -14,4 +14,4 @@ This error occurs when the `block.timestamp` falls after the `validUntil` timest - If you are using Pimlico's paymaster, send the user operation within 10 minutes or [extend the validity period](/guides/how-to/paymasters/extending-sponsorship-duration) up to 24 hours. - If you are using your own paymaster contract and using time-based signatures, verify that the `validAfter` and `validUntil` fields are set correctly and that the user operation is sent within the specified range. -- If you are using your own paymaster contract and *not* looking to use time-based signatures, verify that the `validAfter` and `validUntil` fields are set to `0`. \ No newline at end of file +- If you are using your own paymaster contract and *not* looking to use time-based signatures, verify that the `validAfter` and `validUntil` fields are set to `0`. diff --git a/docs/pages/references/bundler/entrypoint-errors/aa33.mdx b/docs/pages/references/bundler/entrypoint-errors/aa33.mdx index 2ed5568e..05a1654f 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa33.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa33.mdx @@ -1,11 +1,11 @@ # AA33 reverted (or OOG) +The `validatePaymasterUserOp` function of the paymaster contract either reverted or ran out of gas. + :::info OOG = Out Of Gas ::: -The `validatePaymasterUserOp` function of the paymaster contract either reverted or ran out of gas. - ## Possible solutions - Verify that the `verificationGasLimit` is high enough to cover the `validatePaymasterUserOp` function's gas costs. @@ -20,4 +20,4 @@ const userOperationHash = await bundlerClient.sendUserOperation({ ..., // the rest of the user operation }) ``` -- If all else fails, investigate why the `validatePaymasterUserOp` function reverted using tools like [Tenderly](https://tenderly.co/). \ No newline at end of file +- If all else fails, investigate why the `validatePaymasterUserOp` function reverted using tools like [Tenderly](https://tenderly.co/). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa34.mdx b/docs/pages/references/bundler/entrypoint-errors/aa34.mdx index 15dc98f1..a1e45a11 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa34.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa34.mdx @@ -1,11 +1,11 @@ # AA34 signature error +The `validatePaymasterUserOp` function of the paymaster contract rejected the signature of the user operation. + :::info The first 20 bytes of the `paymasterAndData` field specify the address of the paymaster contract you are requesting to use. ::: -The `validatePaymasterUserOp` function of the paymaster contract rejected the signature of the user operation. - ## Possible solutions - If you are using your own paymaster contract, verify that the user operation was correctly signed according to your implementation, and that the paymaster signature was correctly encoded in the `paymasterAndData` field of the user operation. @@ -13,4 +13,4 @@ The `validatePaymasterUserOp` function of the paymaster contract rejected the si - Make sure the paymaster signature verification function is correctly implemented. - If you are using a paymaster service like Pimlico, make sure you do not modify any of the fields of the user operation after the paymaster signs over it (except the `signature` field). - If you are using a paymaster service like Pimlico and you have not modified any of the fields except the `signature` but you are still getting this error, [reach out to them](https://t.me/pimlicoHQ). -- If all else fails, investigate why the `validatePaymasterUserOp` function rejected the paymaster signature using tools like [Tenderly](https://tenderly.co/). \ No newline at end of file +- If all else fails, investigate why the `validatePaymasterUserOp` function rejected the paymaster signature using tools like [Tenderly](https://tenderly.co/). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa50.mdx b/docs/pages/references/bundler/entrypoint-errors/aa50.mdx index 1a2f3bf8..ff13a344 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa50.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa50.mdx @@ -1,13 +1,13 @@ # AA50 postOp reverted +The paymaster contract's `postOp` function reverted. + :::info `postOp` is a function that is called by the EntryPoint on the paymaster contract after the user operation execution is completed. It is often used by paymasters to perform additional accounting logic. ::: -The paymaster contract's `postOp` function reverted. - ## Possible solutions - If you are using your own paymaster contract, verify that that you have correctly implemented the `postOp` function (if you are using one). If you do *not* intent to make use of the `postOp` function, make sure you do not set the `context` parameter in the paymaster's `validatePaymasterUserOp` function. - If you are using a paymaster service like Pimlico and you see this error, [reach out to them](https://t.me/pimlicoHQ). -- If all else fails, investigate why the `postOp` function reverted using tools like [Tenderly](https://tenderly.co/). \ No newline at end of file +- If all else fails, investigate why the `postOp` function reverted using tools like [Tenderly](https://tenderly.co/). diff --git a/docs/pages/references/bundler/entrypoint-errors/aa93.mdx b/docs/pages/references/bundler/entrypoint-errors/aa93.mdx index 299645ac..21168f95 100644 --- a/docs/pages/references/bundler/entrypoint-errors/aa93.mdx +++ b/docs/pages/references/bundler/entrypoint-errors/aa93.mdx @@ -1,12 +1,12 @@ # AA93 invalid paymasterAndData +The `paymasterAndData` field is of an incorrect length. + :::info The first 20 bytes of the `paymasterAndData` field specify the address of the paymaster contract you are requesting to use. ::: -The `paymasterAndData` field is of an incorrect length. - ## Possible solutions - Make sure you have either not set a value for the `paymasterAndData`, or that it is at least 20 bytes long. -- If you are using a paymaster provider like Pimlico, [reach out to them](https://t.me/pimlicoHQ). \ No newline at end of file +- If you are using a paymaster provider like Pimlico, [reach out to them](https://t.me/pimlicoHQ). diff --git a/docs/pages/references/bundler/faqs.mdx b/docs/pages/references/bundler/faqs.mdx index b9fe5924..62706f84 100644 --- a/docs/pages/references/bundler/faqs.mdx +++ b/docs/pages/references/bundler/faqs.mdx @@ -1,5 +1,7 @@ # Bundler FAQs +Answers to common questions about Pimlico's bundler, including troubleshooting dropped or stuck user operations, how bundler transaction fees are paid on-chain, and how the bundler interacts with paymasters and smart accounts. + ## I successfully submitted a user operation to the bundler, but it never got included in a block. What happened? There can be many reasons for this. The most common are: - The user operation succeeds as it is being validated, but fails during the second round of simulations when it is being bundled by the bundler into a transaction to be submitted on-chain and is therefore dropped. diff --git a/docs/pages/references/bundler/index.mdx b/docs/pages/references/bundler/index.mdx index 059fd128..296c235a 100644 --- a/docs/pages/references/bundler/index.mdx +++ b/docs/pages/references/bundler/index.mdx @@ -1,9 +1,9 @@ # Alto Bundler -![Landscape](/alto.png) - Alto ⛰️ is a performant, type-safe ERC-4337 bundler written in Typescript. +![Landscape](/alto.png) + Our focus is on full type safety, transaction inclusion reliability (even in the case of sudden gas price spikes or chain reorgs), as well as transaction inclusion speed. ## Tutorials diff --git a/docs/pages/references/bundler/testing.mdx b/docs/pages/references/bundler/testing.mdx index a58d456b..3fcb74de 100644 --- a/docs/pages/references/bundler/testing.mdx +++ b/docs/pages/references/bundler/testing.mdx @@ -1,6 +1,6 @@ # How to use Alto in CI/CD testing -To effectively integrate Alto, a performant and type-safe ERC-4337 bundler developed by Pimlico, into your CI/CD testing pipeline, we recommend utilizing Prool, a library that provides programmatic HTTP testing instances for Ethereum.rool facilitates the creation of isolated Ethereum environments, enabling efficient testing of smart contracts and related components. +To effectively integrate Alto, a performant and type-safe ERC-4337 bundler developed by Pimlico, into your CI/CD testing pipeline, we recommend utilizing Prool, a library that provides programmatic HTTP testing instances for Ethereum. Prool facilitates the creation of isolated Ethereum environments, enabling efficient testing of smart contracts and related components. **Installation Steps:** :::::steps @@ -83,4 +83,4 @@ Prool offers pre-configured instances, including Anvil, which can be used to sim ``` ::::: -By following these steps, you can effectively incorporate Alto into your CI/CD testing pipeline using Prool, ensuring a robust and efficient testing environment for your Ethereum applications. \ No newline at end of file +By following these steps, you can effectively incorporate Alto into your CI/CD testing pipeline using Prool, ensuring a robust and efficient testing environment for your Ethereum applications. diff --git a/docs/pages/references/bundler/usage.mdx b/docs/pages/references/bundler/usage.mdx index d5932a1c..07c71071 100644 --- a/docs/pages/references/bundler/usage.mdx +++ b/docs/pages/references/bundler/usage.mdx @@ -1,11 +1,11 @@ # How to use the bundler +ERC-4337 bundlers are relayers that bundle user operations into transactions and submit them to the blockchain. You can interact with bundlers using standard JSON-RPC requests. + :::tip[Tip] We recommend using [permissionless.js](/references/permissionless/reference/smart-account-actions/sendUserOperation) as the SDK to interact with the bundler as it provides type-safe wrappers for all bundler methods. ::: -ERC-4337 bundlers are relayers that bundle user operations into transactions and submit them to the blockchain. You can interact with bundlers using standard JSON-RPC requests. - To get access to the bundler, you need to use your Pimlico API key. [Create one here](/guides/create-api-key) if you don't have one. Using the API key, you can make the following JSON-RPC requests to the bundler: - [eth_sendUserOperation](/references/bundler/endpoints/eth_sendUserOperation) diff --git a/docs/pages/references/paymaster/erc20-paymaster/architecture.mdx b/docs/pages/references/paymaster/erc20-paymaster/architecture.mdx index c77f8cf9..8c7cc1a7 100644 --- a/docs/pages/references/paymaster/erc20-paymaster/architecture.mdx +++ b/docs/pages/references/paymaster/erc20-paymaster/architecture.mdx @@ -1,5 +1,7 @@ # ERC-20 Paymaster Architecture +This page explains the design of Pimlico's ERC-20 Paymaster — an ERC-4337 paymaster that pays user gas fees in exchange for ERC-20 tokens drawn from the user — including the off-chain pricing API and the formula used to estimate the token cost of a user operation. + :::info You can view the whole ERC-20 Paymaster contract [in our repository](https://github.com/pimlicolabs). diff --git a/docs/pages/references/paymaster/erc20-paymaster/faqs.mdx b/docs/pages/references/paymaster/erc20-paymaster/faqs.mdx index f7ab208f..5893475d 100644 --- a/docs/pages/references/paymaster/erc20-paymaster/faqs.mdx +++ b/docs/pages/references/paymaster/erc20-paymaster/faqs.mdx @@ -1,5 +1,7 @@ # ERC-20 Paymaster FAQs +Answers to common questions about Pimlico's ERC-20 Paymaster — what a paymaster is, how the ERC-20 variant works, which tokens and chains are supported, and how fees are charged. + ## What is a paymaster? A Paymaster is a special smart contract under the [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) specification that user operations are able to delegate the responsibility of gas fee payments to. This means that ERC-4337 smart contract wallets no longer need to necessarily be responsible for directly paying gas fees in ETH. The paymaster contracts are able to use custom logic (with certain limitations) to decide whether or not they are willing to sponsor a user operation. diff --git a/docs/pages/references/paymaster/erc20-paymaster/index.mdx b/docs/pages/references/paymaster/erc20-paymaster/index.mdx index 68239e44..06ddea24 100644 --- a/docs/pages/references/paymaster/erc20-paymaster/index.mdx +++ b/docs/pages/references/paymaster/erc20-paymaster/index.mdx @@ -1,9 +1,9 @@ # ERC-20 Paymaster -![Landscape](/erc20paymaster.png) - Pimlico's ERC-20 Paymaster is a ERC-4337 paymaster that is able to pay for the gas fees of your users in exchange for ERC-20 tokens. +![Landscape](/erc20paymaster.png) + ## Tutorials Learning-oriented lessons that take you through a series of steps to complete a project. Most useful when you want to get started with Pimlico. They all involve the Alto Bundler. diff --git a/docs/pages/references/paymaster/index.mdx b/docs/pages/references/paymaster/index.mdx index 6eec267b..5e93c619 100644 --- a/docs/pages/references/paymaster/index.mdx +++ b/docs/pages/references/paymaster/index.mdx @@ -1,6 +1,6 @@ # Pimlico Paymasters -Pimlico providers two different types of paymasters to allow you to abstract away the gas fees for your users. +Pimlico provides two different types of paymasters to allow you to abstract away the gas fees for your users. ## Verifying Paymaster @@ -8,4 +8,4 @@ Our Verifying Paymaster allows you to load up your off-chain Pimlico balance thr ## ERC-20 Paymaster -Our ERC-20 Paymaster is a permissionless on-chain smart contract that lets your users pay for their own gas fees using their ERC-20 tokens. \ No newline at end of file +Our ERC-20 Paymaster is a permissionless on-chain smart contract that lets your users pay for their own gas fees using their ERC-20 tokens. diff --git a/docs/pages/references/paymaster/verifying-paymaster/common-errors.mdx b/docs/pages/references/paymaster/verifying-paymaster/common-errors.mdx index 70a5713d..ae035f92 100644 --- a/docs/pages/references/paymaster/verifying-paymaster/common-errors.mdx +++ b/docs/pages/references/paymaster/verifying-paymaster/common-errors.mdx @@ -1,5 +1,7 @@ # Verifying Paymaster Common Errors +Reference for the most common errors returned by Pimlico's Verifying Paymaster — insufficient balance, missing or invalid API keys, unsupported chains, and rejected sponsorship policies — and how to resolve each one. + `Insufficient Pimlico balance for sponsorship, please top up` This error means that you do not have enough Pimlico balance to sponsor the User Operation. Testnet User Operations are free to sponsor, but if you are trying to sponsor User Operations on a mainnet chain, [reach out to us](https://t.me/kristofgazso) to top up your balance. diff --git a/docs/pages/references/paymaster/verifying-paymaster/faqs.mdx b/docs/pages/references/paymaster/verifying-paymaster/faqs.mdx index 1ab692d3..a19da7b4 100644 --- a/docs/pages/references/paymaster/verifying-paymaster/faqs.mdx +++ b/docs/pages/references/paymaster/verifying-paymaster/faqs.mdx @@ -1,4 +1,6 @@ -# Paymaster FAQs [Frequently Asked Questions about Pimlico's Verifying Paymaster] +# Paymaster FAQs + +Frequently asked questions about Pimlico's Verifying Paymaster — including the difference between the ERC-7677 and Pimlico-specific endpoints, gas estimation behavior, and common integration questions. ## What's the difference between `pm_getPaymasterData` and `pm_sponsorUserOperation`? `pm_getPaymasterData` is part of the [ERC-7677 spec](https://www.erc7677.xyz/introduction) which standardizes the way to request sponsorship for a given userOperation. `pm_getPaymasterData` doesn't do any gas estimations and only returns back the relevant userOperation fields for sponsorship. diff --git a/docs/pages/references/paymaster/verifying-paymaster/usage.mdx b/docs/pages/references/paymaster/verifying-paymaster/usage.mdx index 15e90cbc..53f1c8b9 100644 --- a/docs/pages/references/paymaster/verifying-paymaster/usage.mdx +++ b/docs/pages/references/paymaster/verifying-paymaster/usage.mdx @@ -1,13 +1,13 @@ # How to use the Verifying Paymaster +Paymasters are entities that user operations can delegate the responsibilities for gas fee payments for. You can interact with paymasters using JSON-RPC requests. + :::tip[Tip] We recommend using [permissionless.js](/references/permissionless/reference/smart-account-actions/sendUserOperation) as the SDK to interact with the Verifying Paymaster as it provides type-safe wrappers for paymaster methods. ::: -Paymasters are entities that user operations can delegate the responsibilities for gas fee payments for. You can interact with paymasters using JSON-RPC requests. - To get access to the paymaster, you need to [create a Pimlico API key](/guides/create-api-key) and sign up to the [Pimlico dashboard](https://dashboard.pimlico.io). Next, load up some balance to your Pimlico account in the [payment methods page](https://dashboard.pimlico.io/payment) or add your card. Then, using the API key, you can make the following JSON-RPC requests to the paymaster: - [pm_sponsorUserOperation](/references/paymaster/verifying-paymaster/endpoints/pm_sponsorUserOperation) -If you would like an end-to-end example of how to use the Verifying Paymaster, please refer to [tutorial 1](/references/permissionless/tutorial/tutorial-1) of the permissionless.js documentation. \ No newline at end of file +If you would like an end-to-end example of how to use the Verifying Paymaster, please refer to [tutorial 1](/references/permissionless/tutorial/tutorial-1) of the permissionless.js documentation. diff --git a/docs/pages/references/permissionless/faqs.mdx b/docs/pages/references/permissionless/faqs.mdx index e03fc6b6..7bc804e7 100644 --- a/docs/pages/references/permissionless/faqs.mdx +++ b/docs/pages/references/permissionless/faqs.mdx @@ -1,5 +1,7 @@ # permissionless.js FAQs +Answers to common questions encountered when building with permissionless.js, covering inclusion-time tuning on chains like Base, Safe account salt nonces, signer integrations, and other recurring developer issues. + ## How to decrease inclusion time on Base using flashblocks? Just decrease your bundler's polling interval like so: diff --git a/docs/pages/references/permissionless/how-to/accounts/comparison.mdx b/docs/pages/references/permissionless/how-to/accounts/comparison.mdx index 88de8172..ec0d5d86 100644 --- a/docs/pages/references/permissionless/how-to/accounts/comparison.mdx +++ b/docs/pages/references/permissionless/how-to/accounts/comparison.mdx @@ -1,6 +1,6 @@ # Difference between various Smart Account types in permissionless.js -permissionless.js supports 8 types of accounts. Below is an overview of each account type and their key features: +permissionless.js supports 8 ERC-4337 smart account implementations — Safe, Kernel, Nexus, Simple Smart Account, LightAccount, TrustWallet, Etherspot, and Thirdweb. This page compares each one by its key features so you can pick the right account for your application. 1. **Safe** 2. **Kernel** diff --git a/docs/pages/references/permissionless/how-to/accounts/use-coinbase-account.mdx b/docs/pages/references/permissionless/how-to/accounts/use-coinbase-account.mdx index cc75dae6..a355809c 100644 --- a/docs/pages/references/permissionless/how-to/accounts/use-coinbase-account.mdx +++ b/docs/pages/references/permissionless/how-to/accounts/use-coinbase-account.mdx @@ -1,8 +1,7 @@ # How to create and use a Coinbase smart account with permissionless.js +Coinbase smart wallet accounts are supported natively by viem. We recommend using the native viem implementation for which the documentation [can be found here](https://viem.sh/account-abstraction/accounts/smart/toCoinbaseSmartAccount). :::warning[Warning] You should still use permissionless to fetch gas prices. As the bundler might not accept the prices fetched from viem. To learn how to use permissionless to fetch gas prices, [check out this guide](/references/permissionless/reference/pimlico-actions/getUserOperationGasPrice#getuseroperationgasprice). ::: - -Coinbase smart wallet accounts are supported natively by viem. We recommend using the native viem implementation for which the documentation [can be found here](https://viem.sh/account-abstraction/accounts/smart/toCoinbaseSmartAccount). \ No newline at end of file diff --git a/docs/pages/references/permissionless/how-to/accounts/use-kernel-account.mdx b/docs/pages/references/permissionless/how-to/accounts/use-kernel-account.mdx index 4292ee2b..494da5c5 100644 --- a/docs/pages/references/permissionless/how-to/accounts/use-kernel-account.mdx +++ b/docs/pages/references/permissionless/how-to/accounts/use-kernel-account.mdx @@ -1,11 +1,11 @@ # How to create and use a Kernel account with permissionless.js +[Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). + :::info ZeroDev, the author of Kernel, maintains their own in-house SDK built closely on top of permissionless.js that you can use for the account system while still plugging in all the other components from permissionless.js. Take a look at [their documentation](https://docs.zerodev.app) for more information. ::: -[Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). - ## Picking an EntryPoint Kernel is compatible with EntryPoint versions v0.6 and v0.7. diff --git a/docs/pages/references/permissionless/how-to/accounts/use-thirdweb-account.mdx b/docs/pages/references/permissionless/how-to/accounts/use-thirdweb-account.mdx index 0fbcd838..9222445e 100644 --- a/docs/pages/references/permissionless/how-to/accounts/use-thirdweb-account.mdx +++ b/docs/pages/references/permissionless/how-to/accounts/use-thirdweb-account.mdx @@ -1,5 +1,7 @@ # How to create and use a Thirdweb account with permissionless.js +[Thirdweb](https://thirdweb.com) provides a managed smart account implementation that integrates with their developer platform. This guide walks through creating a Thirdweb smart account with permissionless.js and sending user operations through a bundler and optional paymaster. + ## Picking an EntryPoint Thirdweb is compatible with EntryPoint versions v0.6 and v0.7. In this guide, we will use EntryPoint v0.7. diff --git a/docs/pages/references/permissionless/how-to/accounts/use-trustwallet-account.mdx b/docs/pages/references/permissionless/how-to/accounts/use-trustwallet-account.mdx index 3781b3d1..0a3333b8 100644 --- a/docs/pages/references/permissionless/how-to/accounts/use-trustwallet-account.mdx +++ b/docs/pages/references/permissionless/how-to/accounts/use-trustwallet-account.mdx @@ -1,14 +1,14 @@ # How to create and use a Trust smart account with permissionless.js +Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). +After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. + :::info [Trust Wallet](https://trustwallet.com/), the author of [Barz](https://github.com/trustwallet/barz), provides a smart contract security monitoring service for each and every Barz deployed on-chain including Barz created by SDK. This is a service that TrustWallet provides to builders to build innovative products on top of a secure foundation. Monitoring will automatically start as soon as the Barz account is deployed on-chain; for projects wanting to get security monitoring information, reach out to the smart wallet channel in [TrustWallet Discord](https://discord.gg/trustwallet). ::: -Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). -After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. - With the recent opensource of their Smart Wallet system Barz, their smart account solution, together with their security infrastructure is disclosed for public to support builders build products on a secure foundation. This guide will walk you through how to create and use a Barz account with permissionless.js diff --git a/docs/pages/references/permissionless/how-to/migration-guide.mdx b/docs/pages/references/permissionless/how-to/migration-guide.mdx index 6a40605c..f7909cbf 100644 --- a/docs/pages/references/permissionless/how-to/migration-guide.mdx +++ b/docs/pages/references/permissionless/how-to/migration-guide.mdx @@ -1,5 +1,7 @@ # Migration Guide +This guide walks through the breaking changes and steps required to upgrade permissionless.js between major versions, starting with the migration from `^0.1.0` to `0.2.0`. + ## 0.2.0 :::warning diff --git a/docs/pages/references/permissionless/how-to/parallel-transactions.mdx b/docs/pages/references/permissionless/how-to/parallel-transactions.mdx index d711278e..8ceffcba 100644 --- a/docs/pages/references/permissionless/how-to/parallel-transactions.mdx +++ b/docs/pages/references/permissionless/how-to/parallel-transactions.mdx @@ -1,6 +1,6 @@ # How to send multiple user operations in parallel -permissionless.js library lets you to send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. +permissionless.js library lets you send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. ## Batching Multiple Calls diff --git a/docs/pages/references/permissionless/how-to/paymasters/conditional-sponsoring.mdx b/docs/pages/references/permissionless/how-to/paymasters/conditional-sponsoring.mdx index af7b1422..4d19ee2c 100644 --- a/docs/pages/references/permissionless/how-to/paymasters/conditional-sponsoring.mdx +++ b/docs/pages/references/permissionless/how-to/paymasters/conditional-sponsoring.mdx @@ -1,11 +1,6 @@ # How to conditionally sponsor a user operation -The permissionless.js library allows you to conditionally sponsor a user operation. This can be useful in situations like: - -- Sponsor only first 10 transactions -- Sponsor if they have a specific NFT - -The use cases can be many, but the general idea is to use the `middleware.sponsorUserOperation` parameter to conditionally sponsor a user operation. +permissionless.js lets you conditionally sponsor a user operation — useful when you want to cap free sponsorship to the first N transactions per user, gate it behind ownership of a specific NFT, or apply any other custom rule. The general approach is to use the `middleware.sponsorUserOperation` parameter to decide per-operation whether to attach the paymaster. Let's take an example where you want to sponsor only the first 10 transactions. diff --git a/docs/pages/references/permissionless/how-to/testing/docker.mdx b/docs/pages/references/permissionless/how-to/testing/docker.mdx index f2eaa3a8..1238943d 100644 --- a/docs/pages/references/permissionless/how-to/testing/docker.mdx +++ b/docs/pages/references/permissionless/how-to/testing/docker.mdx @@ -1,11 +1,6 @@ # Local Testing With Docker -This guide introduces a ready-to-use mock test environment, that contains: - -- A local Alto bundler -- A mock verifying paymaster -- An Anvil node -- ERC-4337 related contracts, including the EntryPoint and account factories for all major smart account implementations. +This guide walks you through a ready-to-use Docker-based mock ERC-4337 test environment that bundles a local Alto bundler, a mock verifying paymaster, an Anvil node, and all ERC-4337 related contracts — the EntryPoint and account factories for every major smart account implementation. The test environment is orchestrated using **docker compose**. Where the docker containers are pulled from [this repo](https://github.com/pimlicolabs/mock-aa-environment). diff --git a/docs/pages/references/permissionless/index.mdx b/docs/pages/references/permissionless/index.mdx index 81a63798..7f9dfc95 100644 --- a/docs/pages/references/permissionless/index.mdx +++ b/docs/pages/references/permissionless/index.mdx @@ -22,7 +22,9 @@ import { HomePage } from 'vocs/components'
-# Overview +permissionless.js is a TypeScript library built on top of viem for interacting with ERC-4337 bundlers, paymasters, and smart accounts. The library is provider-agnostic, has zero runtime dependencies, and provides high-level support for major smart account implementations including Safe, Kernel, Biconomy, SimpleAccount, TrustWallet, and LightAccount. + +## Overview ```ts twoslash const pimlicoApiKey = "YOUR_API_KEY_HERE" @@ -53,7 +55,7 @@ opReceipt!.actualGasUsed ``` -# Features +## Features - **High-level smart account support**: We support a high-level API for deploying and managing smart accounts, including some of the most popular implementations ([Safe](https://safe.global), [Kernel](https://zerodev.app), [Biconomy](https://biconomy.io), [TrustWallet](https://trustwallet.com/swift), etc.) - **Bundler support**: We support all bundler actions following [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace). @@ -63,7 +65,7 @@ opReceipt!.actualGasUsed - **Built on & for viem**: permissionless.js is designed to be a thin wrapper around viem, maintaining the same style and overall feel viem provides. - and a lot more... -# Source Code +## Source Code The source code for permissionless.js is available on [GitHub](https://github.com/pimlicolabs/permissionless.js) diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/accountId.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/accountId.mdx index f37928f7..afdfeb44 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/accountId.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/accountId.mdx @@ -1,6 +1,6 @@ # accountId -Gets the accountId of the smart account as defined in [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579). Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Returns the account ID of the smart account as defined in [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) — a string that identifies which ERC-7579 implementation the account follows so modules can be installed against the correct interface. ## Usage diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/installModule.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/installModule.mdx index 18b64729..6639f144 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/installModule.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/installModule.mdx @@ -1,6 +1,6 @@ # installModule -Installs a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module to the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Installs an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module on the smart account by sending a user operation that calls the account's `installModule` function — used to add validators, executors, hooks, or fallback handlers to an ERC-7579-compatible account. ## Usage diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/isModuleInstalled.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/isModuleInstalled.mdx index 5f8a2cc3..45e1306f 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/isModuleInstalled.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/isModuleInstalled.mdx @@ -1,6 +1,6 @@ # isModuleInstalled -Checks if an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module is installed on the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Returns `true` if the specified [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module is currently installed on the smart account — useful for gating UI flows or skipping a redundant `installModule` call. ## Usage diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/supportsExecutionMode.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/supportsExecutionMode.mdx index df344f65..6f48b288 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/supportsExecutionMode.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/supportsExecutionMode.mdx @@ -1,6 +1,6 @@ # supportsExecutionMode -Checks if a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) execution mode is supported on the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Returns `true` if the smart account supports a given [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) execution mode (single, batch, delegate-call, etc.). Not every implementation supports every mode, so check before issuing a call that depends on one. :::info According to the specification, not all execution modes must be supported. So it is recommended to use this function to check if the execution mode is supported before using it. diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/supportsModule.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/supportsModule.mdx index 13da8770..2c3bbd84 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/supportsModule.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/supportsModule.mdx @@ -1,6 +1,6 @@ # supportsModule -Checks if a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module type is supported by the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Returns `true` if the smart account supports a given [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module type (validator, executor, hook, or fallback) — check this before attempting to install a module of that type. ## Usage diff --git a/docs/pages/references/permissionless/reference/erc7579-actions/uninstallModule.mdx b/docs/pages/references/permissionless/reference/erc7579-actions/uninstallModule.mdx index 04c48d8b..cf5c8227 100644 --- a/docs/pages/references/permissionless/reference/erc7579-actions/uninstallModule.mdx +++ b/docs/pages/references/permissionless/reference/erc7579-actions/uninstallModule.mdx @@ -1,6 +1,6 @@ # uninstallModule -Uninstalls a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module from the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +Uninstalls an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module from the smart account by sending a user operation that calls the account's `uninstallModule` function — used to remove validators, executors, hooks, or fallback handlers previously installed on the account. ## Usage diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/estimateUserOperationGas.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/estimateUserOperationGas.mdx index 5f26a32b..1cd4fe72 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/estimateUserOperationGas.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/estimateUserOperationGas.mdx @@ -1,5 +1,3 @@ # estimateUserOperationGas -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `estimateUserOperationGas` method. - -You can view the full list of options for `estimateUserOperationGas` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/estimateUserOperationGas). +Estimates the `preVerificationGas`, `verificationGasLimit`, and `callGasLimit` needed to validate and execute a user operation against the current chain state. `SmartAccountClient` wraps viem's `BundlerClient.estimateUserOperationGas`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/estimateUserOperationGas). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/getChainId.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/getChainId.mdx index 70592931..ab23446a 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/getChainId.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/getChainId.mdx @@ -1,5 +1,3 @@ # getChainId -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `getChainId` method. - -You can view the full list of options for `getChainId` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/getChainId). +Returns the chain ID reported by the connected bundler — useful for confirming the bundler is on the expected network. `SmartAccountClient` wraps viem's `BundlerClient.getChainId`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/getChainId). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/getSupportedEntryPoints.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/getSupportedEntryPoints.mdx index ea2af042..c204d0f2 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/getSupportedEntryPoints.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/getSupportedEntryPoints.mdx @@ -1,5 +1,3 @@ # getSupportedEntryPoints -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `getSupportedEntryPoints` method. - -You can view the full list of options for `getSupportedEntryPoints` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/getSupportedEntryPoints). +Returns the list of ERC-4337 EntryPoint contract addresses supported by the connected bundler. `SmartAccountClient` wraps viem's `BundlerClient.getSupportedEntryPoints`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/getSupportedEntryPoints). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperation.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperation.mdx index 454472d5..817aeb17 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperation.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperation.mdx @@ -1,5 +1,3 @@ # getUserOperation -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `getUserOperation` method. - -You can view the full list of options for `getUserOperation` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/getUserOperation). +Returns the user operation and its bundler-side state for a given user operation hash — including the EntryPoint it was submitted to and the transaction hash if it has already been included on-chain. `SmartAccountClient` wraps viem's `BundlerClient.getUserOperation`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/getUserOperation). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperationReceipt.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperationReceipt.mdx index 831e680b..8cb02d48 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperationReceipt.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/getUserOperationReceipt.mdx @@ -1,5 +1,3 @@ # getUserOperationReceipt -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `getUserOperationReceipt` method. - -You can view the full list of options for `getUserOperationReceipt` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/getUserOperationReceipt). +Returns the on-chain receipt for a user operation after the bundler has included it in a transaction — covering success status, actual gas used, the paymaster used, and the wrapping transaction receipt. `SmartAccountClient` wraps viem's `BundlerClient.getUserOperationReceipt`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/getUserOperationReceipt). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/prepareUserOperation.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/prepareUserOperation.mdx index 04d8e32a..5b164a09 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/prepareUserOperation.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/prepareUserOperation.mdx @@ -1,5 +1,3 @@ # prepareUserOperation -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `prepareUserOperation` method. - -You can view the full list of options for `prepareUserOperation` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/prepareUserOperation). +Builds an unsigned user operation by filling in fees, nonce, gas limits, paymaster data, and any other missing fields — ready to be signed and submitted. `SmartAccountClient` wraps viem's `BundlerClient.prepareUserOperation` and applies the smart account's defaults; the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/prepareUserOperation). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/sendUserOperation.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/sendUserOperation.mdx index a59729cf..5360c135 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/sendUserOperation.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/sendUserOperation.mdx @@ -1,5 +1,3 @@ # sendUserOperation -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `sendUserOperation` method. - -You can view the full list of options for `sendUserOperation` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation). +Signs a user operation with the connected smart account and submits it to the bundler, returning the user operation hash you can use to track inclusion. `SmartAccountClient` wraps viem's `BundlerClient.sendUserOperation`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation). diff --git a/docs/pages/references/permissionless/reference/smart-account-actions/waitForUserOperationReceipt.mdx b/docs/pages/references/permissionless/reference/smart-account-actions/waitForUserOperationReceipt.mdx index b3ddfa7f..76c03bac 100644 --- a/docs/pages/references/permissionless/reference/smart-account-actions/waitForUserOperationReceipt.mdx +++ b/docs/pages/references/permissionless/reference/smart-account-actions/waitForUserOperationReceipt.mdx @@ -1,5 +1,3 @@ # waitForUserOperationReceipt -`SmartAccountClient` extends viem's `BundlerClient` and so extends the `waitForUserOperationReceipt` method. - -You can view the full list of options for `waitForUserOperationReceipt` [in viem's documentation](https://viem.sh/account-abstraction/actions/bundler/waitForUserOperationReceipt). +Polls the bundler until the user operation with the given hash is included on-chain and returns its receipt. `SmartAccountClient` wraps viem's `BundlerClient.waitForUserOperationReceipt`, so the [full list of options is documented in viem](https://viem.sh/account-abstraction/actions/bundler/waitForUserOperationReceipt). diff --git a/docs/pages/references/permissionless/tutorial/tutorial-2.mdx b/docs/pages/references/permissionless/tutorial/tutorial-2.mdx index 016a2d45..93e90531 100644 --- a/docs/pages/references/permissionless/tutorial/tutorial-2.mdx +++ b/docs/pages/references/permissionless/tutorial/tutorial-2.mdx @@ -1,11 +1,11 @@ # Tutorial 2 — Submit a user operation with an ERC-20 Paymaster +In this tutorial, you will deploy an ERC-4337 smart contract wallet on Base Sepolia, and submit a user operation that pays for its gas fees with USDC using an ERC-20 Paymaster. + :::info You can visit our [ERC-20 Paymaster overview page](/references/paymaster/erc20-paymaster) to learn more about the design and architecture of our ERC-20 Paymaster, and the deployed smart contract addresses. ::: -In this tutorial, you will deploy an ERC-4337 smart contract wallet on Base Sepolia, and submit a user operation that pays for its gas fees with USDC using an ERC-20 Paymaster. - ## Steps ::::steps diff --git a/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterData.mdx b/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterData.mdx index 5e3c1cb5..5e6ba7b6 100644 --- a/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterData.mdx +++ b/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterData.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getPaymasterData -Return values to be used in paymaster-related fields of a signed user operation. This method calls `pm_getPaymasterData` and is part of the experimental [ERC-7677 specification](https://github.com/ethereum/ERCs/pull/360/files). +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return values to be used in paymaster-related fields of a signed user operation. This method calls `pm_getPaymasterData` and is part of the experimental [ERC-7677 specification](https://github.com/ethereum/ERCs/pull/360/files). ## Usage diff --git a/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterStubData.mdx b/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterStubData.mdx index fb0944cb..35631a0b 100644 --- a/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterStubData.mdx +++ b/docs/pages/references/permissionless/v0_1/experimental/eip7677/getPaymasterStubData.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getPaymasterStubData -Returns stub values to be used in paymaster-related fields of an unsigned user operation for gas estimation. This method calls `pm_getPaymasterStubData` and is part of the experimental [ERC-7677 specification](https://github.com/ethereum/ERCs/pull/360/files). +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns stub values to be used in paymaster-related fields of an unsigned user operation for gas estimation. This method calls `pm_getPaymasterStubData` and is part of the experimental [ERC-7677 specification](https://github.com/ethereum/ERCs/pull/360/files). ## Usage diff --git a/docs/pages/references/permissionless/v0_1/faqs.mdx b/docs/pages/references/permissionless/v0_1/faqs.mdx index 36709584..af9690db 100644 --- a/docs/pages/references/permissionless/v0_1/faqs.mdx +++ b/docs/pages/references/permissionless/v0_1/faqs.mdx @@ -4,6 +4,8 @@ import VersionWarning from "../VersionWarning" # permissionless.js FAQs +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Answers to common questions and troubleshooting tips for issues you may run into with permissionless.js v0.1, covering bundler timeouts, gas estimation errors, and other runtime problems. + ## Getting `WaitForUserOperationReceiptTimeoutError`? This error is thrown when the bundler takes too long to bundle your user operation or the default timeout configured in permissionless.js is not enough. @@ -39,4 +41,4 @@ const userOp = await smartAccountClient.prepareUserOperationRequest({ preVerificationGas: 100_000n, }, }) -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/support.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/support.mdx index 9b716006..de5f9adc 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/support.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/support.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # Account Support -permissionless.js supports 6 types of accounts natively (but can easily be extended to support any compatible ERC-4337 account). The below table details which EntryPoints each account is valid for. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js supports 6 types of accounts natively (but can easily be extended to support any compatible ERC-4337 account). The below table details which EntryPoints each account is valid for. | Account | EntryPoint v0.7 | EntryPoint v0.6 | | :------ | :------ | :------ | diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-biconomy-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-biconomy-account.mdx index 9a60c7a7..1a5dc015 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-biconomy-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-biconomy-account.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a Biconomy account with permissionless.js -[Biconomy Smart Account](https://github.com/bcnmy/scw-contracts) is a smart account building on the core concepts of Gnosis and Argent safes. You can use Biconomy with plugins such as session keys, and even write your own plugins. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Biconomy Smart Account](https://github.com/bcnmy/scw-contracts) is a smart account building on the core concepts of Gnosis and Argent safes. You can use Biconomy with plugins such as session keys, and even write your own plugins. ## Steps @@ -72,4 +72,4 @@ You can also send an array of transactions in a single batch. // [!include ~/snippets/v0_1/accounts/biconomy.ts:submitBatch] ``` -:::: \ No newline at end of file +:::: diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-erc7579-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-erc7579-account.mdx index 2dc534c6..450e79f4 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-erc7579-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-erc7579-account.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to use an ERC-7579 compatible smart account with permissionless.js -[ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) defines a standard for modular smart account interfaces. It also defines behavior for interoperability with minimal restrictions for accounts and modules. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) defines a standard for modular smart account interfaces. It also defines behavior for interoperability with minimal restrictions for accounts and modules. Currently Safe and Kernel are the only smart accounts that implements ERC-7579. diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-kernel-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-kernel-account.mdx index c799affe..3f31edf9 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-kernel-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-kernel-account.mdx @@ -4,12 +4,12 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a Kernel account with permissionless.js +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). + :::info ZeroDev, the author of Kernel, maintains their own in-house SDK built closely on top of permissionless.js that you can use for the account system while still plugging in all the other components from permissionless.js. Take a look at [their documentation](https://docs.zerodev.app) for more information. ::: -[Kernel](https://github.com/zerodevapp/kernel) is a **modular smart account** that supports plugins, which are smart contracts that extend the account's functionalities. You can use Kernel with popular plugins such as session keys and account recovery, and even write your own plugins. Kernel is compatible with [ERC-7579](https://erc7579.com/). - ## Picking an EntryPoint Kernel is compatible with EntryPoint versions v0.6 and v0.7. diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-light-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-light-account.mdx index fca31b0b..536b794b 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-light-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-light-account.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a LightAccount with permissionless.js -[LightAccount](https://github.com/alchemyplatform/light-account) is the smart account implementation made by Alchemy and inspired by SimpleAccount. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [LightAccount](https://github.com/alchemyplatform/light-account) is the smart account implementation made by Alchemy and inspired by SimpleAccount. It has a few additional [features](https://github.com/alchemyplatform/light-account?tab=readme-ov-file#features), such as transferrable ownership and upgradability. This guide will show you how to create and use a LightAccount with permissionless.js. diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-safe-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-safe-account.mdx index bf7162a8..d4a8f2a9 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-safe-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-safe-account.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a Safe account with permissionless.js -[Safe](https://safe.global) is the most battle-tested Ethereum smart account provider. With their recent release of their ERC-4337 module, it is now possible to plug in Safe accounts to ERC-4337 bundlers and paymasters. This guide will walk you through how to create and use a Safe account with permissionless.js. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Safe](https://safe.global) is the most battle-tested Ethereum smart account provider. With their recent release of their ERC-4337 module, it is now possible to plug in Safe accounts to ERC-4337 bundlers and paymasters. This guide will walk you through how to create and use a Safe account with permissionless.js. ## Steps diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-simple-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-simple-account.mdx index 9562cabf..ea961b38 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-simple-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-simple-account.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a SimpleAccount with permissionless.js -[SimpleAccount](https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/accounts/SimpleAccount.sol) is the original reference sample implementation of an ERC-4337 made by the Eth-Infinitism team. Despite being a reference implementation, it is widely used in production. It allows for a single EOA signer to sign user operations for the account. This guide will show you how to create and use a SimpleAccount with permissionless.js. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [SimpleAccount](https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/accounts/SimpleAccount.sol) is the original reference sample implementation of an ERC-4337 made by the Eth-Infinitism team. Despite being a reference implementation, it is widely used in production. It allows for a single EOA signer to sign user operations for the account. This guide will show you how to create and use a SimpleAccount with permissionless.js. ## Steps diff --git a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-trustwallet-account.mdx b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-trustwallet-account.mdx index 305cd1fd..ee8a473d 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/accounts/use-trustwallet-account.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/accounts/use-trustwallet-account.mdx @@ -4,15 +4,15 @@ import VersionWarning from "../../../VersionWarning" # How to create and use a Trust smart account with permissionless.js +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). +After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. + :::info [Trust Wallet](https://trustwallet.com/), the author of [Barz](https://github.com/trustwallet/barz), provides a smart contract security monitoring service for each and every Barz deployed on-chain including Barz created by SDK. This is a service that TrustWallet provides to builders to build innovative products on top of a secure foundation. Monitoring will automatically start as soon as the Barz account is deployed on-chain; for projects wanting to get security monitoring information, reach out to the smart wallet channel in [TrustWallet Discord](https://discord.gg/trustwallet). ::: -Trust Wallet is one of the most trusted wallet provider empowering more than 122 million users and is the first Web3 wallet to be [certified by ISO](https://trustwallet.com/security). -After thorough development and extensive security audits, Trust Wallet launched the [Smart Wallet](https://trustwallet.com/swift) powered by account abstraction. - With the recent opensource of their Smart Wallet system Barz, their smart account solution, together with their security infrastructure is disclosed for public to support builders build products on a secure foundation. This guide will walk you through how to create and use a Barz account with permissionless.js diff --git a/docs/pages/references/permissionless/v0_1/how-to/dapp-gas-sponsorship.mdx b/docs/pages/references/permissionless/v0_1/how-to/dapp-gas-sponsorship.mdx index 4b1fa86b..34bc24e6 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/dapp-gas-sponsorship.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/dapp-gas-sponsorship.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # Update your existing app to sponsor gas fees for smart account users -If you are looking to sponsor gas fees for your users without embedding a wallet in your app, you can use this guide to update your existing app to sponsor gas fees for smart accounts. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ If you are looking to sponsor gas fees for your users without embedding a wallet in your app, you can use this guide to update your existing app to sponsor gas fees for smart accounts. ## Steps @@ -18,4 +18,4 @@ Follow the deployment guide on the [ERC-7677 Proxy Server](https://github.com/pi Follow Step 3 on the [erc7677.xyz guide](https://www.erc7677.xyz/guides/sponsoring-transactions#3-send-eip-5792-requests-with-a-paymaster-service-capability) to update your app to support ERC-5792 requests and enable the paymaster service capability feature, using the public URL you created for the ERC-7677 proxy in the previous step. -:::: \ No newline at end of file +:::: diff --git a/docs/pages/references/permissionless/v0_1/how-to/error-handling.mdx b/docs/pages/references/permissionless/v0_1/how-to/error-handling.mdx index a58fd789..682d5818 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/error-handling.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/error-handling.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # Error Handling -Similarly to how [error handling in viem works](https://viem.sh/docs/error-handling), every module in permissionless.js exports an accompanying error type which you can use to strongly type your `catch` statements. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Similarly to how [error handling in viem works](https://viem.sh/docs/error-handling), every module in permissionless.js exports an accompanying error type which you can use to strongly type your `catch` statements. These types come in the form of `ErrorType`. For example, the `estimateUserOperationGas` action exports a `EstimateUserOperationGasErrorType` type. @@ -68,4 +68,4 @@ export const bundlerClient = createBundlerClient({ }) ``` -::: \ No newline at end of file +::: diff --git a/docs/pages/references/permissionless/v0_1/how-to/local-testing.mdx b/docs/pages/references/permissionless/v0_1/how-to/local-testing.mdx index 064f8436..d6ceaf75 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/local-testing.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/local-testing.mdx @@ -4,12 +4,7 @@ import VersionWarning from "../../VersionWarning" # Local Testing -This guide introduces a ready-to-use mock test environment, that contains: - -- A local Alto bundler -- A mock verifying paymaster -- An Anvil node -- ERC-4337 related contracts, including the EntryPoint and account factories for all major ERC-4337 account implementations. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ This guide walks you through a ready-to-use Docker-based mock ERC-4337 test environment that bundles a local Alto bundler, a mock verifying paymaster, an Anvil node, and all ERC-4337 related contracts — the EntryPoint and account factories for every major smart account implementation. The test environment is orchestrated using **docker compose**. Where the docker containers are pulled from [this repo](https://github.com/pimlicolabs/mock-aa-environment). diff --git a/docs/pages/references/permissionless/v0_1/how-to/migration-guide.mdx b/docs/pages/references/permissionless/v0_1/how-to/migration-guide.mdx index 787296de..8f5f7869 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/migration-guide.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/migration-guide.mdx @@ -4,6 +4,8 @@ import VersionWarning from "../../VersionWarning" # Migration Guide +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ This guide covers the breaking changes introduced in permissionless.js v0.1 and lists the code edits you need to make when upgrading from earlier versions. + ## 0.1.0 :::warning @@ -125,4 +127,4 @@ const userOperationHash = await bundlerClient.sendUserOperation({ userOperation: sponsoredUserOperation, entryPoint: ENTRYPOINT_ADDRESS_V07, // [!code --] }) -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/how-to/parallel-transactions.mdx b/docs/pages/references/permissionless/v0_1/how-to/parallel-transactions.mdx index 89a1feef..097e1e39 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/parallel-transactions.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/parallel-transactions.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # How to send multiple user operations in parallel -permissionless.js library lets you to send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js library lets you send multiple transactions in parallel. This can be useful if you want to batch multiple calls in a single user operation or if you want to send user operations concurrently. ## Batching Multiple Calls diff --git a/docs/pages/references/permissionless/v0_1/how-to/paymasters/conditional-sponsoring.mdx b/docs/pages/references/permissionless/v0_1/how-to/paymasters/conditional-sponsoring.mdx index 1d95413d..8c8da90e 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/paymasters/conditional-sponsoring.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/paymasters/conditional-sponsoring.mdx @@ -4,12 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to conditionally sponsor a user operation -The permissionless.js library allows you to conditionally sponsor a user operation. This can be useful in situations like: - -- Sponsor only first 10 transactions -- Sponsor if they have a specific NFT - -The use cases can be many, but the general idea is to use the `middleware.sponsorUserOperation` parameter to conditionally sponsor a user operation. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js lets you conditionally sponsor a user operation — useful when you want to cap free sponsorship to the first N transactions per user, gate it behind ownership of a specific NFT, or apply any other custom rule. The general approach is to use the `middleware.sponsorUserOperation` parameter to decide per-operation whether to attach the paymaster. Let's take an example where you want to sponsor only the first 10 transactions. diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/dfns.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/dfns.mdx index f8647983..2598862e 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/dfns.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/dfns.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a DFNS signer with permissionless.js -[Dfns](https://www.dfns.co/) is an MPC/TSS Wallet-as-a-Service API/SDK provider. Dfns aims to optimize the balance of security and UX by deploying key shares into a decentralized network on the backend while enabling wallet access via biometric open standards on the frontend like Webauthn. Reach out [here](https://www.dfns.co/) to set up a sandbox environment to get started. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Dfns](https://www.dfns.co/) is an MPC/TSS Wallet-as-a-Service API/SDK provider. Dfns aims to optimize the balance of security and UX by deploying key shares into a decentralized network on the backend while enabling wallet access via biometric open standards on the frontend like Webauthn. Reach out [here](https://www.dfns.co/) to set up a sandbox environment to get started. ## Setup @@ -26,4 +26,4 @@ After following the Dfns documentation, you will have access to a `dfnsWallet` o ### Use with permissionless.js - \ No newline at end of file + diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/dynamic.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/dynamic.mdx index d8e291c4..169642bb 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/dynamic.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/dynamic.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to use a Dynamic signer with permissionless.js -permissionless.js allows you to plug in custom signers to control the accounts that you create. Dynamic is an embedded wallet provider that allows you to easily onboard users to your dapp. It is possible to use Dynamic as a signer with permissionless.js, allowing you to use Dynamic to create and control smart accounts and sign transactions. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js allows you to plug in custom signers to control the accounts that you create. Dynamic is an embedded wallet provider that allows you to easily onboard users to your dapp. It is possible to use Dynamic as a signer with permissionless.js, allowing you to use Dynamic to create and control smart accounts and sign transactions. ::::steps @@ -97,4 +97,4 @@ const txHash = await smartAccountClient.sendTransaction({ }) ``` -:::: \ No newline at end of file +:::: diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/fireblocks.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/fireblocks.mdx index 14a336a4..1e4071b7 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/fireblocks.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/fireblocks.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Fireblocks signer with permissionless.js -[Fireblocks](https://www.fireblocks.com/) is a user-friendly platform designed for building blockchain-based products and managing digital asset operations. It uses a direct custody approach, combining high performance with zero counterparty risk and multi-layered security. The platform includes secure MPC-based digital asset wallets, a policy engine for governance and transaction rules, and comprehensive treasury management. Fireblocks' security framework features multiple layers, including MPC-CMP technology, secure enclaves, and a robust policy engine, ensuring protection against cyberattacks, internal threats, and human errors. It's widely used for various operations like treasury, trading, and managing NFTs, smart contracts, and user wallets. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Fireblocks](https://www.fireblocks.com/) is a user-friendly platform designed for building blockchain-based products and managing digital asset operations. It uses a direct custody approach, combining high performance with zero counterparty risk and multi-layered security. The platform includes secure MPC-based digital asset wallets, a policy engine for governance and transaction rules, and comprehensive treasury management. Fireblocks' security framework features multiple layers, including MPC-CMP technology, secure enclaves, and a robust policy engine, ensuring protection against cyberattacks, internal threats, and human errors. It's widely used for various operations like treasury, trading, and managing NFTs, smart contracts, and user wallets. ## Setup @@ -27,4 +27,4 @@ After following the Fireblocks documentation, you will have access to a `Fireblo ### Use with permissionless.js - \ No newline at end of file + diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/index.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/index.mdx index 4de65cc7..526fc226 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/index.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/index.mdx @@ -4,6 +4,6 @@ import VersionWarning from "../../../VersionWarning" # Signers for permissionless.js -Smart accounts are able to define custom authentication and authorization schemes, but still require signatures to validate user operations coming from signers. permissionless.js defines the `SmartAccountSigner` interface, which is a generic interface that signers for smart accounts can implement. While by default these signers have full control over the smart account, it's possible to define custom roles and permissions for signers, and mix-and-match them to create complex multi-signature schemes, as well as rotate signers and revoke their access. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Smart accounts are able to define custom authentication and authorization schemes, but still require signatures to validate user operations coming from signers. permissionless.js defines the `SmartAccountSigner` interface, which is a generic interface that signers for smart accounts can implement. While by default these signers have full control over the smart account, it's possible to define custom roles and permissions for signers, and mix-and-match them to create complex multi-signature schemes, as well as rotate signers and revoke their access. -In addition to pure EOA signers, permissionless.js supports a variety of third-party wallet services as signers for smart accounts. This allows you to leverage the UIs and infrastructure of these services, while still using smart accounts supported by permissionless.js. \ No newline at end of file +In addition to pure EOA signers, permissionless.js supports a variety of third-party wallet services as signers for smart accounts. This allows you to leverage the UIs and infrastructure of these services, while still using smart accounts supported by permissionless.js. diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/lit-protocol.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/lit-protocol.mdx index ffa97218..3577d10e 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/lit-protocol.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/lit-protocol.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to Integrate Pimlico with Lit Protocol OTP Authentication -This how-to guide will walk you through the steps to integrate Lit Protocol's OTP sign-in with email, SMS, and Whatsapp with a smart account whose user operations are relayed and sponsored by Pimlico. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ This how-to guide will walk you through the steps to integrate Lit Protocol's OTP sign-in with email, SMS, and Whatsapp with a smart account whose user operations are relayed and sponsored by Pimlico. :::info Lit Protocol is an Authentication solution that lets you create and manage distributed cryptographic key-pairs for condition-based encryption and programmatic signing. A decentralized key management network, Lit can be used in place of centralized key custodians and other key management solutions. For more information on how Lit Protocol works, visit [their documentation page](https://developer.litprotocol.com/architecture). diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/magic.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/magic.mdx index a8025a45..5acf315e 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/magic.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/magic.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Magic signer with permissionless.js -[Magic](https://magic.link/) is a popular embedded wallet provider that supports social logins. While social logins are great, your users still need to onramp in order to pay for gas, which introduces significant friction. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Magic](https://magic.link/) is a popular embedded wallet provider that supports social logins. While social logins are great, your users still need to onramp in order to pay for gas, which introduces significant friction. By combining permissionless.js with Magic, you can use Magic to enable a smooth social login experience, while using permissionless.js accounts as the smart wallets to sponsor gas for users, batch transactions, and more. @@ -30,4 +30,4 @@ After following the Magic documentation, you will have access to a `MagicBase` o ### Use with permissionless.js - \ No newline at end of file + diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/para.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/para.mdx index ae1bbe4a..81963ca3 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/para.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/para.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Para signer with permissionless.js -[Para](https://www.getpara.com/) offers a signing solution enabling the creation of secure, embedded MPC wallets accessible via email or social login. These wallets, compatible across different applications, offer portability, recoverability, and programmability, eliminating the need for users to establish separate signers or contract accounts for each application. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Para](https://www.getpara.com/) offers a signing solution enabling the creation of secure, embedded MPC wallets accessible via email or social login. These wallets, compatible across different applications, offer portability, recoverability, and programmability, eliminating the need for users to establish separate signers or contract accounts for each application. ## Setup diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/particle-network.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/particle-network.mdx index 22ee6565..972bb7ce 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/particle-network.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/particle-network.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Particle Network signer with permissionless.js -[Particle Network](https://particle.network/) is an intent-centric, modular wallet-as-a-service (WaaS). By utilizing MPC-TSS for key management, Particle can streamline onboarding via familiar Web2 methods such as Google, emails, and phone numbers. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Particle Network](https://particle.network/) is an intent-centric, modular wallet-as-a-service (WaaS). By utilizing MPC-TSS for key management, Particle can streamline onboarding via familiar Web2 methods such as Google, emails, and phone numbers. By combining permissionless.js with Particle, you can use Particle to enable a smooth social login experience, while using ZeroDev as the smart wallet to sponsor gas for users, batch transactions, and more. @@ -29,4 +29,4 @@ After following the Particle Network documentation, you will have access to a `P ### Use with permissionless.js - \ No newline at end of file + diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/privy.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/privy.mdx index 0e36fe3f..b36f5c86 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/privy.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/privy.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # How to use a Privy signer with permissionless.js -permissionless.js allows you to plug in custom signers to control the accounts that you create. Privy is an embedded wallet provider that allows you to easily onboard users to your dapp. It is possible to use Privy as a signer with permissionless.js, allowing you to use Privy to create and control smart accounts and sign transactions. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js allows you to plug in custom signers to control the accounts that you create. Privy is an embedded wallet provider that allows you to easily onboard users to your dapp. It is possible to use Privy as a signer with permissionless.js, allowing you to use Privy to create and control smart accounts and sign transactions. Additionally you may want to look at Privy's guide on working with permissionless.js [here](https://docs.privy.io/guide/react/recipes/account-abstraction/pimlico). diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/turnkey.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/turnkey.mdx index 791f85e3..3b1ca2a9 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/turnkey.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/turnkey.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Turnkey signer with permissionless.js -[Turnkey](https://turnkey.com/) is a key infrastructure provider with a great developer API and a powerful security policy engine. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Turnkey](https://turnkey.com/) is a key infrastructure provider with a great developer API and a powerful security policy engine. By combining permissionless.js with Turnkey, you can create **custodial AA wallets** whose security is provided by Turnkey, with powerful functionalities such as sponsoring gas, batching transactions, etc. @@ -29,4 +29,4 @@ After following the Turnkey documentation, you will have access to a `TurnkeyCli ### Use with permissionless.js - \ No newline at end of file + diff --git a/docs/pages/references/permissionless/v0_1/how-to/signers/web3auth.mdx b/docs/pages/references/permissionless/v0_1/how-to/signers/web3auth.mdx index 37682ce5..038d993b 100644 --- a/docs/pages/references/permissionless/v0_1/how-to/signers/web3auth.mdx +++ b/docs/pages/references/permissionless/v0_1/how-to/signers/web3auth.mdx @@ -6,7 +6,7 @@ import SmartAccounts from "./smartAccounts.mdx" # How to use a Web3Auth signer with permissionless.js -[Web3Auth](https://web3auth.io/) is a popular embedded wallet provider that supports social logins. While social logins are great, your users still need to onramp in order to pay for gas, which introduces significant friction. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ [Web3Auth](https://web3auth.io/) is a popular embedded wallet provider that supports social logins. While social logins are great, your users still need to onramp in order to pay for gas, which introduces significant friction. By combining permissionless.js with Web3Auth, you can use Web3Auth to enable a smooth social login experience, while using permissionless.js accounts as the smart wallets to sponsor gas for users, batch transactions, and more. diff --git a/docs/pages/references/permissionless/v0_1/index.mdx b/docs/pages/references/permissionless/v0_1/index.mdx index 0150c6b9..8de49115 100644 --- a/docs/pages/references/permissionless/v0_1/index.mdx +++ b/docs/pages/references/permissionless/v0_1/index.mdx @@ -26,7 +26,9 @@ import { HomePage } from 'vocs/components'
-# Overview +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js is a TypeScript library built on top of viem for interacting with ERC-4337 bundlers, paymasters, and smart accounts. The library is provider-agnostic, has zero runtime dependencies, and provides high-level support for major smart account implementations including Safe, Kernel, Biconomy, SimpleAccount, TrustWallet, and LightAccount. + +## Overview ```ts const pimlicoApiKey = "YOUR_API_KEY_HERE" @@ -58,7 +60,7 @@ opReceipt!.actualGasUsed ``` -# Features +## Features - **High-level smart account support**: We support a high-level API for deploying and managing smart accounts, including some of the most popular implementations ([Safe](https://safe.global), [Kernel](https://zerodev.app), [Biconomy](https://biconomy.io), [TrustWallet](https://trustwallet.com/swift), etc.) - **Bundler support**: We support all bundler actions following [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace). @@ -68,7 +70,7 @@ opReceipt!.actualGasUsed - **Built on & for viem**: permissionless.js is designed to be a thin wrapper around viem, maintaining the same style and overall feel viem provides. - and a lot more... -# Source Code +## Source Code The source code for permissionless.js is available on [GitHub](https://github.com/pimlicolabs/permissionless.js) diff --git a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToKernelSmartAccount.mdx b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToKernelSmartAccount.mdx index af784049..dd2f959f 100644 --- a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToKernelSmartAccount.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToKernelSmartAccount.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signerToKernelSmartAccount -Creates a KernelAccount instance controlled by a `SmartAccountSigner`. Check out [this guide](/references/permissionless/how-to/accounts/use-kernel-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Creates a KernelAccount instance controlled by a `SmartAccountSigner`. Check out [this guide](/references/permissionless/how-to/accounts/use-kernel-account) for a complete tutorial. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToLightSmartAccount.mdx b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToLightSmartAccount.mdx index 3a790351..036c0fa5 100644 --- a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToLightSmartAccount.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToLightSmartAccount.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signerToLightSmartAccount -Creates a LightAccount instance controlled by a `SmartAccountSigner`. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Creates a LightAccount instance controlled by a `SmartAccountSigner`. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSafeSmartAccount.mdx b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSafeSmartAccount.mdx index 967e4ec8..9ebfca64 100644 --- a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSafeSmartAccount.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSafeSmartAccount.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signerToSafeSmartAccount -Creates a Safe smart account instance controlled by a `SmartAccountSigner`. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Creates a Safe smart account instance controlled by a `SmartAccountSigner`. ## Usage @@ -129,4 +129,4 @@ An array of calls that will be executed during the deployment of the smart accou If you provide an address, the smart account can not be deployed. This should be used if you want to interact with an existing smart account. ::: -The address of the smart account. If not provided, the determinstic smart account address will be used. \ No newline at end of file +The address of the smart account. If not provided, the determinstic smart account address will be used. diff --git a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSimpleSmartAccount.mdx b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSimpleSmartAccount.mdx index d04c5496..21d45ec5 100644 --- a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSimpleSmartAccount.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToSimpleSmartAccount.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signerToSimpleSmartAccount -Creates a SimpleAccount instance controlled by a `SmartAccountSigner`. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Creates a SimpleAccount instance controlled by a `SmartAccountSigner`. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToTrustSmartAccount.mdx b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToTrustSmartAccount.mdx index a94e6036..2c9515a4 100644 --- a/docs/pages/references/permissionless/v0_1/reference/accounts/signerToTrustSmartAccount.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/accounts/signerToTrustSmartAccount.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signerToTrustSmartAccount -Creates a Trust Wallet Smart Account instance controlled by a `SmartAccountSigner`. Check out [this guide](/references/permissionless/how-to/accounts/use-trustwallet-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Creates a Trust Wallet Smart Account instance controlled by a `SmartAccountSigner`. Check out [this guide](/references/permissionless/how-to/accounts/use-trustwallet-account) for a complete tutorial. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/estimateUserOperationGas.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/estimateUserOperationGas.mdx index 7be6eac6..9bb1f868 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/estimateUserOperationGas.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/estimateUserOperationGas.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # estimateUserOperationGas -Estimate the gas limits for a User Operation. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Estimate the gas limits for a User Operation. ## Usage @@ -76,4 +76,4 @@ The address of the entry point contract. ## JSON-RPC Method -[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationByHash.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationByHash.mdx index 90256622..7af1260b 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationByHash.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationByHash.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getUserOperationByHash -Return a User Operation based on a User Operation hash. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return a User Operation based on a User Operation hash. ## Usage @@ -68,4 +68,4 @@ The User Operation hash. ## JSON-RPC Method -[`eth_estimateUserOperationByHash`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_estimateUserOperationByHash`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationReceipt.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationReceipt.mdx index 23f0a123..fd2939a6 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationReceipt.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/getUserOperationReceipt.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getUserOperationReceipt -Return a User Operation receipt based on a User Operation hash. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return a User Operation receipt based on a User Operation hash. ## Usage @@ -67,4 +67,4 @@ The User Operation hash. ## JSON-RPC Method -[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/sendUserOperation.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/sendUserOperation.mdx index b3cfffe5..e09224e5 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/sendUserOperation.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/sendUserOperation.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # sendUserOperation -Submits a user operation to the bundler. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Submits a user operation to the bundler. ## Usage @@ -74,4 +74,4 @@ The address of the entry point contract. ## JSON-RPC Method -[`eth_sendUserOperation`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_sendUserOperation`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/supportedEntryPoints.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/supportedEntryPoints.mdx index 85ad301d..430f69c1 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/supportedEntryPoints.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/supportedEntryPoints.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # supportedEntryPoints -Return the Entry Points supported by the bundler. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return the Entry Points supported by the bundler. ## Usage @@ -40,4 +40,4 @@ The Entry Points supported by the bundler. ## JSON-RPC Method -[`eth_supportedEntryPoints`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_supportedEntryPoints`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/waitForUserOperationReceipt.mdx b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/waitForUserOperationReceipt.mdx index cccd22d6..a76975da 100644 --- a/docs/pages/references/permissionless/v0_1/reference/bundler-actions/waitForUserOperationReceipt.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/bundler-actions/waitForUserOperationReceipt.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # waitForUserOperationReceipt -Waits for the User Operation to be included on a block (one confirmation), and then returns the User Operation Receipt. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Waits for the User Operation to be included on a block (one confirmation), and then returns the User Operation Receipt. :::warning If you are getting `WaitForUserOperationReceiptTimeoutError`. Use custom timeout in transport, please see the [FAQs](/references/permissionless/faqs#getting-waitforuseroperationreceipttimeouterror) for more information. @@ -83,4 +83,4 @@ Optional timeout (in milliseconds) to wait before polling is stopped. ## JSON-RPC Method -[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) \ No newline at end of file +[`eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) diff --git a/docs/pages/references/permissionless/v0_1/reference/clients/bundlerClient.mdx b/docs/pages/references/permissionless/v0_1/reference/clients/bundlerClient.mdx index 95d07165..0c42dab7 100644 --- a/docs/pages/references/permissionless/v0_1/reference/clients/bundlerClient.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/clients/bundlerClient.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # Bundler Client -A Bundler Client is an interface to official ERC-4337 JSON-RPC API methods that include sending user operations, estimation user operation gas limits, getting user operation receipts and more. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A Bundler Client is an interface to official ERC-4337 JSON-RPC API methods that include sending user operations, estimation user operation gas limits, getting user operation receipts and more. To create a Bundler Client, create a basic client and extend it with the Bundler Actions. @@ -47,4 +47,4 @@ const bundlerClient = createBundlerClient({ transport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_API_KEY_HERE"), entryPoint: ENTRYPOINT_ADDRESS_V07 }) -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoBundlerClient.mdx b/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoBundlerClient.mdx index 41f1c01c..782b5c93 100644 --- a/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoBundlerClient.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoBundlerClient.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # Pimlico Bundler Client -A Pimlico Bundler Client is an interface to official ERC-4337 JSON-RPC API methods that include sending user operations, estimation user operation gas limits, getting user operation receipts and more as well as the Pimlico-specific bundler methods [pimlico_getUserOperationStatus](/references/bundler/endpoints/pimlico_getUserOperationStatus) and [pimlico_getUserOperationGasPrice](/references/bundler/endpoints/pimlico_getUserOperationGasPrice). +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A Pimlico Bundler Client is an interface to official ERC-4337 JSON-RPC API methods that include sending user operations, estimation user operation gas limits, getting user operation receipts and more as well as the Pimlico-specific bundler methods [pimlico_getUserOperationStatus](/references/bundler/endpoints/pimlico_getUserOperationStatus) and [pimlico_getUserOperationGasPrice](/references/bundler/endpoints/pimlico_getUserOperationGasPrice). To create a Pimlico Bundler Client, create a basic client and extend it with the Bundler Actions and Pimlico Bundler Actions. @@ -51,4 +51,4 @@ const pimlicoBundlerClient = createPimlicoBundlerClient({ transport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_API_KEY_HERE"), entryPoint: ENTRYPOINT_ADDRESS_V07 }) -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoPaymasterClient.mdx b/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoPaymasterClient.mdx index bf2a064b..b6d810d7 100644 --- a/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoPaymasterClient.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/clients/pimlicoPaymasterClient.mdx @@ -4,14 +4,14 @@ import VersionWarning from "../../../VersionWarning" # Pimlico Paymaster Client +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A Pimlico Paymaster Client is an interface to the [Pimlico-specific paymaster methods](/references/paymaster/verifying-paymaster/endpoints). + :::warning The Pimlico paymaster actions in permissionless.js only work with the v2 Pimlico API. The v1 API for paymasters is deprecated and will be removed in the future. This version, instead of simply signing over the passed-in User Operation, estimates the gas values for the User Operation and then signs over the estimated gas values, returning not only the `paymasterAndData` but also the `preVerificationGas`, `verificationGasLimit`, and `callGasLimit`. ::: -A Pimlico Paymaster Client is an interface to the [Pimlico-specific paymaster methods](/references/paymaster/verifying-paymaster/endpoints). - To create a Pimlico Paymaster Client, create a basic client and extend it with the Pimlico Paymaster Actions. ## Import @@ -65,4 +65,4 @@ const pimlicoPaymasterClient = createPimlicoPaymasterClient({ transport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_API_KEY_HERE"), entryPoint: ENTRYPOINT_ADDRESS_V07 }) -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/reference/clients/smartAccountClient.mdx b/docs/pages/references/permissionless/v0_1/reference/clients/smartAccountClient.mdx index d0ae5a5f..1e61740c 100644 --- a/docs/pages/references/permissionless/v0_1/reference/clients/smartAccountClient.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/clients/smartAccountClient.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # Smart Account Client -A Smart Account Client is an almost drop-in replacement for a standard viem [walletClient](https://viem.sh/docs/clients/wallet) but for managing smart accounts instead of EOA accounts. In addition, a Smart Account Client also contains, depending on the underlying smart account implementation used, a few extra actions that are specific to smart accounts. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A Smart Account Client is an almost drop-in replacement for a standard viem [walletClient](https://viem.sh/docs/clients/wallet) but for managing smart accounts instead of EOA accounts. In addition, a Smart Account Client also contains, depending on the underlying smart account implementation used, a few extra actions that are specific to smart accounts. To create a Smart Account Client, use the `createSmartAccountClient` function. @@ -40,4 +40,4 @@ Then you can consume Smart Account Actions and access properties: ```ts const smartAccountAddress = await smartAccountClient.address -``` \ No newline at end of file +``` diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/accountId.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/accountId.mdx index a629d693..1d180527 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/accountId.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/accountId.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # accountId -Gets the accountId of the smart account as defined in [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579). Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns the account ID of the smart account as defined in [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) — a string that identifies which ERC-7579 implementation the account follows so modules can be installed against the correct interface. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/installModule.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/installModule.mdx index 741fd0c5..a5d01a68 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/installModule.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/installModule.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # installModule -Installs a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module to the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Installs an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module on the smart account by sending a user operation that calls the account's `installModule` function — used to add validators, executors, hooks, or fallback handlers to an ERC-7579-compatible account. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/isModuleInstalled.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/isModuleInstalled.mdx index e47512bb..45376a2f 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/isModuleInstalled.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/isModuleInstalled.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # isModuleInstalled -Checks if an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module is installed on the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns `true` if the specified [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module is currently installed on the smart account — useful for gating UI flows or skipping a redundant `installModule` call. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsExecutionMode.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsExecutionMode.mdx index 206e1ab9..5e7c2fd1 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsExecutionMode.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsExecutionMode.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # supportsExecutionMode -Checks if a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) execution mode is supported on the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns `true` if the smart account supports a given [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) execution mode (single, batch, delegate-call, etc.). Not every implementation supports every mode, so check before issuing a call that depends on one. :::info According to the specification, not all execution modes must be supported. So it is recommended to use this function to check if the execution mode is supported before using it. diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsModule.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsModule.mdx index 96f44f98..b75b7ce8 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsModule.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/supportsModule.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # supportsModule -Checks if a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module type is supported by the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns `true` if the smart account supports a given [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module type (validator, executor, hook, or fallback) — check this before attempting to install a module of that type. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/uninstallModule.mdx b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/uninstallModule.mdx index 15cbd1f8..cf4f452f 100644 --- a/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/uninstallModule.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/erc7579-actions/uninstallModule.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # uninstallModule -Uninstalls a [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module from the smart account. Check out [this guide](/references/permissionless/how-to/accounts/use-erc7579-account) for a complete tutorial. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Uninstalls an [ERC-7579](https://eips.ethereum.org/EIPS/eip-7579) module from the smart account by sending a user operation that calls the account's `uninstallModule` function — used to remove validators, executors, hooks, or fallback handlers previously installed on the account. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/glossary/errors.mdx b/docs/pages/references/permissionless/v0_1/reference/glossary/errors.mdx index fc09ffd8..d511cf52 100644 --- a/docs/pages/references/permissionless/v0_1/reference/glossary/errors.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/glossary/errors.mdx @@ -2,7 +2,9 @@ import VersionWarning from "../../../VersionWarning" -# Errors [Glossary of Errors in permissionless.js.] +# Errors + +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A glossary of every error class thrown by permissionless.js v0.1, grouped by the layer that raises them (EntryPoint, smart account, paymaster, etc.) so you can quickly find what went wrong. All errors in permissionless.js extend the standard viem [`BaseError`](https://github.com/wevm/viem/blob/main/src/errors/base.ts). @@ -33,4 +35,4 @@ All errors in permissionless.js extend the standard viem [`BaseError`](https://g ### `PaymasterValidationRevertedError` ### `PaymasterDataRejectedError` ### `PaymasterPostOpRevertedError` -### `InvalidPaymasterAndDataError` \ No newline at end of file +### `InvalidPaymasterAndDataError` diff --git a/docs/pages/references/permissionless/v0_1/reference/index.mdx b/docs/pages/references/permissionless/v0_1/reference/index.mdx index 1c1b28c5..1ccc25f8 100644 --- a/docs/pages/references/permissionless/v0_1/reference/index.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/index.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # permissionless.js -permissionless.js is a TypeScript library built on viem for interacting with ERC-4337 bundlers, paymasters, and User Operations. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ permissionless.js is a TypeScript library built on viem for interacting with ERC-4337 bundlers, paymasters, and User Operations. ## Installation @@ -28,4 +28,4 @@ pnpm install permissionless bun install permissionless ``` -:::: \ No newline at end of file +:::: diff --git a/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationGasPrice.mdx b/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationGasPrice.mdx index 345467e1..f7e43e88 100644 --- a/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationGasPrice.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationGasPrice.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getUserOperationGasPrice -Return a User Operation based on a User Operation hash. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns the current `maxFeePerGas` and `maxPriorityFeePerGas` recommended by Pimlico's bundler across slow, standard, and fast tiers — use these gas prices when sending a user operation through the bundler. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationStatus.mdx b/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationStatus.mdx index 641fad5c..d3f25786 100644 --- a/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationStatus.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/pimlico-bundler-actions/getUserOperationStatus.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getUserOperationStatus -Return a status of the User Operation as well as potentially the hash of the transaction being used to bundle the User Operation. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return a status of the User Operation as well as potentially the hash of the transaction being used to bundle the User Operation. ## Usage @@ -47,4 +47,4 @@ The hash of the User Operation. ## JSON-RPC Method -[`pimlico_getUserOperationStatus`](/references/bundler/endpoints/pimlico_getUserOperationStatus) \ No newline at end of file +[`pimlico_getUserOperationStatus`](/references/bundler/endpoints/pimlico_getUserOperationStatus) diff --git a/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/sponsorUserOperation.mdx b/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/sponsorUserOperation.mdx index 32dffde7..f9a038fd 100644 --- a/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/sponsorUserOperation.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/sponsorUserOperation.mdx @@ -4,14 +4,14 @@ import VersionWarning from "../../../VersionWarning" # sponsorUserOperation +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Estimates the gas values for the User Operation and sponsors the operation with the new gas values. + :::warning The Pimlico paymaster actions in permissionless.js only work with the v2 Pimlico API. The v1 API for paymasters is deprecated and will be removed in the future. This version, instead of simply signing over the passed-in User Operation, estimates the gas values for the User Operation and then signs over the estimated gas values, returning not only the `paymasterAndData` but also the `preVerificationGas`, `verificationGasLimit`, and `callGasLimit`. ::: -Estimates the gas values for the User Operation and sponsors the operation with the new gas values. - ## Usage ::::code-group @@ -79,4 +79,4 @@ The ID of the [sponsorship policy](https://dashboard.pimlico.io/sponsorship-poli ## JSON-RPC Method -[`pm_sponsorUserOperation`](/references/paymaster/verifying-paymaster/endpoints#pm_sponsoruseroperation) \ No newline at end of file +[`pm_sponsorUserOperation`](/references/paymaster/verifying-paymaster/endpoints#pm_sponsoruseroperation) diff --git a/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/validateSponsorshipPolicies.mdx b/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/validateSponsorshipPolicies.mdx index 76be0989..515330ac 100644 --- a/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/validateSponsorshipPolicies.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/pimlico-paymaster-actions/validateSponsorshipPolicies.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # validateSponsorshipPolicies -Validates a User Operation against an array of [sponsorship policies](https://dashboard.pimlico.io/sponsorship-policies), and returns an array of sponsorship policies (alongside additional data for each policy) that are willing to sponsor the user operation. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Validates a User Operation against an array of [sponsorship policies](https://dashboard.pimlico.io/sponsorship-policies), and returns an array of sponsorship policies (alongside additional data for each policy) that are willing to sponsor the user operation. ## Usage @@ -112,4 +112,4 @@ An array of sponsorship policy IDs to validate against. ## JSON-RPC Method -[`pm_validateSponsorshipPolicies`](/references/paymaster/verifying-paymaster/endpoints) \ No newline at end of file +[`pm_validateSponsorshipPolicies`](/references/paymaster/verifying-paymaster/endpoints) diff --git a/docs/pages/references/permissionless/v0_1/reference/public-actions/getAccountNonce.mdx b/docs/pages/references/permissionless/v0_1/reference/public-actions/getAccountNonce.mdx index 7027abd2..8bf17e99 100644 --- a/docs/pages/references/permissionless/v0_1/reference/public-actions/getAccountNonce.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/public-actions/getAccountNonce.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getAccountNonce -Returns the current nonce of the smart account for a specified key. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns the current nonce of the smart account for a specified key. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/public-actions/getSenderAddress.mdx b/docs/pages/references/permissionless/v0_1/reference/public-actions/getSenderAddress.mdx index e1916769..0e3f794a 100644 --- a/docs/pages/references/permissionless/v0_1/reference/public-actions/getSenderAddress.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/public-actions/getSenderAddress.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getSenderAddress -Return a sender address corresponding to the initCode of the User Operation where the smart account will be deployed. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Return a sender address corresponding to the initCode of the User Operation where the smart account will be deployed. ## Usage @@ -52,4 +52,4 @@ The initCode of the User Operation that deploys the smart account. - **Type:** `Address` -The entry point address. \ No newline at end of file +The entry point address. diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/deployContract.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/deployContract.mdx index 7b4d6ad1..5ed473f0 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/deployContract.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/deployContract.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # deployContract -deploys a contract to the network from a smart account, given bytecode & constructor arguments. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ deploys a contract to the network from a smart account, given bytecode & constructor arguments. :::info This action is only supported by some smart account types. diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/prepareUserOperationRequest.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/prepareUserOperationRequest.mdx index 8eec65b1..cb1be9ba 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/prepareUserOperationRequest.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/prepareUserOperationRequest.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # prepareUserOperationRequest -Prepares a user operation request for signing by populating a `sender`, `nonce`, `initCode`, gas price values, gas limit values, and optionally requesting sponsorship from a paymaster. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Prepares a user operation request for signing by populating a `sender`, `nonce`, `initCode`, gas price values, gas limit values, and optionally requesting sponsorship from a paymaster. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransaction.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransaction.mdx index 6c7cf158..63f25ed6 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransaction.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransaction.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # sendTransaction -Send a transaction from a smart account using the same `sendTransaction` interface as viem. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Send a transaction from a smart account using the same `sendTransaction` interface as viem. Internally, sendTransaction calls the smartAccount's `prepareUserOperationRequest`, `sendUserOperation`, and `waitForUserOperationReceipt` actions. diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransactions.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransactions.mdx index e8fe2ebe..e002e0ff 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransactions.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendTransactions.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # sendTransactions -Send a batch of transaction from a smart account. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Send a batch of transaction from a smart account. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendUserOperation.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendUserOperation.mdx index dea7da48..eb0e7acd 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendUserOperation.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/sendUserOperation.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # sendUserOperation -Submits a user operation to the smart account client's underlying bundler. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Submits a user operation to the smart account client's underlying bundler. ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signMessage.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signMessage.mdx index 319dc8a3..2d6d0dfe 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signMessage.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signMessage.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signMessage -Uses a smart account to sign and calculate an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Uses a smart account to sign and calculate an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. With the calculated signature, you can: diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signTypedData.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signTypedData.mdx index bb9662e3..b737e911 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signTypedData.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/signTypedData.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signTypedData -Signs typed data from a smart account and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))` +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Signs typed data from a smart account and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))` ## Usage diff --git a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/writeContract.mdx b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/writeContract.mdx index 538b2251..6ede5bb8 100644 --- a/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/writeContract.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/smart-account-actions/writeContract.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # writeContract -Uses a smart account to executes a write function on a contract. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Uses a smart account to executes a write function on a contract. A "write" function on a Solidity contract modifies the state of the blockchain. diff --git a/docs/pages/references/permissionless/v0_1/reference/utils/getRequiredPrefund.mdx b/docs/pages/references/permissionless/v0_1/reference/utils/getRequiredPrefund.mdx index 012e7585..b5c81df5 100644 --- a/docs/pages/references/permissionless/v0_1/reference/utils/getRequiredPrefund.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/utils/getRequiredPrefund.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getRequiredPrefund -Returns the minimum required funds in wei in the senders's smart account to execute the user operation. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Returns the minimum required funds in wei in the senders's smart account to execute the user operation. ## Import @@ -35,4 +35,4 @@ The requied prefund in wei. - **Type:** `UserOperation` -The User Operation to get the prefund for. \ No newline at end of file +The User Operation to get the prefund for. diff --git a/docs/pages/references/permissionless/v0_1/reference/utils/getUserOperationHash.mdx b/docs/pages/references/permissionless/v0_1/reference/utils/getUserOperationHash.mdx index 24ddb42a..0abb040c 100644 --- a/docs/pages/references/permissionless/v0_1/reference/utils/getUserOperationHash.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/utils/getUserOperationHash.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # getUserOperationHash -Generates the hash of the User Operation [as calculated by the EntryPoint](https://github.com/eth-infinitism/account-abstraction/blob/465f22310fcc639964e6ab5f8aa648770c6d8981/contracts/core/EntryPoint.sol#L296-L302). +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Generates the hash of the User Operation [as calculated by the EntryPoint](https://github.com/eth-infinitism/account-abstraction/blob/465f22310fcc639964e6ab5f8aa648770c6d8981/contracts/core/EntryPoint.sol#L296-L302). ## Import @@ -49,4 +49,4 @@ The chain ID of the chain on which the User Operation is being executed. - **Type:** `Address` -The entry point address. \ No newline at end of file +The entry point address. diff --git a/docs/pages/references/permissionless/v0_1/reference/utils/providerToSmartAccountSigner.mdx b/docs/pages/references/permissionless/v0_1/reference/utils/providerToSmartAccountSigner.mdx index d0526b7c..030d8d8b 100644 --- a/docs/pages/references/permissionless/v0_1/reference/utils/providerToSmartAccountSigner.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/utils/providerToSmartAccountSigner.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # providerToSmartAccountSigner -Takes an EIP-1193 provider and returns a signer that can be used as a signer with permissionless accounts. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Takes an EIP-1193 provider and returns a signer that can be used as a signer with permissionless accounts. ## Import @@ -45,4 +45,4 @@ The EIP-1193 provider. - **Type:** `Address` -The address of the signer. If not provided, it will automatically be fetched from the provider using `eth_requestAccounts`. \ No newline at end of file +The address of the signer. If not provided, it will automatically be fetched from the provider using `eth_requestAccounts`. diff --git a/docs/pages/references/permissionless/v0_1/reference/utils/signUserOperationHashWithECDSA.mdx b/docs/pages/references/permissionless/v0_1/reference/utils/signUserOperationHashWithECDSA.mdx index b2365d4f..2f1692df 100644 --- a/docs/pages/references/permissionless/v0_1/reference/utils/signUserOperationHashWithECDSA.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/utils/signUserOperationHashWithECDSA.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # signUserOperationHashWithECDSA -Signs the hash of the User Operation with the standard ECDSA signature scheme (used by all EOAs and most smart wallets). +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Signs the hash of the User Operation with the standard ECDSA signature scheme (used by all EOAs and most smart wallets). Can take in either the hash of the User Operation or a combination of the User Operation, chain ID and entry point address (calculating the hash internally). @@ -84,4 +84,4 @@ The chain ID of the chain on which the User Operation is being executed. - **Type:** `Address` -The entry point address. \ No newline at end of file +The entry point address. diff --git a/docs/pages/references/permissionless/v0_1/reference/utils/walletClientToSmartAccountSigner.mdx b/docs/pages/references/permissionless/v0_1/reference/utils/walletClientToSmartAccountSigner.mdx index 135e41c6..999a9fa3 100644 --- a/docs/pages/references/permissionless/v0_1/reference/utils/walletClientToSmartAccountSigner.mdx +++ b/docs/pages/references/permissionless/v0_1/reference/utils/walletClientToSmartAccountSigner.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../../VersionWarning" # walletClientToSmartAccountSigner -Takes a walletClient and returns a custom signer that can be used as a signer with permissionless accounts. This is especially useful when using `useWallet` from wagmi, allowing for an easy way to plug in custom frontend wagmi signers to permissionless accounts. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Takes a walletClient and returns a custom signer that can be used as a signer with permissionless accounts. This is especially useful when using `useWallet` from wagmi, allowing for an easy way to plug in custom frontend wagmi signers to permissionless accounts. ## Import @@ -30,4 +30,4 @@ The smart account signer that can be used with permissionless accounts. - **Type:** `WalletClient` -The viem/wagmi wallet client. \ No newline at end of file +The viem/wagmi wallet client. diff --git a/docs/pages/references/permissionless/v0_1/tutorial/index.mdx b/docs/pages/references/permissionless/v0_1/tutorial/index.mdx index 78e9336e..180711d0 100644 --- a/docs/pages/references/permissionless/v0_1/tutorial/index.mdx +++ b/docs/pages/references/permissionless/v0_1/tutorial/index.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # Tutorials -Learning-oriented lessons that take you through a series of steps to complete a project. Most useful when you want to get started with Pimlico. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ Learning-oriented lessons that take you through a series of steps to complete a project. Most useful when you want to get started with Pimlico. [Tutorial 1](/references/permissionless/v0_1/tutorial/tutorial-1) takes you through the journey of leveraging permissionless.js's high-level APIs to easily create and bundle a user operation. diff --git a/docs/pages/references/permissionless/v0_1/tutorial/tutorial-1.mdx b/docs/pages/references/permissionless/v0_1/tutorial/tutorial-1.mdx index 0bda330c..5939c167 100644 --- a/docs/pages/references/permissionless/v0_1/tutorial/tutorial-1.mdx +++ b/docs/pages/references/permissionless/v0_1/tutorial/tutorial-1.mdx @@ -4,7 +4,7 @@ import VersionWarning from "../../VersionWarning" # Tutorial 1 — Send your first gasless transaction -In this tutorial, you will submit your first fully-gasless transaction from a smart account. +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ In this tutorial, you will submit your first fully-gasless transaction from a smart account. You will set up the necessary permissionless.js clients, create a user operation, ask Pimlico's verifying paymaster to sponsor it, and then submit it on-chain with Pimlico's bundler. @@ -125,4 +125,4 @@ Please [get in touch](https://t.me/pimlicoHQ) if you have any questions or if yo ### Combined code -If you want to see the complete code that combines all of the previous steps, we uploaded it to a [separate repository](https://github.com/pimlicolabs/tutorials). If you're looking to run it, remember to replace the API key with your own! \ No newline at end of file +If you want to see the complete code that combines all of the previous steps, we uploaded it to a [separate repository](https://github.com/pimlicolabs/tutorials). If you're looking to run it, remember to replace the API key with your own! diff --git a/docs/pages/references/permissionless/v0_1/tutorial/tutorial-2.mdx b/docs/pages/references/permissionless/v0_1/tutorial/tutorial-2.mdx index b03a2805..8e7ddae0 100644 --- a/docs/pages/references/permissionless/v0_1/tutorial/tutorial-2.mdx +++ b/docs/pages/references/permissionless/v0_1/tutorial/tutorial-2.mdx @@ -4,12 +4,12 @@ import VersionWarning from "../../VersionWarning" # Tutorial 2 — Submit a user operation with a Verifying Paymaster +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ In this tutorial, you will generate a user operation, ask Pimlico's verifying paymaster to sponsor it, and then submit the sponsored user operation on-chain with Pimlico's Alto bundler. + :::note This is a low-level tutorial that walks you through the steps of constructing a user operation from scratch. If you would like to leverage permissionless.js's high-level functions, take a look at [tutorial 1](/references/permissionless/tutorial/tutorial-1). ::: -In this tutorial, you will generate a user operation, ask Pimlico's verifying paymaster to sponsor it, and then submit the sponsored user operation on-chain with Pimlico's Alto bundler. - ## Steps ::::steps diff --git a/docs/pages/references/permissionless/v0_1/why.mdx b/docs/pages/references/permissionless/v0_1/why.mdx index cbb45381..d9eb59f6 100644 --- a/docs/pages/references/permissionless/v0_1/why.mdx +++ b/docs/pages/references/permissionless/v0_1/why.mdx @@ -2,7 +2,9 @@ import VersionWarning from "../VersionWarning" -# Why permissionless.js [A summary of why we built permissionless.js] +# Why permissionless.js + +_You are viewing permissionless.js v0.1 documentation. [View the latest documentation →](/references/permissionless)._ A summary of why we built permissionless.js — the gaps in existing ERC-4337 tooling, the principles that shaped the library, and how it stays vendor-agnostic while still giving you tight integration with viem. ## Problems diff --git a/docs/pages/references/permissionless/wagmi/index.mdx b/docs/pages/references/permissionless/wagmi/index.mdx index c449d92f..4481ff6c 100644 --- a/docs/pages/references/permissionless/wagmi/index.mdx +++ b/docs/pages/references/permissionless/wagmi/index.mdx @@ -22,7 +22,9 @@ import { HomePage } from 'vocs/components'
-# Overview +@permissionless/wagmi is a TypeScript library built on top of permissionless.js and wagmi that enables EIP-5792 features — gas sponsorship via ERC-7677 paymasters and transaction batching — in your wagmi app with just a couple lines of code. + +## Overview ```tsx [main.tsx] import { PermissionlessProvider } from "@permissionless/wagmi" // [!code ++] @@ -75,14 +77,14 @@ function App() { And that's it! -# Features +## Features - **ERC-7677 Paymaster service**: Makes it easier to interact with an external smart account that offers support. - **Sending multiple transactions**: Makes it easier to send multiple transactions from an external smart account. - **Built on & for wagmi**: `@permissionless/wagmi` is designed to be a thin wrapper around wagmi, maintaining the same style and overall feel wagmi provides. - and a lot more coming soon... -# Source Code +## Source Code The source code for `@permissionless/wagmi` is available on [GitHub](https://github.com/pimlicolabs/permissionless.js) diff --git a/docs/pages/references/permissionless/wagmi/reference/hooks/useSendTransaction.mdx b/docs/pages/references/permissionless/wagmi/reference/hooks/useSendTransaction.mdx index 5648a8c6..a0aca3be 100644 --- a/docs/pages/references/permissionless/wagmi/reference/hooks/useSendTransaction.mdx +++ b/docs/pages/references/permissionless/wagmi/reference/hooks/useSendTransaction.mdx @@ -5,7 +5,7 @@ description: Hook for creating, signing, and sending transactions to networks. # useSendTransaction -Hook for creating, signing, and sending transactions to networks. +Drop-in replacement for wagmi's `useSendTransaction` that routes the transaction through the configured smart account and ERC-7677 paymaster — returning a transaction *reference* (not an EOA hash) that pairs with `useWaitForTransactionReceipt` from this package. ## Import diff --git a/docs/pages/references/permissionless/wagmi/reference/hooks/useWaitForTransactionReceipt.mdx b/docs/pages/references/permissionless/wagmi/reference/hooks/useWaitForTransactionReceipt.mdx index 65bd6cb3..b65ca000 100644 --- a/docs/pages/references/permissionless/wagmi/reference/hooks/useWaitForTransactionReceipt.mdx +++ b/docs/pages/references/permissionless/wagmi/reference/hooks/useWaitForTransactionReceipt.mdx @@ -5,7 +5,7 @@ description: Hook that waits for the transaction to be included on a block, and # useWaitForTransactionReceipt -Hook that waits for the transaction to be included on a block, and then returns the transaction receipt. If the transaction reverts, then the action will throw an error. Replacement detection (e.g. sped up transactions) is also supported. +Drop-in replacement for wagmi's `useWaitForTransactionReceipt` that resolves the receipt for a smart account transaction submitted via this package's `useSendTransaction`, using the transaction reference returned by that hook instead of an EOA hash. ## Import diff --git a/docs/pages/references/permissionless/why.mdx b/docs/pages/references/permissionless/why.mdx index 07d18296..fa1c4bae 100644 --- a/docs/pages/references/permissionless/why.mdx +++ b/docs/pages/references/permissionless/why.mdx @@ -1,4 +1,6 @@ -# Why permissionless.js [A summary of why we built permissionless.js] +# Why permissionless.js + +A summary of why we built permissionless.js — the gaps in existing ERC-4337 tooling, the principles that shaped the library, and how it stays vendor-agnostic while still giving you tight integration with viem. ## Problems diff --git a/docs/pages/references/platform/api/sponsorship-policies/create.mdx b/docs/pages/references/platform/api/sponsorship-policies/create.mdx index 72c00acd..ed53aa3f 100644 --- a/docs/pages/references/platform/api/sponsorship-policies/create.mdx +++ b/docs/pages/references/platform/api/sponsorship-policies/create.mdx @@ -1,6 +1,6 @@ # Create a sponsorship policy -Creates a sponsorship policy. +Creates a new sponsorship policy in your Pimlico account — including its name, scope (active chains and EntryPoint versions), spending limits, and active time window — via a single `POST` to the platform API. ## HTTP Request diff --git a/docs/pages/references/platform/api/sponsorship-policies/object.mdx b/docs/pages/references/platform/api/sponsorship-policies/object.mdx index 0edea4a2..e50e295d 100644 --- a/docs/pages/references/platform/api/sponsorship-policies/object.mdx +++ b/docs/pages/references/platform/api/sponsorship-policies/object.mdx @@ -1,5 +1,7 @@ # The Sponsorship Policy object +A sponsorship policy is a set of rules that govern which user operations the verifying paymaster will sponsor. The object captures the policy's identifier, status, active time window, allowed chains, and spending limits. + ## Attributes :::note diff --git a/docs/pages/stackup-migration.mdx b/docs/pages/stackup-migration.mdx index e7c1b72a..429744f7 100644 --- a/docs/pages/stackup-migration.mdx +++ b/docs/pages/stackup-migration.mdx @@ -1,4 +1,4 @@ -# Migration from Stackup [This guide is intended for users migrating from Stackup to Pimlico] +# Migration from Stackup Welcome to Pimlico! We're excited to help you in your transition from Stackup. This guide will help you understand the migration process, the changes you'll need to make to your existing setup, and give a brief overview of new features you will have access to.