Documentation Index
Fetch the complete documentation index at: https://docs.brewit.money/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
To get started with Brewit Account all we need it brewit.js package.
Create an Account
import { toAccount } from 'brewit';
const account = await toAccount({
chainId: 8453,
rpcEndpoint: 'https://mainnet.base.org',
signer: privateKeyToAccount('0x...'),
type: 'main',
config: { validator: 'ownable' },
});
Send a transaction
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...',
});