← BSV MCPInstall
Wallet

wallet_sweepBsv21

Sweep BSV21 tokens from an external WIF private key into the wallet

Read as Markdown

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.

Inputs and availability

Full catalog · Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; External BRC-100 wallet; Local Vault + sponsor

FieldType / requiredDescription
inputsarray of object
Required
Token UTXOs to sweep (must all be same tokenId)
inputs[].outpointstring
Required
Outpoint (txid_vout)
inputs[].satoshisinteger
Required
Satoshis (should be 1)

minimum: -9007199254740991; maximum: 9007199254740991

inputs[].lockingScriptstring
Required
Locking script hex
inputs[].tokenIdstring
Required
Token ID (txid_vout format)
inputs[].amountstring
Required
Token amount as string
wifstring
Required
WIF private key controlling the inputs

Nested fields are required only when their parent object or array item is supplied.

Full input schema
{
  "type": "object",
  "properties": {
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "outpoint": {
            "type": "string",
            "description": "Outpoint (txid_vout)"
          },
          "satoshis": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Satoshis (should be 1)"
          },
          "lockingScript": {
            "type": "string",
            "description": "Locking script hex"
          },
          "tokenId": {
            "type": "string",
            "description": "Token ID (txid_vout format)"
          },
          "amount": {
            "type": "string",
            "description": "Token amount as string"
          }
        },
        "required": [
          "outpoint",
          "satoshis",
          "lockingScript",
          "tokenId",
          "amount"
        ]
      },
      "description": "Token UTXOs to sweep (must all be same tokenId)"
    },
    "wif": {
      "type": "string",
      "description": "WIF private key controlling the inputs"
    }
  },
  "required": [
    "inputs",
    "wif"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}