{
  "id": "p2wpkhaddr",
  "kind": "datatype",
  "status": "stable",
  "name": "Bitcoin P2WPKH address (native SegWit, bc1q)",
  "doc": "Native SegWit address of the pay-to-witness-public-key-hash (P2WPKH) type: witness version 0 with a 20-byte public key hash (BIP 141), encoded with Bech32 (BIP 173). Mainnet addresses have the prefix bc1q and 42 characters. They are written in lower case, or in upper case in QR codes, but never in mixed case. 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]{38}|BC1Q[02-9AC-HJ-NP-Z]{38})$",
  "checksum": "bech32",
  "examples": [
    {
      "value": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
      "description": "P2WPKH example of BIP 173",
      "valid": true
    },
    {
      "value": "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4",
      "description": "The same address in upper case (BIP 173 test vector)",
      "valid": true
    },
    {
      "value": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
      "description": "Example address of the Bitcoin Wiki article on invoice addresses",
      "valid": true
    },
    {
      "value": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t5",
      "description": "last character changed, the checksum fails",
      "valid": false
    },
    {
      "value": "bc1qW508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
      "description": "mixed case is not allowed",
      "valid": false
    }
  ],
  "mappings": {
    "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 P2WPKH (SegWit, bc1q)"
    }
  },
  "detected_by": {
    "tools": [
      "dataprep",
      "greatexpectations",
      "metacrafter",
      "openmetadata",
      "presidio",
      "pythonstdnum"
    ],
    "metacrafter_rules": [
      {
        "rule": "p2wpkhaddr",
        "type": "data",
        "match": "ppr",
        "file": "common/cryptocurrency.yaml"
      },
      {
        "rule": "p2wpkhaddr_by_field",
        "type": "field",
        "match": "text",
        "file": "common/cryptocurrency.yaml"
      }
    ]
  },
  "quality": {
    "score": 100,
    "missing": []
  },
  "source": {
    "path": "data/datatypes/any/cryptocurrency/p2wpkhaddr.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/cryptocurrency/p2wpkhaddr.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/cryptocurrency/p2wpkhaddr.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/p2wpkhaddr",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/p2wpkhaddr.json"
  }
}