---
id: "p2pkhaddr"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["cryptocurrency"]
langs: ["common"]
quality: 93
url: "http://registry.apicrafter.io/datatype/p2pkhaddr"
---

# Bitcoin P2PKH address (`p2pkhaddr`)

Legacy Bitcoin address of the pay-to-public-key-hash (P2PKH) type. It is the Base58Check encoding of the version byte 0 and the 20-byte RIPEMD-160 hash of the SHA-256 hash of a public key, so it always starts with 1. Most such addresses have 33 or 34 characters; each leading zero byte of the hash adds a 1 and makes the address shorter. Testnet P2PKH addresses start with m or n and are not matched.

- Parent datatype: `crypto_address`
- Personal data (PII): no
- Categories: Cryptocurrency (cryptocurrency)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^1[1-9A-HJ-NP-Za-km-z]{25,33}$
```

Check digit algorithm: `base58check`

## Examples

- `1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs` — Address derived step by step in the Bitcoin Wiki article on version 1 addresses
- `1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2` — Example address of the Bitcoin Wiki article on invoice addresses
- `1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAt` (invalid example) — last character changed, the checksum fails
- `3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy` (invalid example) — P2SH address (p2shaddr)

## Mappings

- autotype: `bitcoin`
- presidio: `CRYPTO`
- stdnum: `bitcoin`

## Metacrafter rules

2 rules: 1 match the field name, 1 match values.

- `p2pkhaddr` (data, `common/cryptocurrency.yaml`)
- `p2pkhaddr_by_field` (field, `common/cryptocurrency.yaml`)

## Supported by tools

- `autotype`
- `dataprep`
- `greatexpectations`
- `metacrafter`
- `openmetadata`
- `presidio`
- `pythonstdnum`

## Translations

- ru: Адрес Bitcoin P2PKH

## Sources

- other: <https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses>
- other: <https://en.bitcoin.it/wiki/Invoice_address>

## Quality

Score 93/100. Missing: authoritative source link.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/p2pkhaddr.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/cryptocurrency/p2pkhaddr.yaml>
