01 Discover
Check dataSuffix for this account and chain.
Ship Builder Codes through Base Account, Privy, and custom smart wallets without guessing whether attribution survived the UserOperation pipeline.
pnpm add @base-attribution-os/walletCheck dataSuffix for this account and chain.
Add one required capability without changing inner calls.
Merge wallet and app codes into the final userOp.callData.
Decode every expected code before or after submission.
const sent = await sendAttributedCalls(
provider,
{ chainId: "0x2105", from, calls },
{ codes: ["bc_app"] },
);Bao Toolkit checks wallet_getCapabilities before the first send and preserves paymaster, atomic, and application-defined capabilities.
attributeUserOperation(userOp, {
walletCodes: ["bc_wallet"],
appDataSuffix,
});
// decoded: bc_wallet, bc_appExisting suffixes are normalized, duplicates are removed, and the result is appended to the final userOp.callData before signing.
wallet_sendCalls receives a required dataSuffix capability.
The request stops before submission. No silent attribution loss.
The unchanged batch is sent only after an explicit opt-in.
bao check-user-op --input user-op.json --expect bc_wallet,bc_app