Segwit address validate

segwit-address-validate · version 1.0.0 · Encoding & checksums · free, no key needed

Validate a native segwit address and report which Bech32 or Bech32m rule failed.

Use when you need to: validate native segwit address · check segwit address checksum variant · check witness program length rules.

Decide before calling

Read the versioned contract and the supported scope below. Reuse segwit-address-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use segwit-address-validate@1.0.0 for validate native segwit address. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "address": "BC1SW50QGDZ25J",
  "expected_hrp": "bc"
}

Response:

{
  "result": {
    "valid": true,
    "encoding": "bech32m",
    "witness_version": 16,
    "program_length": 2
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "segwit-address-validate",
  "version": "1.0.0",
  "input": {
    "address": "BC1SW50QGDZ25J",
    "expected_hrp": "bc"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/segwit-address-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"address":"BC1SW50QGDZ25J","expected_hrp":"bc"}'

The machine-readable contract is at /v1/tools/segwit-address-validate/versions/1.0.0.

CLI

node cli.mjs run segwit-address-validate 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.