create-bap-identity
Create new BAP (Bitcoin Attestation Protocol) identities using the bap CLI. Supports Type42 (modern) and Legacy identity formats. Creates encrypted .bep backup files stored in Flow's /.flow/.bsv/backups/ directory.
When & Why to Use This Skill
This Claude skill enables the automated creation and management of Bitcoin Attestation Protocol (BAP) identities using the bap CLI. It supports both modern Type42 (BIP32/BIP39) and Legacy formats, providing a secure workflow for generating encrypted .bep backups and establishing on-chain reputation within the Flow BSV ecosystem.
Use Cases
- Blockchain Identity Provisioning: Rapidly generate new BAP identities to sign attestations and establish verifiable on-chain reputation for decentralized applications.
- Secure Identity Backups: Automatically create encrypted .bep backup files stored in standardized directories with automated registry updates in config.json.
- Legacy System Compatibility: Generate Legacy format identities to maintain interoperability with older Bitcoin Attestation Protocol implementations.
- Hierarchical Identity Management: Utilize Type42 identities to derive multiple member identities from a single master mnemonic for complex organizational structures.
- Development Workflow Automation: Integrate BAP identity creation into CI/CD or local setup scripts for blockchain-based developer environments.
| name | create-bap-identity |
|---|---|
| description | Create new BAP (Bitcoin Attestation Protocol) identities using the bap CLI. Supports Type42 (modern) and Legacy identity formats. Creates encrypted .bep backup files stored in Flow's /.flow/.bsv/backups/ directory. |
| allowed-tools | "Bash(bun:*)" |
Create BAP Identity
Create new BAP (Bitcoin Attestation Protocol) identities using the bap CLI.
When to Use
- Create a new Bitcoin identity for signing attestations
- Generate Type42 identity (recommended, modern format)
- Generate Legacy identity (compatibility with older systems)
- Create master identity that can derive member identities
- Establish on-chain reputation and identity
BAP Identity Types
Type42 (Recommended):
- Modern format using BIP32 derivation
- More secure and flexible
- Can derive multiple member identities
- Full BIP39 mnemonic support
Legacy:
- Original BAP format
- Compatibility with older systems
- Simpler structure
Usage
Run the create script:
# Create Type42 identity (recommended)
bun run /path/to/skills/create-bap-identity/scripts/create.ts "Alice Smith" type42
# Create Legacy identity
bun run /path/to/skills/create-bap-identity/scripts/create.ts "Bob Jones" legacy
# Specify custom output file
bun run /path/to/skills/create-bap-identity/scripts/create.ts "Carol" type42 my-identity.bep
Flow's BSV Convention
This skill follows Flow's BSV backup convention:
Storage Location: /.flow/.bsv/backups/
- Identity backups saved as
<name>-identity.bep - Encrypted with
FLOW_BACKUP_PASSPHRASE - Registered in
/.flow/.bsv/config.json
Registry: Updates config.json with:
{
"identityBackup": "alice-smith-identity.bep",
"backups": {
"alice-smith-identity.bep": {
"created": "2025-12-26T...",
"type": "BapMasterBackup",
"identityType": "type42",
"name": "Alice Smith"
}
}
}
Requirements
FLOW_BACKUP_PASSPHRASEenvironment variable must be setbapCLI installed globally:git clone https://github.com/b-open-io/bap-cli.git cd bap-cli && bun install && bun run build && bun link
CLI Reference
The bap CLI new command creates identities:
bap new --type type42 --password <pass> --name "Name" --output identity.bep
bap new --type legacy --password <pass> --name "Name" --output identity.bep
What Gets Created
The .bep backup contains:
- Root key (encrypted)
- BIP39 mnemonic (Type42 only)
- Identity name and metadata
- Signing keys for attestations
- Derivation path info (Type42)
Next Steps
After creating an identity:
- Use
manage-bap-backupskill to list members - Use
manage-bap-backupskill to export member identities - Use identity for signing attestations
- Publish identity to blockchain for on-chain reputation