Bitcoin P2WSH address (native SegWit, bc1q)
ID p2wshaddr
DatatypeNot PIIidentifier
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 datatype
- Cryptocurrency address
crypto_address - Categories
- Cryptocurrency
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- MISP attribute type
btc- Presidio
CRYPTO- python-stdnum
stdnum.bitcoin- Check digit
bech32- Quality
- 93/100 · missing: second example
- Metacrafter rules
- 2 rules (1 by field name, 1 by value)
p2wshaddrdata, common/cryptocurrency.yamlp2wshaddr_by_fieldfield, common/cryptocurrency.yaml
- Supported by tools
- DataPrep, metacrafter, OpenMetadata auto-classification, Microsoft Presidio, python-stdnum, pyWhat, validator.js
Regular expression
^(?:bc1q[02-9ac-hj-np-z]{58}|BC1Q[02-9AC-HJ-NP-Z]{58})$
Python re syntax.
Test a value
Examples
| Value | Description |
|---|---|
| bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3 | P2WSH example of BIP 173 |
| bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv4 invalid | last character changed, the checksum fails |
| bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 invalid | P2WPKH address (p2wpkhaddr) |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Адрес Bitcoin P2WSH (SegWit, bc1q) |
Sources
- doc: github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
- doc: github.com/bitcoin/bips/blob/master/bip-0141.mediawiki
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/p2wshaddr - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/cryptocurrency/p2wshaddr.yamlon GitHub