User account creation
To get started with Brewit Account all we need it brewit.js package.
brewit.js
npm install brewit
import { toAccount } from 'brewit'; const account = await toAccount({ chainId: 8453, rpcEndpoint: 'https://mainnet.base.org', signer: privateKeyToAccount('0x...'), type: 'main', config: { validator: 'ownable' }, });
import { createAccountClient } from 'brewit'; // You can replace with any bundler URL const pimlicoAPIKey = "<YOUR_PIMLICO_API_KEY>"; const bundlerUrl = `https://api.pimlico.io/v2/11155111/rpc?apikey=${pimlicoAPIKey}` const client = createAccountClient(account, bundlerUrl); const tx = await client.sendTransaction({ account: account, to: '0x...', value: '0x...', });