pubkey_to_address
Convert a public key hex string to a Bitcoin address, supporting P2PKH, P2SH, P2WPKH, and P2WSH formats.
Instructions
Convert a public key to an address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pubkey | Yes | Public key as a hex string (33 or 65 bytes). | |
| address_type | No | Address type - "p2pkh", "p2sh", "p2wpkh", or "p2wsh". | p2pkh |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |