From 7b5b5a2dfc1948e10fc4ec3225b24500f8729d97 Mon Sep 17 00:00:00 2001 From: Soos3D <99700157+soos3d@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:04:01 -0300 Subject: [PATCH 1/2] Update Particle Network tutorial --- .../how-to/signers/particle-network.mdx | 17 ++++++++++------- docs/snippets/signers/particle-network.ts | 17 ++++++----------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/docs/pages/permissionless/how-to/signers/particle-network.mdx b/docs/pages/permissionless/how-to/signers/particle-network.mdx index 842fb519..ba7128a8 100644 --- a/docs/pages/permissionless/how-to/signers/particle-network.mdx +++ b/docs/pages/permissionless/how-to/signers/particle-network.mdx @@ -6,22 +6,25 @@ 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. +[Particle Network](https://particle.network) provides Wallet Abstraction services that simplify user onboarding. -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. +The [Particle Auth SDK](https://developers.particle.network/api-reference/auth/desktop-sdks/web) offers seamless 2-click onboarding using social logins. It allows users to quickly sign up using familiar Web2 options like Google, email, or phone numbers. Particle uses MPC-TSS for secure key management, ensuring both convenience and security. -## Setup +For a streamlined social login experience, you can combine Particle with permissionless.js while leveraging ZeroDev as the smart wallet. This setup enables features like gas fee sponsorship, transaction batching, and more, enhancing the user experience within your application. + +## Setup To use Particle Network with permissionless.js, first create an application that integrates with Particle Network. -- Refer to the [Particle Network documentation site](https://docs.particle.network/) for instructions on setting up an application with the Particle Network. -- For a quick start, Particle Network provides a guide, available [here](https://docs.particle.network/getting-started/get-started). +- Follow the Quickstart on the [Particle docs](https://developers.particle.network/guides/wallet-as-a-service/waas/auth/web-quickstart) to quickly spin up a Particle Auth project. ## Integration + Integrating permissionless.js with Particle Network is straightforward after setting up the project. Particle Network provides an Externally Owned Account (EOA) wallet to use as a signer with permissionless.js accounts. -### Create the Particle Network object -After following the Particle Network documentation, you will have access to a `ParticleProvider` object as shown below that you can pass as an owner to `createeSmartAccountClient`: +### Initialize the Particle Network Object + +After setting up your Particle Auth project, you’ll have access to a `provider` object via the `useEthereum()` hook, as shown below. You can then pass this `provider` as the owner parameter when initializing `createSmartAccountClient`: ```typescript // [!include ~/snippets/signers/particle-network.ts:main] diff --git a/docs/snippets/signers/particle-network.ts b/docs/snippets/signers/particle-network.ts index c8703646..5b81e27a 100644 --- a/docs/snippets/signers/particle-network.ts +++ b/docs/snippets/signers/particle-network.ts @@ -1,14 +1,9 @@ // [!region main] -import { ParticleNetwork } from "@particle-network/auth" -import { ParticleProvider } from "@particle-network/provider" +import { useEthereum } from "@particle-network/authkit"; -// Param options here will be specific to your project. See the Particle docs for more info. -const particle = new ParticleNetwork({ - projectId, - clientKey, - appId, - chainName, - chainId, -}) -const smartAccountOwner = new ParticleProvider(particle.auth) +// Inside your component or app function +const { provider } = useEthereum(); + +// Assign provider to smartAccountOwner +const smartAccountOwner = provider; // [!endregion main] From e45798f1ff3238f2d94caf133a58357577bbf7d4 Mon Sep 17 00:00:00 2001 From: TABASCO <84655644+TABASCOatw@users.noreply.github.com> Date: Sat, 16 Nov 2024 17:10:49 +0800 Subject: [PATCH 2/2] Update particle-network.mdx --- .../permissionless/how-to/signers/particle-network.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/pages/permissionless/how-to/signers/particle-network.mdx b/docs/pages/permissionless/how-to/signers/particle-network.mdx index ba7128a8..88074be3 100644 --- a/docs/pages/permissionless/how-to/signers/particle-network.mdx +++ b/docs/pages/permissionless/how-to/signers/particle-network.mdx @@ -8,9 +8,9 @@ import SmartAccounts from "./smartAccounts.mdx" [Particle Network](https://particle.network) provides Wallet Abstraction services that simplify user onboarding. -The [Particle Auth SDK](https://developers.particle.network/api-reference/auth/desktop-sdks/web) offers seamless 2-click onboarding using social logins. It allows users to quickly sign up using familiar Web2 options like Google, email, or phone numbers. Particle uses MPC-TSS for secure key management, ensuring both convenience and security. +The [Particle Auth SDK](https://developers.particle.network/api-reference/auth/desktop-sdks/web) offers seamless 2-click onboarding using social logins, powered by MPC-TSS. It allows users to quickly sign up using familiar Web2 options like Google, email, or phone numbers. -For a streamlined social login experience, you can combine Particle with permissionless.js while leveraging ZeroDev as the smart wallet. This setup enables features like gas fee sponsorship, transaction batching, and more, enhancing the user experience within your application. +For a streamlined social login experience, you can combine Particle with permissionless.js while leveraging any smart account; as Particle acts as a signer. This setup enables features like gas fee sponsorship, transaction batching, and more, further enhancing the user experience within your application. ## Setup @@ -32,4 +32,4 @@ After setting up your Particle Auth project, you’ll have access to a `provider ### Use with permissionless.js - \ No newline at end of file +