def priv_ver_to_pub_ver
      case version
        when Bitcoin.chain_params.bip49_privkey_p2wpkh_p2sh_version
          Bitcoin.chain_params.bip49_pubkey_p2wpkh_p2sh_version
        when Bitcoin.chain_params.bip84_privkey_p2wpkh_version
          Bitcoin.chain_params.bip84_pubkey_p2wpkh_version
        else
          Bitcoin.chain_params.extended_pubkey_version
      end
    end
def priv_ver_to_pub_ver
      case version
        when Bitcoin.chain_params.bip49_privkey_p2wpkh_p2sh_version
          Bitcoin.chain_params.bip49_pubkey_p2wpkh_p2sh_version
        when Bitcoin.chain_params.bip84_privkey_p2wpkh_version
          Bitcoin.chain_params.bip84_pubkey_p2wpkh_version
        else
          Bitcoin.chain_params.extended_pubkey_version
      end
    end
convert privkey version to pubkey version