# bap_generate

Generates a BAP HD master key AND derives the first identity key if no BAP keys (xprv or identityPk) exist. Saves keys to secure storage. Attempts on-chain registration using payPk (honors DISABLE_BROADCASTING). Optionally takes alternateName and description for the profile.

## Result

An MCP result containing the operation outcome as text, with structured content where supplied. Check isError before using it; an output schema is shown when registered.

## Permissions

This operation can change wallet, account or service state. A connected wallet applies its own permissions. Guarded broadcasts also require broadcasting to be enabled; service authorization is separate from wallet approval.

## Definition 1 (full)

Registered in: Legacy local wallet.

Generates a BAP HD master key AND derives the first identity key if no BAP keys (xprv or identityPk) exist. Saves keys to secure storage. Attempts on-chain registration using payPk (honors DISABLE_BROADCASTING). Optionally takes alternateName and description for the profile.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| alternateName | string | No | Alternate name for the BAP identity profile |  |
| description | string | No | Description for the BAP identity profile |  |

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "alternateName": {
      "description": "Alternate name for the BAP identity profile",
      "type": "string"
    },
    "description": {
      "description": "Description for the BAP identity profile",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

[All tools](https://bsvmcp.com/docs/tools)