Skip to content

Commit

Permalink
Fix steps
Browse files Browse the repository at this point in the history
  • Loading branch information
plusminushalf committed Nov 14, 2024
1 parent 89fb4f4 commit 8a75662
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import VersionWarning from "../../VersionWarning"

<VersionWarning version="0.2" />

# How to create and use a thirdweb account with permissionless.js
# How to create and use a Thirdweb account with permissionless.js

## Picking an EntryPoint

Thirdweb is compatible with EntryPoint versions v0.6 and v0.7. In this guide, we will use EntryPoint v0.7.

## Steps

::::steps
:::::steps

### Import the required packages

Expand All @@ -22,9 +22,9 @@ Thirdweb is compatible with EntryPoint versions v0.6 and v0.7. In this guide, we

First we must create the public, (optionally) pimlico paymaster clients that will be used to interact with the account.

::::info
Get your client ID from the [thirdweb dashboard](https://thirdweb.com/dashboard/settings/api-keys) for free bundler and RPC access.
::::
:::info
Get your client ID from the [Thirdweb dashboard](https://thirdweb.com/dashboard/settings/api-keys) for free RPC access.
:::

```ts
// [!include ~/snippets/accounts/thirdweb.ts:clients]
Expand Down Expand Up @@ -78,4 +78,4 @@ You can also send an array of transactions in a single batch.
// [!include ~/snippets/accounts/thirdweb.ts:submitBatch]
```

::::
:::::
5 changes: 2 additions & 3 deletions docs/snippets/accounts/thirdweb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export const publicClient = createPublicClient({
transport: http("https://11155111.rpc.thirdweb.com"),
})

const CLIENT_ID = "CLIENT_ID"
export const paymasterClient = createPimlicoClient({
transport: http(`https://11155111.bundler.thirdweb.com/v2?clientId=${CLIENT_ID}`),
transport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=API_KEY"),
entryPoint: {
address: entryPoint07Address,
version: "0.7",
Expand Down Expand Up @@ -46,7 +45,7 @@ const smartAccountClient = createSmartAccountClient({
account: thirdwebAccount,
chain: sepolia,
paymaster: paymasterClient,
bundlerTransport: http(`https://11155111.bundler.thirdweb.com/v2?clientId=${CLIENT_ID}`),
bundlerTransport: http("https://api.pimlico.io/v2/sepolia/rpc?apikey=API_KEY"),
userOperation: {
estimateFeesPerGas: async () => (await paymasterClient.getUserOperationGasPrice()).fast,
},
Expand Down
4 changes: 2 additions & 2 deletions vocs.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export const permissionlessSidebar = [
link: "/permissionless/how-to/accounts/use-kernel-account",
},
{
text: "How to use a thirdweb account",
text: "How to use a Thirdweb account",
link: "/permissionless/how-to/accounts/use-thirdweb-account",
},
{
Expand Down Expand Up @@ -1356,7 +1356,7 @@ export default defineConfig({
text: "MagicSpend++",
link: "/infra/magic-spend",
items: magicSpendSidebar,
}
},
],
"/conceptual": conceptualSidebar,
},
Expand Down

0 comments on commit 8a75662

Please sign in to comment.