Start building with Bao Toolkit
Install an attribution adapter, add your Builder Code, and run the first source audit.
Get your Builder Code
Register your project on Base Dashboard (base.dev), then copy its code from Settings → Builder Code. Use that exact code throughout your app and Bao Toolkit policy.
bc_abc123 is a placeholder in this guide. Bao Toolkit does not register a code for you. You can explore the browser examples before connecting your own project.
Install the adapter and CLI
Start in an existing TypeScript app with viem. Choose the wagmi or ethers adapter if that is your transaction client. These commands use the released attribution packages; B20 installation follows the separate candidate pilot kit.
pnpm add @base-attribution-os/viem viem
pnpm add -D @base-attribution-os/cliSet your project’s policy
Replace bc_abc123 with a Builder Code registered for your own project. init creates bao.config.json; it does not rewrite your app. Commit that policy so local work and CI use the same rules.
pnpm exec bao init --builder-code bc_abc123
pnpm exec bao doctorAdd attribution to the request
Use the helper where your app builds the transaction. The surrounding walletClient, account, recipient, and value come from your app.
import { builderCodeDataSuffix } from "@base-attribution-os/viem";
await walletClient.sendTransaction({
account,
to,
value,
data: "0x",
dataSuffix: builderCodeDataSuffix("bc_abc123"),
});Check the full project
Run Doctor again and inspect every supported transaction path. Resolve missing or wrong codes. Treat unresolved configuration as a finding to investigate. The browser Doctor is an illustrative snippet preview; merge and release checks belong in the full-project CLI or Action.
A passing strict audit has supported paths, the expected code on each path, and no blocking findings. If no paths are found, check the scan scope and supported integration before treating the app as covered. Source checks do not prove that a submitted transaction kept its code; verify a transaction next.
pnpm exec bao doctor --profile strict