Comment on page
Particle AA SDK
Particle Network Smart Wallet-as-a-Service Integration
Particle Network is an intent-centric, modular access layer of web3 applications. With Particle's Smart Wallet-as-a-Service, developers can curate an unparalleled user experience through modular and customizable EOA/AA embedded wallet components. Using MPC-TSS for key management, Particle can streamline user onboarding via familiar web2 accounts - such as Google accounts, email addresses, and phone numbers.
Particle supports Mantle Mainnet and Testnet through both EOA interactions and native ERC-4337 SimpleAccount implementations.
Using Particle Network Wallet-as-a-Service for a secure, flexible embedded EOA wallet implementation on Mantle Mainnet and Testnet is quite simple and can be achieved through a mechanism like the one below.
- 1.Create a ParticleNetwork instance.
import { ParticleNetwork } from "@particle-network/auth";
import { Mantle, MantleTestnet } from "@particle-network/chains";
import { SmartAccount } "@particle-network/aa";
// Retrieved from https://dashboard.particle.network
const config = {
projectId: "xx",
clientKey: "xx",
appId: "xx",
};
const particle = new ParticleNetwork({
...config,
chainName: Mantle.name.
chainId: Mantle.id,
});
await particle.auth.login() // Initiates social login
- 2.Introducing ERC-4337 account abstraction into Particle instance. Instead facilitating interaction with Mantle through a smart account can be achieved through the following:
import { ParticleNetwork } from "@particle-network/auth";
import { Mantle, MantleTestnet } from "@particle-network/chains";
import { SmartAccount } "@particle-network/aa";
// Retrieved from https://dashboard.particle.network
const config = {
projectId: "xx",
clientKey: "xx",
appId: "xx",
};
const particle = new ParticleNetwork({
...config,
chainName: Mantle.name,
chainId: Mantle.id,
});
// If using AA
const smartAccount = new SmartAccount(new ParticleProvider(particle.auth), {
...config,
aaOptions: {
simple: [{ chainId: Mantle.id, version: '1.0.0' }]
}
});
particle.setERC4337({
name: 'SIMPLE',
version: '1.0.0'
});
await particle.auth.login() // Initiates social login
Last modified 19d ago