# app_sweep_prepare

App-only: verify source transactions and prepare a sweep that preserves ordinals and token amounts. Source private keys remain in the browser.

## Result

A prepared sweep description; submission is a separate operation.

## Permissions

Requires the configured wallet or identity context. Wallet read permissions apply; this handler does not request a payment.

## Definition 1 (full)

Registered in: Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; External BRC-100 wallet; Local Vault + sponsor.

App-only: verify source transactions and prepare a sweep that preserves ordinals and token amounts. Source private keys remain in the browser.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| sweepType | "bsv" \| "ordinals" \| "bsv21" | Yes |  |  |
| inputs | array of object | Yes |  | minItems: 1; maxItems: 100 |
| inputs[].outpoint | string | Yes |  | pattern: "^[0-9a-f]{64}_[0-9]+$" |
| inputs[].satoshis | integer | Yes |  | minimum: -9007199254740991; maximum: 9007199254740991 |
| inputs[].lockingScript | string | Yes |  | pattern: "^(?:[0-9a-f]{2})+$" |

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "sweepType": {
      "type": "string",
      "enum": [
        "bsv",
        "ordinals",
        "bsv21"
      ]
    },
    "inputs": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "outpoint": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}_[0-9]+$"
          },
          "satoshis": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lockingScript": {
            "type": "string",
            "pattern": "^(?:[0-9a-f]{2})+$"
          }
        },
        "required": [
          "outpoint",
          "satoshis",
          "lockingScript"
        ]
      }
    }
  },
  "required": [
    "sweepType",
    "inputs"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

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