decode card_spawn protobuf message and validate it against deck.version
    :protobuf - bytes from op_return message
    :deck_version - integer

def parse_card_transfer_metainfo(protobuf: bytes, deck_version: int) -> dict:
    '''decode card_spawn protobuf message and validate it against deck.version
    :protobuf - bytes from op_return message
    :deck_version - integer
    '''

    card = CardTransferProto()
    card.ParseFromString(protobuf)

    if not card.version == deck_version:
        raise CardVersionMismatch({'error': 'card version does not match deck version.'})

    return {
        "version": card.version,
        "number_of_decimals": card.number_of_decimals,
        "amount": list(card.amount),
        "asset_specific_data": card.asset_specific_data
    }