{
  "id": "p2wshaddr",
  "kind": "datatype",
  "status": "stable",
  "name": "Bitcoin P2WSH address (native SegWit, bc1q)",
  "doc": "Native SegWit address of the pay-to-witness-script-hash (P2WSH) type: witness version 0 with the 32-byte SHA-256 hash of a witness script (BIP 141), encoded with Bech32 (BIP 173). Mainnet addresses have the prefix bc1q and 62 characters, which tells them apart from 42-character P2WPKH addresses. Lower or upper case, never mixed. Testnet addresses (tb1q) are not matched.",
  "parent": "crypto_address",
  "is_pii": false,
  "categories": [
    "cryptocurrency"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^(?:bc1q[02-9ac-hj-np-z]{58}|BC1Q[02-9AC-HJ-NP-Z]{58})$",
  "checksum": "bech32",
  "examples": [
    {
      "value": "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3",
      "description": "P2WSH example of BIP 173",
      "valid": true
    },
    {
      "value": "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv4",
      "description": "last character changed, the checksum fails",
      "valid": false
    },
    {
      "value": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
      "description": "P2WPKH address (p2wpkhaddr)",
      "valid": false
    }
  ],
  "mappings": {
    "misp": "btc",
    "presidio": "CRYPTO",
    "stdnum": "bitcoin"
  },
  "links": [
    {
      "type": "doc",
      "url": "https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki"
    },
    {
      "type": "doc",
      "url": "https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki"
    }
  ],
  "translations": {
    "ru": {
      "name": "Адрес Bitcoin P2WSH (SegWit, bc1q)"
    }
  },
  "detected_by": {
    "tools": [
      "dataprep",
      "metacrafter",
      "openmetadata",
      "presidio",
      "pythonstdnum",
      "pywhat",
      "validatorjs"
    ],
    "metacrafter_rules": [
      {
        "rule": "p2wshaddr",
        "type": "data",
        "match": "ppr",
        "file": "common/cryptocurrency.yaml"
      },
      {
        "rule": "p2wshaddr_by_field",
        "type": "field",
        "match": "text",
        "file": "common/cryptocurrency.yaml"
      }
    ]
  },
  "quality": {
    "score": 93,
    "missing": [
      "second example"
    ]
  },
  "source": {
    "path": "data/datatypes/any/cryptocurrency/p2wshaddr.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/cryptocurrency/p2wshaddr.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/cryptocurrency/p2wshaddr.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/p2wshaddr",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/p2wshaddr.json"
  }
}