b-open-io/bsv-skills/create-bap-identity
Claude Code and agent skill by b-open-io/bsv-skills
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "create BAP identity", "new BAP", "Type42 identity", "Legacy BAP identity", "generate BAP", "set up BAP identity", "initialize BAP", "update profile", "get profile", "attest attribute", "BAP attestation", or needs to create or manage Bitcoin Attestation Protocol identities.
Install
npx vskill@latest install b-open-io/bsv-skills/create-bap-identitySKILL.md
Create BAP Identity
Create and manage BAP (Bitcoin Attestation Protocol) identities.
Installation
Creating an Identity
BAP ID Format
The BAP library calls this the identityKey (via getIdentityKey()), but to avoid confusion with BRC-31 "identity keys" (which are public keys), we call it the BAP ID everywhere else.
Derivation: base58(ripemd160(sha256(rootAddress))) where rootAddress is the Bitcoin address of the member key.
This is NOT a Bitcoin address, NOT a public key, and NOT a BRC-31 identity key. It is a stable hash identifier that persists across signing key rotations.
BAP ID vs BRC-31 Identity Key
| BAP ID | BRC-31 Identity Key | ||
|---|---|---|---|
| What | Stable identity hash | Compressed secp256k1 public key | |
| Format | ~27 char base58 string | 66 hex chars (02/03 prefix) | |
| Example | Go8vCHAa4S6AhXK... | 02a08a4bbb07ead... | |
| Used in | BAP attestations, ClawNet bapId, Sigma Auth bap_id | BRC-31 Authrite headers, BRC-42/43 key derivation | |
| Derived from | Member key's address (rootAddress) | Direct from private key |
In BRC-100 wallets, the member key's pubkey is the BRC-31 identity key. You can derive the BAP ID from it: pubkey.toAddress() = rootAddress, then hash. This only works for the member key — NOT signing keys.
Key Derivation
BAP uses Type42 (BRC-42) key derivation with BRC-43 invoice numbers:
| Purpose | Invoice Number | Security Level | |
|---|---|---|---|
| Signing key | 1-sigma-identity | 1 (public protocol) | |
| Friend encryption | 2-friend-{sha256(friendBapId)} | 2 (user-approved) |
Signing Messages
Friend Encryption
Derive friend-specific encryption keys via the BRC-100 wallet:
Export/Import
CLI Option
For quick operations, the bsv-bap package includes a CLI:
Touch ID / Secure Enclave Protection (macOS arm64)
The BAP CLI supports hardware-level protection of the master key via @1sat/vault, which uses the macOS Secure Enclave (CryptoKit P-256 + ECIES encryption). When enabled, the rootPk is encrypted with a Secure Enclave key that never leaves the chip, and all decryption requires Touch ID.
- Config stores
se:bap-mastersentinel inrootPkEncryptedfield when enabled - Vault directory:
~/.secure-enclave-vault/ - macOS arm64 only (fails informatively on other platforms)
BAP_NO_TOUCHID=1env var or--no-touchidflag oncreate/importfor CI/headless environments
Key Rotation & Path Management
BAP separates stable identity from active signing key:
- rootPath (e.g.,
bap:0) — derives the stable member key. Never changes. This is the key used for identity linkage and member backup export. - currentPath (e.g.,
bap:0:1) — derives the active wallet/signing key. Rotates withincrementPath(). - Identity key persists across all rotations — it's derived from the rootAddress, not the signing address.
Identity Destruction
To permanently destroy an identity (emergency kill switch if signing key is compromised), broadcast an ID transaction with address 0, signed by the rootAddress:
MemberID Counter-Based Rotation
MemberID uses a counter for signing key derivation:
The protocol name "sigma" is 5 characters, meeting BRC-100 minimum length requirements for protocol IDs. Calling member.rotate() increments the counter, producing a new signing key while the member key stays fixed.
Stable vs Active Keys
| Key | Derivation | Changes? | Use | |
|---|---|---|---|---|
| Member key | rootPath derived from master | Never | Identity linkage, auth tokens, backup export | |
| Signing key | currentPath derived from member + counter | On rotation | On-chain attestations, AIP signatures |
Identity Actions via @1sat/actions (Recommended)
For BRC-100 wallet operations, use the identity actions from @1sat/actions. These use the wallet's BAP signing key ([1, "bapid"] / "identity") via AIP.
Seeding the wallet: When Sigma Identity publishes a BAP ID, it seeds the wallet via one of two paths:
- Wallet-funded: Root key signs the ID OP_RETURN via
PrivateKeySigner+AIP.sign(), thenpublishIdentity.execute()funds via the BRC-100 wallet. Output auto-lands in thebapbasket. - Droplit-funded (onboarding): Droplit funds the broadcast, then
wallet.internalizeAction()seeds thebapbasket withtype:id, bapId:<hash>tags.
Publish Identity (wallet-funded)
Update Profile
Get Profile
Attest
Resolve BAP ID
Identity Architecture
- Sigma Identity handles: key generation, identity creation, ID record publication (root key), key rotation, OAuth
- @1sat/actions handles:
publishIdentity(pre-signed script),attest,updateProfile,getProfile(signing key only) - BAP ID is stable across key rotations — it's the identity anchor
- AIP signature proves who authorized each transaction
Related Skills
- `key-derivation` - Type42 and BRC-43 key derivation patterns
- `message-signing` - BSM, BRC-77, AIP, and Sigma signing protocols
- `encrypt-decrypt-backup` - bitcoin-backup CLI for .bep encrypted backups
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/create-bap-identity/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/b-open-io/bsv-skills/create-bap-identity)