Let's assume Alice has Bob's bech32 address (BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4).
After decoding the address Alice knows that the address has a
witness version of
20 bytes of a hash (
32 bytes would also be considered valid bytes).
Let's say Alice writes down the
20 hash bytes, but forgets what the
witness version was.
Can Alice still "send spendable funds" to Bob? Can Alice determine the original
witness version — e.g. by length of hash bytes? Could Alice determine the original
witness version if she knew the address type P2WPKH/P2WSH?
In BIP-173 the authors highlight the importance of the witness version:
Implementations should take special care when converting the address to a scriptPubkey, where witness version n is stored as OP_n. OP_0 is encoded as 0x00, but OP_1 through OP_16 are encoded as 0x51 though 0x60 (81 to 96 in decimal). If a bech32 address is converted to an incorrect scriptPubKey the result will likely be either unspendable or insecure.
Is my understanding of the bech32 address data correct here?