BAP identities and profiles
A BAP identity binds public profile information to Bitcoin signing authority. The BAP identifier, Better Auth account ID, and selected wallet public key have different roles. Preserve the identity's original derivation and backup format when restoring it.
Profile lifecycle
- Create or import key material locally through a supported backup/identity implementation.
- Register the profile with the Sigma account.
- Edit a private draft in the account UI.
- Unlock the correct local signing identity and approve publication.
- Sign and broadcast the BAP transaction through the configured wallet/funding flow.
- Record the publication and allow overlay/indexer propagation before expecting every public lookup to update.
Saving a draft does not publish it. A database record or a submitted txid is not a chain-confirmation proof. Provider email verification is separate from a user-written email in the profile.
Read profile data
export async function readBapProfile(bapId: string) {
const url = new URL("https://auth.sigmaidentity.com/api/bap/profile");
url.searchParams.set("bapId", bapId);
const response = await fetch(url);
if (!response.ok) throw new Error(`Profile lookup failed: ${response.status}`);
return response.json();
}A public profile can contain id, rootAddress, currentAddress, and an identity object with display metadata. Optional fields are not guaranteed. Validate URLs before embedding remote images or links, and escape user-authored text.
Multiple identities and OAuth
One account may hold several profiles. OAuth consent selects a BAP identity; consumers receive the account sub and selected bap_id. The raw bap claim may be JSON text. Do not assume selecting an identity transfers account ownership or changes the application's authorization policy.
Updates, removal, and rotation
Keep your encrypted backup current after local identity changes. Server drafts are not automatically mirrored into every exported backup. Removing a profile from a file does not revoke the key's authority; a seed can still derive the same profile index.
The hosted /api/bap/rotate operation currently returns 501 after authentication. Do not describe hosted key rotation as an available API or synthesize a new root during recovery. Existing BAP protocol rotation capabilities and backup-format constraints are separate from this hosted endpoint.
Public blockchain data and copies held by overlays can persist after local deletion. See Profile API and backup formats.