Loading...
Loading...
Critical Bitcoin terminology rules to prevent confusion between bech32m (encoding) and taproot (address type). Use when working on BTC-related code, config files, or shell scripts.
npx skill4agent add hiromaily/go-crypto-wallet btc-terminology| Term | What It Is | Where Used |
|---|---|---|
| bech32m | Encoding format (HOW address is serialized) | Bitcoin Core RPC, shell scripts |
| taproot | Address type (WHAT the address represents) | Config files, domain model |
bech32mtaproot| Context | Correct Term | Example |
|---|---|---|
| Config YAML/TOML files | | |
| Environment variables | | |
| Bitcoin Core CLI/RPC | | |
| Shell scripts (receiver addresses) | | |
Go domain code ( | | |
Go Bitcoin Core interface ( | | |
# Config file - DON'T use bech32m
address_type: "bech32m" # WRONG!# Shell script - DON'T use taproot for Bitcoin Core RPC
bitcoin-cli getnewaddress "" taproot # WRONG!# Config file - Use taproot
address_type: "taproot" # CORRECT!# Shell script - Use bech32m for Bitcoin Core RPC
bitcoin-cli getnewaddress "" bech32m # CORRECT!| Encoding | SegWit Version | Address Type | Prefix | Config Value |
|---|---|---|---|---|
| Base58 | N/A | P2PKH | | |
| Base58 | N/A | P2SH | | |
| Bech32 | v0 | P2WPKH | | |
| Bech32m | v1 | P2TR | | |
// internal/domain/bitcoin/address_type.go
// For Bitcoin Core RPC communication
AddressTypeTaproot AddressType = "bech32m" // Bitcoin Core uses "bech32m"
// internal/domain/address/types.go
// For user-facing configuration
AddrTypeTaproot AddrType = "taproot" // User sees "taproot"// internal/infrastructure/api/btc/btc/mapper.go
// FromAddressType: "bech32m" (Bitcoin Core) → "taproot" (user-facing)
// ToAddressType: "taproot" (user-facing) → "bech32m" (Bitcoin Core)address_type: "taproot"WALLET_ADDRESS_TYPE="taproot"bech32mbech32mAddrTypeTaproot"taproot"AddressTypeTaproot"bech32m"| File | Purpose |
|---|---|
| User-facing |
| Bitcoin Core |
| Type conversion functions |
| Taproot user guide |